static void OverrideVisible(GLib.GType gtype, VisibleNativeDelegate callback)
 {
     unsafe {
         IntPtr *raw_ptr = (IntPtr *)(((long)gtype.GetClassPtr()) + (long)class_abi.GetFieldOffset("visible"));
         *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate)callback);
     }
 }
        private bool InternalVisible(Gtk.ITreeModel child_model, Gtk.TreeIter iter)
        {
            VisibleNativeDelegate unmanaged = null;

            unsafe {
                IntPtr *raw_ptr = (IntPtr *)(((long)this.LookupGType().GetThresholdType().GetClassPtr()) + (long)class_abi.GetFieldOffset("visible"));
                unmanaged = (VisibleNativeDelegate)Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(VisibleNativeDelegate));
            }
            if (unmanaged == null)
            {
                return(false);
            }

            IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc(iter);
            bool   __result    = unmanaged(this.Handle, child_model == null ? IntPtr.Zero : ((child_model is GLib.Object) ? (child_model as GLib.Object).Handle : (child_model as Gtk.TreeModelAdapter).Handle), native_iter);

            Marshal.FreeHGlobal(native_iter);
            return(__result);
        }
Esempio n. 3
0
		static void OverrideVisible (GLib.GType gtype, VisibleNativeDelegate callback)
		{
			GtkTreeModelFilterClass class_iface = GetClassStruct (gtype, false);
			class_iface.Visible = callback;
			OverrideClassStruct (gtype, class_iface);
		}