Ejemplo n.º 1
0
 public PrinterFuncWrapper(Gtk.PrinterFunc managed)
 {
     this.managed = managed;
     if (managed != null)
     {
         NativeDelegate = new PrinterFuncNative(NativeCallback);
     }
 }
Ejemplo n.º 2
0
        public static void EnumeratePrinters(Gtk.PrinterFunc func, bool wait)
        {
            GtkSharp.PrinterFuncWrapper func_wrapper;
            IntPtr func_data;

            GLib.DestroyNotify destroy;
            if (func == null)
            {
                func_wrapper = null;
                func_data    = IntPtr.Zero;
                destroy      = null;
            }
            else
            {
                func_wrapper = new GtkSharp.PrinterFuncWrapper(func);
                func_data    = (IntPtr)GCHandle.Alloc(func_wrapper);
                destroy      = GLib.DestroyHelper.NotifyHandler;
            }
            gtk_enumerate_printers(func_wrapper.NativeDelegate, func_data, destroy, wait);
        }
		public PrinterFuncWrapper (Gtk.PrinterFunc managed)
		{
			this.managed = managed;
			if (managed != null)
				NativeDelegate = new PrinterFuncNative (NativeCallback);
		}