f284492006-08-03Lance Dillon /* -*-C -*- */
d007812006-10-31Martin Nilsson require gtk210;
f284492006-08-03Lance Dillon class GTK2.Printer; inherit G.Object; //! A GTK2.Printer object represents a printer. You only need to deal //! directly with printers if you use the non-portable GTK2.PrintUnixDialog API. //! Properties: //! int accepts-pdf //! int accepts-ps //! GTK2.PrintBackend backend //! string icon-name //! int is-virtual //! int job-count //! string location //! string name //! string state-message signal details_acquired; void create(mapping(string:mixed)|string props_or_name, GTK2.PrintBackend|void backend, int|void virtual) //! Create a new GTK2.Printer. { pgtk2_verify_not_inited(); pgtk2_verify_setup(); if (args==1) { INIT_WITH_PROPS(GTK_TYPE_PRINTER); pgtk2_pop_n_elems(args); } else { GtkPrinter *gp; gchar *name; int virtual; struct object *o1; get_all_args("create",args,"%s%o%i",&name,&o1,&virtual); gp=gtk_printer_new(name,get_gobject(o1),virtual); pgtk2_pop_n_elems(args); THIS->obj=G_OBJECT(gp); } pgtk2__init_this_object(); } +GTK2.PrintBackend get_backend(); //! Returns the backend of the printer. string name get_name(); //! Returns the name of the printer. string get_state_message(); //! Returns the state message describing the current state of the printer. string get_description(); //! Gets the description of the printer. string get_location(); //! Returns a description of the location of the printer. string get_icon_name(); //! Gets the name of the icon to use for the printer. int get_job_count(); //! Gets the number of jobs currently queued on the printer. int is_active(); //! Returns whether the printer is currently active (i.e. accepts new jobs). int is_virtual(); //! Returns whether the printer is virtual (i.e. does not represent actual //! printer hardware, but something like a CUPS class). int is_default(); //! Returns whether the printer is the default printer. int accepts_ps(); //! Returns whether the printer accepts input in PostScript format. int accepts_pdf(); //! Returns whether the printer accepts input in PDF format. int compare(GTK2.Printer b); //! Compares two printers. endrequire;