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

📄 pango-text-processing.html

📁 GTK+-2.0源码之pango-1.15.6.tar.gz
💻 HTML
📖 第 1 页 / 共 5 页
字号:
  guint8 level;  guint8 gravity; /* PangoGravity */  guint8 flags;  PangoLanguage *language;  GSList *extra_attrs;} PangoAnalysis;</pre><p>The <a href="pango-Text-Processing.html#PangoAnalysis"><span class="type">PangoAnalysis</span></a> structure stores information aboutthe properties of a segment of text. It has the followingfields:</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><a href="PangoEngineShape.html" title="PangoEngineShape">PangoEngineShape</a>&#160;*<em class="structfield"><code>shape_engine</code></em>;</span></td><td>the engine for doing rendering-system-dependent processing.</td></tr><tr><td><span class="term"><a href="PangoEngineLang.html" title="PangoEngineLang">PangoEngineLang</a>&#160;*<em class="structfield"><code>lang_engine</code></em>;</span></td><td>the engine for doing rendering-system-independent processing.</td></tr><tr><td><span class="term"><a href="pango-Fonts.html#PangoFont">PangoFont</a>&#160;*<em class="structfield"><code>font</code></em>;</span></td><td>the font for this segment.</td></tr><tr><td><span class="term"><ahref="../glib/glib-Basic-Types.html#guint8">guint8</a>&#160;<em class="structfield"><code>level</code></em>;</span></td><td>the bidirectional level for this segment.</td></tr><tr><td><span class="term"><ahref="../glib/glib-Basic-Types.html#guint8">guint8</a>&#160;<em class="structfield"><code>gravity</code></em>;</span></td><td>the glyph orientation for this segment.</td></tr><tr><td><span class="term"><ahref="../glib/glib-Basic-Types.html#guint8">guint8</a>&#160;<em class="structfield"><code>flags</code></em>;</span></td><td>boolean flags for this segment (currently only one) (Since: 1.16).</td></tr><tr><td><span class="term"><a href="pango-Text-Attributes.html#PangoLanguage">PangoLanguage</a>&#160;*<em class="structfield"><code>language</code></em>;</span></td><td>the detected language for this segment.</td></tr><tr><td><span class="term"><ahref="../glib/glib-Singly-Linked-Lists.html#GSList">GSList</a>&#160;*<em class="structfield"><code>extra_attrs</code></em>;</span></td><td>extra attributes for this segment.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2755293"></a><h3><a name="PANGO-ANALYSIS-FLAG-CENTERED-BASELINE:CAPS"></a>PANGO_ANALYSIS_FLAG_CENTERED_BASELINE</h3><a class="indexterm" name="id2755306"></a><pre class="programlisting">#define PANGO_ANALYSIS_FLAG_CENTERED_BASELINE (1 &lt;&lt; 0)</pre><p>Whether the segment should be shifted to center around the baseline.Used in vertical writing directions mostly.Since: 1.16</p></div><hr><div class="refsect2" lang="en"><a name="id2755326"></a><h3><a name="PangoDirection"></a>enum PangoDirection</h3><a class="indexterm" name="id2755338"></a><pre class="programlisting">typedef enum {  PANGO_DIRECTION_LTR,  PANGO_DIRECTION_RTL,  PANGO_DIRECTION_TTB_LTR,  PANGO_DIRECTION_TTB_RTL,  PANGO_DIRECTION_WEAK_LTR,  PANGO_DIRECTION_WEAK_RTL,  PANGO_DIRECTION_NEUTRAL} PangoDirection;</pre><p>The <a href="pango-Text-Processing.html#PangoDirection"><span class="type">PangoDirection</span></a> type represents a direction in theUnicode bidirectional algorithm; not every value in thisenumeration makes sense for every usage of <a href="pango-Text-Processing.html#PangoDirection"><span class="type">PangoDirection</span></a>;for example, the return value of <a href="pango-Text-Processing.html#pango-unichar-direction"><code class="function">pango_unichar_direction()</code></a>and <a href="pango-Text-Processing.html#pango-find-base-dir"><code class="function">pango_find_base_dir()</code></a> cannot be <a href="pango-Text-Processing.html#PANGO-DIRECTION-WEAK-LTR:CAPS"><code class="literal">PANGO_DIRECTION_WEAK_LTR</code></a>or <a href="pango-Text-Processing.html#PANGO-DIRECTION-WEAK-RTL:CAPS"><code class="literal">PANGO_DIRECTION_WEAK_RTL</code></a>, since every character is eitherneutral or has a strong direction; on the other hand<a href="pango-Text-Processing.html#PANGO-DIRECTION-NEUTRAL:CAPS"><code class="literal">PANGO_DIRECTION_NEUTRAL</code></a> doesn't make sense to passto <a href="pango-Text-Processing.html#pango-itemize-with-base-dir"><code class="function">pango_itemize_with_base_dir()</code></a>.</p><p>The <a href="pango-Text-Processing.html#PANGO-DIRECTION-TTB-LTR:CAPS"><code class="literal">PANGO_DIRECTION_TTB_LTR</code></a>, <a href="pango-Text-Processing.html#PANGO-DIRECTION-TTB-RTL:CAPS"><code class="literal">PANGO_DIRECTION_TTB_RTL</code></a>values come from an earlier interpretation of thisenumeration as the writing direction of a block oftext and are no longer used; See <a href="pango-Vertical-Text.html#PangoGravity"><span class="type">PangoGravity</span></a> for howvertical text is handled in Pango.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><a name="PANGO-DIRECTION-LTR:CAPS"></a><code class="literal">PANGO_DIRECTION_LTR</code></span></td><td> A strong left-to-right direction</td></tr><tr><td><span class="term"><a name="PANGO-DIRECTION-RTL:CAPS"></a><code class="literal">PANGO_DIRECTION_RTL</code></span></td><td> A strong right-to-left direction</td></tr><tr><td><span class="term"><a name="PANGO-DIRECTION-TTB-LTR:CAPS"></a><code class="literal">PANGO_DIRECTION_TTB_LTR</code></span></td><td> Deprecated value; treated the  same as <a href="pango-Text-Processing.html#PANGO-DIRECTION-RTL:CAPS"><code class="literal">PANGO_DIRECTION_RTL</code></a>.</td></tr><tr><td><span class="term"><a name="PANGO-DIRECTION-TTB-RTL:CAPS"></a><code class="literal">PANGO_DIRECTION_TTB_RTL</code></span></td><td> Deprecated value; treated the  same as <a href="pango-Text-Processing.html#PANGO-DIRECTION-LTR:CAPS"><code class="literal">PANGO_DIRECTION_LTR</code></a></td></tr><tr><td><span class="term"><a name="PANGO-DIRECTION-WEAK-LTR:CAPS"></a><code class="literal">PANGO_DIRECTION_WEAK_LTR</code></span></td><td> A weak left-to-right direction</td></tr><tr><td><span class="term"><a name="PANGO-DIRECTION-WEAK-RTL:CAPS"></a><code class="literal">PANGO_DIRECTION_WEAK_RTL</code></span></td><td> A weak right-to-left direction</td></tr><tr><td><span class="term"><a name="PANGO-DIRECTION-NEUTRAL:CAPS"></a><code class="literal">PANGO_DIRECTION_NEUTRAL</code></span></td><td> No direction specified</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2755674"></a><h3><a name="PANGO-TYPE-DIRECTION:CAPS"></a>PANGO_TYPE_DIRECTION</h3><a class="indexterm" name="id2755686"></a><pre class="programlisting">#define PANGO_TYPE_DIRECTION (pango_direction_get_type())</pre><p>The <ahref="../gobject/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> type for <a href="pango-Text-Processing.html#PangoDirection"><span class="type">PangoDirection</span></a>.</p></div><hr><div class="refsect2" lang="en"><a name="id2755719"></a><h3><a name="pango-itemize"></a>pango_itemize ()</h3><a class="indexterm" name="id2755731"></a><pre class="programlisting"><ahref="../glib/glib-Doubly-Linked-Lists.html#GList">GList</a>*      pango_itemize                   (<a href="pango-Text-Processing.html#PangoContext">PangoContext</a> *context,                                             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>Breaks a piece of text into segments with consistentdirectional level and shaping engine. Each byte of <em class="parameter"><code>text</code></em> willbe contained in exactly one of the items in the returned list;the generated list of items will be in logical order (the startoffsets of the items are ascending).</p><p><em class="parameter"><code>cached_iter</code></em> should be an iterator over <em class="parameter"><code>attrs</code></em> currently positioned at arange before or containing <em class="parameter"><code>start_index</code></em>; <em class="parameter"><code>cached_iter</code></em> will be advanced tothe range covering the position just after <em class="parameter"><code>start_index</code></em> + <em class="parameter"><code>length</code></em>.(i.e. if itemizing in a loop, just keep passing in the same <em class="parameter"><code>cached_iter</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>context</code></em>&#160;:</span></td><td>   a structure holding information that affects	       the itemization process.</td></tr><tr><td><span class="term"><em class="parameter"><code>text</code></em>&#160;:</span></td><td>      the text to itemize.</td></tr><tr><td><span class="term"><em class="parameter"><code>start_index</code></em>&#160;:</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>&#160;:</span></td><td>    the number of bytes (not characters) to process            after <em class="parameter"><code>start_index</code></em>.            This must be &gt;= 0.</td></tr><tr><td><span class="term"><em class="parameter"><code>attrs</code></em>&#160;:</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>&#160;:</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>&#160;:</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="id2756005"></a><h3><a name="pango-itemize-with-base-dir"></a>pango_itemize_with_base_dir ()</h3><a class="indexterm" name="id2756020"></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">

⌨️ 快捷键说明

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