📄 modules.xml
字号:
<refentry id="pango-Modules"><refmeta><refentrytitle role="top_of_page" id="pango-Modules.top_of_page">Modules</refentrytitle><manvolnum>3</manvolnum><refmiscinfo>PANGO Library</refmiscinfo></refmeta><refnamediv><refname>Modules</refname><refpurpose>Support for loadable modules</refpurpose><!--[<xref linkend="desc" endterm="desc.title"/>]--></refnamediv><refsynopsisdiv id="pango-Modules.synopsis" role="synopsis"><title role="synopsis.title">Synopsis</title><synopsis> <link linkend="PangoIncludedModule">PangoIncludedModule</link>; <link linkend="PangoMap">PangoMap</link>; <link linkend="PangoMapEntry">PangoMapEntry</link>;<link linkend="PangoMap">PangoMap</link>* <link linkend="pango-find-map">pango_find_map</link> (<link linkend="PangoLanguage">PangoLanguage</link> *language, <link linkend="guint">guint</link> engine_type_id, <link linkend="guint">guint</link> render_type_id);<link linkend="PangoEngine">PangoEngine</link>* <link linkend="pango-map-get-engine">pango_map_get_engine</link> (<link linkend="PangoMap">PangoMap</link> *map, <link linkend="PangoScript">PangoScript</link> script);<link linkend="void">void</link> <link linkend="pango-map-get-engines">pango_map_get_engines</link> (<link linkend="PangoMap">PangoMap</link> *map, <link linkend="PangoScript">PangoScript</link> script, <link linkend="GSList">GSList</link> **exact_engines, <link linkend="GSList">GSList</link> **fallback_engines);<link linkend="void">void</link> <link linkend="pango-module-register">pango_module_register</link> (<link linkend="PangoIncludedModule">PangoIncludedModule</link> *module);</synopsis></refsynopsisdiv><refsect1 id="pango-Modules.description" role="desc"><title role="desc.title">Description</title><para>Functions and macros in this section are used to support loading dynamicmodules that add engines to Pango at run time.</para></refsect1><refsect1 id="pango-Modules.details" role="details"><title role="details.title">Details</title><refsect2 id="PangoIncludedModule" role="struct"><title>PangoIncludedModule</title><indexterm zone="PangoIncludedModule"><primary>PangoIncludedModule</primary></indexterm><programlisting>typedef struct { void (*list) (PangoEngineInfo **engines, int *n_engines); void (*init) (GTypeModule *module); void (*exit) (void); PangoEngine *(*create) (const char *id);} PangoIncludedModule;</programlisting><para>The <link linkend="PangoIncludedModule"><type>PangoIncludedModule</type></link> structure for a statically linked module contains the functions that would otherwise be loaded from a dynamically loaded module.</para><variablelist role="struct"><varlistentry><term><structfield>list</structfield> ()</term><listitem><simpara>a function that lists the engines defined in this module.</simpara></listitem></varlistentry><varlistentry><term><structfield>init</structfield> ()</term><listitem><simpara>a function to initialize the module.</simpara></listitem></varlistentry><varlistentry><term><structfield>exit</structfield> ()</term><listitem><simpara>a function to finalize the module.</simpara></listitem></varlistentry><varlistentry><term><structfield>create</structfield> ()</term><listitem><simpara>a function to create an engine, given the engine name.</simpara></listitem></varlistentry></variablelist></refsect2><refsect2 id="PangoMap" role="struct"><title>PangoMap</title><indexterm zone="PangoMap"><primary>PangoMap</primary></indexterm><programlisting>typedef struct _PangoMap PangoMap;</programlisting><para>A <link linkend="PangoMap"><type>PangoMap</type></link> structure can be used to determine the engine touse for each character.</para></refsect2><refsect2 id="PangoMapEntry" role="struct"><title>PangoMapEntry</title><indexterm zone="PangoMapEntry"><primary>PangoMapEntry</primary></indexterm><programlisting>typedef struct _PangoMapEntry PangoMapEntry;</programlisting><para>A <link linkend="PangoMapEntry"><type>PangoMapEntry</type></link> 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.</para></refsect2><refsect2 id="pango-find-map" role="function"><title>pango_find_map ()</title><indexterm zone="pango-find-map"><primary>pango_find_map</primary></indexterm><programlisting><link linkend="PangoMap">PangoMap</link>* pango_find_map (<link linkend="PangoLanguage">PangoLanguage</link> *language, <link linkend="guint">guint</link> engine_type_id, <link linkend="guint">guint</link> render_type_id);</programlisting><para>Locate a <link linkend="PangoMap"><type>PangoMap</type></link> for a particular engine type and rendertype. The resulting map can be used to determine the enginefor each character.</para><para></para><variablelist role="params"><varlistentry><term><parameter>language</parameter> :</term><listitem><simpara> the language tag for which to find the map</simpara></listitem></varlistentry><varlistentry><term><parameter>engine_type_id</parameter> :</term><listitem><simpara> the engine type for the map to find</simpara></listitem></varlistentry><varlistentry><term><parameter>render_type_id</parameter> :</term><listitem><simpara> the render type for the map to find</simpara></listitem></varlistentry><varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> the suitable <link linkend="PangoMap"><type>PangoMap</type></link>.</simpara></listitem></varlistentry></variablelist></refsect2><refsect2 id="pango-map-get-engine" role="function"><title>pango_map_get_engine ()</title><indexterm zone="pango-map-get-engine"><primary>pango_map_get_engine</primary></indexterm><programlisting><link linkend="PangoEngine">PangoEngine</link>* pango_map_get_engine (<link linkend="PangoMap">PangoMap</link> *map, <link linkend="PangoScript">PangoScript</link> script);</programlisting><para>Returns the best engine listed in the map for a given script</para><para></para><variablelist role="params"><varlistentry><term><parameter>map</parameter> :</term><listitem><simpara> a <link linkend="PangoMap"><type>PangoMap</type></link></simpara></listitem></varlistentry><varlistentry><term><parameter>script</parameter> :</term><listitem><simpara> a <link linkend="PangoScript"><type>PangoScript</type></link></simpara></listitem></varlistentry><varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> the best engine, if one is listed for the script, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>. 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.</simpara></listitem></varlistentry></variablelist></refsect2><refsect2 id="pango-map-get-engines" role="function" condition="since:1.4"><title>pango_map_get_engines ()</title><indexterm zone="pango-map-get-engines" role="1.4"><primary>pango_map_get_engines</primary></indexterm><programlisting><link linkend="void">void</link> pango_map_get_engines (<link linkend="PangoMap">PangoMap</link> *map, <link linkend="PangoScript">PangoScript</link> script, <link linkend="GSList">GSList</link> **exact_engines, <link linkend="GSList">GSList</link> **fallback_engines);</programlisting><para>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.</para><para></para><variablelist role="params"><varlistentry><term><parameter>map</parameter> :</term><listitem><simpara> a <link linkend="PangoMap"><type>PangoMap</type></link></simpara></listitem></varlistentry><varlistentry><term><parameter>script</parameter> :</term><listitem><simpara> a <link linkend="PangoScript"><type>PangoScript</type></link></simpara></listitem></varlistentry><varlistentry><term><parameter>exact_engines</parameter> :</term><listitem><simpara> location to store list of engines that exactly handle this script.</simpara></listitem></varlistentry><varlistentry><term><parameter>fallback_engines</parameter> :</term><listitem><simpara> location to store list of engines that approximately handle this script.</simpara></listitem></varlistentry></variablelist><para role="since">Since 1.4</para></refsect2><refsect2 id="pango-module-register" role="function"><title>pango_module_register ()</title><indexterm zone="pango-module-register"><primary>pango_module_register</primary></indexterm><programlisting><link linkend="void">void</link> pango_module_register (<link linkend="PangoIncludedModule">PangoIncludedModule</link> *module);</programlisting><para>Registers a statically linked module with Pango. The<link linkend="PangoIncludedModule"><type>PangoIncludedModule</type></link> structure that is passed in contains thefunctions that would otherwise be loaded from a dynamically loadedmodule.</para><para></para><variablelist role="params"><varlistentry><term><parameter>module</parameter> :</term><listitem><simpara> a <link linkend="PangoIncludedModule"><type>PangoIncludedModule</type></link></simpara></listitem></varlistentry></variablelist></refsect2></refsect1></refentry>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -