def _bind(self, src: GObject, src_prop: str, dst: GObject.GObject, dst_prop: str, bidirectional: bool = True, invert: bool = False) -> GObject.Binding: flags = GObject.BindingFlags.SYNC_CREATE if bidirectional: flags |= GObject.BindingFlags.BIDIRECTIONAL if invert: flags |= GObject.BindingFlags.INVERT_BOOLEAN return src.bind_property(src_prop, dst, dst_prop, flags)