]> Pileus Git - ~andy/gtk/blob - gtk/gtkprinteroptionset.h
8ba5e2574f92b00c68f70442c192be3cb29cbc59
[~andy/gtk] / gtk / gtkprinteroptionset.h
1 /* GTK - The GTK+ Toolkit
2  * gtkprinteroptionset.h: printer option set
3  * Copyright (C) 2006, Red Hat, Inc.
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the
17  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18  * Boston, MA 02111-1307, USA.
19  */
20
21 #ifndef __GTK_PRINTER_OPTION_SET_H__
22 #define __GTK_PRINTER_OPTION_SET_H__
23
24 /* This is a "semi-private" header; it is meant only for
25  * alternate GtkPrintDialog backend modules; no stability guarantees
26  * are made at this point
27  */
28 #ifndef GTK_PRINT_BACKEND_ENABLE_UNSUPPORTED
29 #error "GtkPrintBackend is not supported API for general use"
30 #endif
31
32 #include <glib-object.h>
33 #include "gtkprinteroption.h"
34
35 G_BEGIN_DECLS
36
37 #define GTK_TYPE_PRINTER_OPTION_SET             (gtk_printer_option_set_get_type ())
38 #define GTK_PRINTER_OPTION_SET(obj)             (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_PRINTER_OPTION_SET, GtkPrinterOptionSet))
39 #define GTK_IS_PRINTER_OPTION_SET(obj)          (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_PRINTER_OPTION_SET))
40
41 typedef struct _GtkPrinterOptionSet       GtkPrinterOptionSet;
42 typedef struct _GtkPrinterOptionSetClass  GtkPrinterOptionSetClass;
43
44 struct _GtkPrinterOptionSet
45 {
46   GObject parent_instance;
47
48   /*< private >*/
49   GPtrArray *array;
50   GHashTable *hash;
51 };
52
53 struct _GtkPrinterOptionSetClass
54 {
55   GObjectClass parent_class;
56
57   void (*changed) (GtkPrinterOptionSet *option);
58
59
60   /* Padding for future expansion */
61   void (*_gtk_reserved1) (void);
62   void (*_gtk_reserved2) (void);
63   void (*_gtk_reserved3) (void);
64   void (*_gtk_reserved4) (void);
65   void (*_gtk_reserved5) (void);
66   void (*_gtk_reserved6) (void);
67   void (*_gtk_reserved7) (void);
68 };
69
70 typedef void (*GtkPrinterOptionSetFunc) (GtkPrinterOption  *option,
71                                          gpointer           user_data);
72
73
74 GType   gtk_printer_option_set_get_type       (void) G_GNUC_CONST;
75
76 GtkPrinterOptionSet *gtk_printer_option_set_new              (void);
77 void                 gtk_printer_option_set_add              (GtkPrinterOptionSet     *set,
78                                                               GtkPrinterOption        *option);
79 void                 gtk_printer_option_set_remove           (GtkPrinterOptionSet     *set,
80                                                               GtkPrinterOption        *option);
81 GtkPrinterOption *   gtk_printer_option_set_lookup           (GtkPrinterOptionSet     *set,
82                                                               const char              *name);
83 void                 gtk_printer_option_set_foreach          (GtkPrinterOptionSet     *set,
84                                                               GtkPrinterOptionSetFunc  func,
85                                                               gpointer                 user_data);
86 void                 gtk_printer_option_set_clear_conflicts  (GtkPrinterOptionSet     *set);
87 GList *              gtk_printer_option_set_get_groups       (GtkPrinterOptionSet     *set);
88 void                 gtk_printer_option_set_foreach_in_group (GtkPrinterOptionSet     *set,
89                                                               const char              *group,
90                                                               GtkPrinterOptionSetFunc  func,
91                                                               gpointer                 user_data);
92
93 G_END_DECLS
94
95 #endif /* __GTK_PRINTER_OPTION_SET_H__ */