Exemplo n.º 1
0
 static void OverridePopupContextMenu(GLib.GType gtype, PopupContextMenuNativeDelegate callback)
 {
     unsafe {
         IntPtr *raw_ptr = (IntPtr *)(((long)gtype.GetClassPtr()) + (long)class_abi.GetFieldOffset("popup_context_menu"));
         *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate)callback);
     }
 }
Exemplo n.º 2
0
        private bool InternalPopupContextMenu(int x, int y, int button_number)
        {
            PopupContextMenuNativeDelegate unmanaged = class_abi.BaseOverride <PopupContextMenuNativeDelegate>(this.LookupGType(), "popup_context_menu");

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

            bool __result = unmanaged(this.Handle, x, y, button_number);

            return(__result);
        }
Exemplo n.º 3
0
        private bool InternalPopupContextMenu(int x, int y, int button_number)
        {
            PopupContextMenuNativeDelegate unmanaged = null;

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

            bool __result = unmanaged(this.Handle, x, y, button_number);

            return(__result);
        }
Exemplo n.º 4
0
		static void OverridePopupContextMenu (GLib.GType gtype, PopupContextMenuNativeDelegate callback)
		{
			GtkToolbarClass class_iface = GetClassStruct (gtype, false);
			class_iface.PopupContextMenu = callback;
			OverrideClassStruct (gtype, class_iface);
		}