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

📄 pango-miscellaneous-utilities.html

📁 linux
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"><title>Miscellaneous Utilities</title><meta name="generator" content="DocBook XSL Stylesheets V1.72.0"><link rel="start" href="index.html" title="Pango Reference Manual"><link rel="up" href="lowlevel.html" title="Low Level Functionality"><link rel="prev" href="pango-Modules.html" title="Modules"><link rel="next" href="pango-Version-Checking.html" title="Version Checking"><meta name="generator" content="GTK-Doc V1.8 (XML mode)"><link rel="stylesheet" href="style.css" type="text/css"><link rel="chapter" href="pango.html" title="Basic Pango Interfaces"><link rel="chapter" href="rendering.html" title="Rendering with Pango"><link rel="chapter" href="lowlevel.html" title="Low Level Functionality"><link rel="chapter" href="tools.html" title="Pango Tools"><link rel="chapter" href="pango-hierarchy.html" title="Object Hierarchy"><link rel="index" href="index-all.html" title="Index"><link rel="index" href="index-deprecated.html" title="Index of deprecated symbols"><link rel="index" href="index-1.2.html" title="Index of new symbols in 1.2"><link rel="index" href="index-1.4.html" title="Index of new symbols in 1.4"><link rel="index" href="index-1.6.html" title="Index of new symbols in 1.6"><link rel="index" href="index-1.8.html" title="Index of new symbols in 1.8"><link rel="index" href="index-1.10.html" title="Index of new symbols in 1.10"><link rel="index" href="index-1.12.html" title="Index of new symbols in 1.12"><link rel="index" href="index-1.14.html" title="Index of new symbols in 1.14"><link rel="index" href="index-1.16.html" title="Index of new symbols in 1.16"><link rel="index" href="index-1.18.html" title="Index of new symbols in 1.18"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="pango-Modules.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td><td><a accesskey="u" href="lowlevel.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td><td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td><th width="100%" align="center">Pango Reference Manual</th><td><a accesskey="n" href="pango-Version-Checking.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td></tr><tr><td colspan="5" class="shortcuts"><nobr><a href="#id3285894" class="shortcut">Top</a>                  &#160;|&#160;                  <a href="#id3286535" class="shortcut">Description</a></nobr></td></tr></table><div class="refentry" lang="en"><a name="pango-Miscellaneous-Utilities"></a><div class="titlepage"></div><div class="refnamediv"><table width="100%"><tr><td valign="top"><h2><a name="id3285894"></a><span class="refentrytitle">Miscellaneous Utilities</span></h2><p>Miscellaneous Utilities &#8212; Various convenience and utility functions</p></td><td valign="top" align="right"></td></tr></table></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="synopsis">char**              <a href="pango-Miscellaneous-Utilities.html#pango-split-file-list">pango_split_file_list</a>               (const char *str);char*               <a href="pango-Miscellaneous-Utilities.html#pango-trim-string">pango_trim_string</a>                   (const char *str);<ahref="../glib/glib-Basic-Types.html#gint">gint</a>                <a href="pango-Miscellaneous-Utilities.html#pango-read-line">pango_read_line</a>                     (FILE *stream,                                                         <ahref="../glib/glib-Strings.html#GString">GString</a> *str);<ahref="../glib/glib-Basic-Types.html#gboolean">gboolean</a>            <a href="pango-Miscellaneous-Utilities.html#pango-skip-space">pango_skip_space</a>                    (const char **pos);<ahref="../glib/glib-Basic-Types.html#gboolean">gboolean</a>            <a href="pango-Miscellaneous-Utilities.html#pango-scan-word">pango_scan_word</a>                     (const char **pos,                                                         <ahref="../glib/glib-Strings.html#GString">GString</a> *out);<ahref="../glib/glib-Basic-Types.html#gboolean">gboolean</a>            <a href="pango-Miscellaneous-Utilities.html#pango-scan-string">pango_scan_string</a>                   (const char **pos,                                                         <ahref="../glib/glib-Strings.html#GString">GString</a> *out);<ahref="../glib/glib-Basic-Types.html#gboolean">gboolean</a>            <a href="pango-Miscellaneous-Utilities.html#pango-scan-int">pango_scan_int</a>                      (const char **pos,                                                         int *out);char*               <a href="pango-Miscellaneous-Utilities.html#pango-config-key-get">pango_config_key_get</a>                (const char *key);void                <a href="pango-Miscellaneous-Utilities.html#pango-lookup-aliases">pango_lookup_aliases</a>                (const char *fontname,                                                         char ***families,                                                         int *n_families);<ahref="../glib/glib-Basic-Types.html#gboolean">gboolean</a>            <a href="pango-Miscellaneous-Utilities.html#pango-parse-enum">pango_parse_enum</a>                    (<ahref="../gobject/gobject-Type-Information.html#GType">GType</a> type,                                                         const char *str,                                                         int *value,                                                         <ahref="../glib/glib-Basic-Types.html#gboolean">gboolean</a> warn,                                                         char **possible_values);<ahref="../glib/glib-Basic-Types.html#gboolean">gboolean</a>            <a href="pango-Miscellaneous-Utilities.html#pango-parse-style">pango_parse_style</a>                   (const char *str,                                                         <a href="pango-Fonts.html#PangoStyle">PangoStyle</a> *style,                                                         <ahref="../glib/glib-Basic-Types.html#gboolean">gboolean</a> warn);<ahref="../glib/glib-Basic-Types.html#gboolean">gboolean</a>            <a href="pango-Miscellaneous-Utilities.html#pango-parse-variant">pango_parse_variant</a>                 (const char *str,                                                         <a href="pango-Fonts.html#PangoVariant">PangoVariant</a> *variant,                                                         <ahref="../glib/glib-Basic-Types.html#gboolean">gboolean</a> warn);<ahref="../glib/glib-Basic-Types.html#gboolean">gboolean</a>            <a href="pango-Miscellaneous-Utilities.html#pango-parse-weight">pango_parse_weight</a>                  (const char *str,                                                         <a href="pango-Fonts.html#PangoWeight">PangoWeight</a> *weight,                                                         <ahref="../glib/glib-Basic-Types.html#gboolean">gboolean</a> warn);<ahref="../glib/glib-Basic-Types.html#gboolean">gboolean</a>            <a href="pango-Miscellaneous-Utilities.html#pango-parse-stretch">pango_parse_stretch</a>                 (const char *str,                                                         <a href="pango-Fonts.html#PangoStretch">PangoStretch</a> *stretch,                                                         <ahref="../glib/glib-Basic-Types.html#gboolean">gboolean</a> warn);const char*         <a href="pango-Miscellaneous-Utilities.html#pango-get-sysconf-subdirectory">pango_get_sysconf_subdirectory</a>      (void);const char*         <a href="pango-Miscellaneous-Utilities.html#pango-get-lib-subdirectory">pango_get_lib_subdirectory</a>          (void);<ahref="../glib/glib-Basic-Types.html#guint8">guint8</a>*             <a href="pango-Miscellaneous-Utilities.html#pango-log2vis-get-embedding-levels">pango_log2vis_get_embedding_levels</a>  (const <ahref="../glib/glib-Basic-Types.html#gchar">gchar</a> *text,                                                         int length,                                                         <a href="pango-Text-Processing.html#PangoDirection">PangoDirection</a> *pbase_dir);<a href="pango-Text-Attributes.html#PangoLanguage">PangoLanguage</a>*      <a href="pango-Miscellaneous-Utilities.html#pango-language-get-default">pango_language_get_default</a>          (void);const char*         <a href="pango-Miscellaneous-Utilities.html#pango-language-get-sample-string">pango_language_get_sample_string</a>    (<a href="pango-Text-Attributes.html#PangoLanguage">PangoLanguage</a> *language);<ahref="../glib/glib-Basic-Types.html#gboolean">gboolean</a>            <a href="pango-Miscellaneous-Utilities.html#pango-is-zero-width">pango_is_zero_width</a>                 (<ahref="../glib/glib-Unicode-Manipulation.html#gunichar">gunichar</a> ch);void                <a href="pango-Miscellaneous-Utilities.html#pango-quantize-line-geometry">pango_quantize_line_geometry</a>        (int *thickness,                                                         int *position);</pre></div><div class="refsect1" lang="en"><a name="id3286535"></a><h2>Description</h2><p>The functions and utilities in this section are mostly used from Pangobackends and modules, but may be useful for other purposes too.</p></div><div class="refsect1" lang="en"><a name="id3286551"></a><h2>Details</h2><div class="refsect2" lang="en"><a name="id3286561"></a><h3><a name="pango-split-file-list"></a>pango_split_file_list ()</h3><a class="indexterm" name="id3286574"></a><pre class="programlisting">char**              pango_split_file_list               (const char *str);</pre><p>Splits a <ahref="../glib/glib-Standard-Macros.html#G-SEARCHPATH-SEPARATOR:CAPS"><code class="literal">G_SEARCHPATH_SEPARATOR</code></a>-separated list of files, strippingwhite space and substituting ~/ with $HOME/.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>str</code></em>&#160;:</span></td><td> a <ahref="../glib/glib-Standard-Macros.html#G-SEARCHPATH-SEPARATOR:CAPS"><code class="literal">G_SEARCHPATH_SEPARATOR</code></a> separated list of filenames</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td><td> a list of strings to be freed with <ahref="../glib/glib-String-Utility-Functions.html#g-strfreev"><code class="function">g_strfreev()</code></a></td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3286671"></a><h3><a name="pango-trim-string"></a>pango_trim_string ()</h3><a class="indexterm" name="id3286684"></a><pre class="programlisting">char*               pango_trim_string                   (const char *str);</pre><p>Trims leading and trailing whitespace from a string.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>str</code></em>&#160;:</span></td><td> a string</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td><td> A newly-allocated string that must be freed with <ahref="../glib/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a></td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3286756"></a><h3><a name="pango-read-line"></a>pango_read_line ()</h3><a class="indexterm" name="id3286768"></a><pre class="programlisting"><ahref="../glib/glib-Basic-Types.html#gint">gint</a>                pango_read_line                     (FILE *stream,                                                         <ahref="../glib/glib-Strings.html#GString">GString</a> *str);</pre><p>Reads an entire line from a file into a buffer. Lines maybe delimited with '\n', '\r', '\n\r', or '\r\n'. The delimiteris not written into the buffer. Text after a '#' character is treated asa comment and skipped. '\' can be used to escape a # character.'\' proceeding a line delimiter combines adjacent lines. A '\' proceedingany other character is ignored and written into the output bufferunmodified.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>stream</code></em>&#160;:</span></td><td> a stdio stream</td></tr><tr><td><span class="term"><em class="parameter"><code>str</code></em>&#160;:</span></td><td> <ahref="../glib/glib-Strings.html#GString"><span class="type">GString</span></a> buffer into which to write the result</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td><td> 0 if the stream was already at an <code class="literal">EOF</code> character, otherwise              the number of lines read (this is useful for maintaining              a line number counter which doesn't combine lines with '\')</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3286880"></a><h3><a name="pango-skip-space"></a>pango_skip_space ()</h3><a class="indexterm" name="id3286893"></a><pre class="programlisting"><ahref="../glib/glib-Basic-Types.html#gboolean">gboolean</a>            pango_skip_space                    (const char **pos);</pre><p>Skips 0 or more characters of white space.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>pos</code></em>&#160;:</span></td><td> in/out string position</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td><td> <ahref="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if skipping the white space leavesthe position at a '\0' character.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3286964"></a><h3><a name="pango-scan-word"></a>pango_scan_word ()</h3><a class="indexterm" name="id3286977"></a><pre class="programlisting"><ahref="../glib/glib-Basic-Types.html#gboolean">gboolean</a>            pango_scan_word                     (const char **pos,                                                         <ahref="../glib/glib-Strings.html#GString">GString</a> *out);</pre><p>Scans a word into a <ahref="../glib/glib-Strings.html#GString"><span class="type">GString</span></a> buffer. A word consistsof [A-Za-z_] followed by zero or more [A-Za-z_0-9]Leading white space is skipped.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>pos</code></em>&#160;:</span></td><td> in/out string position</td></tr><tr><td><span class="term"><em class="parameter"><code>out</code></em>&#160;:</span></td><td> a <ahref="../glib/glib-Strings.html#GString"><span class="type">GString</span></a> into which to write the result</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td><td> <ahref="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if a parse error occurred.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3287088"></a><h3><a name="pango-scan-string"></a>pango_scan_string ()</h3><a class="indexterm" name="id3287101"></a><pre class="programlisting"><ahref="../glib/glib-Basic-Types.html#gboolean">gboolean</a>            pango_scan_string                   (const char **pos,                                                         <a

⌨️ 快捷键说明

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