public MenuTracker(Gtk.MenuTrackerItem item, string link_name, bool merge_sections, bool mac_os_mode, Gtk.MenuTrackerInsertFunc insert_func, Gtk.MenuTrackerRemoveFunc remove_func) { IntPtr native_link_name = GLib.Marshaller.StringToPtrGStrdup(link_name); GtkSharp.MenuTrackerInsertFuncWrapper insert_func_wrapper = new GtkSharp.MenuTrackerInsertFuncWrapper(insert_func); GtkSharp.MenuTrackerRemoveFuncWrapper remove_func_wrapper = new GtkSharp.MenuTrackerRemoveFuncWrapper(remove_func); Raw = gtk_menu_tracker_new_for_item_link(item == null ? IntPtr.Zero : item.Handle, native_link_name, merge_sections, mac_os_mode, insert_func_wrapper.NativeDelegate, remove_func_wrapper.NativeDelegate, IntPtr.Zero); GLib.Marshaller.Free(native_link_name); }
void InvokeNative(Gtk.MenuTrackerItem item, int position) { native_cb(item == null ? IntPtr.Zero : item.Handle, position, __data); }