public FileFilterFuncWrapper(Gtk.FileFilterFunc managed)
 {
     this.managed = managed;
     if (managed != null)
     {
         NativeDelegate = new FileFilterFuncNative(NativeCallback);
     }
 }
예제 #2
0
        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 FileFilterFuncWrapper (Gtk.FileFilterFunc managed)
		{
			this.managed = managed;
			if (managed != null)
				NativeDelegate = new FileFilterFuncNative (NativeCallback);
		}