File: GtkCssProvider.html

package info (click to toggle)
gtk%2B3.0 3.22.11-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 182,828 kB
  • ctags: 82,378
  • sloc: ansic: 1,165,043; xml: 9,259; makefile: 6,914; sh: 5,179; python: 402; perl: 370; cpp: 34; sed: 16
file content (1077 lines) | stat: -rw-r--r-- 59,450 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GtkCssProvider: GTK+ 3 Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="index.html" title="GTK+ 3 Reference Manual">
<link rel="up" href="theming.html" title="Part IV. Theming in GTK+">
<link rel="prev" href="GtkStyleContext.html" title="GtkStyleContext">
<link rel="next" href="GtkStyleProvider.html" title="GtkStyleProvider">
<meta name="generator" content="GTK-Doc V1.25.1 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
                  <a href="#GtkCssProvider.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
                  <a href="#GtkCssProvider.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_interfaces">  <span class="dim">|</span> 
                  <a href="#GtkCssProvider.implemented-interfaces" class="shortcut">Implemented Interfaces</a></span><span id="nav_signals">  <span class="dim">|</span> 
                  <a href="#GtkCssProvider.signals" class="shortcut">Signals</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="theming.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="GtkStyleContext.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="GtkStyleProvider.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="GtkCssProvider"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="GtkCssProvider.top_of_page"></a>GtkCssProvider</span></h2>
<p>GtkCssProvider — CSS-like styling for widgets</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="GtkCssProvider.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="functions_return">
<col class="functions_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<a class="link" href="GtkCssProvider.html" title="GtkCssProvider"><span class="returnvalue">GtkCssProvider</span></a> *
</td>
<td class="function_name">
<a class="link" href="GtkCssProvider.html#gtk-css-provider-get-default" title="gtk_css_provider_get_default ()">gtk_css_provider_get_default</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GtkCssProvider.html" title="GtkCssProvider"><span class="returnvalue">GtkCssProvider</span></a> *
</td>
<td class="function_name">
<a class="link" href="GtkCssProvider.html#gtk-css-provider-get-named" title="gtk_css_provider_get_named ()">gtk_css_provider_get_named</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="GtkCssProvider.html#gtk-css-provider-load-from-data" title="gtk_css_provider_load_from_data ()">gtk_css_provider_load_from_data</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="GtkCssProvider.html#gtk-css-provider-load-from-file" title="gtk_css_provider_load_from_file ()">gtk_css_provider_load_from_file</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="GtkCssProvider.html#gtk-css-provider-load-from-path" title="gtk_css_provider_load_from_path ()">gtk_css_provider_load_from_path</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GtkCssProvider.html#gtk-css-provider-load-from-resource" title="gtk_css_provider_load_from_resource ()">gtk_css_provider_load_from_resource</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GtkCssProvider.html" title="GtkCssProvider"><span class="returnvalue">GtkCssProvider</span></a> *
</td>
<td class="function_name">
<a class="link" href="GtkCssProvider.html#gtk-css-provider-new" title="gtk_css_provider_new ()">gtk_css_provider_new</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">char</span> *
</td>
<td class="function_name">
<a class="link" href="GtkCssProvider.html#gtk-css-provider-to-string" title="gtk_css_provider_to_string ()">gtk_css_provider_to_string</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
</td>
<td class="function_name">
<a class="link" href="GtkCssProvider.html#gtk-css-section-get-end-line" title="gtk_css_section_get_end_line ()">gtk_css_section_get_end_line</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
</td>
<td class="function_name">
<a class="link" href="GtkCssProvider.html#gtk-css-section-get-end-position" title="gtk_css_section_get_end_position ()">gtk_css_section_get_end_position</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/gio/unstable/GFile.html#GFile-struct"><span class="returnvalue">GFile</span></a> *
</td>
<td class="function_name">
<a class="link" href="GtkCssProvider.html#gtk-css-section-get-file" title="gtk_css_section_get_file ()">gtk_css_section_get_file</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GtkCssProvider.html#GtkCssSection"><span class="returnvalue">GtkCssSection</span></a> *
</td>
<td class="function_name">
<a class="link" href="GtkCssProvider.html#gtk-css-section-get-parent" title="gtk_css_section_get_parent ()">gtk_css_section_get_parent</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GtkCssProvider.html#GtkCssSectionType" title="enum GtkCssSectionType"><span class="returnvalue">GtkCssSectionType</span></a>
</td>
<td class="function_name">
<a class="link" href="GtkCssProvider.html#gtk-css-section-get-section-type" title="gtk_css_section_get_section_type ()">gtk_css_section_get_section_type</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
</td>
<td class="function_name">
<a class="link" href="GtkCssProvider.html#gtk-css-section-get-start-line" title="gtk_css_section_get_start_line ()">gtk_css_section_get_start_line</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
</td>
<td class="function_name">
<a class="link" href="GtkCssProvider.html#gtk-css-section-get-start-position" title="gtk_css_section_get_start_position ()">gtk_css_section_get_start_position</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GtkCssProvider.html#GtkCssSection"><span class="returnvalue">GtkCssSection</span></a> *
</td>
<td class="function_name">
<a class="link" href="GtkCssProvider.html#gtk-css-section-ref" title="gtk_css_section_ref ()">gtk_css_section_ref</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GtkCssProvider.html#gtk-css-section-unref" title="gtk_css_section_unref ()">gtk_css_section_unref</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GtkCssProvider.signals"></a><h2>Signals</h2>
<div class="informaltable"><table class="informaltable" border="0">
<colgroup>
<col width="150px" class="signals_return">
<col width="300px" class="signals_name">
<col width="200px" class="signals_flags">
</colgroup>
<tbody><tr>
<td class="signal_type"><span class="returnvalue">void</span></td>
<td class="signal_name"><a class="link" href="GtkCssProvider.html#GtkCssProvider-parsing-error" title="The “parsing-error” signal">parsing-error</a></td>
<td class="signal_flags"><a href="https://developer.gnome.org/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS">Run Last</a></td>
</tr></tbody>
</table></div>
</div>
<a name="GtkCssSection"></a><div class="refsect1">
<a name="GtkCssProvider.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="name">
<col class="description">
</colgroup>
<tbody>
<tr>
<td class="datatype_keyword">struct</td>
<td class="function_name"><a class="link" href="GtkCssProvider.html#GtkCssProvider-struct" title="struct GtkCssProvider">GtkCssProvider</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="GtkCssProvider.html#GTK-CSS-PROVIDER-ERROR:CAPS" title="GTK_CSS_PROVIDER_ERROR">GTK_CSS_PROVIDER_ERROR</a></td>
</tr>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="GtkCssProvider.html#GtkCssProviderError" title="enum GtkCssProviderError">GtkCssProviderError</a></td>
</tr>
<tr>
<td class="datatype_keyword"> </td>
<td class="function_name"><a class="link" href="GtkCssProvider.html#GtkCssSection-struct" title="GtkCssSection">GtkCssSection</a></td>
</tr>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="GtkCssProvider.html#GtkCssSectionType" title="enum GtkCssSectionType">GtkCssSectionType</a></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GtkCssProvider.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="screen">    <a href="https://developer.gnome.org/gobject/unstable/gobject-Boxed-Types.html">GBoxed</a>
    <span class="lineart">╰──</span> GtkCssSection
    <a href="https://developer.gnome.org/gobject/unstable/gobject-The-Base-Object-Type.html#GObject-struct">GObject</a>
    <span class="lineart">╰──</span> GtkCssProvider
