📄 main.xml
字号:
the itemization process.</simpara></listitem></varlistentry><varlistentry><term><parameter>base_dir</parameter> :</term><listitem><simpara> base direction to use for bidirectional processing</simpara></listitem></varlistentry><varlistentry><term><parameter>text</parameter> :</term><listitem><simpara> the text to itemize.</simpara></listitem></varlistentry><varlistentry><term><parameter>start_index</parameter> :</term><listitem><simpara> first byte in <parameter>text</parameter> to process</simpara></listitem></varlistentry><varlistentry><term><parameter>length</parameter> :</term><listitem><simpara> the number of bytes (not characters) to process after <parameter>start_index</parameter>. This must be >= 0.</simpara></listitem></varlistentry><varlistentry><term><parameter>attrs</parameter> :</term><listitem><simpara> the set of attributes that apply to <parameter>text</parameter>.</simpara></listitem></varlistentry><varlistentry><term><parameter>cached_iter</parameter> :</term><listitem><simpara> Cached attribute iterator, or <link linkend="NULL:CAPS"><literal>NULL</literal></link></simpara></listitem></varlistentry><varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> a <link linkend="GList"><type>GList</type></link> of <link linkend="PangoItem"><type>PangoItem</type></link> structures.</simpara></listitem></varlistentry></variablelist><para>Since 1.4</para></refsect2><refsect2><title><anchor id="pango-item-free" role="function"/>pango_item_free ()</title><indexterm><primary>pango_item_free</primary></indexterm><programlisting><link linkend="void">void</link> pango_item_free (<link linkend="PangoItem">PangoItem</link> *item);</programlisting><para>Free a <link linkend="PangoItem"><type>PangoItem</type></link> and all associated memory.</para><para></para><variablelist role="params"><varlistentry><term><parameter>item</parameter> :</term><listitem><simpara> a <link linkend="PangoItem"><type>PangoItem</type></link></simpara></listitem></varlistentry></variablelist></refsect2><refsect2><title><anchor id="pango-item-copy" role="function"/>pango_item_copy ()</title><indexterm><primary>pango_item_copy</primary></indexterm><programlisting><link linkend="PangoItem">PangoItem</link>* pango_item_copy (<link linkend="PangoItem">PangoItem</link> *item);</programlisting><para>Copy an existing <link linkend="PangoItem"><type>PangoItem</type></link> structure.</para><para></para><variablelist role="params"><varlistentry><term><parameter>item</parameter> :</term><listitem><simpara> a <link linkend="PangoItem"><type>PangoItem</type></link></simpara></listitem></varlistentry><varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> the newly allocated <link linkend="PangoItem"><type>PangoItem</type></link>, which should be freed with <link linkend="pango-item-free"><function>pango_item_free()</function></link>.</simpara></listitem></varlistentry></variablelist></refsect2><refsect2><title><anchor id="pango-item-new" role="function"/>pango_item_new ()</title><indexterm><primary>pango_item_new</primary></indexterm><programlisting><link linkend="PangoItem">PangoItem</link>* pango_item_new (void);</programlisting><para>Creates a new <link linkend="PangoItem"><type>PangoItem</type></link> structure initialized to default values.</para><para></para><variablelist role="params"><varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> the newly allocated <link linkend="PangoItem"><type>PangoItem</type></link>, which should be freed with <link linkend="pango-item-free"><function>pango_item_free()</function></link>.</simpara></listitem></varlistentry></variablelist></refsect2><refsect2><title><anchor id="pango-item-split" role="function"/>pango_item_split ()</title><indexterm><primary>pango_item_split</primary></indexterm><programlisting><link linkend="PangoItem">PangoItem</link>* pango_item_split (<link linkend="PangoItem">PangoItem</link> *orig, <link linkend="int">int</link> split_index, <link linkend="int">int</link> split_offset);</programlisting><para>Modifies <parameter>orig</parameter> to cover only the text after <parameter>split_index</parameter>, andreturns a new item that covers the text before <parameter>split_index</parameter> thatused to be in <parameter>orig</parameter>. You can think of <parameter>split_index</parameter> as the length ofthe returned item. <parameter>split_index</parameter> may not be 0, and it may not begreater than or equal to the length of <parameter>orig</parameter> (that is, there mustbe at least one byte assigned to each item, you can't create azero-length item). <parameter>split_offset</parameter> is the length of the first item inchars, and must be provided because the text used to generate theitem isn't available, so <link linkend="pango-item-split"><function>pango_item_split()</function></link> can't count the charlength of the split items itself.</para><para></para><variablelist role="params"><varlistentry><term><parameter>orig</parameter> :</term><listitem><simpara> a <link linkend="PangoItem"><type>PangoItem</type></link></simpara></listitem></varlistentry><varlistentry><term><parameter>split_index</parameter> :</term><listitem><simpara> byte index of position to split item, relative to the start of the item</simpara></listitem></varlistentry><varlistentry><term><parameter>split_offset</parameter> :</term><listitem><simpara> number of chars between start of <parameter>orig</parameter> and <parameter>split_index</parameter></simpara></listitem></varlistentry><varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> new item representing text before <parameter>split_index</parameter>, which should be freed with <link linkend="pango-item-free"><function>pango_item_free()</function></link>.</simpara></listitem></varlistentry></variablelist></refsect2><refsect2><title><anchor id="pango-reorder-items" role="function"/>pango_reorder_items ()</title><indexterm><primary>pango_reorder_items</primary></indexterm><programlisting><link linkend="GList">GList</link>* pango_reorder_items (<link linkend="GList">GList</link> *logical_items);</programlisting><para>From a list of items in logical order and the associateddirectional levels, produce a list in visual order.The original list is unmodified.</para><para></para><variablelist role="params"><varlistentry><term><parameter>logical_items</parameter> :</term><listitem><simpara> a <link linkend="GList"><type>GList</type></link> of <link linkend="PangoItem"><type>PangoItem</type></link> in logical order.</simpara></listitem></varlistentry><varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara>a <link linkend="GList"><type>GList</type></link> of <link linkend="PangoItem"><type>PangoItem</type></link> structures in visual order.(Please open a bug if you use this function. It is not a particularly convenient interface, and the code is duplicated elsewhere in Pango for that reason.)</simpara></listitem></varlistentry></variablelist></refsect2><refsect2><title><anchor id="pango-context-new" role="function"/>pango_context_new ()</title><indexterm><primary>pango_context_new</primary></indexterm><programlisting><link linkend="PangoContext">PangoContext</link>* pango_context_new (void);</programlisting><para>Creates a new <link linkend="PangoContext"><type>PangoContext</type></link> initialized to default value.</para><para>This function is only useful when implementing a new backendfor Pango, something applications won't do. You should usethe context creation function for the backend you are using,for example, <link linkend="pango-cairo-font-map-create-context"><function>pango_cairo_font_map_create_context()</function></link>, <link linkend="pango-xft-get-context"><function>pango_xft_get_context()</function></link>,<link linkend="pango-win32-get-context"><function>pango_win32_get_context()</function></link> or, <link linkend="pango-ft2-font-map-create-context"><function>pango_ft2_font_map_create_context()</function></link>.</para><para>If you are using Pango as part of a higher-level system,that system may have it's own ways of create a <link linkend="PangoContext"><type>PangoContext</type></link>.For instance, the GTK+ toolkit has, among others,<link linkend="gdk-pango-context-get-for-screen"><function>gdk_pango_context_get_for_screen()</function></link>, and<link linkend="gtk-widget-get-pango-context"><function>gtk_widget_get_pango_context()</function></link>.</para><para></para><variablelist role="params"><varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> the newly allocated <link linkend="PangoContext"><type>PangoContext</type></link>, which should be freed with <link linkend="g-object-unref"><function>g_object_unref()</function></link>.</simpara></listitem></varlistentry></variablelist></refsect2><refsect2><title><anchor id="pango-context-set-font-map" role="function"/>pango_context_set_font_map ()</title><indexterm><primary>pango_context_set_font_map</primary></indexterm><programlisting><link linkend="void">void</link> pango_context_set_font_map (<link linkend="PangoContext">PangoContext</link> *context, <link linkend="PangoFontMap">PangoFontMap</link> *font_map);</programlisting><para>Sets the font map to be searched when fonts are looked-up in this context.This is only for internal use by Pango backends, a <link linkend="PangoContext"><type>PangoContext</type></link> obtainedvia one of the recommended methods should already have a suitable font map.</para><para></para><variablelist role="params"><varlistentry><term><parameter>context</parameter> :</term><listitem><simpara> a <link linkend="PangoContext"><type>PangoContext</type></link></simpara></listitem></varlistentry><varlistentry><term><parameter>font_map</parameter> :</term><listitem><simpara> the <link linkend="PangoFontMap"><type>PangoFontMap</type></link> to set.</simpara></listitem></varlistentry></variablelist></refsect2><refsect2><title><anchor id="pango-context-get-font-map" role="function" condition="since:1.6"/>pango_context_get_font_map ()</title><indexterm role="1.6"><primary>pango_context_get_font_map</primary></indexterm><programlisting><link linkend="PangoFontMap">PangoFontMap</link>* pango_context_get_font_map (<link linkend="PangoContext">PangoContext</link> *context);</programlisting><para>Gets the <link linkend="PangoFontmap"><type>PangoFontmap</type></link> used to look up fonts for this context.</para><para></para><variablelist role="params"><varlistentry><term><parameter>context</parameter> :</term><listitem><simpara> a <link linkend="PangoContext"><type>PangoContext</type></link></simpara></listitem></varlistentry><varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> the font map for the <link linkend="PangoContext"><type>PangoContext</type></link>. This value is owned by Pango and should not be unreferenced.</simpara></listitem></varlistentry></variablelist><para>Since 1.6</para></refsect2><refsect2><title><anchor id="pango-context-get-font-description" role="function"/>pango_context_get_font_description ()</title><indexterm><primary>pango_context_get_font_description</primary></indexterm><programlisting><link linkend="PangoFontDescription">PangoFontDescription</link>* pango_context_get_font_description (<link linkend="PangoContext">PangoContext</link> *context);</programlisting><para>Retrieve the default font description for the context.</para><para></para><variablelist role="params"><varlistentry><term><parameter>context</parameter> :</term><listitem><simpara> a <link linkend="PangoContext"><type>PangoContext</type></link></simpara></listitem></varlistentry><varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> a pointer to the context's default font description. This value must not be modified or freed.</simpara></listitem></varlistentry></variablelist></refsect2><refsect2><title><anchor id="pango-context-set-font-description" role="function"/>pango_context_set_font_description ()</title><indexterm><primary>pango_context_set_font_description</primary></indexterm><programlisting><link linkend="void">void</link> pango_context_set_font_description (<link linkend="PangoContext">PangoContext</link> *context, const <link linkend="PangoFontDescription">PangoFontDescription</link> *desc);</programlisting><para>Set the default font description for the context</para><para></para><variablelist role="params">
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -