1 | /* GTK - The GIMP 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, see <http://www.gnu.org/licenses/>. |
17 | */ |
18 | |
19 | #ifndef __GTK_PRINTER_OPTION_SET_H__ |
20 | #define __GTK_PRINTER_OPTION_SET_H__ |
21 | |
22 | /* This is a "semi-private" header; it is meant only for |
23 | * alternate GtkPrintDialog backend modules; no stability guarantees |
24 | * are made at this point |
25 | */ |
26 | #ifndef GTK_PRINT_BACKEND_ENABLE_UNSUPPORTED |
27 | #error "GtkPrintBackend is not supported API for general use" |
28 | #endif |
29 | |
30 | #include <glib-object.h> |
31 | #include <gdk/gdk.h> |
32 | #include "gtkprinteroption.h" |
33 | |
34 | G_BEGIN_DECLS |
35 | |
36 | #define GTK_TYPE_PRINTER_OPTION_SET (gtk_printer_option_set_get_type ()) |
37 | #define GTK_PRINTER_OPTION_SET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_PRINTER_OPTION_SET, GtkPrinterOptionSet)) |
38 | #define GTK_IS_PRINTER_OPTION_SET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_PRINTER_OPTION_SET)) |
39 | |
40 | typedef struct _GtkPrinterOptionSet GtkPrinterOptionSet; |
41 | typedef struct _GtkPrinterOptionSetClass GtkPrinterOptionSetClass; |
42 | |
43 | struct _GtkPrinterOptionSet |
44 | { |
45 | GObject parent_instance; |
46 | |
47 | /*< private >*/ |
48 | GPtrArray *array; |
49 | GHashTable *hash; |
50 | }; |
51 | |
52 | struct _GtkPrinterOptionSetClass |
53 | { |
54 | GObjectClass parent_class; |
55 | |
56 | void (*changed) (GtkPrinterOptionSet *option); |
57 | |
58 | |
59 | /* Padding for future expansion */ |
60 | void (*_gtk_reserved1) (void); |
61 | void (*_gtk_reserved2) (void); |
62 | void (*_gtk_reserved3) (void); |
63 | void (*_gtk_reserved4) (void); |
64 | }; |
65 | |
66 | typedef void (*GtkPrinterOptionSetFunc) (GtkPrinterOption *option, |
67 | gpointer user_data); |
68 | |
69 | |
70 | GDK_AVAILABLE_IN_ALL |
71 | GType gtk_printer_option_set_get_type (void) G_GNUC_CONST; |
72 | |
73 | GDK_AVAILABLE_IN_ALL |
74 | GtkPrinterOptionSet *gtk_printer_option_set_new (void); |
75 | GDK_AVAILABLE_IN_ALL |
76 | void gtk_printer_option_set_add (GtkPrinterOptionSet *set, |
77 | GtkPrinterOption *option); |
78 | GDK_AVAILABLE_IN_ALL |
79 | void gtk_printer_option_set_remove (GtkPrinterOptionSet *set, |
80 | GtkPrinterOption *option); |
81 | GDK_AVAILABLE_IN_ALL |
82 | GtkPrinterOption * gtk_printer_option_set_lookup (GtkPrinterOptionSet *set, |
83 | const char *name); |
84 | GDK_AVAILABLE_IN_ALL |
85 | void gtk_printer_option_set_foreach (GtkPrinterOptionSet *set, |
86 | GtkPrinterOptionSetFunc func, |
87 | gpointer user_data); |
88 | GDK_AVAILABLE_IN_ALL |
89 | void gtk_printer_option_set_clear_conflicts (GtkPrinterOptionSet *set); |
90 | GDK_AVAILABLE_IN_ALL |
91 | GList * gtk_printer_option_set_get_groups (GtkPrinterOptionSet *set); |
92 | GDK_AVAILABLE_IN_ALL |
93 | void gtk_printer_option_set_foreach_in_group (GtkPrinterOptionSet *set, |
94 | const char *group, |
95 | GtkPrinterOptionSetFunc func, |
96 | gpointer user_data); |
97 | |
98 | G_END_DECLS |
99 | |
100 | #endif /* __GTK_PRINTER_OPTION_SET_H__ */ |
101 | |