-
-
Notifications
You must be signed in to change notification settings - Fork 46
/
Pango-1.0.gir
14589 lines (13925 loc) · 721 KB
/
Pango-1.0.gir
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
<?xml version="1.0"?>
<!-- This file was automatically generated from C sources - DO NOT EDIT!
To affect the contents of this file, edit the original C definitions,
and/or use gtk-doc annotations. -->
<repository xmlns="http://www.gtk.org/introspection/core/1.0" xmlns:c="http://www.gtk.org/introspection/c/1.0" xmlns:glib="http://www.gtk.org/introspection/glib/1.0" version="1.2">
<include name="GObject" version="2.0"/>
<include name="Gio" version="2.0"/>
<include name="HarfBuzz" version="0.0"/>
<include name="cairo" version="1.0"/>
<package name="pango"/>
<c:include name="pango/pango.h"/>
<namespace name="Pango" version="1.0" shared-library="libpango-1.0.so.0" c:identifier-prefixes="Pango" c:symbol-prefixes="pango">
<alias name="Glyph" c:type="PangoGlyph">
<doc xml:space="preserve">A `PangoGlyph` represents a single glyph in the output form of a string.</doc>
<type name="guint32" c:type="guint32"/>
</alias>
<alias name="GlyphUnit" c:type="PangoGlyphUnit">
<doc xml:space="preserve">The `PangoGlyphUnit` type is used to store dimensions within
Pango.
Dimensions are stored in 1/PANGO_SCALE of a device unit.
(A device unit might be a pixel for screen display, or
a point on a printer.) PANGO_SCALE is currently 1024, and
may change in the future (unlikely though), but you should not
depend on its exact value.
The PANGO_PIXELS() macro can be used to convert from glyph units
into device units with correct rounding.</doc>
<type name="gint32" c:type="gint32"/>
</alias>
<alias name="LayoutRun" c:type="PangoLayoutRun">
<doc xml:space="preserve">A `PangoLayoutRun` represents a single run within a `PangoLayoutLine`.
It is simply an alternate name for [[email protected]].
See the [[email protected]] docs for details on the fields.</doc>
<type name="GlyphItem" c:type="PangoGlyphItem"/>
</alias>
<constant name="ANALYSIS_FLAG_CENTERED_BASELINE" value="1" c:type="PANGO_ANALYSIS_FLAG_CENTERED_BASELINE" version="1.16">
<doc xml:space="preserve">Whether the segment should be shifted to center around the baseline.
This is mainly used in vertical writing directions.</doc>
<type name="gint" c:type="gint"/>
</constant>
<constant name="ANALYSIS_FLAG_IS_ELLIPSIS" value="2" c:type="PANGO_ANALYSIS_FLAG_IS_ELLIPSIS" version="1.36.7">
<doc xml:space="preserve">Whether this run holds ellipsized text.</doc>
<type name="gint" c:type="gint"/>
</constant>
<constant name="ANALYSIS_FLAG_NEED_HYPHEN" value="4" c:type="PANGO_ANALYSIS_FLAG_NEED_HYPHEN" version="1.44">
<doc xml:space="preserve">Whether to add a hyphen at the end of the run during shaping.</doc>
<type name="gint" c:type="gint"/>
</constant>
<function-macro name="ASCENT" c:identifier="PANGO_ASCENT" introspectable="0">
<doc xml:space="preserve">Extracts the *ascent* from a `PangoRectangle`
representing glyph extents.
The ascent is the distance from the baseline to the
highest point of the character. This is positive if the
glyph ascends above the baseline.</doc>
<parameters>
<parameter name="rect">
<doc xml:space="preserve">a `PangoRectangle`</doc>
</parameter>
</parameters>
</function-macro>
<constant name="ATTR_INDEX_FROM_TEXT_BEGINNING" value="0" c:type="PANGO_ATTR_INDEX_FROM_TEXT_BEGINNING" version="1.24">
<doc xml:space="preserve">Value for @start_index in `PangoAttribute` that indicates
the beginning of the text.</doc>
<type name="guint" c:type="guint"/>
</constant>
<constant name="ATTR_INDEX_TO_TEXT_END" value="4294967295" c:type="PANGO_ATTR_INDEX_TO_TEXT_END" version="1.24">
<doc xml:space="preserve">Value for @end_index in `PangoAttribute` that indicates
the end of the text.</doc>
<type name="guint" c:type="guint"/>
</constant>
<enumeration name="Alignment" glib:type-name="PangoAlignment" glib:get-type="pango_alignment_get_type" c:type="PangoAlignment">
<doc xml:space="preserve">`PangoAlignment` describes how to align the lines of a `PangoLayout`
within the available space.
If the `PangoLayout` is set to justify using [[email protected]_justify],
this only affects partial lines.
See [[email protected]_auto_dir] for how text direction affects
the interpretation of `PangoAlignment` values.</doc>
<member name="left" value="0" c:identifier="PANGO_ALIGN_LEFT" glib:nick="left" glib:name="PANGO_ALIGN_LEFT">
<doc xml:space="preserve">Put all available space on the right</doc>
</member>
<member name="center" value="1" c:identifier="PANGO_ALIGN_CENTER" glib:nick="center" glib:name="PANGO_ALIGN_CENTER">
<doc xml:space="preserve">Center the line within the available space</doc>
</member>
<member name="right" value="2" c:identifier="PANGO_ALIGN_RIGHT" glib:nick="right" glib:name="PANGO_ALIGN_RIGHT">
<doc xml:space="preserve">Put all available space on the left</doc>
</member>
</enumeration>
<record name="Analysis" c:type="PangoAnalysis">
<doc xml:space="preserve">The `PangoAnalysis` structure stores information about
the properties of a segment of text.</doc>
<field name="shape_engine" writable="1">
<doc xml:space="preserve">unused, reserved</doc>
<type name="gpointer" c:type="gpointer"/>
</field>
<field name="lang_engine" writable="1">
<doc xml:space="preserve">unused, reserved</doc>
<type name="gpointer" c:type="gpointer"/>
</field>
<field name="font" writable="1">
<doc xml:space="preserve">the font for this segment.</doc>
<type name="Font" c:type="PangoFont*"/>
</field>
<field name="level" writable="1">
<doc xml:space="preserve">the bidirectional level for this segment.</doc>
<type name="guint8" c:type="guint8"/>
</field>
<field name="gravity" writable="1">
<doc xml:space="preserve">the glyph orientation for this segment (A `PangoGravity`).</doc>
<type name="guint8" c:type="guint8"/>
</field>
<field name="flags" writable="1">
<doc xml:space="preserve">boolean flags for this segment (Since: 1.16).</doc>
<type name="guint8" c:type="guint8"/>
</field>
<field name="script" writable="1">
<doc xml:space="preserve">the detected script for this segment (A `PangoScript`) (Since: 1.18).</doc>
<type name="guint8" c:type="guint8"/>
</field>
<field name="language" writable="1">
<doc xml:space="preserve">the detected language for this segment.</doc>
<type name="Language" c:type="PangoLanguage*"/>
</field>
<field name="extra_attrs" writable="1">
<doc xml:space="preserve">extra attributes for this segment.</doc>
<type name="GLib.SList" c:type="GSList*">
<type name="gpointer" c:type="gpointer"/>
</type>
</field>
</record>
<record name="AttrClass" c:type="PangoAttrClass">
<doc xml:space="preserve">The `PangoAttrClass` structure stores the type and operations for
a particular type of attribute.
The functions in this structure should not be called directly. Instead,
one should use the wrapper functions provided for `PangoAttribute`.</doc>
<field name="type" writable="1">
<doc xml:space="preserve">the type ID for this attribute</doc>
<type name="AttrType" c:type="PangoAttrType"/>
</field>
<field name="copy">
<doc xml:space="preserve">function to duplicate an attribute of this type
(see [[email protected]])</doc>
<callback name="copy">
<return-value transfer-ownership="full">
<type name="Attribute" c:type="PangoAttribute*"/>
</return-value>
<parameters>
<parameter name="attr" transfer-ownership="none">
<type name="Attribute" c:type="const PangoAttribute*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="destroy">
<doc xml:space="preserve">function to free an attribute of this type
(see [[email protected]])</doc>
<callback name="destroy">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="attr" transfer-ownership="none">
<type name="Attribute" c:type="PangoAttribute*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="equal">
<doc xml:space="preserve">function to check two attributes of this type for equality
(see [[email protected]])</doc>
<callback name="equal">
<return-value transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="attr1" transfer-ownership="none">
<type name="Attribute" c:type="const PangoAttribute*"/>
</parameter>
<parameter name="attr2" transfer-ownership="none">
<type name="Attribute" c:type="const PangoAttribute*"/>
</parameter>
</parameters>
</callback>
</field>
</record>
<record name="AttrColor" c:type="PangoAttrColor">
<doc xml:space="preserve">The `PangoAttrColor` structure is used to represent attributes that
are colors.</doc>
<field name="attr" writable="1">
<doc xml:space="preserve">the common portion of the attribute</doc>
<type name="Attribute" c:type="PangoAttribute"/>
</field>
<field name="color" writable="1">
<doc xml:space="preserve">the `PangoColor` which is the value of the attribute</doc>
<type name="Color" c:type="PangoColor"/>
</field>
</record>
<callback name="AttrDataCopyFunc" c:type="PangoAttrDataCopyFunc">
<doc xml:space="preserve">Type of a function that can duplicate user data for an attribute.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">new copy of @user_data.</doc>
<type name="gpointer" c:type="gpointer"/>
</return-value>
<parameters>
<parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1" closure="0">
<doc xml:space="preserve">user data to copy</doc>
<type name="gpointer" c:type="gconstpointer"/>
</parameter>
</parameters>
</callback>
<callback name="AttrFilterFunc" c:type="PangoAttrFilterFunc">
<doc xml:space="preserve">Type of a function filtering a list of attributes.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the attribute should be selected for
filtering, %FALSE otherwise.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="attribute" transfer-ownership="none">
<doc xml:space="preserve">a Pango attribute</doc>
<type name="Attribute" c:type="PangoAttribute*"/>
</parameter>
<parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1" closure="1">
<doc xml:space="preserve">user data passed to the function</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
</parameters>
</callback>
<record name="AttrFloat" c:type="PangoAttrFloat">
<doc xml:space="preserve">The `PangoAttrFloat` structure is used to represent attributes with
a float or double value.</doc>
<field name="attr" writable="1">
<doc xml:space="preserve">the common portion of the attribute</doc>
<type name="Attribute" c:type="PangoAttribute"/>
</field>
<field name="value" writable="1">
<doc xml:space="preserve">the value of the attribute</doc>
<type name="gdouble" c:type="double"/>
</field>
</record>
<record name="AttrFontDesc" c:type="PangoAttrFontDesc">
<doc xml:space="preserve">The `PangoAttrFontDesc` structure is used to store an attribute that
sets all aspects of the font description at once.</doc>
<field name="attr" writable="1">
<doc xml:space="preserve">the common portion of the attribute</doc>
<type name="Attribute" c:type="PangoAttribute"/>
</field>
<field name="desc" writable="1">
<doc xml:space="preserve">the font description which is the value of this attribute</doc>
<type name="FontDescription" c:type="PangoFontDescription*"/>
</field>
<function name="new" c:identifier="pango_attr_font_desc_new">
<doc xml:space="preserve">Create a new font description attribute.
This attribute allows setting family, style, weight, variant,
stretch, and size simultaneously.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">the newly allocated
`PangoAttribute`, which should be freed with
[[email protected]]</doc>
<type name="Attribute" c:type="PangoAttribute*"/>
</return-value>
<parameters>
<parameter name="desc" transfer-ownership="none">
<doc xml:space="preserve">the font description</doc>
<type name="FontDescription" c:type="const PangoFontDescription*"/>
</parameter>
</parameters>
</function>
</record>
<record name="AttrFontFeatures" c:type="PangoAttrFontFeatures" version="1.38">
<doc xml:space="preserve">The `PangoAttrFontFeatures` structure is used to represent OpenType
font features as an attribute.</doc>
<field name="attr" writable="1">
<doc xml:space="preserve">the common portion of the attribute</doc>
<type name="Attribute" c:type="PangoAttribute"/>
</field>
<field name="features" writable="1">
<doc xml:space="preserve">the features, as a string in CSS syntax</doc>
<type name="utf8" c:type="gchar*"/>
</field>
<function name="new" c:identifier="pango_attr_font_features_new" version="1.38">
<doc xml:space="preserve">Create a new font features tag attribute.
You can use this attribute to select OpenType font features like small-caps,
alternative glyphs, ligatures, etc. for fonts that support them.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">the newly allocated
`PangoAttribute`, which should be freed with
[[email protected]]</doc>
<type name="Attribute" c:type="PangoAttribute*"/>
</return-value>
<parameters>
<parameter name="features" transfer-ownership="none">
<doc xml:space="preserve">a string with OpenType font features, with the syntax of the [CSS
font-feature-settings property](https://www.w3.org/TR/css-fonts-4/#font-rend-desc)</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</function>
</record>
<record name="AttrInt" c:type="PangoAttrInt">
<doc xml:space="preserve">The `PangoAttrInt` structure is used to represent attributes with
an integer or enumeration value.</doc>
<field name="attr" writable="1">
<doc xml:space="preserve">the common portion of the attribute</doc>
<type name="Attribute" c:type="PangoAttribute"/>
</field>
<field name="value" writable="1">
<doc xml:space="preserve">the value of the attribute</doc>
<type name="gint" c:type="int"/>
</field>
</record>
<record name="AttrIterator" c:type="PangoAttrIterator" opaque="1" glib:type-name="PangoAttrIterator" glib:get-type="pango_attr_iterator_get_type" c:symbol-prefix="attr_iterator">
<doc xml:space="preserve">A `PangoAttrIterator` is used to iterate through a `PangoAttrList`.
A new iterator is created with [[email protected]_iterator].
Once the iterator is created, it can be advanced through the style
changes in the text using [[email protected]]. At each
style change, the range of the current style segment and the attributes
currently in effect can be queried.</doc>
<method name="copy" c:identifier="pango_attr_iterator_copy">
<doc xml:space="preserve">Copy a `PangoAttrIterator`.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">the newly allocated
`PangoAttrIterator`, which should be freed with
[[email protected]]</doc>
<type name="AttrIterator" c:type="PangoAttrIterator*"/>
</return-value>
<parameters>
<instance-parameter name="iterator" transfer-ownership="none">
<doc xml:space="preserve">a `PangoAttrIterator`</doc>
<type name="AttrIterator" c:type="PangoAttrIterator*"/>
</instance-parameter>
</parameters>
</method>
<method name="destroy" c:identifier="pango_attr_iterator_destroy">
<doc xml:space="preserve">Destroy a `PangoAttrIterator` and free all associated memory.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="iterator" transfer-ownership="none">
<doc xml:space="preserve">a `PangoAttrIterator`</doc>
<type name="AttrIterator" c:type="PangoAttrIterator*"/>
</instance-parameter>
</parameters>
</method>
<method name="get" c:identifier="pango_attr_iterator_get">
<doc xml:space="preserve">Find the current attribute of a particular type
at the iterator location.
When multiple attributes of the same type overlap,
the attribute whose range starts closest to the
current location is used.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the current
attribute of the given type, or %NULL if no attribute
of that type applies to the current location.</doc>
<type name="Attribute" c:type="PangoAttribute*"/>
</return-value>
<parameters>
<instance-parameter name="iterator" transfer-ownership="none">
<doc xml:space="preserve">a `PangoAttrIterator`</doc>
<type name="AttrIterator" c:type="PangoAttrIterator*"/>
</instance-parameter>
<parameter name="type" transfer-ownership="none">
<doc xml:space="preserve">the type of attribute to find</doc>
<type name="AttrType" c:type="PangoAttrType"/>
</parameter>
</parameters>
</method>
<method name="get_attrs" c:identifier="pango_attr_iterator_get_attrs" version="1.2">
<doc xml:space="preserve">Gets a list of all attributes at the current position of the
iterator.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">
a list of all attributes for the current range. To free
this value, call [[email protected]] on each
value and g_slist_free() on the list.</doc>
<type name="GLib.SList" c:type="GSList*">
<type name="Attribute"/>
</type>
</return-value>
<parameters>
<instance-parameter name="iterator" transfer-ownership="none">
<doc xml:space="preserve">a `PangoAttrIterator`</doc>
<type name="AttrIterator" c:type="PangoAttrIterator*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_font" c:identifier="pango_attr_iterator_get_font">
<doc xml:space="preserve">Get the font and other attributes at the current
iterator position.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="iterator" transfer-ownership="none">
<doc xml:space="preserve">a `PangoAttrIterator`</doc>
<type name="AttrIterator" c:type="PangoAttrIterator*"/>
</instance-parameter>
<parameter name="desc" transfer-ownership="none">
<doc xml:space="preserve">a `PangoFontDescription` to fill in with the current
values. The family name in this structure will be set using
[[email protected]_family_static] using
values from an attribute in the `PangoAttrList` associated
with the iterator, so if you plan to keep it around, you
must call:
`pango_font_description_set_family (desc, pango_font_description_get_family (desc))`.</doc>
<type name="FontDescription" c:type="PangoFontDescription*"/>
</parameter>
<parameter name="language" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to store language tag
for item, or %NULL if none is found.</doc>
<type name="Language" c:type="PangoLanguage**"/>
</parameter>
<parameter name="extra_attrs" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">
location in which to store a list of non-font attributes
at the the current position; only the highest priority
value of each attribute will be added to this list. In
order to free this value, you must call
[[email protected]] on each member.</doc>
<type name="GLib.SList" c:type="GSList**">
<type name="Attribute"/>
</type>
</parameter>
</parameters>
</method>
<method name="next" c:identifier="pango_attr_iterator_next">
<doc xml:space="preserve">Advance the iterator until the next change of style.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%FALSE if the iterator is at the end
of the list, otherwise %TRUE</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="iterator" transfer-ownership="none">
<doc xml:space="preserve">a `PangoAttrIterator`</doc>
<type name="AttrIterator" c:type="PangoAttrIterator*"/>
</instance-parameter>
</parameters>
</method>
<method name="range" c:identifier="pango_attr_iterator_range">
<doc xml:space="preserve">Get the range of the current segment.
Note that the stored return values are signed, not unsigned
like the values in `PangoAttribute`. To deal with this API
oversight, stored return values that wouldn't fit into
a signed integer are clamped to %G_MAXINT.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="iterator" transfer-ownership="none">
<doc xml:space="preserve">a PangoAttrIterator</doc>
<type name="AttrIterator" c:type="PangoAttrIterator*"/>
</instance-parameter>
<parameter name="start" direction="out" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">location to store the start of the range</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="end" direction="out" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">location to store the end of the range</doc>
<type name="gint" c:type="int*"/>
</parameter>
</parameters>
</method>
</record>
<record name="AttrLanguage" c:type="PangoAttrLanguage">
<doc xml:space="preserve">The `PangoAttrLanguage` structure is used to represent attributes that
are languages.</doc>
<field name="attr" writable="1">
<doc xml:space="preserve">the common portion of the attribute</doc>
<type name="Attribute" c:type="PangoAttribute"/>
</field>
<field name="value" writable="1">
<doc xml:space="preserve">the `PangoLanguage` which is the value of the attribute</doc>
<type name="Language" c:type="PangoLanguage*"/>
</field>
<function name="new" c:identifier="pango_attr_language_new">
<doc xml:space="preserve">Create a new language tag attribute.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">the newly allocated
`PangoAttribute`, which should be freed with
[[email protected]]</doc>
<type name="Attribute" c:type="PangoAttribute*"/>
</return-value>
<parameters>
<parameter name="language" transfer-ownership="none">
<doc xml:space="preserve">language tag</doc>
<type name="Language" c:type="PangoLanguage*"/>
</parameter>
</parameters>
</function>
</record>
<record name="AttrList" c:type="PangoAttrList" opaque="1" glib:type-name="PangoAttrList" glib:get-type="pango_attr_list_get_type" c:symbol-prefix="attr_list">
<doc xml:space="preserve">A `PangoAttrList` represents a list of attributes that apply to a section
of text.
The attributes in a `PangoAttrList` are, in general, allowed to overlap in
an arbitrary fashion. However, if the attributes are manipulated only through
[[email protected]], the overlap between properties will meet
stricter criteria.
Since the `PangoAttrList` structure is stored as a linear list, it is not
suitable for storing attributes for large amounts of text. In general, you
should not use a single `PangoAttrList` for more than one paragraph of text.</doc>
<constructor name="new" c:identifier="pango_attr_list_new">
<doc xml:space="preserve">Create a new empty attribute list with a reference
count of one.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">the newly allocated
`PangoAttrList`, which should be freed with
[[email protected]]</doc>
<type name="AttrList" c:type="PangoAttrList*"/>
</return-value>
</constructor>
<method name="change" c:identifier="pango_attr_list_change">
<doc xml:space="preserve">Insert the given attribute into the `PangoAttrList`.
It will replace any attributes of the same type
on that segment and be merged with any adjoining
attributes that are identical.
This function is slower than [[email protected]]
for creating an attribute list in order (potentially
much slower for large lists). However,
[[email protected]] is not suitable for
continually changing a set of attributes since it
never removes or combines existing attributes.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="list" transfer-ownership="none">
<doc xml:space="preserve">a `PangoAttrList`</doc>
<type name="AttrList" c:type="PangoAttrList*"/>
</instance-parameter>
<parameter name="attr" transfer-ownership="full">
<doc xml:space="preserve">the attribute to insert</doc>
<type name="Attribute" c:type="PangoAttribute*"/>
</parameter>
</parameters>
</method>
<method name="copy" c:identifier="pango_attr_list_copy">
<doc xml:space="preserve">Copy @list and return an identical new list.</doc>
<return-value transfer-ownership="full" nullable="1">
<doc xml:space="preserve">the newly allocated
`PangoAttrList`, with a reference count of one,
which should be freed with [[email protected]].
Returns %NULL if @list was %NULL.</doc>
<type name="AttrList" c:type="PangoAttrList*"/>
</return-value>
<parameters>
<instance-parameter name="list" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `PangoAttrList`</doc>
<type name="AttrList" c:type="PangoAttrList*"/>
</instance-parameter>
</parameters>
</method>
<method name="equal" c:identifier="pango_attr_list_equal" version="1.46">
<doc xml:space="preserve">Checks whether @list and @other_list contain the same
attributes and whether those attributes apply to the
same ranges.
Beware that this will return wrong values if any list
contains duplicates.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the lists are equal, %FALSE if
they aren't</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="list" transfer-ownership="none">
<doc xml:space="preserve">a `PangoAttrList`</doc>
<type name="AttrList" c:type="PangoAttrList*"/>
</instance-parameter>
<parameter name="other_list" transfer-ownership="none">
<doc xml:space="preserve">the other `PangoAttrList`</doc>
<type name="AttrList" c:type="PangoAttrList*"/>
</parameter>
</parameters>
</method>
<method name="filter" c:identifier="pango_attr_list_filter" version="1.2">
<doc xml:space="preserve">Given a `PangoAttrList` and callback function, removes
any elements of @list for which @func returns %TRUE and
inserts them into a new list.</doc>
<return-value transfer-ownership="full" nullable="1">
<doc xml:space="preserve">the new
`PangoAttrList` or %NULL if no attributes of the
given types were found</doc>
<type name="AttrList" c:type="PangoAttrList*"/>
</return-value>
<parameters>
<instance-parameter name="list" transfer-ownership="none">
<doc xml:space="preserve">a `PangoAttrList`</doc>
<type name="AttrList" c:type="PangoAttrList*"/>
</instance-parameter>
<parameter name="func" transfer-ownership="none" scope="call" closure="1">
<doc xml:space="preserve">callback function;
returns %TRUE if an attribute should be filtered out</doc>
<type name="AttrFilterFunc" c:type="PangoAttrFilterFunc"/>
</parameter>
<parameter name="data" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">Data to be passed to @func</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
</parameters>
</method>
<method name="get_attributes" c:identifier="pango_attr_list_get_attributes" version="1.44">
<doc xml:space="preserve">Gets a list of all attributes in @list.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">
a list of all attributes in @list. To free this value,
call [[email protected]] on each value and
g_slist_free() on the list.</doc>
<type name="GLib.SList" c:type="GSList*">
<type name="Attribute"/>
</type>
</return-value>
<parameters>
<instance-parameter name="list" transfer-ownership="none">
<doc xml:space="preserve">a `PangoAttrList`</doc>
<type name="AttrList" c:type="PangoAttrList*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_iterator" c:identifier="pango_attr_list_get_iterator">
<doc xml:space="preserve">Create a iterator initialized to the beginning of the list.
@list must not be modified until this iterator is freed.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">the newly allocated
`PangoAttrIterator`, which should be freed with
[[email protected]]</doc>
<type name="AttrIterator" c:type="PangoAttrIterator*"/>
</return-value>
<parameters>
<instance-parameter name="list" transfer-ownership="none">
<doc xml:space="preserve">a `PangoAttrList`</doc>
<type name="AttrList" c:type="PangoAttrList*"/>
</instance-parameter>
</parameters>
</method>
<method name="insert" c:identifier="pango_attr_list_insert">
<doc xml:space="preserve">Insert the given attribute into the `PangoAttrList`.
It will be inserted after all other attributes with a
matching @start_index.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="list" transfer-ownership="none">
<doc xml:space="preserve">a `PangoAttrList`</doc>
<type name="AttrList" c:type="PangoAttrList*"/>
</instance-parameter>
<parameter name="attr" transfer-ownership="full">
<doc xml:space="preserve">the attribute to insert</doc>
<type name="Attribute" c:type="PangoAttribute*"/>
</parameter>
</parameters>
</method>
<method name="insert_before" c:identifier="pango_attr_list_insert_before">
<doc xml:space="preserve">Insert the given attribute into the `PangoAttrList`.
It will be inserted before all other attributes with a
matching @start_index.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="list" transfer-ownership="none">
<doc xml:space="preserve">a `PangoAttrList`</doc>
<type name="AttrList" c:type="PangoAttrList*"/>
</instance-parameter>
<parameter name="attr" transfer-ownership="full">
<doc xml:space="preserve">the attribute to insert</doc>
<type name="Attribute" c:type="PangoAttribute*"/>
</parameter>
</parameters>
</method>
<method name="ref" c:identifier="pango_attr_list_ref" version="1.10">
<doc xml:space="preserve">Increase the reference count of the given attribute
list by one.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">The attribute list passed in</doc>
<type name="AttrList" c:type="PangoAttrList*"/>
</return-value>
<parameters>
<instance-parameter name="list" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `PangoAttrList`</doc>
<type name="AttrList" c:type="PangoAttrList*"/>
</instance-parameter>
</parameters>
</method>
<method name="splice" c:identifier="pango_attr_list_splice">
<doc xml:space="preserve">This function opens up a hole in @list, fills it
in with attributes from the left, and then merges
@other on top of the hole.
This operation is equivalent to stretching every attribute
that applies at position @pos in @list by an amount @len,
and then calling [[email protected]] with a copy
of each attribute in @other in sequence (offset in position
by @pos, and limited in length to @len).
This operation proves useful for, for instance, inserting
a pre-edit string in the middle of an edit buffer.
For backwards compatibility, the function behaves differently
when @len is 0. In this case, the attributes from @other are
not imited to @len, and are just overlayed on top of @list.
This mode is useful for merging two lists of attributes together.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="list" transfer-ownership="none">
<doc xml:space="preserve">a `PangoAttrList`</doc>
<type name="AttrList" c:type="PangoAttrList*"/>
</instance-parameter>
<parameter name="other" transfer-ownership="none">
<doc xml:space="preserve">another `PangoAttrList`</doc>
<type name="AttrList" c:type="PangoAttrList*"/>
</parameter>
<parameter name="pos" transfer-ownership="none">
<doc xml:space="preserve">the position in @list at which to insert @other</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="len" transfer-ownership="none">
<doc xml:space="preserve">the length of the spliced segment. (Note that this
must be specified since the attributes in @other may only
be present at some subsection of this range)</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="to_string" c:identifier="pango_attr_list_to_string" version="1.50">
<doc xml:space="preserve">Serializes a `PangoAttrList` to a string.
In the resulting string, serialized attributes are separated by newlines or commas.
Individual attributes are serialized to a string of the form
START END TYPE VALUE
Where START and END are the indices (with -1 being accepted in place
of MAXUINT), TYPE is the nickname of the attribute value type, e.g.
_weight_ or _stretch_, and the value is serialized according to its type:
- enum values as nick or numeric value
- boolean values as _true_ or _false_
- integers and floats as numbers
- strings as string, optionally quoted
- font features as quoted string
- PangoLanguage as string
- PangoFontDescription as serialized by [[email protected]_string], quoted
- PangoColor as serialized by [[email protected]_string]
Examples:
```
0 10 foreground red, 5 15 weight bold, 0 200 font-desc "Sans 10"
```
```
0 -1 weight 700
0 100 family Times
```
To parse the returned value, use [[email protected]_string].
Note that shape attributes can not be serialized.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a newly allocated string</doc>
<type name="utf8" c:type="char*"/>
</return-value>
<parameters>
<instance-parameter name="list" transfer-ownership="none">
<doc xml:space="preserve">a `PangoAttrList`</doc>
<type name="AttrList" c:type="PangoAttrList*"/>
</instance-parameter>
</parameters>
</method>
<method name="unref" c:identifier="pango_attr_list_unref">
<doc xml:space="preserve">Decrease the reference count of the given attribute
list by one.
If the result is zero, free the attribute list
and the attributes it contains.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="list" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `PangoAttrList`</doc>
<type name="AttrList" c:type="PangoAttrList*"/>
</instance-parameter>
</parameters>
</method>
<method name="update" c:identifier="pango_attr_list_update" version="1.44">
<doc xml:space="preserve">Update indices of attributes in @list for a change in the
text they refer to.
The change that this function applies is removing @remove
bytes at position @pos and inserting @add bytes instead.
Attributes that fall entirely in the (@pos, @pos + @remove)
range are removed.
Attributes that start or end inside the (@pos, @pos + @remove)
range are shortened to reflect the removal.
Attributes start and end positions are updated if they are
behind @pos + @remove.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="list" transfer-ownership="none">
<doc xml:space="preserve">a `PangoAttrList`</doc>
<type name="AttrList" c:type="PangoAttrList*"/>
</instance-parameter>
<parameter name="pos" transfer-ownership="none">
<doc xml:space="preserve">the position of the change</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="remove" transfer-ownership="none">
<doc xml:space="preserve">the number of removed bytes</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="add" transfer-ownership="none">
<doc xml:space="preserve">the number of added bytes</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<function name="from_string" c:identifier="pango_attr_list_from_string" version="1.50">
<doc xml:space="preserve">Deserializes a `PangoAttrList` from a string.
This is the counterpart to [[email protected]_string].
See that functions for details about the format.</doc>
<return-value transfer-ownership="full" nullable="1">
<doc xml:space="preserve">a new `PangoAttrList`</doc>
<type name="AttrList" c:type="PangoAttrList*"/>
</return-value>
<parameters>
<parameter name="text" transfer-ownership="none">
<doc xml:space="preserve">a string</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</function>
</record>
<record name="AttrShape" c:type="PangoAttrShape">
<doc xml:space="preserve">The `PangoAttrShape` structure is used to represent attributes which
impose shape restrictions.</doc>
<field name="attr" writable="1">
<doc xml:space="preserve">the common portion of the attribute</doc>
<type name="Attribute" c:type="PangoAttribute"/>
</field>
<field name="ink_rect" writable="1">
<doc xml:space="preserve">the ink rectangle to restrict to</doc>
<type name="Rectangle" c:type="PangoRectangle"/>
</field>
<field name="logical_rect" writable="1">
<doc xml:space="preserve">the logical rectangle to restrict to</doc>
<type name="Rectangle" c:type="PangoRectangle"/>
</field>
<field name="data" writable="1">
<doc xml:space="preserve">user data set (see [[email protected]_with_data])</doc>
<type name="gpointer" c:type="gpointer"/>
</field>
<field name="copy_func" writable="1">
<doc xml:space="preserve">copy function for the user data</doc>
<type name="AttrDataCopyFunc" c:type="PangoAttrDataCopyFunc"/>
</field>
<field name="destroy_func" writable="1">
<doc xml:space="preserve">destroy function for the user data</doc>
<type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
</field>
<function name="new" c:identifier="pango_attr_shape_new">
<doc xml:space="preserve">Create a new shape attribute.
A shape is used to impose a particular ink and logical
rectangle on the result of shaping a particular glyph.
This might be used, for instance, for embedding a picture
or a widget inside a `PangoLayout`.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">the newly allocated
`PangoAttribute`, which should be freed with
[[email protected]]</doc>
<type name="Attribute" c:type="PangoAttribute*"/>
</return-value>
<parameters>
<parameter name="ink_rect" transfer-ownership="none">
<doc xml:space="preserve">ink rectangle to assign to each character</doc>
<type name="Rectangle" c:type="const PangoRectangle*"/>
</parameter>
<parameter name="logical_rect" transfer-ownership="none">
<doc xml:space="preserve">logical rectangle to assign to each character</doc>
<type name="Rectangle" c:type="const PangoRectangle*"/>
</parameter>
</parameters>
</function>
<function name="new_with_data" c:identifier="pango_attr_shape_new_with_data" version="1.8">
<doc xml:space="preserve">Creates a new shape attribute.
Like [[email protected]], but a user data pointer
is also provided; this pointer can be accessed when later
rendering the glyph.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">the newly allocated
`PangoAttribute`, which should be freed with
[[email protected]]</doc>
<type name="Attribute" c:type="PangoAttribute*"/>
</return-value>
<parameters>
<parameter name="ink_rect" transfer-ownership="none">
<doc xml:space="preserve">ink rectangle to assign to each character</doc>
<type name="Rectangle" c:type="const PangoRectangle*"/>
</parameter>
<parameter name="logical_rect" transfer-ownership="none">
<doc xml:space="preserve">logical rectangle to assign to each character</doc>
<type name="Rectangle" c:type="const PangoRectangle*"/>
</parameter>
<parameter name="data" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">user data pointer</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
<parameter name="copy_func" transfer-ownership="none" nullable="1" allow-none="1" scope="notified" destroy="4">
<doc xml:space="preserve">function to copy @data when the
attribute is copied. If %NULL, @data is simply copied
as a pointer</doc>
<type name="AttrDataCopyFunc" c:type="PangoAttrDataCopyFunc"/>
</parameter>
<parameter name="destroy_func" transfer-ownership="none" nullable="1" allow-none="1" scope="async">
<doc xml:space="preserve">function to free @data when the
attribute is freed</doc>
<type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
</parameter>
</parameters>
</function>
</record>
<record name="AttrSize" c:type="PangoAttrSize">
<doc xml:space="preserve">The `PangoAttrSize` structure is used to represent attributes which
set font size.</doc>
<field name="attr" writable="1">
<doc xml:space="preserve">the common portion of the attribute</doc>
<type name="Attribute" c:type="PangoAttribute"/>
</field>
<field name="size" writable="1">
<doc xml:space="preserve">size of font, in units of 1/%PANGO_SCALE of a point (for
%PANGO_ATTR_SIZE) or of a device unit (for %PANGO_ATTR_ABSOLUTE_SIZE)</doc>
<type name="gint" c:type="int"/>
</field>
<field name="absolute" writable="1" bits="1">
<doc xml:space="preserve">whether the font size is in device units or points.
This field is only present for compatibility with Pango-1.8.0
(%PANGO_ATTR_ABSOLUTE_SIZE was added in 1.8.1); and always will
be %FALSE for %PANGO_ATTR_SIZE and %TRUE for %PANGO_ATTR_ABSOLUTE_SIZE.</doc>
<type name="guint" c:type="guint"/>
</field>
<function name="new" c:identifier="pango_attr_size_new">
<doc xml:space="preserve">Create a new font-size attribute in fractional points.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">the newly allocated
`PangoAttribute`, which should be freed with
[[email protected]]</doc>
<type name="Attribute" c:type="PangoAttribute*"/>
</return-value>
<parameters>
<parameter name="size" transfer-ownership="none">
<doc xml:space="preserve">the font size, in %PANGO_SCALE-ths of a point</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</function>
<function name="new_absolute" c:identifier="pango_attr_size_new_absolute" version="1.8">
<doc xml:space="preserve">Create a new font-size attribute in device units.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">the newly allocated
`PangoAttribute`, which should be freed with
[[email protected]]</doc>
<type name="Attribute" c:type="PangoAttribute*"/>
</return-value>
<parameters>
<parameter name="size" transfer-ownership="none">
<doc xml:space="preserve">the font size, in %PANGO_SCALE-ths of a device unit</doc>
<type name="gint" c:type="int"/>
</parameter>