Synopsis
#include <gtk/gtk.h>
GtkPrinter;
GtkPrintBackend;
GtkPrinter* gtk_printer_new (const gchar *name,
GtkPrintBackend *backend,
gboolean virtual_);
GtkPrintBackend* gtk_printer_get_backend (GtkPrinter *printer);
const gchar* gtk_printer_get_name (GtkPrinter *printer);
const gchar* gtk_printer_get_state_message (GtkPrinter *printer);
const gchar* gtk_printer_get_description (GtkPrinter *printer);
const gchar* gtk_printer_get_location (GtkPrinter *printer);
const gchar* gtk_printer_get_icon_name (GtkPrinter *printer);
gint gtk_printer_get_job_count (GtkPrinter *printer);
gboolean gtk_printer_is_active (GtkPrinter *printer);
gboolean gtk_printer_is_paused (GtkPrinter *printer);
gboolean gtk_printer_is_accepting_jobs (GtkPrinter *printer);
gboolean gtk_printer_is_virtual (GtkPrinter *printer);
gboolean gtk_printer_is_default (GtkPrinter *printer);
gboolean gtk_printer_accepts_ps (GtkPrinter *printer);
gboolean gtk_printer_accepts_pdf (GtkPrinter *printer);
GList* gtk_printer_list_papers (GtkPrinter *printer);
gint gtk_printer_compare (GtkPrinter *a,
GtkPrinter *b);
gboolean gtk_printer_has_details (GtkPrinter *printer);
void gtk_printer_request_details (GtkPrinter *printer);
GtkPrintCapabilities gtk_printer_get_capabilities (GtkPrinter *printer);
GtkPageSetup* gtk_printer_get_default_page_size (GtkPrinter *printer);
gboolean (*GtkPrinterFunc) (GtkPrinter *printer,
gpointer data);
void gtk_enumerate_printers (GtkPrinterFunc func,
gpointer data,
GDestroyNotify destroy,
gboolean wait);
Properties"accepting-jobs" gboolean : Read "accepts-pdf" gboolean : Read / Write / Construct Only "accepts-ps" gboolean : Read / Write / Construct Only "backend" GtkPrintBackend* : Read / Write / Construct Only "icon-name" gchar* : Read "is-virtual" gboolean : Read / Write / Construct Only "job-count" gint : Read "location" gchar* : Read "name" gchar* : Read / Write / Construct Only "paused" gboolean : Read "state-message" gchar* : Read DescriptionA GtkPrinter object represents a printer. You only need to deal directly with printers if you use the non-portable GtkPrintUnixDialog API. A GtkPrinter allows to get status information about the printer, such as its description, its location, the number of queued jobs, etc. Most importantly, a GtkPrinter object can be used to create a GtkPrintJob object, which lets you print to the printer. Printing support was added in GTK+ 2.10. Detailsgtk_printer_new ()GtkPrinter* gtk_printer_new (const gchar *name, GtkPrintBackend *backend, gboolean virtual_); Creates a new GtkPrinter.
Since 2.10 gtk_printer_get_backend ()GtkPrintBackend* gtk_printer_get_backend (GtkPrinter *printer); Returns the backend of the printer.
Since 2.10 gtk_printer_get_name ()const gchar* gtk_printer_get_name (GtkPrinter *printer); Returns the name of the printer.
Since 2.10 gtk_printer_get_state_message ()const gchar* gtk_printer_get_state_message (GtkPrinter *printer); Returns the state message describing the current state of the printer.
Since 2.10 gtk_printer_get_description ()const gchar* gtk_printer_get_description (GtkPrinter *printer); Gets the description of the printer.
Since 2.10 gtk_printer_get_location ()const gchar* gtk_printer_get_location (GtkPrinter *printer); Returns a description of the location of the printer.
Since 2.10 gtk_printer_get_icon_name ()const gchar* gtk_printer_get_icon_name (GtkPrinter *printer); Gets the name of the icon to use for the printer.
Since 2.10 gtk_printer_get_job_count ()gint gtk_printer_get_job_count (GtkPrinter *printer); Gets the number of jobs currently queued on the printer.
Since 2.10 gtk_printer_is_active ()gboolean gtk_printer_is_active (GtkPrinter *printer); Returns whether the printer is currently active (i.e. accepts new jobs).
Since 2.10 gtk_printer_is_paused ()gboolean gtk_printer_is_paused (GtkPrinter *printer); Returns whether the printer is currently paused. A paused printer still accepts jobs, but it is not printing them.
Since 2.14 gtk_printer_is_accepting_jobs ()gboolean gtk_printer_is_accepting_jobs (GtkPrinter *printer); Returns whether the printer is accepting jobs
Since 2.14 gtk_printer_is_virtual ()gboolean gtk_printer_is_virtual (GtkPrinter *printer); Returns whether the printer is virtual (i.e. does not represent actual printer hardware, but something like a CUPS class).
Since 2.10 gtk_printer_is_default ()gboolean gtk_printer_is_default (GtkPrinter *printer); Returns whether the printer is the default printer.
Since 2.10 gtk_printer_accepts_ps ()gboolean gtk_printer_accepts_ps (GtkPrinter *printer); Returns whether the printer accepts input in PostScript format.
Since 2.10 gtk_printer_accepts_pdf ()gboolean gtk_printer_accepts_pdf (GtkPrinter *printer); Returns whether the printer accepts input in PDF format.
Since 2.10 gtk_printer_list_papers ()GList* gtk_printer_list_papers (GtkPrinter *printer);
Lists all the paper sizes
Since 2.12 gtk_printer_compare ()gint gtk_printer_compare (GtkPrinter *a, GtkPrinter *b); Compares two printers.
Since 2.10 gtk_printer_has_details ()gboolean gtk_printer_has_details (GtkPrinter *printer); Returns whether the printer details are available.
Since 2.12 gtk_printer_request_details ()void gtk_printer_request_details (GtkPrinter *printer);
Requests the printer details. When the details are available,
the "details-acquired" signal will be emitted on
Since 2.12 gtk_printer_get_capabilities ()GtkPrintCapabilities gtk_printer_get_capabilities (GtkPrinter *printer); Returns the printer's capabilities. This is useful when you're using GtkPrintUnixDialog's manual-capabilities setting and need to know which settings the printer can handle and which you must handle yourself.
This will return 0 unless the printer's details are available, see
Since 2.12 gtk_printer_get_default_page_size ()GtkPageSetup* gtk_printer_get_default_page_size (GtkPrinter *printer);
Returns default page size of
Since 2.13 GtkPrinterFunc ()gboolean (*GtkPrinterFunc) (GtkPrinter *printer, gpointer data);
The type of function passed to
gtk_enumerate_printers ()void gtk_enumerate_printers (GtkPrinterFunc func, gpointer data, GDestroyNotify destroy, gboolean wait);
Calls a function for all GtkPrinters.
If
Since 2.10 Property DetailsThe
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
the GtkPrinter on which the signal is emitted |
|
TRUE if the details were successfully acquired
|
|
user data set when the signal handler was connected. |
Since 2.10