⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 text-attributes.xml

📁 Pango is a library for layout and rendering of text, with an emphasis on internationalization. Pang
💻 XML
📖 第 1 页 / 共 5 页
字号:
</simpara></listitem></varlistentry><varlistentry><term><link linkend="guint">guint</link>&nbsp;<structfield>absolute</structfield>&nbsp;:&nbsp;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 id="pango-parse-markup" role="function"><title>pango_parse_markup ()</title><indexterm zone="pango-parse-markup"><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,and the first character so marked will be returned in <parameter>accel_char</parameter>.Two <parameter>accel_marker</parameter> characters following each other produce a singleliteral <parameter>accel_marker</parameter> character.</para><para>If any error happens, none of the output arguments are touched exceptfor <parameter>error</parameter>.</para><para></para><variablelist role="params"><varlistentry><term><parameter>markup_text</parameter>&nbsp;:</term><listitem><simpara> markup to parse (see <link linkend="PangoMarkupFormat">markup format</link>)</simpara></listitem></varlistentry><varlistentry><term><parameter>length</parameter>&nbsp;:</term><listitem><simpara> length of <parameter>markup_text</parameter>, or -1 if nul-terminated</simpara></listitem></varlistentry><varlistentry><term><parameter>accel_marker</parameter>&nbsp;:</term><listitem><simpara> character that precedes an accelerator, or 0 for none</simpara></listitem></varlistentry><varlistentry><term><parameter>attr_list</parameter>&nbsp;:</term><listitem><simpara> address of return location for a <link linkend="PangoAttrList"><type>PangoAttrList</type></link>, or <link linkend="NULL:CAPS"><literal>NULL</literal></link></simpara></listitem></varlistentry><varlistentry><term><parameter>text</parameter>&nbsp;:</term><listitem><simpara> address of return location for text with tags stripped, or <link linkend="NULL:CAPS"><literal>NULL</literal></link></simpara></listitem></varlistentry><varlistentry><term><parameter>accel_char</parameter>&nbsp;:</term><listitem><simpara> address of return location for accelerator char, or <link linkend="NULL:CAPS"><literal>NULL</literal></link></simpara></listitem></varlistentry><varlistentry><term><parameter>error</parameter>&nbsp;:</term><listitem><simpara> address of return location for errors, or <link linkend="NULL:CAPS"><literal>NULL</literal></link></simpara></listitem></varlistentry><varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> <link linkend="FALSE:CAPS"><literal>FALSE</literal></link> if <parameter>error</parameter> is set, otherwise <link linkend="TRUE:CAPS"><literal>TRUE</literal></link></simpara></listitem></varlistentry></variablelist></refsect2><refsect2 id="pango-attr-type-register" role="function"><title>pango_attr_type_register ()</title><indexterm zone="pango-attr-type-register"><primary>pango_attr_type_register</primary></indexterm><programlisting><link linkend="PangoAttrType">PangoAttrType</link>       pango_attr_type_register            (const <link linkend="gchar">gchar</link> *name);</programlisting><para>Allocate a new attribute type ID.</para><para></para><variablelist role="params"><varlistentry><term><parameter>name</parameter>&nbsp;:</term><listitem><simpara> an identifier for the type (currently unused.)</simpara></listitem></varlistentry><varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the new type ID.</simpara></listitem></varlistentry></variablelist></refsect2><refsect2 id="pango-attribute-init" role="function" condition="since:1.20"><title>pango_attribute_init ()</title><indexterm zone="pango-attribute-init" role="1.20"><primary>pango_attribute_init</primary></indexterm><programlisting><link linkend="void">void</link>                pango_attribute_init                (<link linkend="PangoAttribute">PangoAttribute</link> *attr,                                                         const <link linkend="PangoAttrClass">PangoAttrClass</link> *klass);</programlisting><para>Initializes <parameter>attr</parameter>'s klass to <parameter>klass</parameter>, it's start_index to zero,and end_index to <link linkend="G-MAXUINT:CAPS"><literal>G_MAXUINT</literal></link> such that the attribute appliesto the entire text by default.</para><para></para><variablelist role="params"><varlistentry><term><parameter>attr</parameter>&nbsp;:</term><listitem><simpara> a <link linkend="PangoAttribute"><type>PangoAttribute</type></link></simpara></listitem></varlistentry><varlistentry><term><parameter>klass</parameter>&nbsp;:</term><listitem><simpara> a <link linkend="PangoAttributeClass"><type>PangoAttributeClass</type></link></simpara></listitem></varlistentry></variablelist><para role="since">Since  1.20</para></refsect2><refsect2 id="pango-attribute-copy" role="function"><title>pango_attribute_copy ()</title><indexterm zone="pango-attribute-copy"><primary>pango_attribute_copy</primary></indexterm><programlisting><link linkend="PangoAttribute">PangoAttribute</link>*     pango_attribute_copy                (const <link linkend="PangoAttribute">PangoAttribute</link> *attr);</programlisting><para>Make a copy of an attribute.</para><para></para><variablelist role="params"><varlistentry><term><parameter>attr</parameter>&nbsp;:</term><listitem><simpara> a <link linkend="PangoAttribute"><type>PangoAttribute</type></link></simpara></listitem></varlistentry><varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the newly allocated <link linkend="PangoAttribute"><type>PangoAttribute</type></link>, which should be              freed with <link linkend="pango-attribute-destroy"><function>pango_attribute_destroy()</function></link>.</simpara></listitem></varlistentry></variablelist></refsect2><refsect2 id="pango-attribute-equal" role="function"><title>pango_attribute_equal ()</title><indexterm zone="pango-attribute-equal"><primary>pango_attribute_equal</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            pango_attribute_equal               (const <link linkend="PangoAttribute">PangoAttribute</link> *attr1,                                                         const <link linkend="PangoAttribute">PangoAttribute</link> *attr2);</programlisting><para>Compare two attributes for equality. This compares only theactual value of the two attributes and not the ranges that theattributes apply to.</para><para></para><variablelist role="params"><varlistentry><term><parameter>attr1</parameter>&nbsp;:</term><listitem><simpara> a <link linkend="PangoAttribute"><type>PangoAttribute</type></link></simpara></listitem></varlistentry><varlistentry><term><parameter>attr2</parameter>&nbsp;:</term><listitem><simpara> another <link linkend="PangoAttribute"><type>PangoAttribute</type></link></simpara></listitem></varlistentry><varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the two attributes have the same value.</simpara></listitem></varlistentry></variablelist></refsect2><refsect2 id="pango-attribute-destroy" role="function"><title>pango_attribute_destroy ()</title><indexterm zone="pango-attribute-destroy"><primary>pango_attribute_destroy</primary></indexterm><programlisting><link linkend="void">void</link>                pango_attribute_destroy             (<link linkend="PangoAttribute">PangoAttribute</link> *attr);</programlisting><para>Destroy a <link linkend="PangoAttribute"><type>PangoAttribute</type></link> and free all associated memory.</para><para></para><variablelist role="params"><varlistentry><term><parameter>attr</parameter>&nbsp;:</term><listitem><simpara> a <link linkend="PangoAttribute"><type>PangoAttribute</type></link>.</simpara></listitem></varlistentry></variablelist></refsect2><refsect2 id="pango-attr-language-new" role="function"><title>pango_attr_language_new ()</title><indexterm zone="pango-attr-language-new"><primary>pango_attr_language_new</primary></indexterm><programlisting><link linkend="PangoAttribute">PangoAttribute</link>*     pango_attr_language_new             (<link linkend="PangoLanguage">PangoLanguage</link> *language);</programlisting><para>Create a new language tag attribute.</para><para></para><variablelist role="params"><varlistentry><term><parameter>language</parameter>&nbsp;:</term><listitem><simpara> language tag</simpara></listitem></varlistentry><varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the newly allocated <link linkend="PangoAttribute"><type>PangoAttribute</type></link>, which should be              freed with <link linkend="pango-attribute-destroy"><function>pango_attribute_destroy()</function></link>.</simpara></listitem></varlistentry></variablelist></refsect2><refsect2 id="pango-attr-family-new" role="function"><title>pango_attr_family_new ()</title><indexterm zone="pango-attr-family-new"><primary>pango_attr_family_new</primary></indexterm><programlisting><link linkend="PangoAttribute">PangoAttribute</link>*     pango_attr_family_new               (const <link linkend="char">char</link> *family);</programlisting><para>Create a new font family attribute.</para><para></para><variablelist role="params"><varlistentry><term><parameter>family</parameter>&nbsp;:</term><listitem><simpara> the family or comma separated list of families</simpara></listitem></varlistentry><varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the newly allocated <link linkend="PangoAttribute"><type>PangoAttribute</type></link>, which should be              freed with <link linkend="pango-attribute-destroy"><function>pango_attribute_destroy()</function></link>.</simpara></listitem></varlistentry></variablelist></refsect2><refsect2 id="pango-attr-style-new" role="function"><title>pango_attr_style_new ()</title><indexterm zone="pango-attr-style-new"><primary>pango_attr_style_new</primary></indexterm><programlisting><link linkend="PangoAttribute">PangoAttribute</link>*     pango_attr_style_new                (<link linkend="PangoStyle">PangoStyle</link> style);</programlisting><para>Create a new font slant style attribute.</para><para></para><variablelist role="params"><varlistentry><term><parameter>style</parameter>&nbsp;:</term><listitem><simpara> the slant style</simpara></listitem></varlistentry><varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the newly allocated <link linkend="PangoAttribute"><type>PangoAttribute</type></link>, which should be              freed with <link linkend="pango-attribute-destroy"><function>pango_attribute_destroy()</function></link>.</simpara></listitem></varlistentry></variablelist></refsect2><refsect2 id="pango-attr-variant-new" role="function"><title>pango_attr_variant_new ()</title><indexterm zone="pango-attr-variant-new"><primary>pango_attr_variant_new</primary></indexterm><programlisting><link linkend="PangoAttribute">PangoAttribute</link>*     pango_attr_variant_new              (<link linkend="PangoVariant">PangoVariant</link> variant);</programlisting><para>Create a new font variant attribute (normal or small caps)</para><para></para><variablelist role="params"><varlistentry><term><parameter>variant</parameter>&nbsp;:</term><listitem><simpara> the variant</simpara></listitem></varlistentry>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -