示例#1
0
 static void OverrideMatchSelected(GLib.GType gtype, MatchSelectedNativeDelegate callback)
 {
     unsafe {
         IntPtr *raw_ptr = (IntPtr *)(((long)gtype.GetClassPtr()) + (long)class_abi.GetFieldOffset("match_selected"));
         *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate)callback);
     }
 }
示例#2
0
        private bool InternalMatchSelected(Gtk.ITreeModel model, Gtk.TreeIter iter)
        {
            MatchSelectedNativeDelegate unmanaged = class_abi.BaseOverride <MatchSelectedNativeDelegate>(this.LookupGType(), "match_selected");

            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);
        }
示例#3
0
        private bool InternalMatchSelected(Gtk.ITreeModel model, Gtk.TreeIter iter)
        {
            MatchSelectedNativeDelegate unmanaged = null;

            unsafe {
                IntPtr *raw_ptr = (IntPtr *)(((long)this.LookupGType().GetThresholdType().GetClassPtr()) + (long)class_abi.GetFieldOffset("match_selected"));
                unmanaged = (MatchSelectedNativeDelegate)Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(MatchSelectedNativeDelegate));
            }
            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);
        }