public RecentFilterFuncWrapper(Gtk.RecentFilterFunc managed)
 {
     this.managed = managed;
     if (managed != null)
     {
         NativeDelegate = new RecentFilterFuncNative(NativeCallback);
     }
 }
Exemplo n.º 2
0
        public void AddCustom(Gtk.RecentFilterFlags needed, Gtk.RecentFilterFunc func)
        {
            GtkSharp.RecentFilterFuncWrapper func_wrapper = new GtkSharp.RecentFilterFuncWrapper(func);
            IntPtr data;

            GLib.DestroyNotify data_destroy;
            if (func == null)
            {
                data         = IntPtr.Zero;
                data_destroy = null;
            }
            else
            {
                data         = (IntPtr)GCHandle.Alloc(func_wrapper);
                data_destroy = GLib.DestroyHelper.NotifyHandler;
            }
            gtk_recent_filter_add_custom(Handle, (int)needed, func_wrapper.NativeDelegate, data, data_destroy);
        }