📄 text-attributes.xml
字号:
<title><anchor id="PangoAttrLanguage" role="struct"/>PangoAttrLanguage</title><indexterm><primary>PangoAttrLanguage</primary></indexterm><programlisting>typedef struct { PangoAttribute attr; PangoLanguage *value;} PangoAttrLanguage;</programlisting><para>The <link linkend="PangoAttrLanguage"><type>PangoAttrLanguage</type></link> structure is used to represent attributes thatare languages.</para><variablelist role="struct"><varlistentry><term><link linkend="PangoAttribute">PangoAttribute</link> <structfield>attr</structfield>;</term><listitem><simpara>the common portion of the attribute</simpara></listitem></varlistentry><varlistentry><term><link linkend="PangoLanguage">PangoLanguage</link> *<structfield>value</structfield>;</term><listitem><simpara>the <link linkend="PangoLanguage"><type>PangoLanguage</type></link> which is the value of the attribute</simpara></listitem></varlistentry></variablelist></refsect2><refsect2><title><anchor id="PangoAttrColor" role="struct"/>PangoAttrColor</title><indexterm><primary>PangoAttrColor</primary></indexterm><programlisting>typedef struct { PangoAttribute attr; PangoColor color;} PangoAttrColor;</programlisting><para>The <link linkend="PangoAttrColor"><type>PangoAttrColor</type></link> structure is used to represent attributes thatare colors.</para><variablelist role="struct"><varlistentry><term><link linkend="PangoAttribute">PangoAttribute</link> <structfield>attr</structfield>;</term><listitem><simpara>the common portion of the attribute</simpara></listitem></varlistentry><varlistentry><term><link linkend="PangoColor">PangoColor</link> <structfield>color</structfield>;</term><listitem><simpara>the <link linkend="PangoColor"><type>PangoColor</type></link> which is the value of the attribute</simpara></listitem></varlistentry></variablelist></refsect2><refsect2><title><anchor id="PangoAttrInt" role="struct"/>PangoAttrInt</title><indexterm><primary>PangoAttrInt</primary></indexterm><programlisting>typedef struct { PangoAttribute attr; int value;} PangoAttrInt;</programlisting><para>The <link linkend="PangoAttrInt"><type>PangoAttrInt</type></link> structure is used to represent attributes withan integer or enumeration value.</para><variablelist role="struct"><varlistentry><term><link linkend="PangoAttribute">PangoAttribute</link> <structfield>attr</structfield>;</term><listitem><simpara>the common portion of the attribute</simpara></listitem></varlistentry><varlistentry><term><link linkend="int">int</link> <structfield>value</structfield>;</term><listitem><simpara>the value of the attribute</simpara></listitem></varlistentry></variablelist></refsect2><refsect2><title><anchor id="PangoAttrFloat" role="struct"/>PangoAttrFloat</title><indexterm><primary>PangoAttrFloat</primary></indexterm><programlisting>typedef struct { PangoAttribute attr; double value;} PangoAttrFloat;</programlisting><para>The <link linkend="PangoAttrFloat"><type>PangoAttrFloat</type></link> structure is used to represent attributes witha float or double value.</para><variablelist role="struct"><varlistentry><term><link linkend="PangoAttribute">PangoAttribute</link> <structfield>attr</structfield>;</term><listitem><simpara>the common portion of the attribute</simpara></listitem></varlistentry><varlistentry><term><link linkend="double">double</link> <structfield>value</structfield>;</term><listitem><simpara>the value of the attribute</simpara></listitem></varlistentry></variablelist></refsect2><refsect2><title><anchor id="PangoAttrFontDesc" role="struct"/>PangoAttrFontDesc</title><indexterm><primary>PangoAttrFontDesc</primary></indexterm><programlisting>typedef struct { PangoAttribute attr; PangoFontDescription *desc;} PangoAttrFontDesc;</programlisting><para>The <link linkend="PangoAttrFontDesc"><type>PangoAttrFontDesc</type></link> structure is used to store an attribute thatsets all aspects of the font description at once.</para><variablelist role="struct"><varlistentry><term><link linkend="PangoAttribute">PangoAttribute</link> <structfield>attr</structfield>;</term><listitem><simpara>the common portion of the attribute</simpara></listitem></varlistentry><varlistentry><term><link linkend="PangoFontDescription">PangoFontDescription</link> *<structfield>desc</structfield>;</term><listitem><simpara>the font description which is the value of this attribute</simpara></listitem></varlistentry></variablelist></refsect2><refsect2><title><anchor id="PangoAttrShape" role="struct"/>PangoAttrShape</title><indexterm><primary>PangoAttrShape</primary></indexterm><programlisting>typedef struct { PangoAttribute attr; PangoRectangle ink_rect; PangoRectangle logical_rect; gpointer data; PangoAttrDataCopyFunc copy_func; GDestroyNotify destroy_func;} PangoAttrShape;</programlisting><para>The <link linkend="PangoAttrShape"><type>PangoAttrShape</type></link> structure is used to represent attributes which impose shape restrictions.</para><variablelist role="struct"><varlistentry><term><link linkend="PangoAttribute">PangoAttribute</link> <structfield>attr</structfield>;</term><listitem><simpara>the common portion of the attribute</simpara></listitem></varlistentry><varlistentry><term><link linkend="PangoRectangle">PangoRectangle</link> <structfield>ink_rect</structfield>;</term><listitem><simpara>the ink rectangle to restrict to</simpara></listitem></varlistentry><varlistentry><term><link linkend="PangoRectangle">PangoRectangle</link> <structfield>logical_rect</structfield>;</term><listitem><simpara>the logical rectangle to restrict to</simpara></listitem></varlistentry><varlistentry><term><link linkend="gpointer">gpointer</link> <structfield>data</structfield>;</term><listitem><simpara>user data set (see <link linkend="pango-attr-shape-new-with-data"><function>pango_attr_shape_new_with_data()</function></link>)</simpara></listitem></varlistentry><varlistentry><term><link linkend="PangoAttrDataCopyFunc">PangoAttrDataCopyFunc</link> <structfield>copy_func</structfield>;</term><listitem><simpara>copy function for the user data</simpara></listitem></varlistentry><varlistentry><term><link linkend="GDestroyNotify">GDestroyNotify</link> <structfield>destroy_func</structfield>;</term><listitem><simpara>destroy function for the user data</simpara></listitem></varlistentry></variablelist></refsect2><refsect2><title><anchor id="PangoAttrSize" role="struct"/>PangoAttrSize</title><indexterm><primary>PangoAttrSize</primary></indexterm><programlisting>typedef struct { PangoAttribute attr; int size; guint absolute : 1;} PangoAttrSize;</programlisting><para>The <link linkend="PangoAttrShape"><type>PangoAttrShape</type></link> structure is used to represent attributes whichset font size.</para><variablelist role="struct"><varlistentry><term><link linkend="PangoAttribute">PangoAttribute</link> <structfield>attr</structfield>;</term><listitem><simpara>the common portion of the attribute</simpara></listitem></varlistentry><varlistentry><term><link linkend="int">int</link> <structfield>size</structfield>;</term><listitem><simpara>size of font, in units of 1/<link linkend="PANGO-SCALE:CAPS"><literal>PANGO_SCALE</literal></link> of a point (for <link linkend="PANGO-ATTR-SIZE:CAPS"><literal>PANGO_ATTR_SIZE</literal></link>) or of a device uni (for <link linkend="PANGO-ATTR-ABSOLUTE-SIZE:CAPS"><literal>PANGO_ATTR_ABSOLUTE_SIZE</literal></link>)</simpara></listitem></varlistentry><varlistentry><term><link linkend="guint">guint</link> <structfield>absolute</structfield> : 1;</term><listitem><simpara>whether the font size is in device units or points. This field is only present for compatibility with Pango-1.8.0 (<link linkend="PANGO-ATTR-ABSOLUTE-SIZE:CAPS"><literal>PANGO_ATTR_ABSOLUTE_SIZE</literal></link> was added in 1.8.1); and always will be <link linkend="FALSE:CAPS"><literal>FALSE</literal></link> for <link linkend="PANGO-ATTR-SIZE:CAPS"><literal>PANGO_ATTR_SIZE</literal></link> and <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> for <link linkend="PANGO-ATTR-ABSOLUTE-SIZE:CAPS"><literal>PANGO_ATTR_ABSOLUTE_SIZE</literal></link>.</simpara></listitem></varlistentry></variablelist></refsect2><refsect2><title><anchor id="pango-parse-markup" role="function"/>pango_parse_markup ()</title><indexterm><primary>pango_parse_markup</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> pango_parse_markup (const <link linkend="char">char</link> *markup_text, <link linkend="int">int</link> length, <link linkend="gunichar">gunichar</link> accel_marker, <link linkend="PangoAttrList">PangoAttrList</link> **attr_list, <link linkend="char">char</link> **text, <link linkend="gunichar">gunichar</link> *accel_char, <link linkend="GError">GError</link> **error);</programlisting><para>Parses marked-up text (see<link linkend="PangoMarkupFormat">markup format</link>) to createa plain-text string and an attribute list.</para><para>If <parameter>accel_marker</parameter> is nonzero, the given character will mark thecharacter following it as an accelerator. For example, <parameter>accel_marker</parameter>might be an ampersand or underscore. All characters markedas an accelerator will receive a <link linkend="PANGO-UNDERLINE-LOW:CAPS"><literal>PANGO_UNDERLINE_LOW</literal></link> attribute,
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -