コード例 #1
0
 static void OverrideButtonReleaseEvent(GLib.GType gtype, ButtonReleaseEventNativeDelegate callback)
 {
     unsafe {
         IntPtr *raw_ptr = (IntPtr *)(((long)gtype.GetClassPtr()) + (long)class_abi.GetFieldOffset("button_release_event"));
         *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate)callback);
     }
 }
コード例 #2
0
        private bool InternalButtonReleaseEvent(Gdk.EventButton evnt)
        {
            ButtonReleaseEventNativeDelegate unmanaged = class_abi.BaseOverride <ButtonReleaseEventNativeDelegate>(this.LookupGType(), "button_release_event");

            if (unmanaged == null)
            {
                return(false);
            }

            bool __result = unmanaged(this.Handle, evnt == null ? IntPtr.Zero : evnt.Handle);

            return(__result);
        }
コード例 #3
0
        private bool InternalButtonReleaseEvent(Gdk.EventButton evnt)
        {
            ButtonReleaseEventNativeDelegate unmanaged = null;

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

            bool __result = unmanaged(this.Handle, evnt == null ? IntPtr.Zero : evnt.Handle);

            return(__result);
        }
コード例 #4
0
ファイル: StatusIcon.cs プロジェクト: akrisiun/gtk-sharp
		static void OverrideButtonReleaseEvent (GLib.GType gtype, ButtonReleaseEventNativeDelegate callback)
		{
			GtkStatusIconClass class_iface = GetClassStruct (gtype, false);
			class_iface.ButtonReleaseEvent = callback;
			OverrideClassStruct (gtype, class_iface);
		}