示例#1
0
 static void OverridePreActivate(GLib.GType gtype, PreActivateNativeDelegate callback)
 {
     unsafe {
         IntPtr *raw_ptr = (IntPtr *)(((long)gtype.GetClassPtr()) + (long)class_abi.GetFieldOffset("pre_activate"));
         *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate)callback);
     }
 }
示例#2
0
        private void InternalPreActivate(Gtk.Action action)
        {
            PreActivateNativeDelegate unmanaged = class_abi.BaseOverride <PreActivateNativeDelegate>(this.LookupGType(), "pre_activate");

            if (unmanaged == null)
            {
                return;
            }

            unmanaged(this.Handle, action == null ? IntPtr.Zero : action.Handle);
        }
示例#3
0
        private void InternalPreActivate(Gtk.Action action)
        {
            PreActivateNativeDelegate unmanaged = null;

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

            unmanaged(this.Handle, action == null ? IntPtr.Zero : action.Handle);
        }
示例#4
0
		static void OverridePreActivate (GLib.GType gtype, PreActivateNativeDelegate callback)
		{
			GtkUIManagerClass class_iface = GetClassStruct (gtype, false);
			class_iface.PreActivate = callback;
			OverrideClassStruct (gtype, class_iface);
		}
示例#5
0
		static void OverridePreActivate (GLib.GType gtype, PreActivateNativeDelegate callback)
		{
			OverrideVirtualMethod (gtype, "pre-activate", callback);
		}
示例#6
0
 static void OverridePreActivate(GLib.GType gtype, PreActivateNativeDelegate callback)
 {
     OverrideVirtualMethod(gtype, "pre-activate", callback);
 }