Debian Codegraph @

gtk/print/gtkprinteroptionset.c

raw symbols SCIP
1 /* GTK - The GIMP Toolkit
2 * gtkprintbackendprivate.h: Abstract printer backend interfaces
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 #include "config.h"cxx . . $ `<file>/build/config.h`/
20 #include <string.h>
21 #include <glib.h>
22
23 #include "gtkprinteroptionsetprivate.h"cxx . . $ `<file>/gtk/print/gtkprinteroptionsetprivate.h`/
24
25 /*****************************************
26 * GtkPrinterOptionSet *
27 *****************************************/
28
29 enumcxx . . $ $anonymous_type_ced1d50c2220e6d9_0# {
30 CHANGEDcxx . . $ CHANGED.,
31 LAST_SIGNALcxx . . $ LAST_SIGNAL.
32 };
33
34 static guintcxx . . $ guint# signalscxx . . $ signals.[LAST_SIGNALcxx . . $ LAST_SIGNAL.] = { 0 };
35
36 /* ugly side-effect of aliasing */
37 #undef gtk_printer_option_set
38
39 G_DEFINE_TYPEcxx . . $ `<external>/9567554376676449156/gtype.h:1834:9`! (GtkPrinterOptionSet, gtk_printer_option_set, G_TYPE_OBJECTcxx . . $ `<external>/9567554376676449156/gtype.h:189:9`!)
40
41 static void
42 gtk_printer_option_set_finalizecxx . . $ gtk_printer_option_set_finalize(6087475fa43034d3). (GObjectcxx . . $ GObject# *object)
43 {
44 GtkPrinterOptionSetcxx . . $ GtkPrinterOptionSet# *set = GTK_PRINTER_OPTION_SETcxx . . $ `gtk/print/gtkprinteroptionsetprivate.h:36:9`! (object);
45
46 g_hash_table_destroycxx . . $ g_hash_table_destroy(ce4eddf544b9218). (set->hashcxx . . $ _GtkPrinterOptionSet#hash.);
47 g_ptr_array_foreachcxx . . $ g_ptr_array_foreach(f6778d7be3ee67fe). (set->arraycxx . . $ _GtkPrinterOptionSet#array., (GFunccxx . . $ GFunc#)g_object_unrefcxx . . $ g_object_unref(5d22bdacc48458e8)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
48 g_ptr_array_freecxx . . $ g_ptr_array_free(fb5c4b2755cb4a51). (set->arraycxx . . $ _GtkPrinterOptionSet#array., TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!);
49
50 G_OBJECT_CLASScxx . . $ `<external>/1341695927569185362/gobject.h:61:9`! (gtk_printer_option_set_parent_class)->finalizecxx . . $ _GObjectClass#finalize. (object);
51 }
52
53 static void
54 gtk_printer_option_set_initcxx . . $ gtk_printer_option_set_init(811e3100464e6106). (GtkPrinterOptionSetcxx . . $ GtkPrinterOptionSet# *set)
55 {
56 set->arraycxx . . $ _GtkPrinterOptionSet#array. = g_ptr_array_newcxx . . $ g_ptr_array_new(61b5db61367ab387). ();
57 set->hashcxx . . $ _GtkPrinterOptionSet#hash. = g_hash_table_newcxx . . $ g_hash_table_new(444186de27d60923). (g_str_hashcxx . . $ g_str_hash(b11f534102b1ad6)., g_str_equalcxx . . $ g_str_equal(9148c8c3ff42c9d8).);
58 }
59
60 static void
61 gtk_printer_option_set_class_initcxx . . $ gtk_printer_option_set_class_init(eaf2d4887f285eb6). (GtkPrinterOptionSetClasscxx . . $ GtkPrinterOptionSetClass# *class)
62 {
63 GObjectClasscxx . . $ GObjectClass# *gobject_class = (GObjectClasscxx . . $ GObjectClass# *)class;
64
65 gobject_class->finalizecxx . . $ _GObjectClass#finalize. = gtk_printer_option_set_finalizecxx . . $ gtk_printer_option_set_finalize(6087475fa43034d3).;
66
67 signalscxx . . $ signals.[CHANGEDcxx . . $ CHANGED.] =
68 g_signal_newcxx . . $ g_signal_new(b0aa5e8090fb95c0). ("changed",
69 G_TYPE_FROM_CLASScxx . . $ `<external>/9567554376676449156/gtype.h:657:9`! (gobject_class),
70 G_SIGNAL_RUN_LASTcxx . . $ G_SIGNAL_RUN_LAST.,
71 G_STRUCT_OFFSETcxx . . $ `<external>/12741050725406041920/gmacros.h:1005:9`! (GtkPrinterOptionSetClass, changed),
72 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!,
73 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!,
74 G_TYPE_NONEcxx . . $ `<external>/9567554376676449156/gtype.h:72:9`!, 0);
75 }
76
77
78 static void
79 emit_changedcxx . . $ emit_changed(811e3100464e6106). (GtkPrinterOptionSetcxx . . $ GtkPrinterOptionSet# *set)
80 {
81 g_signal_emitcxx . . $ g_signal_emit(cc3f7c2ba1c6a182). (set, signalscxx . . $ signals.[CHANGEDcxx . . $ CHANGED.], 0);
82 }
83
84 GtkPrinterOptionSetcxx . . $ GtkPrinterOptionSet# *
85 gtk_printer_option_set_newcxx . . $ gtk_printer_option_set_new(4ec87ed2022f67f4). (void)
86 {
87 return g_object_newcxx . . $ g_object_new(8485fe61b4be4c78). (GTK_TYPE_PRINTER_OPTION_SETcxx . . $ `gtk/print/gtkprinteroptionsetprivate.h:35:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
88 }
89
90 void
91 gtk_printer_option_set_removecxx . . $ gtk_printer_option_set_remove(bb9b5aa2b946a679). (GtkPrinterOptionSetcxx . . $ GtkPrinterOptionSet# *set,
92 GtkPrinterOptioncxx . . $ GtkPrinterOption# *option)
93 {
94 int i;
95
96 for (i = 0; i < set->arraycxx . . $ _GtkPrinterOptionSet#array.->lencxx . . $ _GPtrArray#len.; i++)
97 {
98 if (g_ptr_array_indexcxx . . $ `<external>/13165152102340786875/garray.h:149:12`! (set->array, i) == option)
99 {
100 g_ptr_array_remove_indexcxx . . $ g_ptr_array_remove_index(1e8ea8549f363c82). (set->arraycxx . . $ _GtkPrinterOptionSet#array., i);
101 g_hash_table_removecxx . . $ g_hash_table_remove(453ebbf4abdbe50e). (set->hashcxx . . $ _GtkPrinterOptionSet#hash., option->namecxx . . $ _GtkPrinterOption#name.);
102 g_signal_handlers_disconnect_by_funccxx . . $ `<external>/15952772511652638895/gsignal.h:629:9`! (option, emit_changed, set);
103
104 g_object_unrefcxx . . $ g_object_unref(5d22bdacc48458e8). (option);
105 break;
106 }
107 }
108 }
109
110 void
111 gtk_printer_option_set_addcxx . . $ gtk_printer_option_set_add(bb9b5aa2b946a679). (GtkPrinterOptionSetcxx . . $ GtkPrinterOptionSet# *set,
112 GtkPrinterOptioncxx . . $ GtkPrinterOption# *option)
113 {
114 g_object_refcxx . . $ `<external>/1341695927569185362/gobject.h:533:9`! (option);
115
116 if (gtk_printer_option_set_lookupcxx . . $ gtk_printer_option_set_lookup(78e307abd94e35d1). (set, option->namecxx . . $ _GtkPrinterOption#name.))
117 gtk_printer_option_set_removecxx . . $ gtk_printer_option_set_remove(bb9b5aa2b946a679). (set, option);
118
119 g_ptr_array_addcxx . . $ g_ptr_array_add(3cd73f70a4ada9). (set->arraycxx . . $ _GtkPrinterOptionSet#array., option);
120 g_hash_table_insertcxx . . $ g_hash_table_insert(6a7c46015dd5ef26). (set->hashcxx . . $ _GtkPrinterOptionSet#hash., option->namecxx . . $ _GtkPrinterOption#name., option);
121 g_signal_connect_objectcxx . . $ g_signal_connect_object(567cfbe0c886a38e). (option, "changed", G_CALLBACKcxx . . $ `<external>/16473872192229286895/gclosure.h:73:9`! (emit_changed), set, G_CONNECT_SWAPPEDcxx . . $ G_CONNECT_SWAPPED.);
122 }
123
124 GtkPrinterOptioncxx . . $ GtkPrinterOption# *
125 gtk_printer_option_set_lookupcxx . . $ gtk_printer_option_set_lookup(78e307abd94e35d1). (GtkPrinterOptionSetcxx . . $ GtkPrinterOptionSet# *set,
126 const char *name)
127 {
128 gpointercxx . . $ gpointer# ptr;
129
130 ptr = g_hash_table_lookupcxx . . $ g_hash_table_lookup(8183d62c39a6a245). (set->hashcxx . . $ _GtkPrinterOptionSet#hash., name);
131
132 return GTK_PRINTER_OPTIONcxx . . $ `gtk/print/gtkprinteroptionprivate.h:35:9`! (ptr);
133 }
134
135 void
136 gtk_printer_option_set_clear_conflictscxx . . $ gtk_printer_option_set_clear_conflicts(811e3100464e6106). (GtkPrinterOptionSetcxx . . $ GtkPrinterOptionSet# *set)
137 {
138 gtk_printer_option_set_foreachcxx . . $ gtk_printer_option_set_foreach(acfbcc4cf8d7b9c7). (set,
139 (GtkPrinterOptionSetFunccxx . . $ GtkPrinterOptionSetFunc#)gtk_printer_option_clear_has_conflictcxx . . $ gtk_printer_option_clear_has_conflict(edefb8f20fe88fd9).,
140 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
141 }
142
143 /**
144 * gtk_printer_option_set_get_groups:
145 * @set: a `GtkPrinterOptionSet`
146 *
147 * Gets the groups in this set.
148 *
149 * Returns: (element-type utf8) (transfer full): a list of group names.
150 */
151 GListcxx . . $ GList# *
152 gtk_printer_option_set_get_groupscxx . . $ gtk_printer_option_set_get_groups(bacd2e2c216983af). (GtkPrinterOptionSetcxx . . $ GtkPrinterOptionSet# *set)
153 {
154 GtkPrinterOptioncxx . . $ GtkPrinterOption# *option;
155 GListcxx . . $ GList# *list = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
156 int i;
157
158 for (i = 0; i < set->arraycxx . . $ _GtkPrinterOptionSet#array.->lencxx . . $ _GPtrArray#len.; i++)
159 {
160 option = g_ptr_array_indexcxx . . $ `<external>/13165152102340786875/garray.h:149:12`! (set->array, i);
161
162 if (g_list_find_customcxx . . $ g_list_find_custom(ce1426c07787e5fe). (list, option->groupcxx . . $ _GtkPrinterOption#group., (GCompareFunccxx . . $ GCompareFunc#)g_strcmp0cxx . . $ g_strcmp0(5ae29d726ae57f88).) == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
163 list = g_list_prependcxx . . $ g_list_prepend(35007086a6b2ba1c). (list, g_strdupcxx . . $ `<external>/7822753393113922331/gstrfuncs.h:324:9`! (option->group));
164 }
165
166 return g_list_reversecxx . . $ g_list_reverse(e31b64636014b719). (list);
167 }
168
169 void
170 gtk_printer_option_set_foreach_in_groupcxx . . $ gtk_printer_option_set_foreach_in_group(7e95a5d4b46718ec). (GtkPrinterOptionSetcxx . . $ GtkPrinterOptionSet# *set,
171 const char *group,
172 GtkPrinterOptionSetFunccxx . . $ GtkPrinterOptionSetFunc# func,
173 gpointercxx . . $ gpointer# user_data)
174 {
175 GtkPrinterOptioncxx . . $ GtkPrinterOption# *option;
176 int i;
177
178 for (i = 0; i < set->arraycxx . . $ _GtkPrinterOptionSet#array.->lencxx . . $ _GPtrArray#len.; i++)
179 {
180 option = g_ptr_array_indexcxx . . $ `<external>/13165152102340786875/garray.h:149:12`! (set->array, i);
181
182 if (group == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! || g_strcmp0cxx . . $ g_strcmp0(5ae29d726ae57f88). (group, option->groupcxx . . $ _GtkPrinterOption#group.) == 0)
183 func (option, user_data);
184 }
185 }
186
187 void
188 gtk_printer_option_set_foreachcxx . . $ gtk_printer_option_set_foreach(acfbcc4cf8d7b9c7). (GtkPrinterOptionSetcxx . . $ GtkPrinterOptionSet# *set,
189 GtkPrinterOptionSetFunccxx . . $ GtkPrinterOptionSetFunc# func,
190 gpointercxx . . $ gpointer# user_data)
191 {
192 gtk_printer_option_set_foreach_in_groupcxx . . $ gtk_printer_option_set_foreach_in_group(7e95a5d4b46718ec). (set, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, func, user_data);
193 }