]> Pileus Git - ~andy/gtk/blob - gtk/gtkprinter.h
Make gtk_printer_has_details() and gtk_printer_request_details() public.
[~andy/gtk] / gtk / gtkprinter.h
1 /* GtkPrinter 
2  * Copyright (C) 2006 John (J5) Palmieri <johnp@redhat.com>
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the
16  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17  * Boston, MA 02111-1307, USA.
18  */
19 #ifndef __GTK_PRINTER_H__
20 #define __GTK_PRINTER_H__
21
22 #include <glib-object.h>
23 #include <cairo.h>
24 #include <gtk/gtkprintsettings.h>
25 #include <gtk/gtkpagesetup.h>
26
27 G_BEGIN_DECLS
28
29 #define GTK_TYPE_PRINTER                  (gtk_printer_get_type ())
30 #define GTK_PRINTER(obj)                  (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_PRINTER, GtkPrinter))
31 #define GTK_PRINTER_CLASS(klass)          (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_PRINTER, GtkPrinterClass))
32 #define GTK_IS_PRINTER(obj)               (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_PRINTER))
33 #define GTK_IS_PRINTER_CLASS(klass)       (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_PRINTER))
34 #define GTK_PRINTER_GET_CLASS(obj)        (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_PRINTER, GtkPrinterClass))
35
36 typedef struct _GtkPrinter          GtkPrinter;
37 typedef struct _GtkPrinterClass     GtkPrinterClass;
38 typedef struct _GtkPrinterPrivate   GtkPrinterPrivate;
39 typedef struct _GtkPrintBackend     GtkPrintBackend;
40
41 struct _GtkPrintBackend;
42
43 struct _GtkPrinter
44 {
45   GObject parent_instance;
46
47   GtkPrinterPrivate *priv;
48 };
49
50 struct _GtkPrinterClass
51 {
52   GObjectClass parent_class;
53
54   void (*details_acquired) (GtkPrinter *printer, gboolean success);
55   
56   /* Padding for future expansion */
57   void (*_gtk_reserved1) (void);
58   void (*_gtk_reserved2) (void);
59   void (*_gtk_reserved3) (void);
60   void (*_gtk_reserved4) (void);
61   void (*_gtk_reserved5) (void);
62   void (*_gtk_reserved6) (void);
63   void (*_gtk_reserved7) (void);
64 };
65
66 GType                    gtk_printer_get_type          (void) G_GNUC_CONST;
67 GtkPrinter              *gtk_printer_new               (const gchar     *name,
68                                                         GtkPrintBackend *backend,
69                                                         gboolean         virtual_);
70 GtkPrintBackend         *gtk_printer_get_backend       (GtkPrinter      *printer);
71 G_CONST_RETURN gchar    *gtk_printer_get_name          (GtkPrinter      *printer);
72 G_CONST_RETURN gchar    *gtk_printer_get_state_message (GtkPrinter      *printer);
73 G_CONST_RETURN gchar    *gtk_printer_get_description   (GtkPrinter      *printer);
74 G_CONST_RETURN gchar    *gtk_printer_get_location      (GtkPrinter      *printer);
75 G_CONST_RETURN gchar    *gtk_printer_get_icon_name     (GtkPrinter      *printer);
76 gint                     gtk_printer_get_job_count     (GtkPrinter      *printer);
77 gboolean                 gtk_printer_is_active         (GtkPrinter      *printer);
78 gboolean                 gtk_printer_is_virtual        (GtkPrinter      *printer);
79 gboolean                 gtk_printer_is_default        (GtkPrinter      *printer);
80 gboolean                 gtk_printer_accepts_pdf       (GtkPrinter      *printer);
81 gboolean                 gtk_printer_accepts_ps        (GtkPrinter      *printer);
82 GList                   *gtk_printer_list_papers       (GtkPrinter      *printer);
83 gint                     gtk_printer_compare           (GtkPrinter *a,
84                                                         GtkPrinter *b);
85 gboolean                 gtk_printer_has_details       (GtkPrinter       *printer);
86 void                     gtk_printer_request_details   (GtkPrinter       *printer);
87
88 typedef gboolean (*GtkPrinterFunc) (GtkPrinter *printer,
89                                     gpointer    data);
90
91 void                     gtk_enumerate_printers        (GtkPrinterFunc   func,
92                                                         gpointer         data,
93                                                         GDestroyNotify   destroy,
94                                                         gboolean         wait);
95
96 G_END_DECLS
97
98 #endif /* __GTK_PRINTER_H__ */