static void OverrideCursorOnMatch(GLib.GType gtype, CursorOnMatchNativeDelegate callback) { unsafe { IntPtr *raw_ptr = (IntPtr *)(((long)gtype.GetClassPtr()) + (long)class_abi.GetFieldOffset("cursor_on_match")); *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate)callback); } }
private bool InternalCursorOnMatch(Gtk.ITreeModel model, Gtk.TreeIter iter) { CursorOnMatchNativeDelegate unmanaged = class_abi.BaseOverride <CursorOnMatchNativeDelegate>(this.LookupGType(), "cursor_on_match"); if (unmanaged == null) { return(false); } IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc(iter); bool __result = unmanaged(this.Handle, model == null ? IntPtr.Zero : ((model is GLib.Object) ? (model as GLib.Object).Handle : (model as Gtk.TreeModelAdapter).Handle), native_iter); Marshal.FreeHGlobal(native_iter); return(__result); }
private bool InternalCursorOnMatch(Gtk.ITreeModel model, Gtk.TreeIter iter) { CursorOnMatchNativeDelegate unmanaged = null; unsafe { IntPtr *raw_ptr = (IntPtr *)(((long)this.LookupGType().GetThresholdType().GetClassPtr()) + (long)class_abi.GetFieldOffset("cursor_on_match")); unmanaged = (CursorOnMatchNativeDelegate)Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(CursorOnMatchNativeDelegate)); } if (unmanaged == null) { return(false); } IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc(iter); bool __result = unmanaged(this.Handle, model == null ? IntPtr.Zero : ((model is GLib.Object) ? (model as GLib.Object).Handle : (model as Gtk.TreeModelAdapter).Handle), native_iter); Marshal.FreeHGlobal(native_iter); return(__result); }