📄 pango-text-processing.html
字号:
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> a <ahref="../glib/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> of <a href="pango-Text-Processing.html#PangoItem"><span class="type">PangoItem</span></a> structures.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3084809"></a><h3><a name="pango-itemize-with-base-dir"></a>pango_itemize_with_base_dir ()</h3><a class="indexterm" name="id3084825"></a><pre class="programlisting"><ahref="../glib/glib-Doubly-Linked-Lists.html#GList">GList</a>* pango_itemize_with_base_dir (<a href="pango-Text-Processing.html#PangoContext">PangoContext</a> *context, <a href="pango-Text-Processing.html#PangoDirection">PangoDirection</a> base_dir, const char *text, int start_index, int length, <a href="pango-Text-Attributes.html#PangoAttrList">PangoAttrList</a> *attrs, <a href="pango-Text-Attributes.html#PangoAttrIterator">PangoAttrIterator</a> *cached_iter);</pre><p>Like <a href="pango-Text-Processing.html#pango-itemize"><code class="function">pango_itemize()</code></a>, but the base direction to use whencomputing bidirectional levels (see <a href="pango-Text-Processing.html#pango-context-set-base-dir"><code class="function">pango_context_set_base_dir()</code></a>),is specified explicitly rather than gotten from the <a href="pango-Text-Processing.html#PangoContext"><span class="type">PangoContext</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>context</code></em> :</span></td><td> a structure holding information that affects the itemization process.</td></tr><tr><td><span class="term"><em class="parameter"><code>base_dir</code></em> :</span></td><td> base direction to use for bidirectional processing</td></tr><tr><td><span class="term"><em class="parameter"><code>text</code></em> :</span></td><td> the text to itemize.</td></tr><tr><td><span class="term"><em class="parameter"><code>start_index</code></em> :</span></td><td> first byte in <em class="parameter"><code>text</code></em> to process</td></tr><tr><td><span class="term"><em class="parameter"><code>length</code></em> :</span></td><td> the number of bytes (not characters) to process after <em class="parameter"><code>start_index</code></em>. This must be >= 0.</td></tr><tr><td><span class="term"><em class="parameter"><code>attrs</code></em> :</span></td><td> the set of attributes that apply to <em class="parameter"><code>text</code></em>.</td></tr><tr><td><span class="term"><em class="parameter"><code>cached_iter</code></em> :</span></td><td> Cached attribute iterator, or <ahref="../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 <ahref="../glib/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> of <a href="pango-Text-Processing.html#PangoItem"><span class="type">PangoItem</span></a> structures. The items should befreed using <a href="pango-Text-Processing.html#pango-item-free"><code class="function">pango_item_free()</code></a> probably in combination with <ahref="../glib/glib-Doubly-Linked-Lists.html#g-list-foreach"><code class="function">g_list_foreach()</code></a>,and the list itself using <ahref="../glib/glib-Doubly-Linked-Lists.html#g-list-free"><code class="function">g_list_free()</code></a>.</td></tr></tbody></table></div><p class="since">Since 1.4</p></div><hr><div class="refsect2" lang="en"><a name="id3085137"></a><h3><a name="pango-item-free"></a>pango_item_free ()</h3><a class="indexterm" name="id3085150"></a><pre class="programlisting">void pango_item_free (<a href="pango-Text-Processing.html#PangoItem">PangoItem</a> *item);</pre><p>Free a <a href="pango-Text-Processing.html#PangoItem"><span class="type">PangoItem</span></a> and 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>item</code></em> :</span></td><td> a <a href="pango-Text-Processing.html#PangoItem"><span class="type">PangoItem</span></a></td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3085215"></a><h3><a name="pango-item-copy"></a>pango_item_copy ()</h3><a class="indexterm" name="id3085228"></a><pre class="programlisting"><a href="pango-Text-Processing.html#PangoItem">PangoItem</a>* pango_item_copy (<a href="pango-Text-Processing.html#PangoItem">PangoItem</a> *item);</pre><p>Copy an existing <a href="pango-Text-Processing.html#PangoItem"><span class="type">PangoItem</span></a> structure.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>item</code></em> :</span></td><td> a <a href="pango-Text-Processing.html#PangoItem"><span class="type">PangoItem</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-Processing.html#PangoItem"><span class="type">PangoItem</span></a>, which should be freed with <a href="pango-Text-Processing.html#pango-item-free"><code class="function">pango_item_free()</code></a>.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3085323"></a><h3><a name="pango-item-new"></a>pango_item_new ()</h3><a class="indexterm" name="id3085335"></a><pre class="programlisting"><a href="pango-Text-Processing.html#PangoItem">PangoItem</a>* pango_item_new (void);</pre><p>Creates a new <a href="pango-Text-Processing.html#PangoItem"><span class="type">PangoItem</span></a> structure initialized to default values.</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-Processing.html#PangoItem"><span class="type">PangoItem</span></a>, which should be freed with <a href="pango-Text-Processing.html#pango-item-free"><code class="function">pango_item_free()</code></a>.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3085402"></a><h3><a name="pango-item-split"></a>pango_item_split ()</h3><a class="indexterm" name="id3085415"></a><pre class="programlisting"><a href="pango-Text-Processing.html#PangoItem">PangoItem</a>* pango_item_split (<a href="pango-Text-Processing.html#PangoItem">PangoItem</a> *orig, int split_index, int split_offset);</pre><p>Modifies <em class="parameter"><code>orig</code></em> to cover only the text after <em class="parameter"><code>split_index</code></em>, andreturns a new item that covers the text before <em class="parameter"><code>split_index</code></em> thatused to be in <em class="parameter"><code>orig</code></em>. You can think of <em class="parameter"><code>split_index</code></em> as the length ofthe returned item. <em class="parameter"><code>split_index</code></em> may not be 0, and it may not begreater than or equal to the length of <em class="parameter"><code>orig</code></em> (that is, there mustbe at least one byte assigned to each item, you can't create azero-length item). <em class="parameter"><code>split_offset</code></em> is the length of the first item inchars, and must be provided because the text used to generate theitem isn't available, so <a href="pango-Text-Processing.html#pango-item-split"><code class="function">pango_item_split()</code></a> can't count the charlength of the split items itself.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>orig</code></em> :</span></td><td> a <a href="pango-Text-Processing.html#PangoItem"><span class="type">PangoItem</span></a></td></tr><tr><td><span class="term"><em class="parameter"><code>split_index</code></em> :</span></td><td> byte index of position to split item, relative to the start of the item</td></tr><tr><td><span class="term"><em class="parameter"><code>split_offset</code></em> :</span></td><td> number of chars between start of <em class="parameter"><code>orig</code></em> and <em class="parameter"><code>split_index</code></em></td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> new item representing text before <em class="parameter"><code>split_index</code></em>, which should be freed with <a href="pango-Text-Processing.html#pango-item-free"><code class="function">pango_item_free()</code></a>.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3085622"></a><h3><a name="pango-reorder-items"></a>pango_reorder_items ()</h3><a class="indexterm" name="id3085635"></a><pre class="programlisting"><ahref="../glib/glib-Doubly-Linked-Lists.html#GList">GList</a>* pango_reorder_items (<ahref="../glib/glib-Doubly-Linked-Lists.html#GList">GList</a> *logical_items);</pre><p>From a list of items in logical order and the associateddirectional levels, produce a list in visual order.The original list is unmodified.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>logical_items</code></em> :</span></td><td> a <ahref="../glib/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> of <a href="pango-Text-Processing.html#PangoItem"><span class="type">PangoItem</span></a> in logical order.</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>a <ahref="../glib/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> of <a href="pango-Text-Processing.html#PangoItem"><span class="type">PangoItem</span></a> 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.)</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3085732"></a><h3><a name="pango-context-new"></a>pango_context_new ()</h3><a class="indexterm" name="id3085745"></a><pre class="programlisting"><a href="pango-Text-Processing.html#PangoContext">PangoContext</a>* pango_context_new (void);</pre><p>Creates a new <a href="pango-Text-Processing.html#PangoContext"><span class="type">PangoContext</span></a> initialized to default value.</p><p>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, <a href="pango-Cairo-Rendering.html#pango-cairo-font-map-create-context"><code class="function">pango_cairo_font_map_create_context()</code></a>, <a href="pango-Xft-Fonts-and-Rendering.html#pango-xft-get-context"><code class="function">pango_xft_get_context()</code></a>,<a href="pango-Win32-Fonts-and-Rendering.html#pango-win32-get-context"><code class="function">pango_win32_get_context()</code></a> or, <a href="pango-FreeType-Fonts-and-Rendering.html#pango-ft2-font-map-create-context"><code class="function">pango_ft2_font_map_create_context()</code></a>.</p><p>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -