Example #1
0
 static void OverrideSelectItem(GLib.GType gtype, SelectItemNativeDelegate callback)
 {
     unsafe {
         IntPtr *raw_ptr = (IntPtr *)(((long)gtype.GetClassPtr()) + (long)class_abi.GetFieldOffset("select_item"));
         *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate)callback);
     }
 }
Example #2
0
        private void InternalSelectItem(Gtk.Widget menu_item)
        {
            SelectItemNativeDelegate unmanaged = class_abi.BaseOverride <SelectItemNativeDelegate>(this.LookupGType(), "select_item");

            if (unmanaged == null)
            {
                return;
            }

            unmanaged(this.Handle, menu_item == null ? IntPtr.Zero : menu_item.Handle);
        }
Example #3
0
        private void InternalSelectItem(Gtk.Widget menu_item)
        {
            SelectItemNativeDelegate unmanaged = null;

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

            unmanaged(this.Handle, menu_item == null ? IntPtr.Zero : menu_item.Handle);
        }
Example #4
0
		static void OverrideSelectItem (GLib.GType gtype, SelectItemNativeDelegate callback)
		{
			gtksharp_menushell_override_select_item (gtype.GetClassPtr (), callback);
		}
Example #5
0
		static extern void gtksharp_menushell_override_select_item (IntPtr class_struct, SelectItemNativeDelegate cb);