public void AddCustom(Gtk.FileFilterFlags needed, Gtk.FileFilterFunc func) { GtkSharp.FileFilterFuncWrapper func_wrapper = new GtkSharp.FileFilterFuncWrapper (func); IntPtr data; GLib.DestroyNotify notify; if (func == null) { data = IntPtr.Zero; notify = null; } else { data = (IntPtr) GCHandle.Alloc (func_wrapper); notify = GLib.DestroyHelper.NotifyHandler; } gtk_file_filter_add_custom(Handle, (int) needed, func_wrapper.NativeDelegate, data, notify); }
public void AddCustom(Gtk.FileFilterFlags needed, Gtk.FileFilterFunc func) { GtkSharp.FileFilterFuncWrapper func_wrapper = new GtkSharp.FileFilterFuncWrapper(func); IntPtr data; GLib.DestroyNotify notify; if (func == null) { data = IntPtr.Zero; notify = null; } else { data = (IntPtr)GCHandle.Alloc(func_wrapper); notify = GLib.DestroyHelper.NotifyHandler; } gtk_file_filter_add_custom(Handle, (int)needed, func_wrapper.NativeDelegate, data, notify); }