2
2
@c %start of fragment
4
@deftp Class <pango-attribute>
7
This class defines no direct slots.
4
11
@deftp Class <pango-color>
12
Derives from @code{<gboxed>}.
14
This class defines no direct slots.
7
18
@deftp Class <pango-language>
19
Derives from @code{<gboxed>}.
21
This class defines no direct slots.
10
25
@deftp Class <pango-attr-list>
13
@deffn Function pango-parse-markup (markup_text@tie{}@code{mchars}) (length@tie{}@code{int}) (accel_marker@tie{}@code{unsigned-int32}) (attr_list@tie{}@code{<pango-attr-list**>}) (text@tie{}@code{<char**>}) @result{}@tie{} (ret@tie{}@code{bool}) (accel_char@tie{}@code{unsigned-int32})
14
Parses marked-up text (see markup format) to create a plain-text string and an
17
If @var{accel-marker} is nonzero, the given character will mark the character
18
following it as an accelerator. For example, @var{accel-marker} might be an
19
ampersand or underscore. All characters marked as an accelerator will receive a
20
@samp{PANGO_UNDERLINE_LOW} attribute, and the first character so marked will be
21
returned in @var{accel-char}. Two @var{accel-marker} characters following each
22
other produce a single literal @var{accel-marker} character.
26
markup to parse (see markup format)
29
length of @var{markup-text}, or -1 if nul-terminated
32
character that precedes an accelerator, or 0 for none
35
address of return location for a @code{<pango-attr-list>}, or @samp{@code{#f}}
38
address of return location for text with tags stripped, or @samp{@code{#f}}
41
address of return location for accelerator char, or @samp{@code{#f}}
44
address of return location for errors, or @samp{@code{#f}}
47
@samp{@code{#f}} if @var{error} is set, otherwise @samp{@code{#t}}
26
Derives from @code{<gboxed>}.
28
This class defines no direct slots.
32
@deftp Class <pango-attr-iterator>
35
This class defines no direct slots.
53
39
@deffn Function pango-attr-type-register (name@tie{}@code{mchars}) @result{}@tie{} (ret@tie{}@code{<pango-attr-type>})
54
40
Allocate a new attribute type ID.
67
@deffn Function pango-attribute-equal (self@tie{}@code{<pango-attribute*>}) (attr2@tie{}@code{<pango-attribute*>}) @result{}@tie{} (ret@tie{}@code{bool})
53
@deffn Function pango-attribute-copy (self@tie{}@code{<pango-attribute>}) @result{}@tie{} (ret@tie{}@code{<pango-attribute>})
54
Make a copy of an attribute.
58
a @code{<pango-attribute>}
61
the newly allocated @code{<pango-attribute>}, which should be freed with
62
@code{pango-attribute-destroy}.
68
@deffn Function pango-attribute-equal (self@tie{}@code{<pango-attribute>}) (attr2@tie{}@code{<pango-attribute>}) @result{}@tie{} (ret@tie{}@code{bool})
68
69
Compare two attributes for equality. This compares only the actual value of the
69
70
two attributes and not the ranges that the attributes apply to.
85
@deffn Function pango-attribute-destroy (self@tie{}@code{<pango-attribute*>})
86
Destroy a @code{<pango-attribute>} and free all associated memory.
90
a @code{<pango-attribute>}.
96
@deffn Function pango-attr-language-new (language@tie{}@code{<pango-language>}) @result{}@tie{} (ret@tie{}@code{<pango-attribute*>})
86
@deffn Function pango-attr-language-new (language@tie{}@code{<pango-language>}) @result{}@tie{} (ret@tie{}@code{<pango-attribute>})
97
87
Create a new language tag attribute.
218
@deffn Function pango-attr-font-desc-new (desc@tie{}@code{<pango-font-description>}) @result{}@tie{} (ret@tie{}@code{<pango-attribute*>})
208
@deffn Function pango-attr-font-desc-new (desc@tie{}@code{<pango-font-description>}) @result{}@tie{} (ret@tie{}@code{<pango-attribute>})
219
209
Create a new font description attribute. This attribute allows setting family,
220
210
style, weight, variant, stretch, and size simultaneously.
234
@deffn Function pango-attr-foreground-new (red@tie{}@code{unsigned-int16}) (green@tie{}@code{unsigned-int16}) (blue@tie{}@code{unsigned-int16}) @result{}@tie{} (ret@tie{}@code{<pango-attribute*>})
224
@deffn Function pango-attr-foreground-new (red@tie{}@code{unsigned-int16}) (green@tie{}@code{unsigned-int16}) (blue@tie{}@code{unsigned-int16}) @result{}@tie{} (ret@tie{}@code{<pango-attribute>})
235
225
Create a new foreground color attribute.
255
@deffn Function pango-attr-background-new (red@tie{}@code{unsigned-int16}) (green@tie{}@code{unsigned-int16}) (blue@tie{}@code{unsigned-int16}) @result{}@tie{} (ret@tie{}@code{<pango-attribute*>})
245
@deffn Function pango-attr-background-new (red@tie{}@code{unsigned-int16}) (green@tie{}@code{unsigned-int16}) (blue@tie{}@code{unsigned-int16}) @result{}@tie{} (ret@tie{}@code{<pango-attribute>})
256
246
Create a new background color attribute.
291
@deffn Function pango-attr-strikethrough-color-new (red@tie{}@code{unsigned-int16}) (green@tie{}@code{unsigned-int16}) (blue@tie{}@code{unsigned-int16}) @result{}@tie{} (ret@tie{}@code{<pango-attribute*>})
281
@deffn Function pango-attr-strikethrough-color-new (red@tie{}@code{unsigned-int16}) (green@tie{}@code{unsigned-int16}) (blue@tie{}@code{unsigned-int16}) @result{}@tie{} (ret@tie{}@code{<pango-attribute>})
292
282
Create a new strikethrough color attribute. This attribute modifies the color of
293
283
strikethrough lines. If not set, strikethrough lines will use the foreground
331
@deffn Function pango-attr-underline-color-new (red@tie{}@code{unsigned-int16}) (green@tie{}@code{unsigned-int16}) (blue@tie{}@code{unsigned-int16}) @result{}@tie{} (ret@tie{}@code{<pango-attribute*>})
321
@deffn Function pango-attr-underline-color-new (red@tie{}@code{unsigned-int16}) (green@tie{}@code{unsigned-int16}) (blue@tie{}@code{unsigned-int16}) @result{}@tie{} (ret@tie{}@code{<pango-attribute>})
332
322
Create a new underline color attribute. This attribute modifies the color of
333
323
underlines. If not set, underlines will use the foreground color.
355
@deffn Function pango-attr-shape-new (ink_rect@tie{}@code{<pango-rectangle*>}) (logical_rect@tie{}@code{<pango-rectangle*>}) @result{}@tie{} (ret@tie{}@code{<pango-attribute*>})
345
@deffn Function pango-attr-shape-new (ink_rect@tie{}@code{<pango-rectangle>}) (logical_rect@tie{}@code{<pango-rectangle>}) @result{}@tie{} (ret@tie{}@code{<pango-attribute>})
356
346
Create a new shape attribute. A shape is used to impose a particular ink and
357
347
logical rectangle on the result of shaping a particular glyph. This might be
358
348
used, for instance, for embedding a picture or a widget inside a
376
@deffn Function pango-attr-shape-new-with-data (ink_rect@tie{}@code{<pango-rectangle*>}) (logical_rect@tie{}@code{<pango-rectangle*>}) (data@tie{}@code{<gpointer>}) (copy_func@tie{}@code{<pango-attr-data-copy-func>}) (destroy_func@tie{}@code{<g-destroy-notify>}) @result{}@tie{} (ret@tie{}@code{<pango-attribute*>})
377
Like @code{pango-attr-shape-new}, but a user data pointer is also provided; this
378
pointer can be accessed when later rendering the glyph.
382
ink rectangle to assign to each character
385
logical rectangle to assign to each character
391
function to copy @var{data} when the attribute is copied. If @samp{@code{#f}},
392
@var{data} is simply copied as a pointer.
395
function to free @var{data} when the attribute is freed, or @samp{@code{#f}}
398
the newly allocated @code{<pango-attribute>}, which should be freed with
399
@code{pango-attribute-destroy}.
407
@deffn Function pango-attr-scale-new (scale_factor@tie{}@code{double}) @result{}@tie{} (ret@tie{}@code{<pango-attribute*>})
366
@deffn Function pango-attr-scale-new (scale_factor@tie{}@code{double}) @result{}@tie{} (ret@tie{}@code{<pango-attribute>})
408
367
Create a new font size scale attribute. The base font for the affected text will
409
368
have its size multiplied by @var{scale-factor}.
423
@deffn Function pango-attr-fallback-new (enable_fallback@tie{}@code{bool}) @result{}@tie{} (ret@tie{}@code{<pango-attribute*>})
382
@deffn Function pango-attr-fallback-new (enable_fallback@tie{}@code{bool}) @result{}@tie{} (ret@tie{}@code{<pango-attribute>})
424
383
Create a new font fallback attribute.
426
385
If fallback is disabled, characters will only be used from the closest matching
460
@deffn Function pango-color-copy (self@tie{}@code{<pango-color>}) @result{}@tie{} (ret@tie{}@code{<pango-color>})
461
Creates a copy of @var{src}, which should be freed with @code{pango-color-free}.
462
Primarily used by language bindings, not that useful otherwise (since colors can
463
just be copied by assignment in C).
470
the newly allocated @code{<pango-color>}, which should be freed with
471
@code{pango-color-free}.
501
477
@deffn Function pango-language-from-string (language@tie{}@code{mchars}) @result{}@tie{} (ret@tie{}@code{<pango-language>})
502
478
Take a RFC-3066 format language tag as a string and convert it to a
503
479
@code{<pango-language>} pointer that can be efficiently copied (copy the
556
@deffn Function pango-attr-list-insert (self@tie{}@code{<pango-attr-list>}) (attr@tie{}@code{<pango-attribute*>})
532
@deffn Function pango-attr-list-copy (self@tie{}@code{<pango-attr-list>}) @result{}@tie{} (ret@tie{}@code{<pango-attr-list>})
533
Copy @var{list} and return an identical new list.
537
a @code{<pango-attr-list>}
540
the newly allocated @code{<pango-attr-list>}, with a reference count of one,
541
which should be freed with @code{pango-attr-list-unref}.
547
@deffn Function pango-attr-list-insert (self@tie{}@code{<pango-attr-list>}) (attr@tie{}@code{<pango-attribute>})
557
548
Insert the given attribute into the @code{<pango-attr-list>}. It will be
558
549
inserted after all other attributes with a matching @var{start-index}.
571
@deffn Function pango-attr-list-insert-before (self@tie{}@code{<pango-attr-list>}) (attr@tie{}@code{<pango-attribute*>})
562
@deffn Function pango-attr-list-insert-before (self@tie{}@code{<pango-attr-list>}) (attr@tie{}@code{<pango-attribute>})
572
563
Insert the given attribute into the @code{<pango-attr-list>}. It will be
573
564
inserted before all other attributes with a matching @var{start-index}.
586
@deffn Function pango-attr-list-change (self@tie{}@code{<pango-attr-list>}) (attr@tie{}@code{<pango-attribute*>})
577
@deffn Function pango-attr-list-change (self@tie{}@code{<pango-attr-list>}) (attr@tie{}@code{<pango-attribute>})
587
578
Insert the given attribute into the @code{<pango-attr-list>}. It will replace
588
579
any attributes of the same type on that segment and be merged with any adjoining
589
580
attributes that are identical.
637
@deffn Function pango-attr-list-filter (self@tie{}@code{<pango-attr-list>}) (func@tie{}@code{<pango-attr-filter-func>}) (data@tie{}@code{<gpointer>}) @result{}@tie{} (ret@tie{}@code{<pango-attr-list>})
638
Given a @code{<pango-attr-list>} and callback function, removes any elements of
639
@var{list} for which @var{func} returns @samp{@code{#t}} and inserts them into a
644
a @code{<pango-attr-list>}
647
callback function; returns @samp{@code{#t}} if an attribute should be filtered
651
Data to be passed to @var{func}
654
the new @code{<pango-attr-list>} or @samp{@code{#f}} if no attributes of the
655
given types were found.
663
@deffn Function pango-attr-list-get-iterator (self@tie{}@code{<pango-attr-list>}) @result{}@tie{} (ret@tie{}@code{<pango-attr-iterator*>})
628
@deffn Function pango-attr-list-get-iterator (self@tie{}@code{<pango-attr-list>}) @result{}@tie{} (ret@tie{}@code{<pango-attr-iterator>})
664
629
Create a iterator initialized to the beginning of the list. @var{list} must not
665
630
be modified until this iterator is freed.
679
@deffn Function pango-attr-iterator-next (self@tie{}@code{<pango-attr-iterator*>}) @result{}@tie{} (ret@tie{}@code{bool})
644
@deffn Function pango-attr-iterator-copy (self@tie{}@code{<pango-attr-iterator>}) @result{}@tie{} (ret@tie{}@code{<pango-attr-iterator>})
645
Copy a @code{<pango-attr-iterator>}
649
a @code{<pango-attr-iterator>}.
652
the newly allocated @code{<pango-attr-iterator>}, which should be freed with
653
@code{pango-attr-iterator-destroy}.
659
@deffn Function pango-attr-iterator-next (self@tie{}@code{<pango-attr-iterator>}) @result{}@tie{} (ret@tie{}@code{bool})
680
660
Advance the iterator until the next change of style.
694
@deffn Function pango-attr-iterator-range (self@tie{}@code{<pango-attr-iterator*>}) @result{}@tie{} (start@tie{}@code{int}) (end@tie{}@code{int})
674
@deffn Function pango-attr-iterator-range (self@tie{}@code{<pango-attr-iterator>}) @result{}@tie{} (start@tie{}@code{int}) (end@tie{}@code{int})
695
675
Get the range of the current segment. Note that the stored return values are
696
676
signed, not unsigned like the values in @code{<pango-attribute>}. To deal with
697
677
this API oversight, stored return values that wouldn't fit into a signed integer
714
@deffn Function pango-attr-iterator-get (self@tie{}@code{<pango-attr-iterator*>}) (type@tie{}@code{<pango-attr-type>}) @result{}@tie{} (ret@tie{}@code{<pango-attribute*>})
694
@deffn Function pango-attr-iterator-get (self@tie{}@code{<pango-attr-iterator>}) (type@tie{}@code{<pango-attr-type>}) @result{}@tie{} (ret@tie{}@code{<pango-attribute>})
715
695
Find the current attribute of a particular type at the iterator location. When
716
696
multiple attributes of the same type overlap, the attribute whose range starts
717
697
closest to the current location is used.
734
@deffn Function pango-attr-iterator-get-font (self@tie{}@code{<pango-attr-iterator*>}) (desc@tie{}@code{<pango-font-description>}) (language@tie{}@code{<pango-language**>}) (extra_attrs@tie{}@code{<gs-list**>})
735
Get the font and other attributes at the current iterator position.
739
a @code{<pango-attr-iterator>}
742
a @code{<pango-font-description>} to fill in with the current values. The family
743
name in this structure will be set using
744
@code{pango-font-description-set-family-static} using values from an attribute
745
in the @code{<pango-attr-list>} associated with the iterator, so if you plan to
746
keep it around, you must call: @samp{pango_font_description_set_family (desc,
747
pango_font_description_get_family (desc))}.
750
if non-@samp{@code{#f}}, location to store language tag for item, or
751
@samp{@code{#f}} if none is found.
754
if non-@samp{@code{#f}}, location in which to store a list of non-font
755
attributes at the the current position; only the highest priority value of each
756
attribute will be added to this list. In order to free this value, you must call
757
@code{pango-attribute-destroy} on each member.
763
@deffn Function pango-attr-iterator-get-attrs (self@tie{}@code{<pango-attr-iterator*>}) @result{}@tie{} (ret@tie{}@code{gslist-of})
714
@deffn Function pango-attr-iterator-get-attrs (self@tie{}@code{<pango-attr-iterator>}) @result{}@tie{} (ret@tie{}@code{gslist-of})
764
715
Gets a list of all attributes at the current position of the iterator.