</pre>
</div>
<div class="refsect1">
<a name="GtkCssProvider.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
<p>
GtkCssProvider implements
 <a class="link" href="GtkStyleProvider.html" title="GtkStyleProvider">GtkStyleProvider</a> and  GtkStyleProviderPrivate.</p>
</div>
<div class="refsect1">
<a name="GtkCssProvider.includes"></a><h2>Includes</h2>
<pre class="synopsis">#include &lt;gtk/gtk.h&gt;
</pre>
</div>
<div class="refsect1">
<a name="GtkCssProvider.description"></a><h2>Description</h2>
<p>GtkCssProvider is an object implementing the <a class="link" href="GtkStyleProvider.html" title="GtkStyleProvider"><span class="type">GtkStyleProvider</span></a> interface.
It is able to parse <a class="link" href="chap-css-overview.html#css-overview" title="Overview of CSS in GTK+">CSS-like</a> input in order to style widgets.</p>
<p>An application can make GTK+ parse a specific CSS style sheet by calling
<a class="link" href="GtkCssProvider.html#gtk-css-provider-load-from-file" title="gtk_css_provider_load_from_file ()"><code class="function">gtk_css_provider_load_from_file()</code></a> or <a class="link" href="GtkCssProvider.html#gtk-css-provider-load-from-resource" title="gtk_css_provider_load_from_resource ()"><code class="function">gtk_css_provider_load_from_resource()</code></a>
and adding the provider with <a class="link" href="GtkStyleContext.html#gtk-style-context-add-provider" title="gtk_style_context_add_provider ()"><code class="function">gtk_style_context_add_provider()</code></a> or
<a class="link" href="GtkStyleContext.html#gtk-style-context-add-provider-for-screen" title="gtk_style_context_add_provider_for_screen ()"><code class="function">gtk_style_context_add_provider_for_screen()</code></a>.</p>
<p>In addition, certain files will be read when GTK+ is initialized. First, the
file <code class="literal">$XDG_CONFIG_HOME/gtk-3.0/gtk.css</code> is loaded if it exists. Then, GTK+
loads the first existing file among
<code class="literal">XDG_DATA_HOME/themes/theme-name/gtk-VERSION/gtk.css</code>,
<code class="literal">$HOME/.themes/theme-name/gtk-VERSION/gtk.css</code>,
<code class="literal">$XDG_DATA_DIRS/themes/theme-name/gtk-VERSION/gtk.css</code> and
<code class="literal">DATADIR/share/themes/THEME/gtk-VERSION/gtk.css</code>, where <code class="literal">THEME</code> is the name of
the current theme (see the <a class="link" href="GtkSettings.html#GtkSettings--gtk-theme-name" title="The “gtk-theme-name” property"><span class="type">“gtk-theme-name”</span></a> setting), <code class="literal">DATADIR</code>
is the prefix configured when GTK+ was compiled (unless overridden by the
<code class="literal">GTK_DATA_PREFIX</code> environment variable), and <code class="literal">VERSION</code> is the GTK+ version number.
If no file is found for the current version, GTK+ tries older versions all the
way back to 3.0.</p>
<p>In the same way, GTK+ tries to load a gtk-keys.css file for the current
key theme, as defined by <a class="link" href="GtkSettings.html#GtkSettings--gtk-key-theme-name" title="The “gtk-key-theme-name” property"><span class="type">“gtk-key-theme-name”</span></a>.</p>
</div>
<div class="refsect1">
<a name="GtkCssProvider.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="gtk-css-provider-get-default"></a><h3>gtk_css_provider_get_default ()</h3>
<pre class="programlisting"><a class="link" href="GtkCssProvider.html" title="GtkCssProvider"><span class="returnvalue">GtkCssProvider</span></a> *
gtk_css_provider_get_default (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Returns the provider containing the style settings used as a
fallback for all widgets.</p>
<div class="refsect3">
<a name="gtk-css-provider-get-default.returns"></a><h4>Returns</h4>
<p> The provider used for fallback styling.
This memory is owned by GTK+, and you must not free it. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-css-provider-get-named"></a><h3>gtk_css_provider_get_named ()</h3>
<pre class="programlisting"><a class="link" href="GtkCssProvider.html" title="GtkCssProvider"><span class="returnvalue">GtkCssProvider</span></a> *
gtk_css_provider_get_named (<em class="parameter"><code>const <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>,
                            <em class="parameter"><code>const <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *variant</code></em>);</pre>
<p>Loads a theme from the usual theme paths</p>
<div class="refsect3">
<a name="gtk-css-provider-get-named.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>name</p></td>
<td class="parameter_description"><p>A theme name</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>variant</p></td>
<td class="parameter_description"><p> variant to load, for example, "dark", or
<a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> for the default. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-css-provider-get-named.returns"></a><h4>Returns</h4>
<p> a <a class="link" href="GtkCssProvider.html" title="GtkCssProvider"><span class="type">GtkCssProvider</span></a> with the theme loaded.
This memory is owned by GTK+, and you must not free it. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-css-provider-load-from-data"></a><h3>gtk_css_provider_load_from_data ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
gtk_css_provider_load_from_data (<em class="parameter"><code><a class="link" href="GtkCssProvider.html" title="GtkCssProvider"><span class="type">GtkCssProvider</span></a> *css_provider</code></em>,
                                 <em class="parameter"><code>const <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *data</code></em>,
                                 <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gssize"><span class="type">gssize</span></a> length</code></em>,
                                 <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>Loads <em class="parameter"><code>data</code></em>
 into <em class="parameter"><code>css_provider</code></em>
, and by doing so clears any previously loaded
information.</p>
<div class="refsect3">
<a name="gtk-css-provider-load-from-data.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>css_provider</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkCssProvider.html" title="GtkCssProvider"><span class="type">GtkCssProvider</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>data</p></td>
<td class="parameter_description"><p> CSS data loaded in memory. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=length][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> guint8]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>length</p></td>
<td class="parameter_description"><p>the length of <em class="parameter"><code>data</code></em>
in bytes, or -1 for NUL terminated strings. If
<em class="parameter"><code>length</code></em>
is not -1, the code will assume it is not NUL terminated and will
potentially do a copy.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p> return location for a <a href="https://developer.gnome.org/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-css-provider-load-from-data.returns"></a><h4>Returns</h4>
<p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>. The return value is deprecated and <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> will only be
returned for backwards compatibility reasons if an <em class="parameter"><code>error</code></em>
is not
<a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> and a loading error occurred. To track errors while loading
CSS, connect to the <a class="link" href="GtkCssProvider.html#GtkCssProvider-parsing-error" title="The “parsing-error” signal"><span class="type">“parsing-error”</span></a> signal.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-css-provider-load-from-file"></a><h3>gtk_css_provider_load_from_file ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
gtk_css_provider_load_from_file (<em class="parameter"><code><a class="link" href="GtkCssProvider.html" title="GtkCssProvider"><span class="type">GtkCssProvider</span></a> *css_provider</code></em>,
                                 <em class="parameter"><code><a href="https://developer.gnome.org/gio/unstable/GFile.html#GFile-struct"><span class="type">GFile</span></a> *file</code></em>,
                                 <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>Loads the data contained in <em class="parameter"><code>file</code></em>
 into <em class="parameter"><code>css_provider</code></em>
, making it
clear any previously loaded information.</p>
<div class="refsect3">
<a name="gtk-css-provider-load-from-file.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>css_provider</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkCssProvider.html" title="GtkCssProvider"><span class="type">GtkCssProvider</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>file</p></td>
<td class="parameter_description"><p><a href="https://developer.gnome.org/gio/unstable/GFile.html#GFile-struct"><span class="type">GFile</span></a> pointing to a file to load</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p> return location for a <a href="https://developer.gnome.org/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-css-provider-load-from-file.returns"></a><h4>Returns</h4>
<p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>. The return value is deprecated and <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> will only be
returned for backwards compatibility reasons if an <em class="parameter"><code>error</code></em>
is not
<a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> and a loading error occurred. To track errors while loading
CSS, connect to the <a class="link" href="GtkCssProvider.html#GtkCssProvider-parsing-error" title="The “parsing-error” signal"><span class="type">“parsing-error”</span></a> signal.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-css-provider-load-from-path"></a><h3>gtk_css_provider_load_from_path ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
gtk_css_provider_load_from_path (<em class="parameter"><code><a class="link" href="GtkCssProvider.html" title="GtkCssProvider"><span class="type">GtkCssProvider</span></a> *css_provider</code></em>,
                                 <em class="parameter"><code>const <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *path</code></em>,
                                 <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>Loads the data contained in <em class="parameter"><code>path</code></em>
 into <em class="parameter"><code>css_provider</code></em>
, making it clear
any previously loaded information.</p>
<div class="refsect3">
<a name="gtk-css-provider-load-from-path.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>css_provider</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkCssProvider.html" title="GtkCssProvider"><span class="type">GtkCssProvider</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>path</p></td>
<td class="parameter_description"><p>the path of a filename to load, in the GLib filename encoding</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p> return location for a <a href="https://developer.gnome.org/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-css-provider-load-from-path.returns"></a><h4>Returns</h4>
<p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>. The return value is deprecated and <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> will only be
returned for backwards compatibility reasons if an <em class="parameter"><code>error</code></em>
is not
<a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> and a loading error occurred. To track errors while loading
CSS, connect to the <a class="link" href="GtkCssProvider.html#GtkCssProvider-parsing-error" title="The “parsing-error” signal"><span class="type">“parsing-error”</span></a> signal.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-css-provider-load-from-resource"></a><h3>gtk_css_provider_load_from_resource ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_css_provider_load_from_resource (<em class="parameter"><code><a class="link" href="GtkCssProvider.html" title="GtkCssProvider"><span class="type">GtkCssProvider</span></a> *css_provider</code></em>,
                                     <em class="parameter"><code>const <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *resource_path</code></em>);</pre>
<p>Loads the data contained in the resource at <em class="parameter"><code>resource_path</code></em>
 into
the <a class="link" href="GtkCssProvider.html" title="GtkCssProvider"><span class="type">GtkCssProvider</span></a>, clearing any previously loaded information.</p>
<p>To track errors while loading CSS, connect to the
<a class="link" href="GtkCssProvider.html#GtkCssProvider-parsing-error" title="The “parsing-error” signal"><span class="type">“parsing-error”</span></a> signal.</p>
<div class="refsect3">
<a name="gtk-css-provider-load-from-resource.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>css_provider</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkCssProvider.html" title="GtkCssProvider"><span class="type">GtkCssProvider</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>resource_path</p></td>
<td class="parameter_description"><p>a <a href="https://developer.gnome.org/gio/unstable/GResource.html#GResource-struct"><span class="type">GResource</span></a> resource path</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-3-16.html#api-index-3.16">3.16</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-css-provider-new"></a><h3>gtk_css_provider_new ()</h3>
<pre class="programlisting"><a class="link" href="GtkCssProvider.html" title="GtkCssProvider"><span class="returnvalue">GtkCssProvider</span></a> *
gtk_css_provider_new (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Returns a newly created <a class="link" href="GtkCssProvider.html" title="GtkCssProvider"><span class="type">GtkCssProvider</span></a>.</p>
<div class="refsect3">
<a name="gtk-css-provider-new.returns"></a><h4>Returns</h4>
<p> A new <a class="link" href="GtkCssProvider.html" title="GtkCssProvider"><span class="type">GtkCssProvider</span></a></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-css-provider-to-string"></a><h3>gtk_css_provider_to_string ()</h3>
<pre class="programlisting"><span class="returnvalue">char</span> *
gtk_css_provider_to_string (<em class="parameter"><code><a class="link" href="GtkCssProvider.html" title="GtkCssProvider"><span class="type">GtkCssProvider</span></a> *provider</code></em>);</pre>
<p>Converts the <em class="parameter"><code>provider</code></em>
 into a string representation in CSS
format.</p>
<p>Using <a class="link" href="GtkCssProvider.html#gtk-css-provider-load-from-data" title="gtk_css_provider_load_from_data ()"><code class="function">gtk_css_provider_load_from_data()</code></a> with the return value
from this function on a new provider created with
<a class="link" href="GtkCssProvider.html#gtk-css-provider-new" title="gtk_css_provider_new ()"><code class="function">gtk_css_provider_new()</code></a> will basically create a duplicate of
this <em class="parameter"><code>provider</code></em>
.</p>
<div class="refsect3">
<a name="gtk-css-provider-to-string.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>provider</p></td>
<td class="parameter_description"><p>the provider to write to a string</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-css-provider-to-string.returns"></a><h4>Returns</h4>
<p> a new string representing the <em class="parameter"><code>provider</code></em>
.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-3-2.html#api-index-3.2">3.2</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-css-section-get-end-line"></a><h3>gtk_css_section_get_end_line ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
gtk_css_section_get_end_line (<em class="parameter"><code>const <a class="link" href="GtkCssProvider.html#GtkCssSection"><span class="type">GtkCssSection</span></a> *section</code></em>);</pre>
<p>Returns the line in the CSS document where this section end.
The line number is 0-indexed, so the first line of the document
will return 0.
This value may change in future invocations of this function if
<em class="parameter"><code>section</code></em>
 is not yet parsed completely. This will for example 
happen in the GtkCssProvider::parsing-error signal.
The end position and line may be identical to the start
position and line for sections which failed to parse anything
successfully.</p>
<div class="refsect3">
<a name="gtk-css-section-get-end-line.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>section</p></td>
<td class="parameter_description"><p>the section</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-css-section-get-end-line.returns"></a><h4>Returns</h4>
<p> the line number</p>
</div>
<p class="since">Since: <a class="link" href="api-index-3-2.html#api-index-3.2">3.2</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-css-section-get-end-position"></a><h3>gtk_css_section_get_end_position ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
gtk_css_section_get_end_position (<em class="parameter"><code>const <a class="link" href="GtkCssProvider.html#GtkCssSection"><span class="type">GtkCssSection</span></a> *section</code></em>);</pre>
<p>Returns the offset in bytes from the start of the current line
returned via <a class="link" href="GtkCssProvider.html#gtk-css-section-get-end-line" title="gtk_css_section_get_end_line ()"><code class="function">gtk_css_section_get_end_line()</code></a>.
This value may change in future invocations of this function if
<em class="parameter"><code>section</code></em>
 is not yet parsed completely. This will for example
happen in the GtkCssProvider::parsing-error signal.
The end position and line may be identical to the start
position and line for sections which failed to parse anything
successfully.</p>
<div class="refsect3">
<a name="gtk-css-section-get-end-position.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>section</p></td>
<td class="parameter_description"><p>the section</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-css-section-get-end-position.returns"></a><h4>Returns</h4>
<p> the offset in bytes from the start of the line.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-3-2.html#api-index-3.2">3.2</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-css-section-get-file"></a><h3>gtk_css_section_get_file ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/gio/unstable/GFile.html#GFile-struct"><span class="returnvalue">GFile</span></a> *
gtk_css_section_get_file (<em class="parameter"><code>const <a class="link" href="GtkCssProvider.html#GtkCssSection"><span class="type">GtkCssSection</span></a> *section</code></em>);</pre>
<p>Gets the file that <em class="parameter"><code>section</code></em>
 was parsed from. If no such file exists,
for example because the CSS was loaded via
<em class="parameter"><code><a class="link" href="GtkCssProvider.html#gtk-css-provider-load-from-data" title="gtk_css_provider_load_from_data ()"><code class="function">gtk_css_provider_load_from_data()</code></a></code></em>
, then <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> is returned.</p>
<div class="refsect3">
<a name="gtk-css-section-get-file.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>section</p></td>
<td class="parameter_description"><p>the section</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-css-section-get-file.returns"></a><h4>Returns</h4>
<p> the <a href="https://developer.gnome.org/gio/unstable/GFile.html#GFile-struct"><span class="type">GFile</span></a> that <em class="parameter"><code>section</code></em>
was parsed from
or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if <em class="parameter"><code>section</code></em>
was parsed from other data. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="api-index-3-2.html#api-index-3.2">3.2</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-css-section-get-parent"></a><h3>gtk_css_section_get_parent ()</h3>
<pre class="programlisting"><a class="link" href="GtkCssProvider.html#GtkCssSection"><span class="returnvalue">GtkCssSection</span></a> *
gtk_css_section_get_parent (<em class="parameter"><code>const <a class="link" href="GtkCssProvider.html#GtkCssSection"><span class="type">GtkCssSection</span></a> *section</code></em>);</pre>
<p>Gets the parent section for the given <em class="parameter"><code>section</code></em>
. The parent section is
the section that contains this <em class="parameter"><code>section</code></em>
. A special case are sections of
type <a class="link" href="GtkCssProvider.html#GTK-CSS-SECTION-DOCUMENT:CAPS"><span class="type">GTK_CSS_SECTION_DOCUMENT</span></a>. Their parent will either be <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
if they are the original CSS document that was loaded by
<a class="link" href="GtkCssProvider.html#gtk-css-provider-load-from-file" title="gtk_css_provider_load_from_file ()"><code class="function">gtk_css_provider_load_from_file()</code></a> or a section of type
<a class="link" href="GtkCssProvider.html#GTK-CSS-SECTION-IMPORT:CAPS"><span class="type">GTK_CSS_SECTION_IMPORT</span></a> if it was loaded with an import rule from
a different file.</p>
<div class="refsect3">
<a name="gtk-css-section-get-parent.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>section</p></td>
<td class="parameter_description"><p>the section</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-css-section-get-parent.returns"></a><h4>Returns</h4>
<p> the parent section or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if none. </p>
<p><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="api-index-3-2.html#api-index-3.2">3.2</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-css-section-get-section-type"></a><h3>gtk_css_section_get_section_type ()</h3>
<pre class="programlisting"><a class="link" href="GtkCssProvider.html#GtkCssSectionType" title="enum GtkCssSectionType"><span class="returnvalue">GtkCssSectionType</span></a>
gtk_css_section_get_section_type (<em class="parameter"><code>const <a class="link" href="GtkCssProvider.html#GtkCssSection"><span class="type">GtkCssSection</span></a> *section</code></em>);</pre>
<p>Gets the type of information that <em class="parameter"><code>section</code></em>
 describes.</p>
<div class="refsect3">
<a name="gtk-css-section-get-section-type.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>section</p></td>
<td class="parameter_description"><p>the section</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-css-section-get-section-type.returns"></a><h4>Returns</h4>
<p> the type of <em class="parameter"><code>section</code></em>
</p>
</div>
<p class="since">Since: <a class="link" href="api-index-3-2.html#api-index-3.2">3.2</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-css-section-get-start-line"></a><h3>gtk_css_section_get_start_line ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
gtk_css_section_get_start_line (<em class="parameter"><code>const <a class="link" href="GtkCssProvider.html#GtkCssSection"><span class="type">GtkCssSection</span></a> *section</code></em>);</pre>
<p>Returns the line in the CSS document where this section starts.
The line number is 0-indexed, so the first line of the document
will return 0.</p>
<div class="refsect3">
<a name="gtk-css-section-get-start-line.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>section</p></td>
<td class="parameter_description"><p>the section</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-css-section-get-start-line.returns"></a><h4>Returns</h4>
<p> the line number</p>
</div>
<p class="since">Since: <a class="link" href="api-index-3-2.html#api-index-3.2">3.2</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-css-section-get-start-position"></a><h3>gtk_css_section_get_start_position ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
gtk_css_section_get_start_position (<em class="parameter"><code>const <a class="link" href="GtkCssProvider.html#GtkCssSection"><span class="type">GtkCssSection</span></a> *section</code></em>);</pre>
<p>Returns the offset in bytes from the start of the current line
returned via <a class="link" href="GtkCssProvider.html#gtk-css-section-get-start-line" title="gtk_css_section_get_start_line ()"><code class="function">gtk_css_section_get_start_line()</code></a>.</p>
<div class="refsect3">
<a name="gtk-css-section-get-start-position.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>section</p></td>
<td class="parameter_description"><p>the section</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-css-section-get-start-position.returns"></a><h4>Returns</h4>
<p> the offset in bytes from the start of the line.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-3-2.html#api-index-3.2">3.2</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-css-section-ref"></a><h3>gtk_css_section_ref ()</h3>
<pre class="programlisting"><a class="link" href="GtkCssProvider.html#GtkCssSection"><span class="returnvalue">GtkCssSection</span></a> *
gtk_css_section_ref (<em class="parameter"><code><a class="link" href="GtkCssProvider.html#GtkCssSection"><span class="type">GtkCssSection</span></a> *section</code></em>);</pre>
<p>Increments the reference count on <em class="parameter"><code>section</code></em>
.</p>
<div class="refsect3">
<a name="gtk-css-section-ref.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>section</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkCssProvider.html#GtkCssSection"><span class="type">GtkCssSection</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-css-section-ref.returns"></a><h4>Returns</h4>
<p> <em class="parameter"><code>section</code></em>
itself.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-3-2.html#api-index-3.2">3.2</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-css-section-unref"></a><h3>gtk_css_section_unref ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_css_section_unref (<em class="parameter"><code><a class="link" href="GtkCssProvider.html#GtkCssSection"><span class="type">GtkCssSection</span></a> *section</code></em>);</pre>
<p>Decrements the reference count on <em class="parameter"><code>section</code></em>
, freeing the
structure if the reference count reaches 0.</p>
<div class="refsect3">
<a name="gtk-css-section-unref.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>section</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkCssProvider.html#GtkCssSection"><span class="type">GtkCssSection</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-3-2.html#api-index-3.2">3.2</a></p>
</div>
</div>
<div class="refsect1">
<a name="GtkCssProvider.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="GtkCssProvider-struct"></a><h3>struct GtkCssProvider</h3>
<pre class="programlisting">struct GtkCssProvider;</pre>
</div>
<hr>
<div class="refsect2">
<a name="GTK-CSS-PROVIDER-ERROR:CAPS"></a><h3>GTK_CSS_PROVIDER_ERROR</h3>
<pre class="programlisting">#define GTK_CSS_PROVIDER_ERROR (gtk_css_provider_error_quark ())
</pre>
<p>Domain for <a class="link" href="GtkCssProvider.html" title="GtkCssProvider"><span class="type">GtkCssProvider</span></a> errors.</p>
</div>
<hr>
<div class="refsect2">
<a name="GtkCssProviderError"></a><h3>enum GtkCssProviderError</h3>
<p>Error codes for <a class="link" href="GtkCssProvider.html#GTK-CSS-PROVIDER-ERROR:CAPS" title="GTK_CSS_PROVIDER_ERROR"><code class="literal">GTK_CSS_PROVIDER_ERROR</code></a>.</p>
<div class="refsect3">
<a name="GtkCssProviderError.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="enum_members_name">
<col class="enum_members_description">
<col width="200px" class="enum_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="enum_member_name"><p><a name="GTK-CSS-PROVIDER-ERROR-FAILED:CAPS"></a>GTK_CSS_PROVIDER_ERROR_FAILED</p></td>
<td class="enum_member_description">
<p>Failed.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GTK-CSS-PROVIDER-ERROR-SYNTAX:CAPS"></a>GTK_CSS_PROVIDER_ERROR_SYNTAX</p></td>
<td class="enum_member_description">
<p>Syntax error.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GTK-CSS-PROVIDER-ERROR-IMPORT:CAPS"></a>GTK_CSS_PROVIDER_ERROR_IMPORT</p></td>
<td class="enum_member_description">
<p>Import error.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GTK-CSS-PROVIDER-ERROR-NAME:CAPS"></a>GTK_CSS_PROVIDER_ERROR_NAME</p></td>
<td class="enum_member_description">
<p>Name error.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GTK-CSS-PROVIDER-ERROR-DEPRECATED:CAPS"></a>GTK_CSS_PROVIDER_ERROR_DEPRECATED</p></td>
<td class="enum_member_description">
<p>Deprecation error.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GTK-CSS-PROVIDER-ERROR-UNKNOWN-VALUE:CAPS"></a>GTK_CSS_PROVIDER_ERROR_UNKNOWN_VALUE</p></td>
<td class="enum_member_description">
<p>Unknown value.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="GtkCssSection-struct"></a><h3>GtkCssSection</h3>
<pre class="programlisting">typedef struct _GtkCssSection GtkCssSection;</pre>
<p>Defines a part of a CSS document. Because sections are nested into
one another, you can use <a class="link" href="GtkCssProvider.html#gtk-css-section-get-parent" title="gtk_css_section_get_parent ()"><code class="function">gtk_css_section_get_parent()</code></a> to get the
containing region.</p>
<p class="since">Since: <a class="link" href="api-index-3-2.html#api-index-3.2">3.2</a></p>
</div>
<hr>
<div class="refsect2">
<a name="GtkCssSectionType"></a><h3>enum GtkCssSectionType</h3>
<p>The different types of sections indicate parts of a CSS document as
parsed by GTK’s CSS parser. They are oriented towards the
<a class="ulink" href="http://www.w3.org/TR/CSS21/grammar.html" target="_top">CSS Grammar</a>,
but may contain extensions.</p>
<p>More types might be added in the future as the parser incorporates
more features.</p>
<div class="refsect3">
<a name="GtkCssSectionType.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="enum_members_name">
<col class="enum_members_description">
<col width="200px" class="enum_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="enum_member_name"><p><a name="GTK-CSS-SECTION-DOCUMENT:CAPS"></a>GTK_CSS_SECTION_DOCUMENT</p></td>
<td class="enum_member_description">
<p>The section describes a complete document.
  This section time is the only one where <a class="link" href="GtkCssProvider.html#gtk-css-section-get-parent" title="gtk_css_section_get_parent ()"><code class="function">gtk_css_section_get_parent()</code></a>
  might return <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GTK-CSS-SECTION-IMPORT:CAPS"></a>GTK_CSS_SECTION_IMPORT</p></td>
<td class="enum_member_description">
<p>The section defines an import rule.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GTK-CSS-SECTION-COLOR-DEFINITION:CAPS"></a>GTK_CSS_SECTION_COLOR_DEFINITION</p></td>
<td class="enum_member_description">
<p>The section defines a color. This
  is a GTK extension to CSS.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GTK-CSS-SECTION-BINDING-SET:CAPS"></a>GTK_CSS_SECTION_BINDING_SET</p></td>
<td class="enum_member_description">
<p>The section defines a binding set. This
  is a GTK extension to CSS.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GTK-CSS-SECTION-RULESET:CAPS"></a>GTK_CSS_SECTION_RULESET</p></td>
<td class="enum_member_description">
<p>The section defines a CSS ruleset.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GTK-CSS-SECTION-SELECTOR:CAPS"></a>GTK_CSS_SECTION_SELECTOR</p></td>
<td class="enum_member_description">
<p>The section defines a CSS selector.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GTK-CSS-SECTION-DECLARATION:CAPS"></a>GTK_CSS_SECTION_DECLARATION</p></td>
<td class="enum_member_description">
<p>The section defines the declaration of
  a CSS variable.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GTK-CSS-SECTION-VALUE:CAPS"></a>GTK_CSS_SECTION_VALUE</p></td>
<td class="enum_member_description">
<p>The section defines the value of a CSS declaration.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GTK-CSS-SECTION-KEYFRAMES:CAPS"></a>GTK_CSS_SECTION_KEYFRAMES</p></td>
<td class="enum_member_description">
<p>The section defines keyframes. See <a class="ulink" href="http://dev.w3.org/csswg/css3-animations/#keyframes" target="_top">CSS
  Animations</a> for details. Since 3.6</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-3-2.html#api-index-3.2">3.2</a></p>
</div>
</div>
<div class="refsect1">
<a name="GtkCssProvider.signal-details"></a><h2>Signal Details</h2>
<div class="refsect2">
<a name="GtkCssProvider-parsing-error"></a><h3>The <code class="literal">“parsing-error”</code> signal</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
user_function (<a class="link" href="GtkCssProvider.html" title="GtkCssProvider"><span class="type">GtkCssProvider</span></a> *provider,
               <a class="link" href="GtkCssProvider.html#GtkCssSection"><span class="type">GtkCssSection</span></a>  *section,
               <a href="https://developer.gnome.org/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>         *error,
               <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>        user_data)</pre>
<p>Signals that a parsing error occurred. the <em class="parameter"><code>path</code></em>
, <em class="parameter"><code>line</code></em>
 and <em class="parameter"><code>position</code></em>

describe the actual location of the error as accurately as possible.</p>
<p>Parsing errors are never fatal, so the parsing will resume after
the error. Errors may however cause parts of the given
data or even all of it to not be parsed at all. So it is a useful idea
to check that the parsing succeeds by connecting to this signal.</p>
<p>Note that this signal may be emitted at any time as the css provider
may opt to defer parsing parts or all of the input to a later time
than when a loading function was called.</p>
<div class="refsect3">
<a name="GtkCssProvider-parsing-error.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>provider</p></td>
<td class="parameter_description"><p>the provider that had a parsing error</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>section</p></td>
<td class="parameter_description"><p>section the error happened in</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>The parsing error</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>user data set when the signal handler was connected.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p>Flags: <a href="https://developer.gnome.org/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS">Run Last</a></p>
</div>
</div>
<div class="refsect1">
<a name="GtkCssProvider.see-also"></a><h2>See Also</h2>
<p><a class="link" href="GtkStyleContext.html" title="GtkStyleContext"><span class="type">GtkStyleContext</span></a>, <a class="link" href="GtkStyleProvider.html" title="GtkStyleProvider"><span class="type">GtkStyleProvider</span></a></p>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.25.1</div>
</body>
</html>