|
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17 System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64 User : nobody ( 99) PHP Version : 5.2.17 Disable Function : NONE Directory : /usr/share/gtk-doc/html/pango/ |
Upload File : |
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Text Attributes</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
<link rel="start" href="index.html" title="Pango Reference Manual">
<link rel="up" href="pango.html" title="Basic Pango Interfaces">
<link rel="prev" href="pango-Fonts.html" title="Fonts">
<link rel="next" href="pango-Tab-Stops.html" title="Tab Stops">
<meta name="generator" content="GTK-Doc V1.6 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
<link rel="chapter" href="pango.html" title="Basic Pango Interfaces">
<link rel="chapter" href="rendering.html" title="Rendering with Pango">
<link rel="chapter" href="lowlevel.html" title="Low Level Functionality">
<link rel="chapter" href="tools.html" title="Pango Tools">
<link rel="index" href="ix01.html" title="Index">
<link rel="index" href="ix02.html" title="Index of deprecated symbols">
<link rel="index" href="ix03.html" title="Index of new symbols in 1.2">
<link rel="index" href="ix04.html" title="Index of new symbols in 1.4">
<link rel="index" href="ix05.html" title="Index of new symbols in 1.6">
<link rel="index" href="ix06.html" title="Index of new symbols in 1.8">
<link rel="index" href="ix07.html" title="Index of new symbols in 1.10">
<link rel="index" href="ix08.html" title="Index of new symbols in 1.12">
<link rel="index" href="ix09.html" title="Index of new symbols in 1.14">
</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="2">
<tr valign="middle">
<td><a accesskey="p" href="pango-Fonts.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="pango.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">Pango Reference Manual</th>
<td><a accesskey="n" href="pango-Tab-Stops.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts"><nobr><a href="#top_of_page" class="shortcut">Top</a>
 | 
<a href="#desc" class="shortcut">Description</a></nobr></td></tr>
</table>
<div class="refentry" lang="en">
<a name="pango-Text-Attributes"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="top_of_page"></a>Text Attributes</span></h2>
<p>Text Attributes — Font and other attributes for annotating text</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
enum <a href="pango-Text-Attributes.html#PangoAttrType">PangoAttrType</a>;
#define <a href="pango-Text-Attributes.html#PANGO-TYPE-ATTR-TYPE:CAPS">PANGO_TYPE_ATTR_TYPE</a>
<a href="pango-Text-Attributes.html#PangoAttrClass">PangoAttrClass</a>;
<a href="pango-Text-Attributes.html#PangoAttribute">PangoAttribute</a>;
<a href="pango-Text-Attributes.html#PangoAttrString">PangoAttrString</a>;
<a href="pango-Text-Attributes.html#PangoAttrLanguage">PangoAttrLanguage</a>;
<a href="pango-Text-Attributes.html#PangoAttrColor">PangoAttrColor</a>;
<a href="pango-Text-Attributes.html#PangoAttrInt">PangoAttrInt</a>;
<a href="pango-Text-Attributes.html#PangoAttrFloat">PangoAttrFloat</a>;
<a href="pango-Text-Attributes.html#PangoAttrFontDesc">PangoAttrFontDesc</a>;
<a href="pango-Text-Attributes.html#PangoAttrShape">PangoAttrShape</a>;
<a href="pango-Text-Attributes.html#PangoAttrSize">PangoAttrSize</a>;
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> <a href="pango-Text-Attributes.html#pango-parse-markup">pango_parse_markup</a> (const char *markup_text,
int length,
<a
href="../glib/glib-Unicode-Manipulation.html#gunichar"
>gunichar</a> accel_marker,
<a href="pango-Text-Attributes.html#PangoAttrList">PangoAttrList</a> **attr_list,
char **text,
<a
href="../glib/glib-Unicode-Manipulation.html#gunichar"
>gunichar</a> *accel_char,
<a
href="../glib/glib-Error-Reporting.html#GError"
>GError</a> **error);
<a href="pango-Text-Attributes.html#PangoAttrType">PangoAttrType</a> <a href="pango-Text-Attributes.html#pango-attr-type-register">pango_attr_type_register</a> (const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *name);
<a href="pango-Text-Attributes.html#PangoAttribute">PangoAttribute</a>* <a href="pango-Text-Attributes.html#pango-attribute-copy">pango_attribute_copy</a> (const <a href="pango-Text-Attributes.html#PangoAttribute">PangoAttribute</a> *attr);
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> <a href="pango-Text-Attributes.html#pango-attribute-equal">pango_attribute_equal</a> (const <a href="pango-Text-Attributes.html#PangoAttribute">PangoAttribute</a> *attr1,
const <a href="pango-Text-Attributes.html#PangoAttribute">PangoAttribute</a> *attr2);
void <a href="pango-Text-Attributes.html#pango-attribute-destroy">pango_attribute_destroy</a> (<a href="pango-Text-Attributes.html#PangoAttribute">PangoAttribute</a> *attr);
<a href="pango-Text-Attributes.html#PangoAttribute">PangoAttribute</a>* <a href="pango-Text-Attributes.html#pango-attr-language-new">pango_attr_language_new</a> (<a href="pango-Text-Attributes.html#PangoLanguage">PangoLanguage</a> *language);
<a href="pango-Text-Attributes.html#PangoAttribute">PangoAttribute</a>* <a href="pango-Text-Attributes.html#pango-attr-family-new">pango_attr_family_new</a> (const char *family);
<a href="pango-Text-Attributes.html#PangoAttribute">PangoAttribute</a>* <a href="pango-Text-Attributes.html#pango-attr-style-new">pango_attr_style_new</a> (<a href="pango-Fonts.html#PangoStyle">PangoStyle</a> style);
<a href="pango-Text-Attributes.html#PangoAttribute">PangoAttribute</a>* <a href="pango-Text-Attributes.html#pango-attr-variant-new">pango_attr_variant_new</a> (<a href="pango-Fonts.html#PangoVariant">PangoVariant</a> variant);
<a href="pango-Text-Attributes.html#PangoAttribute">PangoAttribute</a>* <a href="pango-Text-Attributes.html#pango-attr-stretch-new">pango_attr_stretch_new</a> (<a href="pango-Fonts.html#PangoStretch">PangoStretch</a> stretch);
<a href="pango-Text-Attributes.html#PangoAttribute">PangoAttribute</a>* <a href="pango-Text-Attributes.html#pango-attr-weight-new">pango_attr_weight_new</a> (<a href="pango-Fonts.html#PangoWeight">PangoWeight</a> weight);
<a href="pango-Text-Attributes.html#PangoAttribute">PangoAttribute</a>* <a href="pango-Text-Attributes.html#pango-attr-size-new">pango_attr_size_new</a> (int size);
<a href="pango-Text-Attributes.html#PangoAttribute">PangoAttribute</a>* <a href="pango-Text-Attributes.html#pango-attr-size-new-absolute">pango_attr_size_new_absolute</a>
(int size);
<a href="pango-Text-Attributes.html#PangoAttribute">PangoAttribute</a>* <a href="pango-Text-Attributes.html#pango-attr-font-desc-new">pango_attr_font_desc_new</a> (const <a href="pango-Fonts.html#PangoFontDescription">PangoFontDescription</a> *desc);
<a href="pango-Text-Attributes.html#PangoAttribute">PangoAttribute</a>* <a href="pango-Text-Attributes.html#pango-attr-foreground-new">pango_attr_foreground_new</a> (<a
href="../glib/glib-Basic-Types.html#guint16"
>guint16</a> red,
<a
href="../glib/glib-Basic-Types.html#guint16"
>guint16</a> green,
<a
href="../glib/glib-Basic-Types.html#guint16"
>guint16</a> blue);
<a href="pango-Text-Attributes.html#PangoAttribute">PangoAttribute</a>* <a href="pango-Text-Attributes.html#pango-attr-background-new">pango_attr_background_new</a> (<a
href="../glib/glib-Basic-Types.html#guint16"
>guint16</a> red,
<a
href="../glib/glib-Basic-Types.html#guint16"
>guint16</a> green,
<a
href="../glib/glib-Basic-Types.html#guint16"
>guint16</a> blue);
<a href="pango-Text-Attributes.html#PangoAttribute">PangoAttribute</a>* <a href="pango-Text-Attributes.html#pango-attr-strikethrough-new">pango_attr_strikethrough_new</a>
(<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> strikethrough);
<a href="pango-Text-Attributes.html#PangoAttribute">PangoAttribute</a>* <a href="pango-Text-Attributes.html#pango-attr-strikethrough-color-new">pango_attr_strikethrough_color_new</a>
(<a
href="../glib/glib-Basic-Types.html#guint16"
>guint16</a> red,
<a
href="../glib/glib-Basic-Types.html#guint16"
>guint16</a> green,
<a
href="../glib/glib-Basic-Types.html#guint16"
>guint16</a> blue);
<a href="pango-Text-Attributes.html#PangoAttribute">PangoAttribute</a>* <a href="pango-Text-Attributes.html#pango-attr-underline-new">pango_attr_underline_new</a> (<a href="pango-Text-Attributes.html#PangoUnderline">PangoUnderline</a> underline);
<a href="pango-Text-Attributes.html#PangoAttribute">PangoAttribute</a>* <a href="pango-Text-Attributes.html#pango-attr-underline-color-new">pango_attr_underline_color_new</a>
(<a
href="../glib/glib-Basic-Types.html#guint16"
>guint16</a> red,
<a
href="../glib/glib-Basic-Types.html#guint16"
>guint16</a> green,
<a
href="../glib/glib-Basic-Types.html#guint16"
>guint16</a> blue);
enum <a href="pango-Text-Attributes.html#PangoUnderline">PangoUnderline</a>;
#define <a href="pango-Text-Attributes.html#PANGO-TYPE-UNDERLINE:CAPS">PANGO_TYPE_UNDERLINE</a>
<a href="pango-Text-Attributes.html#PangoAttribute">PangoAttribute</a>* <a href="pango-Text-Attributes.html#pango-attr-shape-new">pango_attr_shape_new</a> (const <a href="pango-Glyph-Storage.html#PangoRectangle">PangoRectangle</a> *ink_rect,
const <a href="pango-Glyph-Storage.html#PangoRectangle">PangoRectangle</a> *logical_rect);
<a href="pango-Text-Attributes.html#PangoAttribute">PangoAttribute</a>* <a href="pango-Text-Attributes.html#pango-attr-shape-new-with-data">pango_attr_shape_new_with_data</a>
(const <a href="pango-Glyph-Storage.html#PangoRectangle">PangoRectangle</a> *ink_rect,
const <a href="pango-Glyph-Storage.html#PangoRectangle">PangoRectangle</a> *logical_rect,
<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> data,
<a href="pango-Text-Attributes.html#PangoAttrDataCopyFunc">PangoAttrDataCopyFunc</a> copy_func,
<a
href="../glib/glib-Datasets.html#GDestroyNotify"
>GDestroyNotify</a> destroy_func);
<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> (<a href="pango-Text-Attributes.html#PangoAttrDataCopyFunc">*PangoAttrDataCopyFunc</a>) (<a
href="../glib/glib-Basic-Types.html#gconstpointer"
>gconstpointer</a> data);
<a href="pango-Text-Attributes.html#PangoAttribute">PangoAttribute</a>* <a href="pango-Text-Attributes.html#pango-attr-scale-new">pango_attr_scale_new</a> (double scale_factor);
<a href="pango-Text-Attributes.html#PangoAttribute">PangoAttribute</a>* <a href="pango-Text-Attributes.html#pango-attr-fallback-new">pango_attr_fallback_new</a> (<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> enable_fallback);
#define <a href="pango-Text-Attributes.html#PANGO-SCALE-XX-SMALL:CAPS">PANGO_SCALE_XX_SMALL</a>
#define <a href="pango-Text-Attributes.html#PANGO-SCALE-X-SMALL:CAPS">PANGO_SCALE_X_SMALL</a>
#define <a href="pango-Text-Attributes.html#PANGO-SCALE-SMALL:CAPS">PANGO_SCALE_SMALL</a>
#define <a href="pango-Text-Attributes.html#PANGO-SCALE-MEDIUM:CAPS">PANGO_SCALE_MEDIUM</a>
#define <a href="pango-Text-Attributes.html#PANGO-SCALE-LARGE:CAPS">PANGO_SCALE_LARGE</a>
#define <a href="pango-Text-Attributes.html#PANGO-SCALE-X-LARGE:CAPS">PANGO_SCALE_X_LARGE</a>
#define <a href="pango-Text-Attributes.html#PANGO-SCALE-XX-LARGE:CAPS">PANGO_SCALE_XX_LARGE</a>
<a href="pango-Text-Attributes.html#PangoAttribute">PangoAttribute</a>* <a href="pango-Text-Attributes.html#pango-attr-rise-new">pango_attr_rise_new</a> (int rise);
<a href="pango-Text-Attributes.html#PangoAttribute">PangoAttribute</a>* <a href="pango-Text-Attributes.html#pango-attr-letter-spacing-new">pango_attr_letter_spacing_new</a>
(int letter_spacing);
<a href="pango-Text-Attributes.html#PangoColor">PangoColor</a>;
#define <a href="pango-Text-Attributes.html#PANGO-TYPE-COLOR:CAPS">PANGO_TYPE_COLOR</a>
void <a href="pango-Text-Attributes.html#pango-color-free">pango_color_free</a> (<a href="pango-Text-Attributes.html#PangoColor">PangoColor</a> *color);
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> <a href="pango-Text-Attributes.html#pango-color-parse">pango_color_parse</a> (<a href="pango-Text-Attributes.html#PangoColor">PangoColor</a> *color,
const char *spec);
<a href="pango-Text-Attributes.html#PangoColor">PangoColor</a>* <a href="pango-Text-Attributes.html#pango-color-copy">pango_color_copy</a> (const <a href="pango-Text-Attributes.html#PangoColor">PangoColor</a> *src);
<a href="pango-Text-Attributes.html#PangoLanguage">PangoLanguage</a>;
#define <a href="pango-Text-Attributes.html#PANGO-TYPE-LANGUAGE:CAPS">PANGO_TYPE_LANGUAGE</a>
<a href="pango-Text-Attributes.html#PangoLanguage">PangoLanguage</a>* <a href="pango-Text-Attributes.html#pango-language-from-string">pango_language_from_string</a> (const char *language);
#define <a href="pango-Text-Attributes.html#pango-language-to-string">pango_language_to_string</a> (language)
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> <a href="pango-Text-Attributes.html#pango-language-matches">pango_language_matches</a> (<a href="pango-Text-Attributes.html#PangoLanguage">PangoLanguage</a> *language,
const char *range_list);
<a href="pango-Text-Attributes.html#PangoAttrList">PangoAttrList</a>;
#define <a href="pango-Text-Attributes.html#PANGO-TYPE-ATTR-LIST:CAPS">PANGO_TYPE_ATTR_LIST</a>
<a href="pango-Text-Attributes.html#PangoAttrList">PangoAttrList</a>* <a href="pango-Text-Attributes.html#pango-attr-list-new">pango_attr_list_new</a> (void);
<a href="pango-Text-Attributes.html#PangoAttrList">PangoAttrList</a>* <a href="pango-Text-Attributes.html#pango-attr-list-ref">pango_attr_list_ref</a> (<a href="pango-Text-Attributes.html#PangoAttrList">PangoAttrList</a> *list);
void <a href="pango-Text-Attributes.html#pango-attr-list-unref">pango_attr_list_unref</a> (<a href="pango-Text-Attributes.html#PangoAttrList">PangoAttrList</a> *list);
<a href="pango-Text-Attributes.html#PangoAttrList">PangoAttrList</a>* <a href="pango-Text-Attributes.html#pango-attr-list-copy">pango_attr_list_copy</a> (<a href="pango-Text-Attributes.html#PangoAttrList">PangoAttrList</a> *list);
void <a href="pango-Text-Attributes.html#pango-attr-list-insert">pango_attr_list_insert</a> (<a href="pango-Text-Attributes.html#PangoAttrList">PangoAttrList</a> *list,
<a href="pango-Text-Attributes.html#PangoAttribute">PangoAttribute</a> *attr);
void <a href="pango-Text-Attributes.html#pango-attr-list-insert-before">pango_attr_list_insert_before</a> (<a href="pango-Text-Attributes.html#PangoAttrList">PangoAttrList</a> *list,
<a href="pango-Text-Attributes.html#PangoAttribute">PangoAttribute</a> *attr);
void <a href="pango-Text-Attributes.html#pango-attr-list-change">pango_attr_list_change</a> (<a href="pango-Text-Attributes.html#PangoAttrList">PangoAttrList</a> *list,
<a href="pango-Text-Attributes.html#PangoAttribute">PangoAttribute</a> *attr);
void <a href="pango-Text-Attributes.html#pango-attr-list-splice">pango_attr_list_splice</a> (<a href="pango-Text-Attributes.html#PangoAttrList">PangoAttrList</a> *list,
<a href="pango-Text-Attributes.html#PangoAttrList">PangoAttrList</a> *other,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> pos,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> len);
<a href="pango-Text-Attributes.html#PangoAttrList">PangoAttrList</a>* <a href="pango-Text-Attributes.html#pango-attr-list-filter">pango_attr_list_filter</a> (<a href="pango-Text-Attributes.html#PangoAttrList">PangoAttrList</a> *list,
<a href="pango-Text-Attributes.html#PangoAttrFilterFunc">PangoAttrFilterFunc</a> func,
<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> data);
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> (<a href="pango-Text-Attributes.html#PangoAttrFilterFunc">*PangoAttrFilterFunc</a>) (<a href="pango-Text-Attributes.html#PangoAttribute">PangoAttribute</a> *attribute,
<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> data);
<a href="pango-Text-Attributes.html#PangoAttrIterator">PangoAttrIterator</a>* <a href="pango-Text-Attributes.html#pango-attr-list-get-iterator">pango_attr_list_get_iterator</a>
(<a href="pango-Text-Attributes.html#PangoAttrList">PangoAttrList</a> *list);
<a href="pango-Text-Attributes.html#PangoAttrIterator">PangoAttrIterator</a>;
<a href="pango-Text-Attributes.html#PangoAttrIterator">PangoAttrIterator</a>* <a href="pango-Text-Attributes.html#pango-attr-iterator-copy">pango_attr_iterator_copy</a> (<a href="pango-Text-Attributes.html#PangoAttrIterator">PangoAttrIterator</a> *iterator);
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> <a href="pango-Text-Attributes.html#pango-attr-iterator-next">pango_attr_iterator_next</a> (<a href="pango-Text-Attributes.html#PangoAttrIterator">PangoAttrIterator</a> *iterator);
void <a href="pango-Text-Attributes.html#pango-attr-iterator-range">pango_attr_iterator_range</a> (<a href="pango-Text-Attributes.html#PangoAttrIterator">PangoAttrIterator</a> *iterator,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> *start,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> *end);
<a href="pango-Text-Attributes.html#PangoAttribute">PangoAttribute</a>* <a href="pango-Text-Attributes.html#pango-attr-iterator-get">pango_attr_iterator_get</a> (<a href="pango-Text-Attributes.html#PangoAttrIterator">PangoAttrIterator</a> *iterator,
<a href="pango-Text-Attributes.html#PangoAttrType">PangoAttrType</a> type);
void <a href="pango-Text-Attributes.html#pango-attr-iterator-get-font">pango_attr_iterator_get_font</a> (<a href="pango-Text-Attributes.html#PangoAttrIterator">PangoAttrIterator</a> *iterator,
<a href="pango-Fonts.html#PangoFontDescription">PangoFontDescription</a> *desc,
<a href="pango-Text-Attributes.html#PangoLanguage">PangoLanguage</a> **language,
<a
href="../glib/glib-Singly-Linked-Lists.html#GSList"
>GSList</a> **extra_attrs);
<a
href="../glib/glib-Singly-Linked-Lists.html#GSList"
>GSList</a>* <a href="pango-Text-Attributes.html#pango-attr-iterator-get-attrs">pango_attr_iterator_get_attrs</a> (<a href="pango-Text-Attributes.html#PangoAttrIterator">PangoAttrIterator</a> *iterator);
void <a href="pango-Text-Attributes.html#pango-attr-iterator-destroy">pango_attr_iterator_destroy</a> (<a href="pango-Text-Attributes.html#PangoAttrIterator">PangoAttrIterator</a> *iterator);
</pre>
</div>
<div class="refsect1" lang="en">
<a name="desc"></a><h2>Description</h2>
<p>
Attributed text is used in a number of places in Pango. It
is used as the input to the itemization process and also when
creating a <a href="pango-Layout-Objects.html#PangoLayout"><span class="type">PangoLayout</span></a>. The data types and functions in
this section are used to represent and manipulate sets
of attributes applied to a portion of text.
</p>
</div>
<div class="refsect1" lang="en">
<a name="details"></a><h2>Details</h2>
<div class="refsect2" lang="en">
<a name="id2789750"></a><h3>
<a name="PangoAttrType"></a>enum PangoAttrType</h3>
<a class="indexterm" name="id2789761"></a><pre class="programlisting">typedef enum
{
PANGO_ATTR_INVALID, /* 0 is an invalid attribute type */
PANGO_ATTR_LANGUAGE, /* PangoAttrLanguage */
PANGO_ATTR_FAMILY, /* PangoAttrString */
PANGO_ATTR_STYLE, /* PangoAttrInt */
PANGO_ATTR_WEIGHT, /* PangoAttrInt */
PANGO_ATTR_VARIANT, /* PangoAttrInt */
PANGO_ATTR_STRETCH, /* PangoAttrInt */
PANGO_ATTR_SIZE, /* PangoAttrSize */
PANGO_ATTR_FONT_DESC, /* PangoAttrFontDesc */
PANGO_ATTR_FOREGROUND, /* PangoAttrColor */
PANGO_ATTR_BACKGROUND, /* PangoAttrColor */
PANGO_ATTR_UNDERLINE, /* PangoAttrInt */
PANGO_ATTR_STRIKETHROUGH, /* PangoAttrInt */
PANGO_ATTR_RISE, /* PangoAttrInt */
PANGO_ATTR_SHAPE, /* PangoAttrShape */
PANGO_ATTR_SCALE, /* PangoAttrFloat */
PANGO_ATTR_FALLBACK, /* PangoAttrInt */
PANGO_ATTR_LETTER_SPACING, /* PangoAttrInt */
PANGO_ATTR_UNDERLINE_COLOR, /* PangoAttrColor */
PANGO_ATTR_STRIKETHROUGH_COLOR, /* PangoAttrColor */
PANGO_ATTR_ABSOLUTE_SIZE /* PangoAttrSize */
} PangoAttrType;
</pre>
<p>
The <a href="pango-Text-Attributes.html#PangoAttrType"><span class="type">PangoAttrType</span></a>
distinguishes between different types of attributes. Along with the
predefined values, it is possible to allocate additional values
for custom attributes using <a href="pango-Text-Attributes.html#pango-attr-type-register"><code class="function">pango_attr_type_register()</code></a>. The predefined
values are given below. The type of structure used to store the
attribute is listed in parentheses after the description.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><a name="PANGO-ATTR-INVALID:CAPS"></a><code class="literal">PANGO_ATTR_INVALID</code></span></td>
<td>does not happen
</td>
</tr>
<tr>
<td>
<span class="term"><a name="PANGO-ATTR-LANGUAGE:CAPS"></a><code class="literal">PANGO_ATTR_LANGUAGE</code></span></td>
<td>language (<a href="pango-Text-Attributes.html#PangoAttrLanguage"><span class="type">PangoAttrLanguage</span></a>)
</td>
</tr>
<tr>
<td>
<span class="term"><a name="PANGO-ATTR-FAMILY:CAPS"></a><code class="literal">PANGO_ATTR_FAMILY</code></span></td>
<td>font family name list (<a href="pango-Text-Attributes.html#PangoAttrString"><span class="type">PangoAttrString</span></a>)
</td>
</tr>
<tr>
<td>
<span class="term"><a name="PANGO-ATTR-STYLE:CAPS"></a><code class="literal">PANGO_ATTR_STYLE</code></span></td>
<td>font slant style (<a href="pango-Text-Attributes.html#PangoAttrInt"><span class="type">PangoAttrInt</span></a>)
</td>
</tr>
<tr>
<td>
<span class="term"><a name="PANGO-ATTR-WEIGHT:CAPS"></a><code class="literal">PANGO_ATTR_WEIGHT</code></span></td>
<td>font weight (<a href="pango-Text-Attributes.html#PangoAttrInt"><span class="type">PangoAttrInt</span></a>)
</td>
</tr>
<tr>
<td>
<span class="term"><a name="PANGO-ATTR-VARIANT:CAPS"></a><code class="literal">PANGO_ATTR_VARIANT</code></span></td>
<td>font variant (normal or small caps) (<a href="pango-Text-Attributes.html#PangoAttrInt"><span class="type">PangoAttrInt</span></a>)
</td>
</tr>
<tr>
<td>
<span class="term"><a name="PANGO-ATTR-STRETCH:CAPS"></a><code class="literal">PANGO_ATTR_STRETCH</code></span></td>
<td>font stretch (<a href="pango-Text-Attributes.html#PangoAttrInt"><span class="type">PangoAttrInt</span></a>)
</td>
</tr>
<tr>
<td>
<span class="term"><a name="PANGO-ATTR-SIZE:CAPS"></a><code class="literal">PANGO_ATTR_SIZE</code></span></td>
<td>font size in points scaled by <a href="pango-Glyph-Storage.html#PANGO-SCALE:CAPS"><code class="literal">PANGO_SCALE</code></a> (<a href="pango-Text-Attributes.html#PangoAttrInt"><span class="type">PangoAttrInt</span></a>)
</td>
</tr>
<tr>
<td>
<span class="term"><a name="PANGO-ATTR-FONT-DESC:CAPS"></a><code class="literal">PANGO_ATTR_FONT_DESC</code></span></td>
<td>font description (<a href="pango-Text-Attributes.html#PangoAttrFontDesc"><span class="type">PangoAttrFontDesc</span></a>)
</td>
</tr>
<tr>
<td>
<span class="term"><a name="PANGO-ATTR-FOREGROUND:CAPS"></a><code class="literal">PANGO_ATTR_FOREGROUND</code></span></td>
<td>foreground color (<a href="pango-Text-Attributes.html#PangoAttrColor"><span class="type">PangoAttrColor</span></a>)
</td>
</tr>
<tr>
<td>
<span class="term"><a name="PANGO-ATTR-BACKGROUND:CAPS"></a><code class="literal">PANGO_ATTR_BACKGROUND</code></span></td>
<td>background color (<a href="pango-Text-Attributes.html#PangoAttrColor"><span class="type">PangoAttrColor</span></a>)
</td>
</tr>
<tr>
<td>
<span class="term"><a name="PANGO-ATTR-UNDERLINE:CAPS"></a><code class="literal">PANGO_ATTR_UNDERLINE</code></span></td>
<td>whether the text has an underline (<a href="pango-Text-Attributes.html#PangoAttrInt"><span class="type">PangoAttrInt</span></a>)
</td>
</tr>
<tr>
<td>
<span class="term"><a name="PANGO-ATTR-STRIKETHROUGH:CAPS"></a><code class="literal">PANGO_ATTR_STRIKETHROUGH</code></span></td>
<td>whether the text is struck-through (<a href="pango-Text-Attributes.html#PangoAttrInt"><span class="type">PangoAttrInt</span></a>)
</td>
</tr>
<tr>
<td>
<span class="term"><a name="PANGO-ATTR-RISE:CAPS"></a><code class="literal">PANGO_ATTR_RISE</code></span></td>
<td>baseline displacement (<a href="pango-Text-Attributes.html#PangoAttrInt"><span class="type">PangoAttrInt</span></a>)
</td>
</tr>
<tr>
<td>
<span class="term"><a name="PANGO-ATTR-SHAPE:CAPS"></a><code class="literal">PANGO_ATTR_SHAPE</code></span></td>
<td>shape (<a href="pango-Text-Attributes.html#PangoAttrShape"><span class="type">PangoAttrShape</span></a>)
</td>
</tr>
<tr>
<td>
<span class="term"><a name="PANGO-ATTR-SCALE:CAPS"></a><code class="literal">PANGO_ATTR_SCALE</code></span></td>
<td>font size scale factor (<a href="pango-Text-Attributes.html#PangoAttrFloat"><span class="type">PangoAttrFloat</span></a>)
</td>
</tr>
<tr>
<td>
<span class="term"><a name="PANGO-ATTR-FALLBACK:CAPS"></a><code class="literal">PANGO_ATTR_FALLBACK</code></span></td>
<td>whether fallback is enabled (<a href="pango-Text-Attributes.html#PangoAttrInt"><span class="type">PangoAttrInt</span></a>)
</td>
</tr>
<tr>
<td>
<span class="term"><a name="PANGO-ATTR-LETTER-SPACING:CAPS"></a><code class="literal">PANGO_ATTR_LETTER_SPACING</code></span></td>
<td>letter spacing (<a href="pango-Text-Attributes.html#PangoAttrInt"><span class="type">PangoAttrInt</span></a>)
</td>
</tr>
<tr>
<td>
<span class="term"><a name="PANGO-ATTR-UNDERLINE-COLOR:CAPS"></a><code class="literal">PANGO_ATTR_UNDERLINE_COLOR</code></span></td>
<td>underline color (<a href="pango-Text-Attributes.html#PangoAttrColor"><span class="type">PangoAttrColor</span></a>)
</td>
</tr>
<tr>
<td>
<span class="term"><a name="PANGO-ATTR-STRIKETHROUGH-COLOR:CAPS"></a><code class="literal">PANGO_ATTR_STRIKETHROUGH_COLOR</code></span></td>
<td>strikethrough color (<a href="pango-Text-Attributes.html#PangoAttrColor"><span class="type">PangoAttrColor</span></a>)
</td>
</tr>
<tr>
<td>
<span class="term"><a name="PANGO-ATTR-ABSOLUTE-SIZE:CAPS"></a><code class="literal">PANGO_ATTR_ABSOLUTE_SIZE</code></span></td>
<td>font size in pixels scaled by <a href="pango-Glyph-Storage.html#PANGO-SCALE:CAPS"><code class="literal">PANGO_SCALE</code></a> (<a href="pango-Text-Attributes.html#PangoAttrInt"><span class="type">PangoAttrInt</span></a>)
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2790482"></a><h3>
<a name="PANGO-TYPE-ATTR-TYPE:CAPS"></a>PANGO_TYPE_ATTR_TYPE</h3>
<a class="indexterm" name="id2790495"></a><pre class="programlisting">#define PANGO_TYPE_ATTR_TYPE (pango_attr_type_get_type())
</pre>
<p>
The <a
href="../gobject/gobject-The-Base-Object-Type.html#GObject"
><span class="type">GObject</span></a> type for <a href="pango-Text-Attributes.html#PangoAttrType"><span class="type">PangoAttrType</span></a>.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2790527"></a><h3>
<a name="PangoAttrClass"></a>PangoAttrClass</h3>
<a class="indexterm" name="id2790540"></a><pre class="programlisting">typedef struct {
PangoAttrType type;
PangoAttribute * (*copy) (const PangoAttribute *attr);
void (*destroy) (PangoAttribute *attr);
gboolean (*equal) (const PangoAttribute *attr1, const PangoAttribute *attr2);
} PangoAttrClass;
</pre>
<p>
The <a href="pango-Text-Attributes.html#PangoAttrClass"><span class="type">PangoAttrClass</span></a> 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 <a href="pango-Text-Attributes.html#PangoAttribute"><span class="type">PangoAttribute</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><a href="pango-Text-Attributes.html#PangoAttrType">PangoAttrType</a> <em class="structfield"><code>type</code></em>;</span></td>
<td>the type ID for this attribute
</td>
</tr>
<tr>
<td>
<span class="term"><em class="structfield"><code>copy</code></em> ()</span></td>
<td>function to duplicate an attribute of this type (see <a href="pango-Text-Attributes.html#pango-attribute-copy"><code class="function">pango_attribute_copy()</code></a>)
</td>
</tr>
<tr>
<td>
<span class="term"><em class="structfield"><code>destroy</code></em> ()</span></td>
<td>function to free an attribute of this type (see <a href="pango-Text-Attributes.html#pango-attribute-destroy"><code class="function">pango_attribute_destroy()</code></a>)
</td>
</tr>
<tr>
<td>
<span class="term"><em class="structfield"><code>equal</code></em> ()</span></td>
<td>function to check two attributes of this type for equality (see <a href="pango-Text-Attributes.html#pango-attribute-equal"><code class="function">pango_attribute_equal()</code></a>)
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2790680"></a><h3>
<a name="PangoAttribute"></a>PangoAttribute</h3>
<a class="indexterm" name="id2790692"></a><pre class="programlisting">typedef struct {
const PangoAttrClass *klass;
guint start_index; /* in bytes */
guint end_index; /* in bytes. The character at this index is not included */
} PangoAttribute;
</pre>
<p>
The <a href="pango-Text-Attributes.html#PangoAttribute"><span class="type">PangoAttribute</span></a> structure represents the common portions of all
attributes. Particular types of attributes include this structure
as their initial portion. The common portion of the attribute holds
the range to which the value in the type-specific part of the attribute
applies.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term">const <a href="pango-Text-Attributes.html#PangoAttrClass">PangoAttrClass</a> *<em class="structfield"><code>klass</code></em>;</span></td>
<td>the class structure holding information about the type of the attribute
</td>
</tr>
<tr>
<td>
<span class="term"><a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> <em class="structfield"><code>start_index</code></em>;</span></td>
<td>the start index of the range (in bytes).
</td>
</tr>
<tr>
<td>
<span class="term"><a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> <em class="structfield"><code>end_index</code></em>;</span></td>
<td>end index of the range (in bytes). The character at this index
is not included in the range.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2790793"></a><h3>
<a name="PangoAttrString"></a>PangoAttrString</h3>
<a class="indexterm" name="id2790805"></a><pre class="programlisting">typedef struct {
PangoAttribute attr;
char *value;
} PangoAttrString;
</pre>
<p>
The <a href="pango-Text-Attributes.html#PangoAttrString"><span class="type">PangoAttrString</span></a> structure is used to represent attributes with
a string value.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><a href="pango-Text-Attributes.html#PangoAttribute">PangoAttribute</a> <em class="structfield"><code>attr</code></em>;</span></td>
<td>the common portion of the attribute
</td>
</tr>
<tr>
<td>
<span class="term">char *<em class="structfield"><code>value</code></em>;</span></td>
<td>the string which is the value of the attribute
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2790878"></a><h3>
<a name="PangoAttrLanguage"></a>PangoAttrLanguage</h3>
<a class="indexterm" name="id2790890"></a><pre class="programlisting">typedef struct {
PangoAttribute attr;
PangoLanguage *value;
} PangoAttrLanguage;
</pre>
<p>
The <a href="pango-Text-Attributes.html#PangoAttrLanguage"><span class="type">PangoAttrLanguage</span></a> structure is used to represent attributes that
are languages.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><a href="pango-Text-Attributes.html#PangoAttribute">PangoAttribute</a> <em class="structfield"><code>attr</code></em>;</span></td>
<td>the common portion of the attribute
</td>
</tr>
<tr>
<td>
<span class="term"><a href="pango-Text-Attributes.html#PangoLanguage">PangoLanguage</a> *<em class="structfield"><code>value</code></em>;</span></td>
<td>the <a href="pango-Text-Attributes.html#PangoLanguage"><span class="type">PangoLanguage</span></a> which is the value of the attribute
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2790972"></a><h3>
<a name="PangoAttrColor"></a>PangoAttrColor</h3>
<a class="indexterm" name="id2790984"></a><pre class="programlisting">typedef struct {
PangoAttribute attr;
PangoColor color;
} PangoAttrColor;
</pre>
<p>
The <a href="pango-Text-Attributes.html#PangoAttrColor"><span class="type">PangoAttrColor</span></a> structure is used to represent attributes that
are colors.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><a href="pango-Text-Attributes.html#PangoAttribute">PangoAttribute</a> <em class="structfield"><code>attr</code></em>;</span></td>
<td>the common portion of the attribute
</td>
</tr>
<tr>
<td>
<span class="term"><a href="pango-Text-Attributes.html#PangoColor">PangoColor</a> <em class="structfield"><code>color</code></em>;</span></td>
<td>the <a href="pango-Text-Attributes.html#PangoColor"><span class="type">PangoColor</span></a> which is the value of the attribute
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2791064"></a><h3>
<a name="PangoAttrInt"></a>PangoAttrInt</h3>
<a class="indexterm" name="id2791077"></a><pre class="programlisting">typedef struct {
PangoAttribute attr;
int value;
} PangoAttrInt;
</pre>
<p>
The <a href="pango-Text-Attributes.html#PangoAttrInt"><span class="type">PangoAttrInt</span></a> structure is used to represent attributes with
an integer or enumeration value.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><a href="pango-Text-Attributes.html#PangoAttribute">PangoAttribute</a> <em class="structfield"><code>attr</code></em>;</span></td>
<td>the common portion of the attribute
</td>
</tr>
<tr>
<td>
<span class="term">int <em class="structfield"><code>value</code></em>;</span></td>
<td>the value of the attribute
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2791149"></a><h3>
<a name="PangoAttrFloat"></a>PangoAttrFloat</h3>
<a class="indexterm" name="id2791162"></a><pre class="programlisting">typedef struct {
PangoAttribute attr;
double value;
} PangoAttrFloat;
</pre>
<p>
The <a href="pango-Text-Attributes.html#PangoAttrFloat"><span class="type">PangoAttrFloat</span></a> structure is used to represent attributes with
a float or double value.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><a href="pango-Text-Attributes.html#PangoAttribute">PangoAttribute</a> <em class="structfield"><code>attr</code></em>;</span></td>
<td>the common portion of the attribute
</td>
</tr>
<tr>
<td>
<span class="term">double <em class="structfield"><code>value</code></em>;</span></td>
<td>the value of the attribute
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2791234"></a><h3>
<a name="PangoAttrFontDesc"></a>PangoAttrFontDesc</h3>
<a class="indexterm" name="id2791246"></a><pre class="programlisting">typedef struct {
PangoAttribute attr;
PangoFontDescription *desc;
} PangoAttrFontDesc;
</pre>
<p>
The <a href="pango-Text-Attributes.html#PangoAttrFontDesc"><span class="type">PangoAttrFontDesc</span></a> structure is used to store an attribute that
sets all aspects of the font description at once.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><a href="pango-Text-Attributes.html#PangoAttribute">PangoAttribute</a> <em class="structfield"><code>attr</code></em>;</span></td>
<td>the common portion of the attribute
</td>
</tr>
<tr>
<td>
<span class="term"><a href="pango-Fonts.html#PangoFontDescription">PangoFontDescription</a> *<em class="structfield"><code>desc</code></em>;</span></td>
<td>the font description which is the value of this attribute
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2791320"></a><h3>
<a name="PangoAttrShape"></a>PangoAttrShape</h3>
<a class="indexterm" name="id2791333"></a><pre class="programlisting">typedef struct {
PangoAttribute attr;
PangoRectangle ink_rect;
PangoRectangle logical_rect;
gpointer data;
PangoAttrDataCopyFunc copy_func;
GDestroyNotify destroy_func;
} PangoAttrShape;
</pre>
<p>
The <a href="pango-Text-Attributes.html#PangoAttrShape"><span class="type">PangoAttrShape</span></a> structure is used to represent attributes which
impose shape restrictions.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><a href="pango-Text-Attributes.html#PangoAttribute">PangoAttribute</a> <em class="structfield"><code>attr</code></em>;</span></td>
<td>the common portion of the attribute
</td>
</tr>
<tr>
<td>
<span class="term"><a href="pango-Glyph-Storage.html#PangoRectangle">PangoRectangle</a> <em class="structfield"><code>ink_rect</code></em>;</span></td>
<td>the ink rectangle to restrict to
</td>
</tr>
<tr>
<td>
<span class="term"><a href="pango-Glyph-Storage.html#PangoRectangle">PangoRectangle</a> <em class="structfield"><code>logical_rect</code></em>;</span></td>
<td>the logical rectangle to restrict to
</td>
</tr>
<tr>
<td>
<span class="term"><a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> <em class="structfield"><code>data</code></em>;</span></td>
<td>user data set (see <a href="pango-Text-Attributes.html#pango-attr-shape-new-with-data"><code class="function">pango_attr_shape_new_with_data()</code></a>)
</td>
</tr>
<tr>
<td>
<span class="term"><a href="pango-Text-Attributes.html#PangoAttrDataCopyFunc">PangoAttrDataCopyFunc</a> <em class="structfield"><code>copy_func</code></em>;</span></td>
<td>copy function for the user data
</td>
</tr>
<tr>
<td>
<span class="term"><a
href="../glib/glib-Datasets.html#GDestroyNotify"
>GDestroyNotify</a> <em class="structfield"><code>destroy_func</code></em>;</span></td>
<td>destroy function for the user data
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2791504"></a><h3>
<a name="PangoAttrSize"></a>PangoAttrSize</h3>
<a class="indexterm" name="id2791516"></a><pre class="programlisting">typedef struct {
PangoAttribute attr;
int size;
guint absolute : 1;
} PangoAttrSize;
</pre>
<p>
The <a href="pango-Text-Attributes.html#PangoAttrShape"><span class="type">PangoAttrShape</span></a> structure is used to represent attributes which
set font size.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><a href="pango-Text-Attributes.html#PangoAttribute">PangoAttribute</a> <em class="structfield"><code>attr</code></em>;</span></td>
<td>the common portion of the attribute
</td>
</tr>
<tr>
<td>
<span class="term">int <em class="structfield"><code>size</code></em>;</span></td>
<td>size of font, in units of 1/<a href="pango-Glyph-Storage.html#PANGO-SCALE:CAPS"><code class="literal">PANGO_SCALE</code></a> of a point (for
<a href="pango-Text-Attributes.html#PANGO-ATTR-SIZE:CAPS"><code class="literal">PANGO_ATTR_SIZE</code></a>) or of a device uni (for <a href="pango-Text-Attributes.html#PANGO-ATTR-ABSOLUTE-SIZE:CAPS"><code class="literal">PANGO_ATTR_ABSOLUTE_SIZE</code></a>)
</td>
</tr>
<tr>
<td>
<span class="term"><a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> <em class="structfield"><code>absolute</code></em> : 1;</span></td>
<td>whether the font size is in device units or points.
This field is only present for compatibility with Pango-1.8.0
(<a href="pango-Text-Attributes.html#PANGO-ATTR-ABSOLUTE-SIZE:CAPS"><code class="literal">PANGO_ATTR_ABSOLUTE_SIZE</code></a> was added in 1.8.1); and always will
be <a
href="../glib/glib-Standard-Macros.html#FALSE:CAPS"
><code class="literal">FALSE</code></a> for <a href="pango-Text-Attributes.html#PANGO-ATTR-SIZE:CAPS"><code class="literal">PANGO_ATTR_SIZE</code></a> and <a
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> for <a href="pango-Text-Attributes.html#PANGO-ATTR-ABSOLUTE-SIZE:CAPS"><code class="literal">PANGO_ATTR_ABSOLUTE_SIZE</code></a>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2791701"></a><h3>
<a name="pango-parse-markup"></a>pango_parse_markup ()</h3>
<a class="indexterm" name="id2791714"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> pango_parse_markup (const char *markup_text,
int length,
<a
href="../glib/glib-Unicode-Manipulation.html#gunichar"
>gunichar</a> accel_marker,
<a href="pango-Text-Attributes.html#PangoAttrList">PangoAttrList</a> **attr_list,
char **text,
<a
href="../glib/glib-Unicode-Manipulation.html#gunichar"
>gunichar</a> *accel_char,
<a
href="../glib/glib-Error-Reporting.html#GError"
>GError</a> **error);</pre>
<p>
Parses marked-up text (see
<a href="PangoMarkupFormat.html" title="Text Attribute Markup">markup format</a>) to create
a plaintext string and an attribute list.
</p>
<p>
If <em class="parameter"><code>accel_marker</code></em> is nonzero, the given character will mark the
character following it as an accelerator. For example, the accel
marker might be an ampersand or underscore. All characters marked
as an accelerator will receive a <a href="pango-Text-Attributes.html#PANGO-UNDERLINE-LOW:CAPS"><code class="literal">PANGO_UNDERLINE_LOW</code></a> attribute,
and the first character so marked will be returned in <em class="parameter"><code>accel_char</code></em>.
Two <em class="parameter"><code>accel_marker</code></em> characters following each other produce a single
literal <em class="parameter"><code>accel_marker</code></em> character.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>markup_text</code></em> :</span></td>
<td> markup to parse (see <a href="PangoMarkupFormat.html" title="Text Attribute Markup">markup format</a>)
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>length</code></em> :</span></td>
<td> length of <em class="parameter"><code>markup_text</code></em>, or -1 if nul-terminated
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>accel_marker</code></em> :</span></td>
<td> character that precedes an accelerator, or 0 for none
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>attr_list</code></em> :</span></td>
<td> address of return location for a <a href="pango-Text-Attributes.html#PangoAttrList"><span class="type">PangoAttrList</span></a>, or <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>text</code></em> :</span></td>
<td> address of return location for text with tags stripped, or <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>accel_char</code></em> :</span></td>
<td> address of return location for accelerator char, or <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>error</code></em> :</span></td>
<td> address of return location for errors, or <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> <a
href="../glib/glib-Standard-Macros.html#FALSE:CAPS"
><code class="literal">FALSE</code></a> if <em class="parameter"><code>error</code></em> is set, otherwise <a
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2792048"></a><h3>
<a name="pango-attr-type-register"></a>pango_attr_type_register ()</h3>
<a class="indexterm" name="id2792061"></a><pre class="programlisting"><a href="pango-Text-Attributes.html#PangoAttrType">PangoAttrType</a> pango_attr_type_register (const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *name);</pre>
<p>
Allocate a new attribute type ID.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>name</code></em> :</span></td>
<td> an identifier for the type (currently unused.)
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> the new type ID.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2792123"></a><h3>
<a name="pango-attribute-copy"></a>pango_attribute_copy ()</h3>
<a class="indexterm" name="id2792135"></a><pre class="programlisting"><a href="pango-Text-Attributes.html#PangoAttribute">PangoAttribute</a>* pango_attribute_copy (const <a href="pango-Text-Attributes.html#PangoAttribute">PangoAttribute</a> *attr);</pre>
<p>
Make a copy of an attribute.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>attr</code></em> :</span></td>
<td> a <a href="pango-Text-Attributes.html#PangoAttribute"><span class="type">PangoAttribute</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> the newly allocated <a href="pango-Text-Attributes.html#PangoAttribute"><span class="type">PangoAttribute</span></a>, which should be
freed with <a href="pango-Text-Attributes.html#pango-attribute-destroy"><code class="function">pango_attribute_destroy()</code></a>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2792225"></a><h3>
<a name="pango-attribute-equal"></a>pango_attribute_equal ()</h3>
<a class="indexterm" name="id2792238"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> pango_attribute_equal (const <a href="pango-Text-Attributes.html#PangoAttribute">PangoAttribute</a> *attr1,
const <a href="pango-Text-Attributes.html#PangoAttribute">PangoAttribute</a> *attr2);</pre>
<p>
Compare two attributes for equality. This compares only the
actual value of the two attributes and not the ranges that the
attributes apply to.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>attr1</code></em> :</span></td>
<td> a <a href="pango-Text-Attributes.html#PangoAttribute"><span class="type">PangoAttribute</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>attr2</code></em> :</span></td>
<td> another <a href="pango-Text-Attributes.html#PangoAttribute"><span class="type">PangoAttribute</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> <a
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> if the two attributes have the same value.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2792349"></a><h3>
<a name="pango-attribute-destroy"></a>pango_attribute_destroy ()</h3>
<a class="indexterm" name="id2792362"></a><pre class="programlisting">void pango_attribute_destroy (<a href="pango-Text-Attributes.html#PangoAttribute">PangoAttribute</a> *attr);</pre>
<p>
Destroy a <a href="pango-Text-Attributes.html#PangoAttribute"><span class="type">PangoAttribute</span></a> and free all associated memory.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><em class="parameter"><code>attr</code></em> :</span></td>
<td> a <a href="pango-Text-Attributes.html#PangoAttribute"><span class="type">PangoAttribute</span></a>.
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2792429"></a><h3>
<a name="pango-attr-language-new"></a>pango_attr_language_new ()</h3>
<a class="indexterm" name="id2792442"></a><pre class="programlisting"><a href="pango-Text-Attributes.html#PangoAttribute">PangoAttribute</a>* pango_attr_language_new (<a href="pango-Text-Attributes.html#PangoLanguage">PangoLanguage</a> *language);</pre>
<p>
Create a new language tag attribute.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>language</code></em> :</span></td>
<td> language tag
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> the newly allocated <a href="pango-Text-Attributes.html#PangoAttribute"><span class="type">PangoAttribute</span></a>, which should be
freed with <a href="pango-Text-Attributes.html#pango-attribute-destroy"><code class="function">pango_attribute_destroy()</code></a>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2792523"></a><h3>
<a name="pango-attr-family-new"></a>pango_attr_family_new ()</h3>
<a class="indexterm" name="id2792536"></a><pre class="programlisting"><a href="pango-Text-Attributes.html#PangoAttribute">PangoAttribute</a>* pango_attr_family_new (const char *family);</pre>
<p>
Create a new font family attribute.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>family</code></em> :</span></td>
<td> the family or comma separated list of families
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> the newly allocated <a href="pango-Text-Attributes.html#PangoAttribute"><span class="type">PangoAttribute</span></a>, which should be
freed with <a href="pango-Text-Attributes.html#pango-attribute-destroy"><code class="function">pango_attribute_destroy()</code></a>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2792618"></a><h3>
<a name="pango-attr-style-new"></a>pango_attr_style_new ()</h3>
<a class="indexterm" name="id2792631"></a><pre class="programlisting"><a href="pango-Text-Attributes.html#PangoAttribute">PangoAttribute</a>* pango_attr_style_new (<a href="pango-Fonts.html#PangoStyle">PangoStyle</a> style);</pre>
<p>
Create a new font slant style attribute.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>style</code></em> :</span></td>
<td> the slant style
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> the newly allocated <a href="pango-Text-Attributes.html#PangoAttribute"><span class="type">PangoAttribute</span></a>, which should be
freed with <a href="pango-Text-Attributes.html#pango-attribute-destroy"><code class="function">pango_attribute_destroy()</code></a>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2792712"></a><h3>
<a name="pango-attr-variant-new"></a>pango_attr_variant_new ()</h3>
<a class="indexterm" name="id2792726"></a><pre class="programlisting"><a href="pango-Text-Attributes.html#PangoAttribute">PangoAttribute</a>* pango_attr_variant_new (<a href="pango-Fonts.html#PangoVariant">PangoVariant</a> variant);</pre>
<p>
Create a new font variant attribute (normal or small caps)</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>variant</code></em> :</span></td>
<td> the variant
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> the newly allocated <a href="pango-Text-Attributes.html#PangoAttribute"><span class="type">PangoAttribute</span></a>, which should be
freed with <a href="pango-Text-Attributes.html#pango-attribute-destroy"><code class="function">pango_attribute_destroy()</code></a>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2792807"></a><h3>
<a name="pango-attr-stretch-new"></a>pango_attr_stretch_new ()</h3>
<a class="indexterm" name="id2792821"></a><pre class="programlisting"><a href="pango-Text-Attributes.html#PangoAttribute">PangoAttribute</a>* pango_attr_stretch_new (<a href="pango-Fonts.html#PangoStretch">PangoStretch</a> stretch);</pre>
<p>
Create a new font stretch attribute</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>stretch</code></em> :</span></td>
<td> the stretch
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> the newly allocated <a href="pango-Text-Attributes.html#PangoAttribute"><span class="type">PangoAttribute</span></a>, which should be
freed with <a href="pango-Text-Attributes.html#pango-attribute-destroy"><code class="function">pango_attribute_destroy()</code></a>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2792902"></a><h3>
<a name="pango-attr-weight-new"></a>pango_attr_weight_new ()</h3>
<a class="indexterm" name="id2792916"></a><pre class="programlisting"><a href="pango-Text-Attributes.html#PangoAttribute">PangoAttribute</a>* pango_attr_weight_new (<a href="pango-Fonts.html#PangoWeight">PangoWeight</a> weight);</pre>
<p>
Create a new font weight attribute.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>weight</code></em> :</span></td>
<td> the weight
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> the newly allocated <a href="pango-Text-Attributes.html#PangoAttribute"><span class="type">PangoAttribute</span></a>, which should be
freed with <a href="pango-Text-Attributes.html#pango-attribute-destroy"><code class="function">pango_attribute_destroy()</code></a>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2792997"></a><h3>
<a name="pango-attr-size-new"></a>pango_attr_size_new ()</h3>
<a class="indexterm" name="id2793010"></a><pre class="programlisting"><a href="pango-Text-Attributes.html#PangoAttribute">PangoAttribute</a>* pango_attr_size_new (int size);</pre>
<p>
Create a new font-size attribute in fractional points.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>size</code></em> :</span></td>
<td> the font size, in <a href="pango-Glyph-Storage.html#PANGO-SCALE:CAPS"><code class="literal">PANGO_SCALE</code></a>ths of a point.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> the newly allocated <a href="pango-Text-Attributes.html#PangoAttribute"><span class="type">PangoAttribute</span></a>, which should be
freed with <a href="pango-Text-Attributes.html#pango-attribute-destroy"><code class="function">pango_attribute_destroy()</code></a>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2793102"></a><h3>
<a name="pango-attr-size-new-absolute"></a>pango_attr_size_new_absolute ()</h3>
<a class="indexterm" name="id2793118"></a><pre class="programlisting"><a href="pango-Text-Attributes.html#PangoAttribute">PangoAttribute</a>* pango_attr_size_new_absolute
(int size);</pre>
<p>
Create a new font-size attribute in device units.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>size</code></em> :</span></td>
<td> the font size, in <a href="pango-Glyph-Storage.html#PANGO-SCALE:CAPS"><code class="literal">PANGO_SCALE</code></a>ths of a device unit.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> the newly allocated <a href="pango-Text-Attributes.html#PangoAttribute"><span class="type">PangoAttribute</span></a>, which should be
freed with <a href="pango-Text-Attributes.html#pango-attribute-destroy"><code class="function">pango_attribute_destroy()</code></a>.
</td>
</tr>
</tbody>
</table></div>
<p>Since 1.8
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2793216"></a><h3>
<a name="pango-attr-font-desc-new"></a>pango_attr_font_desc_new ()</h3>
<a class="indexterm" name="id2793230"></a><pre class="programlisting"><a href="pango-Text-Attributes.html#PangoAttribute">PangoAttribute</a>* pango_attr_font_desc_new (const <a href="pango-Fonts.html#PangoFontDescription">PangoFontDescription</a> *desc);</pre>
<p>
Create a new font description attribute. This attribute
allows setting family, style, weight, variant, stretch,
and size simultaneously.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>desc</code></em> :</span></td>
<td> the font description
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> the newly allocated <a href="pango-Text-Attributes.html#PangoAttribute"><span class="type">PangoAttribute</span></a>, which should be
freed with <a href="pango-Text-Attributes.html#pango-attribute-destroy"><code class="function">pango_attribute_destroy()</code></a>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2793314"></a><h3>
<a name="pango-attr-foreground-new"></a>pango_attr_foreground_new ()</h3>
<a class="indexterm" name="id2793328"></a><pre class="programlisting"><a href="pango-Text-Attributes.html#PangoAttribute">PangoAttribute</a>* pango_attr_foreground_new (<a
href="../glib/glib-Basic-Types.html#guint16"
>guint16</a> red,
<a
href="../glib/glib-Basic-Types.html#guint16"
>guint16</a> green,
<a
href="../glib/glib-Basic-Types.html#guint16"
>guint16</a> blue);</pre>
<p>
Create a new foreground color attribute.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>red</code></em> :</span></td>
<td> the red value (ranging from 0 to 65535)
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>green</code></em> :</span></td>
<td> the green value
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>blue</code></em> :</span></td>
<td> the blue value
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> the newly allocated <a href="pango-Text-Attributes.html#PangoAttribute"><span class="type">PangoAttribute</span></a>, which should be
freed with <a href="pango-Text-Attributes.html#pango-attribute-destroy"><code class="function">pango_attribute_destroy()</code></a>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2793452"></a><h3>
<a name="pango-attr-background-new"></a>pango_attr_background_new ()</h3>
<a class="indexterm" name="id2793466"></a><pre class="programlisting"><a href="pango-Text-Attributes.html#PangoAttribute">PangoAttribute</a>* pango_attr_background_new (<a
href="../glib/glib-Basic-Types.html#guint16"
>guint16</a> red,
<a
href="../glib/glib-Basic-Types.html#guint16"
>guint16</a> green,
<a
href="../glib/glib-Basic-Types.html#guint16"
>guint16</a> blue);</pre>
<p>
Create a new background color attribute.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>red</code></em> :</span></td>
<td> the red value (ranging from 0 to 65535)
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>green</code></em> :</span></td>
<td> the green value
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>blue</code></em> :</span></td>
<td> the blue value
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> the newly allocated <a href="pango-Text-Attributes.html#PangoAttribute"><span class="type">PangoAttribute</span></a>, which should be
freed with <a href="pango-Text-Attributes.html#pango-attribute-destroy"><code class="function">pango_attribute_destroy()</code></a>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2793589"></a><h3>
<a name="pango-attr-strikethrough-new"></a>pango_attr_strikethrough_new ()</h3>
<a class="indexterm" name="id2793603"></a><pre class="programlisting"><a href="pango-Text-Attributes.html#PangoAttribute">PangoAttribute</a>* pango_attr_strikethrough_new
(<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> strikethrough);</pre>
<p>
Create a new strike-through attribute.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>strikethrough</code></em> :</span></td>
<td> <a
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> if the text should be struck-through.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> the newly allocated <a href="pango-Text-Attributes.html#PangoAttribute"><span class="type">PangoAttribute</span></a>, which should be
freed with <a href="pango-Text-Attributes.html#pango-attribute-destroy"><code class="function">pango_attribute_destroy()</code></a>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2793695"></a><h3>
<a name="pango-attr-strikethrough-color-new"></a>pango_attr_strikethrough_color_new ()</h3>
<a class="indexterm" name="id2793712"></a><pre class="programlisting"><a href="pango-Text-Attributes.html#PangoAttribute">PangoAttribute</a>* pango_attr_strikethrough_color_new
(<a
href="../glib/glib-Basic-Types.html#guint16"
>guint16</a> red,
<a
href="../glib/glib-Basic-Types.html#guint16"
>guint16</a> green,
<a
href="../glib/glib-Basic-Types.html#guint16"
>guint16</a> blue);</pre>
<p>
Create a new strikethrough color attribute. This attribute
modifies the color of strikethrough lines. If not set, strikethrough
lines will use the foreground color.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>red</code></em> :</span></td>
<td> the red value (ranging from 0 to 65535)
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>green</code></em> :</span></td>
<td> the green value
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>blue</code></em> :</span></td>
<td> the blue value
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> the newly allocated <a href="pango-Text-Attributes.html#PangoAttribute"><span class="type">PangoAttribute</span></a>, which should be
freed with <a href="pango-Text-Attributes.html#pango-attribute-destroy"><code class="function">pango_attribute_destroy()</code></a>.
</td>
</tr>
</tbody>
</table></div>
<p>Since 1.8
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2793843"></a><h3>
<a name="pango-attr-underline-new"></a>pango_attr_underline_new ()</h3>
<a class="indexterm" name="id2793856"></a><pre class="programlisting"><a href="pango-Text-Attributes.html#PangoAttribute">PangoAttribute</a>* pango_attr_underline_new (<a href="pango-Text-Attributes.html#PangoUnderline">PangoUnderline</a> underline);</pre>
<p>
Create a new underline-style attribute.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>underline</code></em> :</span></td>
<td> the underline style.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> the newly allocated <a href="pango-Text-Attributes.html#PangoAttribute"><span class="type">PangoAttribute</span></a>, which should be
freed with <a href="pango-Text-Attributes.html#pango-attribute-destroy"><code class="function">pango_attribute_destroy()</code></a>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2793938"></a><h3>
<a name="pango-attr-underline-color-new"></a>pango_attr_underline_color_new ()</h3>
<a class="indexterm" name="id2793954"></a><pre class="programlisting"><a href="pango-Text-Attributes.html#PangoAttribute">PangoAttribute</a>* pango_attr_underline_color_new
(<a
href="../glib/glib-Basic-Types.html#guint16"
>guint16</a> red,
<a
href="../glib/glib-Basic-Types.html#guint16"
>guint16</a> green,
<a
href="../glib/glib-Basic-Types.html#guint16"
>guint16</a> blue);</pre>
<p>
Create a new underline color attribute. This attribute
modifies the color of underlines. If not set, underlines
will use the foreground color.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>red</code></em> :</span></td>
<td> the red value (ranging from 0 to 65535)
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>green</code></em> :</span></td>
<td> the green value
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>blue</code></em> :</span></td>
<td> the blue value
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> the newly allocated <a href="pango-Text-Attributes.html#PangoAttribute"><span class="type">PangoAttribute</span></a>, which should be
freed with <a href="pango-Text-Attributes.html#pango-attribute-destroy"><code class="function">pango_attribute_destroy()</code></a>.
</td>
</tr>
</tbody>
</table></div>
<p>Since 1.8
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2794086"></a><h3>
<a name="PangoUnderline"></a>enum PangoUnderline</h3>
<a class="indexterm" name="id2794098"></a><pre class="programlisting">typedef enum {
PANGO_UNDERLINE_NONE,
PANGO_UNDERLINE_SINGLE,
PANGO_UNDERLINE_DOUBLE,
PANGO_UNDERLINE_LOW,
PANGO_UNDERLINE_ERROR
} PangoUnderline;
</pre>
<p>
the <a href="pango-Text-Attributes.html#PangoUnderline"><span class="type">PangoUnderline</span></a> enumeration is used to specify
whether text should be underlined, and if so, the type
of underlining.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><a name="PANGO-UNDERLINE-NONE:CAPS"></a><code class="literal">PANGO_UNDERLINE_NONE</code></span></td>
<td>no underline should be drawn
</td>
</tr>
<tr>
<td>
<span class="term"><a name="PANGO-UNDERLINE-SINGLE:CAPS"></a><code class="literal">PANGO_UNDERLINE_SINGLE</code></span></td>
<td>a single underline should be drawn
</td>
</tr>
<tr>
<td>
<span class="term"><a name="PANGO-UNDERLINE-DOUBLE:CAPS"></a><code class="literal">PANGO_UNDERLINE_DOUBLE</code></span></td>
<td>a double underline should be drawn
</td>
</tr>
<tr>
<td>
<span class="term"><a name="PANGO-UNDERLINE-LOW:CAPS"></a><code class="literal">PANGO_UNDERLINE_LOW</code></span></td>
<td>a single underline should be drawn at a position
beneath the ink extents of the text being
underlined. This should be used only for underlining
single characters, such as for keyboard
accelerators. <a href="pango-Text-Attributes.html#PANGO-UNDERLINE-SINGLE:CAPS"><code class="literal">PANGO_UNDERLINE_SINGLE</code></a> should
be used for extended portions of text.
</td>
</tr>
<tr>
<td>
<span class="term"><a name="PANGO-UNDERLINE-ERROR:CAPS"></a><code class="literal">PANGO_UNDERLINE_ERROR</code></span></td>
<td>a wavy underline should be drawn below.
This underline is typically used to indicate
an error such as a possilble mispelling; in some
cases a contrasting color may automatically
be used. This type of underlining is available
since Pango 1.4.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2794267"></a><h3>
<a name="PANGO-TYPE-UNDERLINE:CAPS"></a>PANGO_TYPE_UNDERLINE</h3>
<a class="indexterm" name="id2794280"></a><pre class="programlisting">#define PANGO_TYPE_UNDERLINE (pango_underline_get_type())
</pre>
<p>
The <a
href="../gobject/gobject-The-Base-Object-Type.html#GObject"
><span class="type">GObject</span></a> type for <a href="pango-Text-Attributes.html#PangoUnderline"><span class="type">PangoUnderline</span></a>.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2794312"></a><h3>
<a name="pango-attr-shape-new"></a>pango_attr_shape_new ()</h3>
<a class="indexterm" name="id2794326"></a><pre class="programlisting"><a href="pango-Text-Attributes.html#PangoAttribute">PangoAttribute</a>* pango_attr_shape_new (const <a href="pango-Glyph-Storage.html#PangoRectangle">PangoRectangle</a> *ink_rect,
const <a href="pango-Glyph-Storage.html#PangoRectangle">PangoRectangle</a> *logical_rect);</pre>
<p>
Create a new shape attribute. A shape is used to impose a
particular ink and logical rect on the result of shaping a
particular glyph. This might be used, for instance, for
embedding a picture or a widget inside a PangoLayout.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>ink_rect</code></em> :</span></td>
<td> ink rectangle to assign to each character
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>logical_rect</code></em> :</span></td>
<td> logical rectangle to assign to each character
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> the newly allocated <a href="pango-Text-Attributes.html#PangoAttribute"><span class="type">PangoAttribute</span></a>, which should be
freed with <a href="pango-Text-Attributes.html#pango-attribute-destroy"><code class="function">pango_attribute_destroy()</code></a>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2794434"></a><h3>
<a name="pango-attr-shape-new-with-data"></a>pango_attr_shape_new_with_data ()</h3>
<a class="indexterm" name="id2794449"></a><pre class="programlisting"><a href="pango-Text-Attributes.html#PangoAttribute">PangoAttribute</a>* pango_attr_shape_new_with_data
(const <a href="pango-Glyph-Storage.html#PangoRectangle">PangoRectangle</a> *ink_rect,
const <a href="pango-Glyph-Storage.html#PangoRectangle">PangoRectangle</a> *logical_rect,
<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> data,
<a href="pango-Text-Attributes.html#PangoAttrDataCopyFunc">PangoAttrDataCopyFunc</a> copy_func,
<a
href="../glib/glib-Datasets.html#GDestroyNotify"
>GDestroyNotify</a> destroy_func);</pre>
<p>
Like <a href="pango-Text-Attributes.html#pango-attr-shape-new"><code class="function">pango_attr_shape_new()</code></a>, but a user data pointer is also
provided; this pointer can be accessed when later
rendering the glyph.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>ink_rect</code></em> :</span></td>
<td> ink rectangle to assign to each character
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>logical_rect</code></em> :</span></td>
<td> logical rectangle to assign to each character
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>data</code></em> :</span></td>
<td> user data pointer
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>copy_func</code></em> :</span></td>
<td> function to copy <em class="parameter"><code>data</code></em> when the attribute
is copied. If <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>, <em class="parameter"><code>data</code></em> is simply copied
as a pointer.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>destroy_func</code></em> :</span></td>
<td> function to free <em class="parameter"><code>data</code></em> when the attribute
is freed, or <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> the newly allocated <a href="pango-Text-Attributes.html#PangoAttribute"><span class="type">PangoAttribute</span></a>, which should be
freed with <a href="pango-Text-Attributes.html#pango-attribute-destroy"><code class="function">pango_attribute_destroy()</code></a>.
</td>
</tr>
</tbody>
</table></div>
<p>Since 1.8
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2794678"></a><h3>
<a name="PangoAttrDataCopyFunc"></a>PangoAttrDataCopyFunc ()</h3>
<a class="indexterm" name="id2794692"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> (*PangoAttrDataCopyFunc) (<a
href="../glib/glib-Basic-Types.html#gconstpointer"
>gconstpointer</a> data);</pre>
<p>
A copy function passed to attribute new functions that take
user data.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>data</code></em> :</span></td>
<td>the user data
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td>a new copy of <em class="parameter"><code>data</code></em>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2794756"></a><h3>
<a name="pango-attr-scale-new"></a>pango_attr_scale_new ()</h3>
<a class="indexterm" name="id2794769"></a><pre class="programlisting"><a href="pango-Text-Attributes.html#PangoAttribute">PangoAttribute</a>* pango_attr_scale_new (double scale_factor);</pre>
<p>
Create a new font size scale attribute. The base font for the
affected text will have its size multiplied by <em class="parameter"><code>scale_factor</code></em>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>scale_factor</code></em> :</span></td>
<td> factor to scale the font
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> the newly allocated <a href="pango-Text-Attributes.html#PangoAttribute"><span class="type">PangoAttribute</span></a>, which should be
freed with <a href="pango-Text-Attributes.html#pango-attribute-destroy"><code class="function">pango_attribute_destroy()</code></a>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2794858"></a><h3>
<a name="pango-attr-fallback-new"></a>pango_attr_fallback_new ()</h3>
<a class="indexterm" name="id2794873"></a><pre class="programlisting"><a href="pango-Text-Attributes.html#PangoAttribute">PangoAttribute</a>* pango_attr_fallback_new (<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> enable_fallback);</pre>
<p>
Create a new font fallback attribute.
</p>
<p>
If fallback is disabled, characters will only be used from the
closest matching font on the system. No fallback will be done to
other fonts on the system that might contain the characters in the
text.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>enable_fallback</code></em> :</span></td>
<td> <a
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> if we should fall back on other fonts
for characters the active font is missing.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> the newly allocated <a href="pango-Text-Attributes.html#PangoAttribute"><span class="type">PangoAttribute</span></a>, which should be
freed with <a href="pango-Text-Attributes.html#pango-attribute-destroy"><code class="function">pango_attribute_destroy()</code></a>.
</td>
</tr>
</tbody>
</table></div>
<p>Since 1.4
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2794977"></a><h3>
<a name="PANGO-SCALE-XX-SMALL:CAPS"></a>PANGO_SCALE_XX_SMALL</h3>
<a class="indexterm" name="id2794990"></a><pre class="programlisting">#define PANGO_SCALE_XX_SMALL ((double)0.5787037037037)
</pre>
<p>
The scale factor for three shrinking steps (1 / (1.2 * 1.2 * 1.2)).
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2795008"></a><h3>
<a name="PANGO-SCALE-X-SMALL:CAPS"></a>PANGO_SCALE_X_SMALL</h3>
<a class="indexterm" name="id2795021"></a><pre class="programlisting">#define PANGO_SCALE_X_SMALL ((double)0.6444444444444)
</pre>
<p>
The scale factor for two shrinking steps (1 / (1.2 * 1.2)).
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2795038"></a><h3>
<a name="PANGO-SCALE-SMALL:CAPS"></a>PANGO_SCALE_SMALL</h3>
<a class="indexterm" name="id2795051"></a><pre class="programlisting">#define PANGO_SCALE_SMALL ((double)0.8333333333333)
</pre>
<p>
The scale factor for one shrinking step (1 / 1.2).
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2795068"></a><h3>
<a name="PANGO-SCALE-MEDIUM:CAPS"></a>PANGO_SCALE_MEDIUM</h3>
<a class="indexterm" name="id2795081"></a><pre class="programlisting">#define PANGO_SCALE_MEDIUM ((double)1.0)
</pre>
<p>
The scale factor for normal size (1.0).
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2795097"></a><h3>
<a name="PANGO-SCALE-LARGE:CAPS"></a>PANGO_SCALE_LARGE</h3>
<a class="indexterm" name="id2795110"></a><pre class="programlisting">#define PANGO_SCALE_LARGE ((double)1.2)
</pre>
<p>
The scale factor for one magnification step (1.2).
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2795126"></a><h3>
<a name="PANGO-SCALE-X-LARGE:CAPS"></a>PANGO_SCALE_X_LARGE</h3>
<a class="indexterm" name="id2795139"></a><pre class="programlisting">#define PANGO_SCALE_X_LARGE ((double)1.4399999999999)
</pre>
<p>
The scale factor for two magnification steps (1.2 * 1.2).
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2795156"></a><h3>
<a name="PANGO-SCALE-XX-LARGE:CAPS"></a>PANGO_SCALE_XX_LARGE</h3>
<a class="indexterm" name="id2795169"></a><pre class="programlisting">#define PANGO_SCALE_XX_LARGE ((double)1.728)
</pre>
<p>
The scale factor for three magnification steps (1.2 * 1.2 * 1.2).
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2795186"></a><h3>
<a name="pango-attr-rise-new"></a>pango_attr_rise_new ()</h3>
<a class="indexterm" name="id2795198"></a><pre class="programlisting"><a href="pango-Text-Attributes.html#PangoAttribute">PangoAttribute</a>* pango_attr_rise_new (int rise);</pre>
<p>
Create a new baseline displacement attribute.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>rise</code></em> :</span></td>
<td> the amount that the text should be displaced vertically,
in Pango units. Positive values displace the text upwards.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> the newly allocated <a href="pango-Text-Attributes.html#PangoAttribute"><span class="type">PangoAttribute</span></a>, which should be
freed with <a href="pango-Text-Attributes.html#pango-attribute-destroy"><code class="function">pango_attribute_destroy()</code></a>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2795280"></a><h3>
<a name="pango-attr-letter-spacing-new"></a>pango_attr_letter_spacing_new ()</h3>
<a class="indexterm" name="id2795296"></a><pre class="programlisting"><a href="pango-Text-Attributes.html#PangoAttribute">PangoAttribute</a>* pango_attr_letter_spacing_new
(int letter_spacing);</pre>
<p>
Create a new letter-spacing attribute.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>letter_spacing</code></em> :</span></td>
<td> amount of extra space to add between graphemes
of the text, in Pango units.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> the newly allocated <a href="pango-Text-Attributes.html#PangoAttribute"><span class="type">PangoAttribute</span></a>, which should be
freed with <a href="pango-Text-Attributes.html#pango-attribute-destroy"><code class="function">pango_attribute_destroy()</code></a>.
</td>
</tr>
</tbody>
</table></div>
<p>Since 1.6
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2795384"></a><h3>
<a name="PangoColor"></a>PangoColor</h3>
<a class="indexterm" name="id2795396"></a><pre class="programlisting">typedef struct {
guint16 red;
guint16 green;
guint16 blue;
} PangoColor;
</pre>
<p>
The <a href="pango-Text-Attributes.html#PangoColor"><span class="type">PangoColor</span></a> structure is used to
represent a color in an uncalibrated RGB colorspace.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><a
href="../glib/glib-Basic-Types.html#guint16"
>guint16</a> <em class="structfield"><code>red</code></em>;</span></td>
<td>The red component of the color. This is a value between 0 and 65535,
with 65535 indicating full intensity.
</td>
</tr>
<tr>
<td>
<span class="term"><a
href="../glib/glib-Basic-Types.html#guint16"
>guint16</a> <em class="structfield"><code>green</code></em>;</span></td>
<td>The green component of the color. This is a value between 0 and 65535,
with 65535 indicating full intensity.
</td>
</tr>
<tr>
<td>
<span class="term"><a
href="../glib/glib-Basic-Types.html#guint16"
>guint16</a> <em class="structfield"><code>blue</code></em>;</span></td>
<td>The blue component of the color. This is a value between 0 and 65535,
with 65535 indicating full intensity.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2795492"></a><h3>
<a name="PANGO-TYPE-COLOR:CAPS"></a>PANGO_TYPE_COLOR</h3>
<a class="indexterm" name="id2795506"></a><pre class="programlisting">#define PANGO_TYPE_COLOR pango_color_get_type ()
</pre>
<p>
The <a
href="../gobject/gobject-The-Base-Object-Type.html#GObject"
><span class="type">GObject</span></a> type for <a href="pango-Text-Attributes.html#PangoColor"><span class="type">PangoColor</span></a>.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2795537"></a><h3>
<a name="pango-color-free"></a>pango_color_free ()</h3>
<a class="indexterm" name="id2795550"></a><pre class="programlisting">void pango_color_free (<a href="pango-Text-Attributes.html#PangoColor">PangoColor</a> *color);</pre>
<p>
Frees a color allocated by <a href="pango-Text-Attributes.html#pango-color-copy"><code class="function">pango_color_copy()</code></a>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><em class="parameter"><code>color</code></em> :</span></td>
<td> an allocated <a href="pango-Text-Attributes.html#PangoColor"><span class="type">PangoColor</span></a>
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2795618"></a><h3>
<a name="pango-color-parse"></a>pango_color_parse ()</h3>
<a class="indexterm" name="id2795631"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> pango_color_parse (<a href="pango-Text-Attributes.html#PangoColor">PangoColor</a> *color,
const char *spec);</pre>
<p>
Fill in the fields of a color from a string specification. The
string can either one of a large set of standard names. (Taken
from the X11 <code class="filename">rgb.txt</code> file), or it can be a hex value in the
form '#rgb' '#rrggbb' '#rrrgggbbb' or '#rrrrggggbbbb' where
'r', 'g' and 'b' are hex digits of the red, green, and blue
components of the color, respectively. (White in the four
forms is '#fff' '#ffffff' '#fffffffff' and '#ffffffffffff')</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>color</code></em> :</span></td>
<td> a <a href="pango-Text-Attributes.html#PangoColor"><span class="type">PangoColor</span></a> structure in which to store the result
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>spec</code></em> :</span></td>
<td> a string specifying the new color
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> <a
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> if parsing of the specifier succeeded,
otherwise false.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2795748"></a><h3>
<a name="pango-color-copy"></a>pango_color_copy ()</h3>
<a class="indexterm" name="id2795760"></a><pre class="programlisting"><a href="pango-Text-Attributes.html#PangoColor">PangoColor</a>* pango_color_copy (const <a href="pango-Text-Attributes.html#PangoColor">PangoColor</a> *src);</pre>
<p>
Creates a copy of <em class="parameter"><code>src</code></em>, which should be freed with
<a href="pango-Text-Attributes.html#pango-color-free"><code class="function">pango_color_free()</code></a>. Primarily used by language bindings,
not that useful otherwise (since colors can just be copied
by assignment in C).</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>src</code></em> :</span></td>
<td> color to copy
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> the newly allocated <a href="pango-Text-Attributes.html#PangoColor"><span class="type">PangoColor</span></a>, which should
be freed with <a href="pango-Text-Attributes.html#pango-color-free"><code class="function">pango_color_free()</code></a>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2795856"></a><h3>
<a name="PangoLanguage"></a>PangoLanguage</h3>
<a class="indexterm" name="id2795870"></a><pre class="programlisting">typedef struct _PangoLanguage PangoLanguage;</pre>
<p>
The <a href="pango-Text-Attributes.html#PangoLanguage"><span class="type">PangoLanguage</span></a> structure is used to
represent a language.
</p>
<p>
<a href="pango-Text-Attributes.html#PangoLanguage"><span class="type">PangoLanguage</span></a> pointers can be efficiently
copied and compared with each other.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2795907"></a><h3>
<a name="PANGO-TYPE-LANGUAGE:CAPS"></a>PANGO_TYPE_LANGUAGE</h3>
<a class="indexterm" name="id2795921"></a><pre class="programlisting">#define PANGO_TYPE_LANGUAGE (pango_language_get_type ())
</pre>
<p>
The <a
href="../gobject/gobject-The-Base-Object-Type.html#GObject"
><span class="type">GObject</span></a> type for <a href="pango-Text-Attributes.html#PangoLanguage"><span class="type">PangoLanguage</span></a>.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2795953"></a><h3>
<a name="pango-language-from-string"></a>pango_language_from_string ()</h3>
<a class="indexterm" name="id2795967"></a><pre class="programlisting"><a href="pango-Text-Attributes.html#PangoLanguage">PangoLanguage</a>* pango_language_from_string (const char *language);</pre>
<p>
Take a RFC-3066 format language tag as a string and convert it to a
<a href="pango-Text-Attributes.html#PangoLanguage"><span class="type">PangoLanguage</span></a> pointer that can be efficiently copied (copy the
pointer) and compared with other language tags (compare the
pointer.)
</p>
<p>
This function first canonicalizes the string by converting it to
lowercase, mapping '_' to '-', and stripping all characters other
than letters and '-'.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>language</code></em> :</span></td>
<td> a string representing a language tag
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> an opaque pointer to a <a href="pango-Text-Attributes.html#PangoLanguage"><span class="type">PangoLanguage</span></a> structure.
this will be valid forever after.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2796054"></a><h3>
<a name="pango-language-to-string"></a>pango_language_to_string()</h3>
<a class="indexterm" name="id2796067"></a><pre class="programlisting">#define pango_language_to_string(language) ((const char *)language)
</pre>
<p>
Returns a RFC-3066 format string representing the given language tag.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>language</code></em> :</span></td>
<td>a language tag.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td>a string representing the language tag.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2796114"></a><h3>
<a name="pango-language-matches"></a>pango_language_matches ()</h3>
<a class="indexterm" name="id2796127"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> pango_language_matches (<a href="pango-Text-Attributes.html#PangoLanguage">PangoLanguage</a> *language,
const char *range_list);</pre>
<p>
Checks if a language tag matches one of the elements in a list of
language ranges. A language tag is considered to match a range
in the list if the range is '*', the range is exactly the tag,
or the range is a prefix of the tag, and the character after it
in the tag is '-'.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>language</code></em> :</span></td>
<td> a language tag (see <a href="pango-Text-Attributes.html#pango-language-from-string"><code class="function">pango_language_from_string()</code></a>),
<a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a> is allowed and matches nothing but '*'
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>range_list</code></em> :</span></td>
<td> a list of language ranges, separated by ';', ':',
',', or space characters.
Each element must either be '*', or a RFC 3066 language range
canonicalized as by <a href="pango-Text-Attributes.html#pango-language-from-string"><code class="function">pango_language_from_string()</code></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> <a
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> if a match was found.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2796260"></a><h3>
<a name="PangoAttrList"></a>PangoAttrList</h3>
<a class="indexterm" name="id2796273"></a><pre class="programlisting">typedef struct _PangoAttrList PangoAttrList;</pre>
<p>
The <a href="pango-Text-Attributes.html#PangoAttrList"><span class="type">PangoAttrList</span></a> structure represents a list of attributes
that apply to a section of text. The attributes are, in general,
allowed to overlap in an arbitrary fashion, however, if the
attributes are manipulated only through <a href="pango-Text-Attributes.html#pango-attr-list-change"><code class="function">pango_attr_list_change()</code></a>,
the overlap between properties will meet stricter criteria.
</p>
<p>
Since the <a href="pango-Text-Attributes.html#PangoAttrList"><span class="type">PangoAttrList</span></a> 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 <a href="pango-Text-Attributes.html#PangoAttrList"><span class="type">PangoAttrList</span></a>
for more than one paragraph of text.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2796336"></a><h3>
<a name="PANGO-TYPE-ATTR-LIST:CAPS"></a>PANGO_TYPE_ATTR_LIST</h3>
<a class="indexterm" name="id2796349"></a><pre class="programlisting">#define PANGO_TYPE_ATTR_LIST pango_attr_list_get_type ()
</pre>
<p>
The <a
href="../gobject/gobject-The-Base-Object-Type.html#GObject"
><span class="type">GObject</span></a> type for <a href="pango-Text-Attributes.html#PangoAttrList"><span class="type">PangoAttrList</span></a>.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2796381"></a><h3>
<a name="pango-attr-list-new"></a>pango_attr_list_new ()</h3>
<a class="indexterm" name="id2796394"></a><pre class="programlisting"><a href="pango-Text-Attributes.html#PangoAttrList">PangoAttrList</a>* pango_attr_list_new (void);</pre>
<p>
Create a new empty attribute list with a reference count of one.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> the newly allocated <a href="pango-Text-Attributes.html#PangoAttrList"><span class="type">PangoAttrList</span></a>, which should
be freed with <a href="pango-Text-Attributes.html#pango-attr-list-unref"><code class="function">pango_attr_list_unref()</code></a>.
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2796454"></a><h3>
<a name="pango-attr-list-ref"></a>pango_attr_list_ref ()</h3>
<a class="indexterm" name="id2796470"></a><pre class="programlisting"><a href="pango-Text-Attributes.html#PangoAttrList">PangoAttrList</a>* pango_attr_list_ref (<a href="pango-Text-Attributes.html#PangoAttrList">PangoAttrList</a> *list);</pre>
<p>
Increase the reference count of the given attribute list by one.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>list</code></em> :</span></td>
<td> a <a href="pango-Text-Attributes.html#PangoAttrList"><span class="type">PangoAttrList</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> The attribute list passed in
</td>
</tr>
</tbody>
</table></div>
<p>Since 1.10
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2796544"></a><h3>
<a name="pango-attr-list-unref"></a>pango_attr_list_unref ()</h3>
<a class="indexterm" name="id2796557"></a><pre class="programlisting">void pango_attr_list_unref (<a href="pango-Text-Attributes.html#PangoAttrList">PangoAttrList</a> *list);</pre>
<p>
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.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><em class="parameter"><code>list</code></em> :</span></td>
<td> a <a href="pango-Text-Attributes.html#PangoAttrList"><span class="type">PangoAttrList</span></a>
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2796617"></a><h3>
<a name="pango-attr-list-copy"></a>pango_attr_list_copy ()</h3>
<a class="indexterm" name="id2796630"></a><pre class="programlisting"><a href="pango-Text-Attributes.html#PangoAttrList">PangoAttrList</a>* pango_attr_list_copy (<a href="pango-Text-Attributes.html#PangoAttrList">PangoAttrList</a> *list);</pre>
<p>
Copy <em class="parameter"><code>list</code></em> and return an identical new list.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>list</code></em> :</span></td>
<td> a <a href="pango-Text-Attributes.html#PangoAttrList"><span class="type">PangoAttrList</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> the newly allocated <a href="pango-Text-Attributes.html#PangoAttrList"><span class="type">PangoAttrList</span></a>, with a
reference count of one, which should
be freed with <a href="pango-Text-Attributes.html#pango-attr-list-unref"><code class="function">pango_attr_list_unref()</code></a>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2796726"></a><h3>
<a name="pango-attr-list-insert"></a>pango_attr_list_insert ()</h3>
<a class="indexterm" name="id2796739"></a><pre class="programlisting">void pango_attr_list_insert (<a href="pango-Text-Attributes.html#PangoAttrList">PangoAttrList</a> *list,
<a href="pango-Text-Attributes.html#PangoAttribute">PangoAttribute</a> *attr);</pre>
<p>
Insert the given attribute into the <a href="pango-Text-Attributes.html#PangoAttrList"><span class="type">PangoAttrList</span></a>. It will
be inserted after all other attributes with a matching
<em class="parameter"><code>start_index</code></em>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>list</code></em> :</span></td>
<td> a <a href="pango-Text-Attributes.html#PangoAttrList"><span class="type">PangoAttrList</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>attr</code></em> :</span></td>
<td> the attribute to insert. Ownership of this value is
assumed by the list.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2796836"></a><h3>
<a name="pango-attr-list-insert-before"></a>pango_attr_list_insert_before ()</h3>
<a class="indexterm" name="id2796850"></a><pre class="programlisting">void pango_attr_list_insert_before (<a href="pango-Text-Attributes.html#PangoAttrList">PangoAttrList</a> *list,
<a href="pango-Text-Attributes.html#PangoAttribute">PangoAttribute</a> *attr);</pre>
<p>
Insert the given attribute into the <a href="pango-Text-Attributes.html#PangoAttrList"><span class="type">PangoAttrList</span></a>. It will
be inserted before all other attributes with a matching
<em class="parameter"><code>start_index</code></em>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>list</code></em> :</span></td>
<td> a <a href="pango-Text-Attributes.html#PangoAttrList"><span class="type">PangoAttrList</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>attr</code></em> :</span></td>
<td> the attribute to insert. Ownership of this value is
assumed by the list.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2796947"></a><h3>
<a name="pango-attr-list-change"></a>pango_attr_list_change ()</h3>
<a class="indexterm" name="id2796959"></a><pre class="programlisting">void pango_attr_list_change (<a href="pango-Text-Attributes.html#PangoAttrList">PangoAttrList</a> *list,
<a href="pango-Text-Attributes.html#PangoAttribute">PangoAttribute</a> *attr);</pre>
<p>
Insert the given attribute into the <a href="pango-Text-Attributes.html#PangoAttrList"><span class="type">PangoAttrList</span></a>. It will
replace any attributes of the same type on that segment
and be merged with any adjoining attributes that are identical.
</p>
<p>
This function is slower than <a href="pango-Text-Attributes.html#pango-attr-list-insert"><code class="function">pango_attr_list_insert()</code></a> for
creating a attribute list in order (potentially much slower
for large lists). However, <a href="pango-Text-Attributes.html#pango-attr-list-insert"><code class="function">pango_attr_list_insert()</code></a> is not
suitable for continually changing a set of attributes
since it never removes or combines existing attributes.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>list</code></em> :</span></td>
<td> a <a href="pango-Text-Attributes.html#PangoAttrList"><span class="type">PangoAttrList</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>attr</code></em> :</span></td>
<td> the attribute to insert. Ownership of this value is
assumed by the list.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2797081"></a><h3>
<a name="pango-attr-list-splice"></a>pango_attr_list_splice ()</h3>
<a class="indexterm" name="id2797094"></a><pre class="programlisting">void pango_attr_list_splice (<a href="pango-Text-Attributes.html#PangoAttrList">PangoAttrList</a> *list,
<a href="pango-Text-Attributes.html#PangoAttrList">PangoAttrList</a> *other,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> pos,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> len);</pre>
<p>
This function opens up a hole in <em class="parameter"><code>list</code></em>, fills it in with attributes from
the left, and then merges <em class="parameter"><code>other</code></em> on top of the hole.
</p>
<p>
This operation is equivalent to stretching every attribute
that applies at position <em class="parameter"><code>pos</code></em> in <em class="parameter"><code>list</code></em> by an amount <em class="parameter"><code>len</code></em>,
and then calling <a href="pango-Text-Attributes.html#pango-attr-list-change"><code class="function">pango_attr_list_change()</code></a> with a copy
of each attribute in <em class="parameter"><code>other</code></em> in sequence (offset in position by <em class="parameter"><code>pos</code></em>).
</p>
<p>
This operation proves useful for, for instance, inserting
a preedit string in the middle of an edit buffer.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>list</code></em> :</span></td>
<td> a <a href="pango-Text-Attributes.html#PangoAttrList"><span class="type">PangoAttrList</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>other</code></em> :</span></td>
<td> another <a href="pango-Text-Attributes.html#PangoAttrList"><span class="type">PangoAttrList</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>pos</code></em> :</span></td>
<td> the position in <em class="parameter"><code>list</code></em> at which to insert <em class="parameter"><code>other</code></em>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>len</code></em> :</span></td>
<td> the length of the spliced segment. (Note that this
must be specified since the attributes in <em class="parameter"><code>other</code></em>
may only be present at some subsection of this range)
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2797311"></a><h3>
<a name="pango-attr-list-filter"></a>pango_attr_list_filter ()</h3>
<a class="indexterm" name="id2797326"></a><pre class="programlisting"><a href="pango-Text-Attributes.html#PangoAttrList">PangoAttrList</a>* pango_attr_list_filter (<a href="pango-Text-Attributes.html#PangoAttrList">PangoAttrList</a> *list,
<a href="pango-Text-Attributes.html#PangoAttrFilterFunc">PangoAttrFilterFunc</a> func,
<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> data);</pre>
<p>
Given a <a href="pango-Text-Attributes.html#PangoAttrList"><span class="type">PangoAttrList</span></a> and callback function, removes any elements
of <em class="parameter"><code>list</code></em> for which <em class="parameter"><code>func</code></em> returns <a
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> and inserts them into
a new list.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>list</code></em> :</span></td>
<td> a <a href="pango-Text-Attributes.html#PangoAttrList"><span class="type">PangoAttrList</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>func</code></em> :</span></td>
<td> callback function; returns <a
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> if an atttribute
should be filtered out.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>data</code></em> :</span></td>
<td> Data to be passed to <em class="parameter"><code>func</code></em>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> the new <a href="pango-Text-Attributes.html#PangoAttrList"><span class="type">PangoAttrList</span></a> or <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a> if
no attributes of the given types were found.
</td>
</tr>
</tbody>
</table></div>
<p>Since 1.2
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2797511"></a><h3>
<a name="PangoAttrFilterFunc"></a>PangoAttrFilterFunc ()</h3>
<a class="indexterm" name="id2797524"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> (*PangoAttrFilterFunc) (<a href="pango-Text-Attributes.html#PangoAttribute">PangoAttribute</a> *attribute,
<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> data);</pre>
<p>
A predicate function used by <a href="pango-Text-Attributes.html#pango-attr-list-filter"><code class="function">pango_attr_list_filter()</code></a>
to filter out a subset of attributes for a list.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>attribute</code></em> :</span></td>
<td>a <a href="pango-Text-Attributes.html#PangoAttribute"><span class="type">PangoAttribute</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>data</code></em> :</span></td>
<td>callback data passed to <a href="pango-Text-Attributes.html#pango-attr-list-filter"><code class="function">pango_attr_list_filter()</code></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td>
<a
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> if the attribute should be filtered out
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2797643"></a><h3>
<a name="pango-attr-list-get-iterator"></a>pango_attr_list_get_iterator ()</h3>
<a class="indexterm" name="id2797656"></a><pre class="programlisting"><a href="pango-Text-Attributes.html#PangoAttrIterator">PangoAttrIterator</a>* pango_attr_list_get_iterator
(<a href="pango-Text-Attributes.html#PangoAttrList">PangoAttrList</a> *list);</pre>
<p>
Create a iterator initialized to the beginning of the list.
<em class="parameter"><code>list</code></em> must not be modified until this iterator is freed.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>list</code></em> :</span></td>
<td> a <a href="pango-Text-Attributes.html#PangoAttrList"><span class="type">PangoAttrList</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> the newly allocated <a href="pango-Text-Attributes.html#PangoAttrIterator"><span class="type">PangoAttrIterator</span></a>, which should
be freed with <a href="pango-Text-Attributes.html#pango-attr-iterator-destroy"><code class="function">pango_attr_iterator_destroy()</code></a>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2797754"></a><h3>
<a name="PangoAttrIterator"></a>PangoAttrIterator</h3>
<a class="indexterm" name="id2797767"></a><pre class="programlisting">typedef struct _PangoAttrIterator PangoAttrIterator;</pre>
<p>
The <a href="pango-Text-Attributes.html#PangoAttrIterator"><span class="type">PangoAttrIterator</span></a> structure is used to represent an
iterator through a <a href="pango-Text-Attributes.html#PangoAttrList"><span class="type">PangoAttrList</span></a>. A new iterator is created
with <a href="pango-Text-Attributes.html#pango-attr-list-get-iterator"><code class="function">pango_attr_list_get_iterator()</code></a>. Once the iterator
is created, it can be advanced through the style changes
in the text using <a href="pango-Text-Attributes.html#pango-attr-iterator-next"><code class="function">pango_attr_iterator_next()</code></a>. At each
style change, the range of the current style segment and the
attributes currently in effect can be queried.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2797827"></a><h3>
<a name="pango-attr-iterator-copy"></a>pango_attr_iterator_copy ()</h3>
<a class="indexterm" name="id2797840"></a><pre class="programlisting"><a href="pango-Text-Attributes.html#PangoAttrIterator">PangoAttrIterator</a>* pango_attr_iterator_copy (<a href="pango-Text-Attributes.html#PangoAttrIterator">PangoAttrIterator</a> *iterator);</pre>
<p>
Copy a <a href="pango-Text-Attributes.html#PangoAttrIterator"><span class="type">PangoAttrIterator</span></a></p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>iterator</code></em> :</span></td>
<td> a <a href="pango-Text-Attributes.html#PangoAttrIterator"><span class="type">PangoAttrIterator</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> the newly allocated <a href="pango-Text-Attributes.html#PangoAttrIterator"><span class="type">PangoAttrIterator</span></a>, which should
be freed with <a href="pango-Text-Attributes.html#pango-attr-iterator-destroy"><code class="function">pango_attr_iterator_destroy()</code></a>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2797936"></a><h3>
<a name="pango-attr-iterator-next"></a>pango_attr_iterator_next ()</h3>
<a class="indexterm" name="id2797949"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> pango_attr_iterator_next (<a href="pango-Text-Attributes.html#PangoAttrIterator">PangoAttrIterator</a> *iterator);</pre>
<p>
Advance the iterator until the next change of style.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>iterator</code></em> :</span></td>
<td> a <a href="pango-Text-Attributes.html#PangoAttrIterator"><span class="type">PangoAttrIterator</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> <a
href="../glib/glib-Standard-Macros.html#FALSE:CAPS"
><code class="literal">FALSE</code></a> if the iterator is at the end of the list, otherwise <a
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2798039"></a><h3>
<a name="pango-attr-iterator-range"></a>pango_attr_iterator_range ()</h3>
<a class="indexterm" name="id2798053"></a><pre class="programlisting">void pango_attr_iterator_range (<a href="pango-Text-Attributes.html#PangoAttrIterator">PangoAttrIterator</a> *iterator,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> *start,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> *end);</pre>
<p>
Get the range of the current segment. Note that the
stored return values are signed, not unsigned like
the values in <a href="pango-Text-Attributes.html#PangoAttribute"><span class="type">PangoAttribute</span></a>. To deal with this API
oversight, stored return values that wouldn't fit into
a signed integer are clamped to <a
href="../glib/glib-Limits-of-Basic-Types.html#G-MAXINT:CAPS"
><code class="literal">G_MAXINT</code></a>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>iterator</code></em> :</span></td>
<td> a <a href="pango-Text-Attributes.html#PangoAttrIterator"><span class="type">PangoAttrIterator</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>start</code></em> :</span></td>
<td> location to store the start of the range
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>end</code></em> :</span></td>
<td> location to store the end of the range
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2798177"></a><h3>
<a name="pango-attr-iterator-get"></a>pango_attr_iterator_get ()</h3>
<a class="indexterm" name="id2798190"></a><pre class="programlisting"><a href="pango-Text-Attributes.html#PangoAttribute">PangoAttribute</a>* pango_attr_iterator_get (<a href="pango-Text-Attributes.html#PangoAttrIterator">PangoAttrIterator</a> *iterator,
<a href="pango-Text-Attributes.html#PangoAttrType">PangoAttrType</a> type);</pre>
<p>
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.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>iterator</code></em> :</span></td>
<td> a <a href="pango-Text-Attributes.html#PangoAttrIterator"><span class="type">PangoAttrIterator</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>type</code></em> :</span></td>
<td> the type of attribute to find.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> the current attribute of the given type, or <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>
if no attribute of that type applies to the current
location.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2798297"></a><h3>
<a name="pango-attr-iterator-get-font"></a>pango_attr_iterator_get_font ()</h3>
<a class="indexterm" name="id2798310"></a><pre class="programlisting">void pango_attr_iterator_get_font (<a href="pango-Text-Attributes.html#PangoAttrIterator">PangoAttrIterator</a> *iterator,
<a href="pango-Fonts.html#PangoFontDescription">PangoFontDescription</a> *desc,
<a href="pango-Text-Attributes.html#PangoLanguage">PangoLanguage</a> **language,
<a
href="../glib/glib-Singly-Linked-Lists.html#GSList"
>GSList</a> **extra_attrs);</pre>
<p>
Get the font and other attributes at the current iterator position.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>iterator</code></em> :</span></td>
<td> a <a href="pango-Text-Attributes.html#PangoAttrIterator"><span class="type">PangoAttrIterator</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>desc</code></em> :</span></td>
<td> a <a href="pango-Fonts.html#PangoFontDescription"><span class="type">PangoFontDescription</span></a> to fill in with the current values.
The family name in this structure will be set using
<a href="pango-Fonts.html#pango-font-description-set-family-static"><code class="function">pango_font_description_set_family_static()</code></a> using values from
an attribute in the <a href="pango-Text-Attributes.html#PangoAttrList"><span class="type">PangoAttrList</span></a> associated with the iterator,
so if you plan to keep it around, you must call:
<code class="literal">pango_font_description_set_family (desc, pango_font_description_get_family (desc))</code>.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>language</code></em> :</span></td>
<td> if non-<a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>, location to store language tag for item, or <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>
if none is found.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>extra_attrs</code></em> :</span></td>
<td> if non-<a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>, 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 <a href="pango-Text-Attributes.html#pango-attribute-destroy"><code class="function">pango_attribute_destroy()</code></a> on
each member.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2798522"></a><h3>
<a name="pango-attr-iterator-get-attrs"></a>pango_attr_iterator_get_attrs ()</h3>
<a class="indexterm" name="id2798538"></a><pre class="programlisting"><a
href="../glib/glib-Singly-Linked-Lists.html#GSList"
>GSList</a>* pango_attr_iterator_get_attrs (<a href="pango-Text-Attributes.html#PangoAttrIterator">PangoAttrIterator</a> *iterator);</pre>
<p>
Gets a list of all attributes at the current position of the
iterator.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>iterator</code></em> :</span></td>
<td> a <a href="pango-Text-Attributes.html#PangoAttrIterator"><span class="type">PangoAttrIterator</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> a list of all attributes for the current range.
To free this value, call <a href="pango-Text-Attributes.html#pango-attribute-destroy"><code class="function">pango_attribute_destroy()</code></a> on
each value and <a
href="../glib/glib-Singly-Linked-Lists.html#g-slist-free"
><code class="function">g_slist_free()</code></a> on the list.
</td>
</tr>
</tbody>
</table></div>
<p>Since 1.2
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2798635"></a><h3>
<a name="pango-attr-iterator-destroy"></a>pango_attr_iterator_destroy ()</h3>
<a class="indexterm" name="id2798649"></a><pre class="programlisting">void pango_attr_iterator_destroy (<a href="pango-Text-Attributes.html#PangoAttrIterator">PangoAttrIterator</a> *iterator);</pre>
<p>
Destroy a <a href="pango-Text-Attributes.html#PangoAttrIterator"><span class="type">PangoAttrIterator</span></a> and free all associated memory.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><em class="parameter"><code>iterator</code></em> :</span></td>
<td> a <a href="pango-Text-Attributes.html#PangoAttrIterator"><span class="type">PangoAttrIterator</span></a>.
</td>
</tr></tbody>
</table></div>
</div>
</div>
</div>
</body>
</html>