📄 pango-modules.html
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"><title>Modules</title><meta name="generator" content="DocBook XSL Stylesheets V1.69.1"><link rel="start" href="index.html" title="Pango Reference Manual"><link rel="up" href="lowlevel.html" title="Low Level Functionality"><link rel="prev" href="PangoEngineShape.html" title="PangoEngineShape"><link rel="next" href="pango-Miscellaneous-Utilities.html" title="Miscellaneous Utilities"><meta name="generator" content="GTK-Doc V1.6 (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="index" href="ix01.html" title="Index"><link rel="index" href="ix02.html" title="Index of deprecated symbols"><link rel="index" href="ix03.html" title="Index of new symbols in 1.2"><link rel="index" href="ix04.html" title="Index of new symbols in 1.4"><link rel="index" href="ix05.html" title="Index of new symbols in 1.6"><link rel="index" href="ix06.html" title="Index of new symbols in 1.8"><link rel="index" href="ix07.html" title="Index of new symbols in 1.10"><link rel="index" href="ix08.html" title="Index of new symbols in 1.12"><link rel="index" href="ix09.html" title="Index of new symbols in 1.14"><link rel="index" href="ix10.html" title="Index of new symbols in 1.16"></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="PangoEngineShape.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-Miscellaneous-Utilities.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="#top_of_page" class="shortcut">Top</a>  |  <a href="#desc" class="shortcut">Description</a></nobr></td></tr></table><div class="refentry" lang="en"><a name="pango-Modules"></a><div class="titlepage"></div><div class="refnamediv"><table width="100%"><tr><td valign="top"><h2><span class="refentrytitle"><a name="top_of_page"></a>Modules</span></h2><p>Modules — Support for loadable modules</p></td><td valign="top" align="right"></td></tr></table></div><div class="refsynopsisdiv"><a name="synopsis"></a><h2>Synopsis</h2><pre class="synopsis"> <a href="pango-Modules.html#PangoIncludedModule">PangoIncludedModule</a>; <a href="pango-Modules.html#PangoMap">PangoMap</a>; <a href="pango-Modules.html#PangoMapEntry">PangoMapEntry</a>;<a href="pango-Modules.html#PangoMap">PangoMap</a>* <a href="pango-Modules.html#pango-find-map">pango_find_map</a> (<a href="pango-Text-Attributes.html#PangoLanguage">PangoLanguage</a> *language, <ahref="../glib/glib-Basic-Types.html#guint">guint</a> engine_type_id, <ahref="../glib/glib-Basic-Types.html#guint">guint</a> render_type_id);<a href="pango-Engines.html#PangoEngine">PangoEngine</a>* <a href="pango-Modules.html#pango-map-get-engine">pango_map_get_engine</a> (<a href="pango-Modules.html#PangoMap">PangoMap</a> *map, <a href="pango-Scripts.html#PangoScript">PangoScript</a> script);void <a href="pango-Modules.html#pango-map-get-engines">pango_map_get_engines</a> (<a href="pango-Modules.html#PangoMap">PangoMap</a> *map, <a href="pango-Scripts.html#PangoScript">PangoScript</a> script, <ahref="../glib/glib-Singly-Linked-Lists.html#GSList">GSList</a> **exact_engines, <ahref="../glib/glib-Singly-Linked-Lists.html#GSList">GSList</a> **fallback_engines);void <a href="pango-Modules.html#pango-module-register">pango_module_register</a> (<a href="pango-Modules.html#PangoIncludedModule">PangoIncludedModule</a> *module);</pre></div><div class="refsect1" lang="en"><a name="desc"></a><h2>Description</h2><p>Functions and macros in this section are used to support loading dynamicmodules that add engines to Pango at run time.</p></div><div class="refsect1" lang="en"><a name="details"></a><h2>Details</h2><div class="refsect2" lang="en"><a name="id2940571"></a><h3><a name="PangoIncludedModule"></a>PangoIncludedModule</h3><a class="indexterm" name="id2940582"></a><pre class="programlisting">typedef struct { void (*list) (PangoEngineInfo **engines, int *n_engines); void (*init) (GTypeModule *module); void (*exit) (void); PangoEngine *(*create) (const char *id);} PangoIncludedModule;</pre><p>The <a href="pango-Modules.html#PangoIncludedModule"><span class="type">PangoIncludedModule</span></a> structure for a statically linked module contains the functions that would otherwise be loaded from a dynamically loaded module.</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="structfield"><code>list</code></em> ()</span></td><td>a function that lists the engines defined in this module.</td></tr><tr><td><span class="term"><em class="structfield"><code>init</code></em> ()</span></td><td>a function to initialize the module.</td></tr><tr><td><span class="term"><em class="structfield"><code>exit</code></em> ()</span></td><td>a function to finalize the module.</td></tr><tr><td><span class="term"><em class="structfield"><code>create</code></em> ()</span></td><td>a function to create an engine, given the engine name.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2940673"></a><h3><a name="PangoMap"></a>PangoMap</h3><a class="indexterm" name="id2940686"></a><pre class="programlisting">typedef struct _PangoMap PangoMap;</pre><p>A <a href="pango-Modules.html#PangoMap"><span class="type">PangoMap</span></a> structure can be used to determine the engine touse for each character.</p></div><hr><div class="refsect2" lang="en"><a name="id2940710"></a><h3><a name="PangoMapEntry"></a>PangoMapEntry</h3><a class="indexterm" name="id2940723"></a><pre class="programlisting">typedef struct _PangoMapEntry PangoMapEntry;</pre><p>A <a href="pango-Modules.html#PangoMapEntry"><span class="type">PangoMapEntry</span></a> contains information about the engine that should be used for the codepoint to which this entry belongs and also whether the engine matches the language tag for this entry's map exactly or just approximately.</p></div><hr><div class="refsect2" lang="en"><a name="id2940750"></a><h3><a name="pango-find-map"></a>pango_find_map ()</h3><a class="indexterm" name="id2940763"></a><pre class="programlisting"><a href="pango-Modules.html#PangoMap">PangoMap</a>* pango_find_map (<a href="pango-Text-Attributes.html#PangoLanguage">PangoLanguage</a> *language, <ahref="../glib/glib-Basic-Types.html#guint">guint</a> engine_type_id, <ahref="../glib/glib-Basic-Types.html#guint">guint</a> render_type_id);</pre><p>Locate a <a href="pango-Modules.html#PangoMap"><span class="type">PangoMap</span></a> for a particular engine type and rendertype. The resulting map can be used to determine the enginefor each character.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>language</code></em> :</span></td><td> the language tag for which to find the map</td></tr><tr><td><span class="term"><em class="parameter"><code>engine_type_id</code></em> :</span></td><td> the engine type for the map to find</td></tr><tr><td><span class="term"><em class="parameter"><code>render_type_id</code></em> :</span></td><td> the render type for the map to find</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> the suitable <a href="pango-Modules.html#PangoMap"><span class="type">PangoMap</span></a>.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2940887"></a><h3><a name="pango-map-get-engine"></a>pango_map_get_engine ()</h3><a class="indexterm" name="id2940900"></a><pre class="programlisting"><a href="pango-Engines.html#PangoEngine">PangoEngine</a>* pango_map_get_engine (<a href="pango-Modules.html#PangoMap">PangoMap</a> *map, <a href="pango-Scripts.html#PangoScript">PangoScript</a> script);</pre><p>Returns the best engine listed in the map for a given script</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>map</code></em> :</span></td><td> a <a href="pango-Modules.html#PangoMap"><span class="type">PangoMap</span></a></td></tr><tr><td><span class="term"><em class="parameter"><code>script</code></em> :</span></td><td> a <a href="pango-Scripts.html#PangoScript"><span class="type">PangoScript</span></a></td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> the best engine, if one is listed for the script, or <ahref="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. The lookup may cause the engine to be loaded; once an engine is loaded, it won't be unloaded. If multiple engines are exact for the script, the choice of which is returned is arbitrary.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2941011"></a><h3><a name="pango-map-get-engines"></a>pango_map_get_engines ()</h3><a class="indexterm" name="id2941027"></a><pre class="programlisting">void pango_map_get_engines (<a href="pango-Modules.html#PangoMap">PangoMap</a> *map, <a href="pango-Scripts.html#PangoScript">PangoScript</a> script, <ahref="../glib/glib-Singly-Linked-Lists.html#GSList">GSList</a> **exact_engines, <ahref="../glib/glib-Singly-Linked-Lists.html#GSList">GSList</a> **fallback_engines);</pre><p>Finds engines in the map that handle the given script. The returnedlists should be freed with g_slist_free, but the engines in thelists are owned by GLib and will be kept around permanently, sothey should not be unref'ed.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>map</code></em> :</span></td><td> a <a href="pango-Modules.html#PangoMap"><span class="type">PangoMap</span></a></td></tr><tr><td><span class="term"><em class="parameter"><code>script</code></em> :</span></td><td> a <a href="pango-Scripts.html#PangoScript"><span class="type">PangoScript</span></a></td></tr><tr><td><span class="term"><em class="parameter"><code>exact_engines</code></em> :</span></td><td> location to store list of engines that exactly handle this script.</td></tr><tr><td><span class="term"><em class="parameter"><code>fallback_engines</code></em> :</span></td><td> location to store list of engines that approximately handle this script.</td></tr></tbody></table></div><p>Since 1.4</p></div><hr><div class="refsect2" lang="en"><a name="id2941167"></a><h3><a name="pango-module-register"></a>pango_module_register ()</h3><a class="indexterm" name="id2941180"></a><pre class="programlisting">void pango_module_register (<a href="pango-Modules.html#PangoIncludedModule">PangoIncludedModule</a> *module);</pre><p>Registers a statically linked module with Pango. The<a href="pango-Modules.html#PangoIncludedModule"><span class="type">PangoIncludedModule</span></a> structure that is passed in contains thefunctions that would otherwise be loaded from a dynamically loadedmodule.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>module</code></em> :</span></td><td> a <a href="pango-Modules.html#PangoIncludedModule"><span class="type">PangoIncludedModule</span></a></td></tr></tbody></table></div></div></div></div></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -