Debian Codegraph @

gtk/gtkstylecascade.c

raw symbols SCIP
1 /* GTK - The GIMP Toolkit
2 * Copyright (C) 2012 Benjamin Otte <[email protected]>
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, see <http://www.gnu.org/licenses/>.
16 */
17
18 #include "config.h"cxx . . $ `<file>/build/config.h`/
19
20 #include "gtkstylecascadeprivate.h"cxx . . $ `<file>/gtk/gtkstylecascadeprivate.h`/
21
22 #include "gtkstyleprovider.h"cxx . . $ `<file>/gtk/gtkstyleprovider.h`/
23 #include "gtkstyleproviderprivate.h"cxx . . $ `<file>/gtk/gtkstyleproviderprivate.h`/
24 #include "gtkprivate.h"cxx . . $ `<file>/gtk/gtkprivate.h`/
25
26 typedef struct _GtkStyleCascadeItercxx . . $ _GtkStyleCascadeIter# GtkStyleCascadeItercxx . . $ GtkStyleCascadeIter#;
27 typedef struct _GtkStyleProviderDatacxx . . $ _GtkStyleProviderData# GtkStyleProviderDatacxx . . $ GtkStyleProviderData#;
28
29 struct _GtkStyleCascadeItercxx . . $ _GtkStyleCascadeIter# {
30 int n_cascadescxx . . $ _GtkStyleCascadeIter#n_cascades.;
31 int *cascade_indexcxx . . $ _GtkStyleCascadeIter#cascade_index.; /* each one points at last index that was returned, */
32 /* not next one that should be returned */
33 int index_cxx . . $ _GtkStyleCascadeIter#index_.[20];
34 };
35
36 struct _GtkStyleProviderDatacxx . . $ _GtkStyleProviderData#
37 {
38 GtkStyleProvidercxx . . $ GtkStyleProvider# *providercxx . . $ _GtkStyleProviderData#provider.;
39 guintcxx . . $ guint# prioritycxx . . $ _GtkStyleProviderData#priority.;
40 guintcxx . . $ guint# changed_signal_idcxx . . $ _GtkStyleProviderData#changed_signal_id.;
41 };
42
43 static GtkStyleProvidercxx . . $ GtkStyleProvider# *
44 gtk_style_cascade_iter_nextcxx . . $ gtk_style_cascade_iter_next(46f0049c25801b29). (GtkStyleCascadecxx . . $ GtkStyleCascade# *cascade,
45 GtkStyleCascadeItercxx . . $ GtkStyleCascadeIter# *iter)
46 {
47 GtkStyleCascadecxx . . $ GtkStyleCascade# *cas;
48 int ix, highest_priority_index = 0;
49 GtkStyleProviderDatacxx . . $ GtkStyleProviderData# *highest_priority_data = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
50
51 for (cas = cascade, ix = 0; ix < iter->n_cascadescxx . . $ _GtkStyleCascadeIter#n_cascades.; cas = cas->parentcxx . . $ _GtkStyleCascade#parent., ix++)
52 {
53 GtkStyleProviderDatacxx . . $ GtkStyleProviderData# *data;
54
55 if (iter->cascade_indexcxx . . $ _GtkStyleCascadeIter#cascade_index.[ix] <= 0)
56 continue;
57
58 data = &g_array_indexcxx . . $ `<external>/13165152102340786875/garray.h:69:9`! (cas->providers,
59 GtkStyleProviderData,
60 iter->cascade_index[ix] - 1);
61 if (highest_priority_data == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! || data->prioritycxx . . $ _GtkStyleProviderData#priority. > highest_priority_data->prioritycxx . . $ _GtkStyleProviderData#priority.)
62 {
63 highest_priority_index = ix;
64 highest_priority_data = data;
65 }
66 }
67
68 if (highest_priority_data != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
69 {
70 iter->cascade_indexcxx . . $ _GtkStyleCascadeIter#cascade_index.[highest_priority_index]--;
71 return highest_priority_data->providercxx . . $ _GtkStyleProviderData#provider.;
72 }
73 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
74 }
75
76 static GtkStyleProvidercxx . . $ GtkStyleProvider# *
77 gtk_style_cascade_iter_initcxx . . $ gtk_style_cascade_iter_init(46f0049c25801b29). (GtkStyleCascadecxx . . $ GtkStyleCascade# *cascade,
78 GtkStyleCascadeItercxx . . $ GtkStyleCascadeIter# *iter)
79 {
80 GtkStyleCascadecxx . . $ GtkStyleCascade# *cas = cascade;
81 int ix;
82
83 iter->n_cascadescxx . . $ _GtkStyleCascadeIter#n_cascades. = 1;
84 while ((cas = cas->parentcxx . . $ _GtkStyleCascade#parent.) != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
85 iter->n_cascadescxx . . $ _GtkStyleCascadeIter#n_cascades.++;
86
87 if (iter->n_cascadescxx . . $ _GtkStyleCascadeIter#n_cascades. < 20)
88 iter->cascade_indexcxx . . $ _GtkStyleCascadeIter#cascade_index. = iter->index_cxx . . $ _GtkStyleCascadeIter#index_.;
89 else
90 iter->cascade_indexcxx . . $ _GtkStyleCascadeIter#cascade_index. = g_newcxx . . $ `<external>/1123956534522462559/gmem.h:318:9`! (int, iter->n_cascades);
91
92 for (cas = cascade, ix = 0; ix < iter->n_cascadescxx . . $ _GtkStyleCascadeIter#n_cascades.; cas = cas->parentcxx . . $ _GtkStyleCascade#parent., ix++)
93 iter->cascade_indexcxx . . $ _GtkStyleCascadeIter#cascade_index.[ix] = cas->providerscxx . . $ _GtkStyleCascade#providers.->lencxx . . $ _GArray#len.;
94
95 return gtk_style_cascade_iter_nextcxx . . $ gtk_style_cascade_iter_next(46f0049c25801b29). (cascade, iter);
96 }
97
98 static void
99 gtk_style_cascade_iter_clearcxx . . $ gtk_style_cascade_iter_clear(bd1068f2d3c55ca9). (GtkStyleCascadeItercxx . . $ GtkStyleCascadeIter# *iter)
100 {
101 if (iter->cascade_indexcxx . . $ _GtkStyleCascadeIter#cascade_index. != iter->index_cxx . . $ _GtkStyleCascadeIter#index_.)
102 g_freecxx . . $ g_free(5d22bdacc48458e8). (iter->cascade_indexcxx . . $ _GtkStyleCascadeIter#cascade_index.);
103 }
104
105 static GtkSettingscxx . . $ GtkSettings# *
106 gtk_style_cascade_get_settingscxx . . $ gtk_style_cascade_get_settings(ef52ef05ae10f313). (GtkStyleProvidercxx . . $ GtkStyleProvider# *provider)
107 {
108 GtkStyleCascadecxx . . $ GtkStyleCascade# *cascade = GTK_STYLE_CASCADEcxx . . $ `gtk/gtkstylecascadeprivate.h:26:9`! (provider);
109 GtkStyleCascadeItercxx . . $ GtkStyleCascadeIter# iter;
110 GtkSettingscxx . . $ GtkSettings# *settings;
111 GtkStyleProvidercxx . . $ GtkStyleProvider# *item;
112
113 for (item = gtk_style_cascade_iter_initcxx . . $ gtk_style_cascade_iter_init(46f0049c25801b29). (cascade, &iter);
114 item;
115 item = gtk_style_cascade_iter_nextcxx . . $ gtk_style_cascade_iter_next(46f0049c25801b29). (cascade, &iter))
116 {
117 settings = gtk_style_provider_get_settingscxx . . $ gtk_style_provider_get_settings(ef52ef05ae10f313). (item);
118 if (settings)
119 {
120 gtk_style_cascade_iter_clearcxx . . $ gtk_style_cascade_iter_clear(bd1068f2d3c55ca9). (&iter);
121 return settings;
122 }
123 }
124
125 gtk_style_cascade_iter_clearcxx . . $ gtk_style_cascade_iter_clear(bd1068f2d3c55ca9). (&iter);
126 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
127 }
128
129 static GtkCssValuecxx . . $ GtkCssValue# *
130 gtk_style_cascade_get_colorcxx . . $ gtk_style_cascade_get_color(146e1ab834071b29). (GtkStyleProvidercxx . . $ GtkStyleProvider# *provider,
131 const char *name)
132 {
133 GtkStyleCascadecxx . . $ GtkStyleCascade# *cascade = GTK_STYLE_CASCADEcxx . . $ `gtk/gtkstylecascadeprivate.h:26:9`! (provider);
134 GtkStyleCascadeItercxx . . $ GtkStyleCascadeIter# iter;
135 GtkCssValuecxx . . $ GtkCssValue# *color;
136 GtkStyleProvidercxx . . $ GtkStyleProvider# *item;
137
138 for (item = gtk_style_cascade_iter_initcxx . . $ gtk_style_cascade_iter_init(46f0049c25801b29). (cascade, &iter);
139 item;
140 item = gtk_style_cascade_iter_nextcxx . . $ gtk_style_cascade_iter_next(46f0049c25801b29). (cascade, &iter))
141 {
142 color = gtk_style_provider_get_colorcxx . . $ gtk_style_provider_get_color(146e1ab834071b29). (item, name);
143 if (color)
144 {
145 gtk_style_cascade_iter_clearcxx . . $ gtk_style_cascade_iter_clear(bd1068f2d3c55ca9). (&iter);
146 return color;
147 }
148 }
149
150 gtk_style_cascade_iter_clearcxx . . $ gtk_style_cascade_iter_clear(bd1068f2d3c55ca9). (&iter);
151 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
152 }
153
154 static int
155 gtk_style_cascade_get_scalecxx . . $ gtk_style_cascade_get_scale(f3da610f6fd0f5de). (GtkStyleProvidercxx . . $ GtkStyleProvider# *provider)
156 {
157 GtkStyleCascadecxx . . $ GtkStyleCascade# *cascade = GTK_STYLE_CASCADEcxx . . $ `gtk/gtkstylecascadeprivate.h:26:9`! (provider);
158
159 return cascade->scalecxx . . $ _GtkStyleCascade#scale.;
160 }
161
162 static GtkCssKeyframescxx . . $ GtkCssKeyframes# *
163 gtk_style_cascade_get_keyframescxx . . $ gtk_style_cascade_get_keyframes(9eb5d697aae7921a). (GtkStyleProvidercxx . . $ GtkStyleProvider# *provider,
164 const char *name)
165 {
166 GtkStyleCascadecxx . . $ GtkStyleCascade# *cascade = GTK_STYLE_CASCADEcxx . . $ `gtk/gtkstylecascadeprivate.h:26:9`! (provider);
167 GtkStyleCascadeItercxx . . $ GtkStyleCascadeIter# iter;
168 GtkCssKeyframescxx . . $ GtkCssKeyframes# *keyframes;
169 GtkStyleProvidercxx . . $ GtkStyleProvider# *item;
170
171 for (item = gtk_style_cascade_iter_initcxx . . $ gtk_style_cascade_iter_init(46f0049c25801b29). (cascade, &iter);
172 item;
173 item = gtk_style_cascade_iter_nextcxx . . $ gtk_style_cascade_iter_next(46f0049c25801b29). (cascade, &iter))
174 {
175 keyframes = gtk_style_provider_get_keyframescxx . . $ gtk_style_provider_get_keyframes(9eb5d697aae7921a). (item, name);
176 if (keyframes)
177 {
178 gtk_style_cascade_iter_clearcxx . . $ gtk_style_cascade_iter_clear(bd1068f2d3c55ca9). (&iter);
179 return keyframes;
180 }
181 }
182
183 gtk_style_cascade_iter_clearcxx . . $ gtk_style_cascade_iter_clear(bd1068f2d3c55ca9). (&iter);
184 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
185 }
186
187 static void
188 gtk_style_cascade_lookupcxx . . $ gtk_style_cascade_lookup(396c7b078f8c6be7). (GtkStyleProvidercxx . . $ GtkStyleProvider# *provider,
189 const GtkCountingBloomFiltercxx . . $ GtkCountingBloomFilter# *filter,
190 GtkCssNodecxx . . $ GtkCssNode# *node,
191 GtkCssLookupcxx . . $ GtkCssLookup# *lookup,
192 GtkCssChangecxx . . $ GtkCssChange# *change)
193 {
194 GtkStyleCascadecxx . . $ GtkStyleCascade# *cascade = GTK_STYLE_CASCADEcxx . . $ `gtk/gtkstylecascadeprivate.h:26:9`! (provider);
195 GtkStyleCascadeItercxx . . $ GtkStyleCascadeIter# iter;
196 GtkStyleProvidercxx . . $ GtkStyleProvider# *item;
197 GtkCssChangecxx . . $ GtkCssChange# iter_change;
198
199 for (item = gtk_style_cascade_iter_initcxx . . $ gtk_style_cascade_iter_init(46f0049c25801b29). (cascade, &iter);
200 item;
201 item = gtk_style_cascade_iter_nextcxx . . $ gtk_style_cascade_iter_next(46f0049c25801b29). (cascade, &iter))
202 {
203 gtk_style_provider_lookupcxx . . $ gtk_style_provider_lookup(396c7b078f8c6be7). (item, filter, node, lookup,
204 change ? &iter_change : NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
205 if (change)
206 *change |= iter_change;
207 }
208 gtk_style_cascade_iter_clearcxx . . $ gtk_style_cascade_iter_clear(bd1068f2d3c55ca9). (&iter);
209 }
210
211 static void
212 gtk_style_cascade_emit_errorcxx . . $ gtk_style_cascade_emit_error(28fb6dbfebde60a1). (GtkStyleProvidercxx . . $ GtkStyleProvider# *provider,
213 GtkCssSectioncxx . . $ GtkCssSection# *section,
214 const GErrorcxx . . $ GError# *error)
215 {
216 GtkStyleCascadecxx . . $ GtkStyleCascade# *cascade = GTK_STYLE_CASCADEcxx . . $ `gtk/gtkstylecascadeprivate.h:26:9`! (provider);
217 GtkStyleCascadeItercxx . . $ GtkStyleCascadeIter# iter;
218 GtkStyleProvidercxx . . $ GtkStyleProvider# *item;
219
220 for (item = gtk_style_cascade_iter_initcxx . . $ gtk_style_cascade_iter_init(46f0049c25801b29). (cascade, &iter);
221 item;
222 item = gtk_style_cascade_iter_nextcxx . . $ gtk_style_cascade_iter_next(46f0049c25801b29). (cascade, &iter))
223 {
224 if (gtk_style_provider_has_sectioncxx . . $ gtk_style_provider_has_section(7a2f57e7ed736338). (item, section))
225 {
226 gtk_style_provider_emit_errorcxx . . $ gtk_style_provider_emit_error(a738e37d3e65b1d1). (item, section, (GErrorcxx . . $ GError# *) error);
227 break;
228 }
229 }
230
231 gtk_style_cascade_iter_clearcxx . . $ gtk_style_cascade_iter_clear(bd1068f2d3c55ca9). (&iter);
232 }
233
234 static void
235 gtk_style_cascade_provider_iface_initcxx . . $ gtk_style_cascade_provider_iface_init(670ec270bfca9785). (GtkStyleProviderInterfacecxx . . $ GtkStyleProviderInterface# *iface)
236 {
237 iface->get_colorcxx . . $ _GtkStyleProviderInterface#get_color. = gtk_style_cascade_get_colorcxx . . $ gtk_style_cascade_get_color(146e1ab834071b29).;
238 iface->get_settingscxx . . $ _GtkStyleProviderInterface#get_settings. = gtk_style_cascade_get_settingscxx . . $ gtk_style_cascade_get_settings(ef52ef05ae10f313).;
239 iface->get_scalecxx . . $ _GtkStyleProviderInterface#get_scale. = gtk_style_cascade_get_scalecxx . . $ gtk_style_cascade_get_scale(f3da610f6fd0f5de).;
240 iface->get_keyframescxx . . $ _GtkStyleProviderInterface#get_keyframes. = gtk_style_cascade_get_keyframescxx . . $ gtk_style_cascade_get_keyframes(9eb5d697aae7921a).;
241 iface->lookupcxx . . $ _GtkStyleProviderInterface#lookup. = gtk_style_cascade_lookupcxx . . $ gtk_style_cascade_lookup(396c7b078f8c6be7).;
242 iface->emit_errorcxx . . $ _GtkStyleProviderInterface#emit_error. = gtk_style_cascade_emit_errorcxx . . $ gtk_style_cascade_emit_error(28fb6dbfebde60a1).;
243 }
244
245 G_DEFINE_TYPE_EXTENDEDcxx . . $ `<external>/9567554376676449156/gtype.h:2053:9`! (GtkStyleCascade, _gtk_style_cascade, G_TYPE_OBJECTcxx . . $ `<external>/9567554376676449156/gtype.h:189:9`!, 0,
246 G_IMPLEMENT_INTERFACEcxx . . $ `<external>/9567554376676449156/gtype.h:2115:9`! (GTK_TYPE_STYLE_PROVIDERcxx . . $ `gtk/gtkstyleprovider.h:30:9`!,
247 gtk_style_cascade_provider_iface_init));
248
249 static void
250 gtk_style_cascade_disposecxx . . $ gtk_style_cascade_dispose(6087475fa43034d3). (GObjectcxx . . $ GObject# *object)
251 {
252 GtkStyleCascadecxx . . $ GtkStyleCascade# *cascade = GTK_STYLE_CASCADEcxx . . $ `gtk/gtkstylecascadeprivate.h:26:9`! (object);
253
254 _gtk_style_cascade_set_parentcxx . . $ _gtk_style_cascade_set_parent(2966a12fc236df26). (cascade, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
255 g_array_unrefcxx . . $ g_array_unref(3e7fee704de2a37e). (cascade->providerscxx . . $ _GtkStyleCascade#providers.);
256
257 G_OBJECT_CLASScxx . . $ `<external>/1341695927569185362/gobject.h:61:9`! (_gtk_style_cascade_parent_class)->disposecxx . . $ _GObjectClass#dispose. (object);
258 }
259
260 static void
261 _gtk_style_cascade_class_initcxx . . $ _gtk_style_cascade_class_init(f45b29384328eab). (GtkStyleCascadeClasscxx . . $ GtkStyleCascadeClass# *klass)
262 {
263 GObjectClasscxx . . $ GObjectClass# *object_class = G_OBJECT_CLASScxx . . $ `<external>/1341695927569185362/gobject.h:61:9`! (klass);
264
265 object_class->disposecxx . . $ _GObjectClass#dispose. = gtk_style_cascade_disposecxx . . $ gtk_style_cascade_dispose(6087475fa43034d3).;
266 }
267
268 static void
269 style_provider_data_clearcxx . . $ style_provider_data_clear(5d22bdacc48458e8). (gpointercxx . . $ gpointer# data_)
270 {
271 GtkStyleProviderDatacxx . . $ GtkStyleProviderData# *data = data_;
272
273 g_signal_handler_disconnectcxx . . $ g_signal_handler_disconnect(5500c4293b1bbef0). (data->providercxx . . $ _GtkStyleProviderData#provider., data->changed_signal_idcxx . . $ _GtkStyleProviderData#changed_signal_id.);
274 g_object_unrefcxx . . $ g_object_unref(5d22bdacc48458e8). (data->providercxx . . $ _GtkStyleProviderData#provider.);
275 }
276
277 static void
278 _gtk_style_cascade_initcxx . . $ _gtk_style_cascade_init(4c180768f12dbabc). (GtkStyleCascadecxx . . $ GtkStyleCascade# *cascade)
279 {
280 cascade->scalecxx . . $ _GtkStyleCascade#scale. = 1;
281
282 cascade->providerscxx . . $ _GtkStyleCascade#providers. = g_array_newcxx . . $ g_array_new(fe898421933afc00). (FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!, sizeof (GtkStyleProviderDatacxx . . $ GtkStyleProviderData#));
283 g_array_set_clear_funccxx . . $ g_array_set_clear_func(231326da27099c95). (cascade->providerscxx . . $ _GtkStyleCascade#providers., style_provider_data_clearcxx . . $ style_provider_data_clear(5d22bdacc48458e8).);
284 }
285
286 GtkStyleCascadecxx . . $ GtkStyleCascade# *
287 _gtk_style_cascade_newcxx . . $ _gtk_style_cascade_new(be53ab37401399d7). (void)
288 {
289 return g_object_newcxx . . $ g_object_new(8485fe61b4be4c78). (GTK_TYPE_STYLE_CASCADEcxx . . $ `gtk/gtkstylecascadeprivate.h:25:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
290 }
291
292 void
293 _gtk_style_cascade_set_parentcxx . . $ _gtk_style_cascade_set_parent(2966a12fc236df26). (GtkStyleCascadecxx . . $ GtkStyleCascade# *cascade,
294 GtkStyleCascadecxx . . $ GtkStyleCascade# *parent)
295 {
296 gtk_internal_return_if_failcxx . . $ `gtk/gtkprivate.h:50:9`! (GTK_IS_STYLE_CASCADE (cascade));
297 gtk_internal_return_if_failcxx . . $ `gtk/gtkprivate.h:50:9`! (parent == NULL || GTK_IS_STYLE_CASCADE (parent));
298
299 if (cascade->parentcxx . . $ _GtkStyleCascade#parent. == parent)
300 return;
301
302 if (parent)
303 {
304 g_object_refcxx . . $ `<external>/1341695927569185362/gobject.h:533:9`! (parent);
305 g_signal_connect_swappedcxx . . $ `<external>/15952772511652638895/gsignal.h:617:9`! (parent,
306 "gtk-private-changed",
307 G_CALLBACKcxx . . $ `<external>/16473872192229286895/gclosure.h:73:9`! (gtk_style_provider_changed),
308 cascade);
309 }
310
311 if (cascade->parentcxx . . $ _GtkStyleCascade#parent.)
312 {
313 g_signal_handlers_disconnect_by_funccxx . . $ `<external>/15952772511652638895/gsignal.h:629:9`! (cascade->parent,
314 gtk_style_provider_changed,
315 cascade);
316 g_object_unrefcxx . . $ g_object_unref(5d22bdacc48458e8). (cascade->parentcxx . . $ _GtkStyleCascade#parent.);
317 }
318
319 cascade->parentcxx . . $ _GtkStyleCascade#parent. = parent;
320 }
321
322 void
323 _gtk_style_cascade_add_providercxx . . $ _gtk_style_cascade_add_provider(79db53d1324b5adb). (GtkStyleCascadecxx . . $ GtkStyleCascade# *cascade,
324 GtkStyleProvidercxx . . $ GtkStyleProvider# *provider,
325 guintcxx . . $ guint# priority)
326 {
327 GtkStyleProviderDatacxx . . $ GtkStyleProviderData# data;
328 guintcxx . . $ guint# i;
329
330 gtk_internal_return_if_failcxx . . $ `gtk/gtkprivate.h:50:9`! (GTK_IS_STYLE_CASCADE (cascade));
331 gtk_internal_return_if_failcxx . . $ `gtk/gtkprivate.h:50:9`! (GTK_IS_STYLE_PROVIDER (provider));
332 gtk_internal_return_if_failcxx . . $ `gtk/gtkprivate.h:50:9`! (GTK_STYLE_PROVIDER (cascade) != provider);
333
334 data.providercxx . . $ _GtkStyleProviderData#provider. = g_object_refcxx . . $ `<external>/1341695927569185362/gobject.h:533:9`! (provider);
335 data.prioritycxx . . $ _GtkStyleProviderData#priority. = priority;
336 data.changed_signal_idcxx . . $ _GtkStyleProviderData#changed_signal_id. = g_signal_connect_swappedcxx . . $ `<external>/15952772511652638895/gsignal.h:617:9`! (provider,
337 "gtk-private-changed",
338 G_CALLBACKcxx . . $ `<external>/16473872192229286895/gclosure.h:73:9`! (gtk_style_provider_changed),
339 cascade);
340
341 /* ensure it gets removed first */
342 _gtk_style_cascade_remove_providercxx . . $ _gtk_style_cascade_remove_provider(7150856c70cd5f8f). (cascade, provider);
343
344 for (i = 0; i < cascade->providerscxx . . $ _GtkStyleCascade#providers.->lencxx . . $ _GArray#len.; i++)
345 {
346 if (g_array_indexcxx . . $ `<external>/13165152102340786875/garray.h:69:9`! (cascade->providers, GtkStyleProviderData, i).prioritycxx . . $ _GtkStyleProviderData#priority. > priority)
347 break;
348 }
349 g_array_insert_valcxx . . $ `<external>/13165152102340786875/garray.h:68:9`! (cascade->providers, i, data);
350
351 gtk_style_provider_changedcxx . . $ gtk_style_provider_changed(9719a19f9c9a8adb). (GTK_STYLE_PROVIDERcxx . . $ `gtk/gtkstyleprovider.h:31:9`! (cascade));
352 }
353
354 void
355 _gtk_style_cascade_remove_providercxx . . $ _gtk_style_cascade_remove_provider(7150856c70cd5f8f). (GtkStyleCascadecxx . . $ GtkStyleCascade# *cascade,
356 GtkStyleProvidercxx . . $ GtkStyleProvider# *provider)
357 {
358 guintcxx . . $ guint# i;
359
360 gtk_internal_return_if_failcxx . . $ `gtk/gtkprivate.h:50:9`! (GTK_IS_STYLE_CASCADE (cascade));
361 gtk_internal_return_if_failcxx . . $ `gtk/gtkprivate.h:50:9`! (GTK_IS_STYLE_PROVIDER (provider));
362
363 for (i = 0; i < cascade->providerscxx . . $ _GtkStyleCascade#providers.->lencxx . . $ _GArray#len.; i++)
364 {
365 GtkStyleProviderDatacxx . . $ GtkStyleProviderData# *data = &g_array_indexcxx . . $ `<external>/13165152102340786875/garray.h:69:9`! (cascade->providers, GtkStyleProviderData, i);
366
367 if (data->providercxx . . $ _GtkStyleProviderData#provider. == provider)
368 {
369 g_array_remove_indexcxx . . $ g_array_remove_index(7887fa1264b468b8). (cascade->providerscxx . . $ _GtkStyleCascade#providers., i);
370
371 gtk_style_provider_changedcxx . . $ gtk_style_provider_changed(9719a19f9c9a8adb). (GTK_STYLE_PROVIDERcxx . . $ `gtk/gtkstyleprovider.h:31:9`! (cascade));
372 break;
373 }
374 }
375 }
376
377 void
378 _gtk_style_cascade_set_scalecxx . . $ _gtk_style_cascade_set_scale(e297d7462384343). (GtkStyleCascadecxx . . $ GtkStyleCascade# *cascade,
379 int scale)
380 {
381 gtk_internal_return_if_failcxx . . $ `gtk/gtkprivate.h:50:9`! (GTK_IS_STYLE_CASCADE (cascade));
382
383 if (cascade->scalecxx . . $ _GtkStyleCascade#scale. == scale)
384 return;
385
386 cascade->scalecxx . . $ _GtkStyleCascade#scale. = scale;
387
388 gtk_style_provider_changedcxx . . $ gtk_style_provider_changed(9719a19f9c9a8adb). (GTK_STYLE_PROVIDERcxx . . $ `gtk/gtkstyleprovider.h:31:9`! (cascade));
389 }
390
391 int
392 _gtk_style_cascade_get_scalecxx . . $ _gtk_style_cascade_get_scale(5e3a91bf51df529d). (GtkStyleCascadecxx . . $ GtkStyleCascade# *cascade)
393 {
394 gtk_internal_return_val_if_failcxx . . $ `gtk/gtkprivate.h:51:9`! (GTK_IS_STYLE_CASCADE (cascade), 1);
395
396 return cascade->scalecxx . . $ _GtkStyleCascade#scale.;
397 }