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); } }
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); }
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); }
static void OverrideSelectItem (GLib.GType gtype, SelectItemNativeDelegate callback) { gtksharp_menushell_override_select_item (gtype.GetClassPtr (), callback); }
static extern void gtksharp_menushell_override_select_item (IntPtr class_struct, SelectItemNativeDelegate cb);