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

📄 modules.sgml

📁 GLib是GTK+和GNOME工程的基础底层核心程序库
💻 SGML
📖 第 1 页 / 共 2 页
字号:
</tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="GModuleFlags">enum GModuleFlags</title><programlisting>typedef enum{  G_MODULE_BIND_LAZY	= 1 &lt;&lt; 0,  G_MODULE_BIND_MASK	= 0x01} GModuleFlags;</programlisting><para>Flags passed to <link linkend="g-module-open">g_module_open</link>().<link linkend="G-MODULE-BIND-LAZY-CAPS">G_MODULE_BIND_LAZY</link> specifies that symbols are only resolved when needed.The default action is to bind all symbols when the module is loaded.(<link linkend="G-MODULE-BIND-LAZY-CAPS">G_MODULE_BIND_LAZY</link> is not supported on all platforms.)</para></refsect2><refsect2><title><anchor id="g-module-symbol">g_module_symbol ()</title><programlisting><link linkend="gboolean">gboolean</link>    g_module_symbol                 (<link linkend="GModule">GModule</link> *module,                                             const <link linkend="gchar">gchar</link> *symbol_name,                                             <link linkend="gpointer">gpointer</link> *symbol);</programlisting><para>Gets a symbol pointer from a module.</para><informaltable pgwide="1" frame="none" role="params"><tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*"><tbody><row><entry align="right"><parameter>module</parameter>&nbsp;:</entry><entry>a <link linkend="GModule">GModule</link>.</entry></row><row><entry align="right"><parameter>symbol_name</parameter>&nbsp;:</entry><entry>the name of the symbol to find.</entry></row><row><entry align="right"><parameter>symbol</parameter>&nbsp;:</entry><entry>returns the pointer to the symbol value.</entry></row><row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry><literal>TRUE</literal> on success.</entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="g-module-name">g_module_name ()</title><programlisting>G_CONST_RETURN <link linkend="gchar">gchar</link>* g_module_name         (<link linkend="GModule">GModule</link> *module);</programlisting><para>Gets the filename from a <link linkend="GModule">GModule</link>.</para><informaltable pgwide="1" frame="none" role="params"><tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*"><tbody><row><entry align="right"><parameter>module</parameter>&nbsp;:</entry><entry>a <link linkend="GModule">GModule</link>.</entry></row><row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry>the filename of the module, or "main" if the module is the mainprogram itself.</entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="g-module-make-resident">g_module_make_resident ()</title><programlisting>void        g_module_make_resident          (<link linkend="GModule">GModule</link> *module);</programlisting><para>Ensures that a module will never be unloaded.Any future <link linkend="g-module-close">g_module_close</link>() calls on the module will be ignored.</para><informaltable pgwide="1" frame="none" role="params"><tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*"><tbody><row><entry align="right"><parameter>module</parameter>&nbsp;:</entry><entry>a <link linkend="GModule">GModule</link> to make permanently resident.</entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="g-module-close">g_module_close ()</title><programlisting><link linkend="gboolean">gboolean</link>    g_module_close                  (<link linkend="GModule">GModule</link> *module);</programlisting><para>Closes a module.</para><informaltable pgwide="1" frame="none" role="params"><tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*"><tbody><row><entry align="right"><parameter>module</parameter>&nbsp;:</entry><entry>a <link linkend="GModule">GModule</link> to close.</entry></row><row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry><literal>TRUE</literal> on success.</entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="g-module-error">g_module_error ()</title><programlisting>G_CONST_RETURN <link linkend="gchar">gchar</link>* g_module_error        (void);</programlisting><para>Gets a string describing the last module error.</para><informaltable pgwide="1" frame="none" role="params"><tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*"><tbody><row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry>a string describing the last module error.</entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="GModuleCheckInit">GModuleCheckInit ()</title><programlisting>const <link linkend="gchar">gchar</link>* (*GModuleCheckInit)            (<link linkend="GModule">GModule</link> *module);</programlisting><para>Specifies the type of the module initialization function.If a module contains a function named <link linkend="g-module-check-init">g_module_check_init</link>() it is calledautomatically when the module is loaded. It is passed the <link linkend="GModule">GModule</link> structureand should return <literal>NULL</literal> on success or a string describing the initializationerror.</para><informaltable pgwide="1" frame="none" role="params"><tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*"><tbody><row><entry align="right"><parameter>module</parameter>&nbsp;:</entry><entry>the <link linkend="GModule">GModule</link> corresponding to the module which has just been loaded.</entry></row><row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry><literal>NULL</literal> on success, or a string describing the initialization error.</entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="GModuleUnload">GModuleUnload ()</title><programlisting>void        (*GModuleUnload)                (<link linkend="GModule">GModule</link> *module);</programlisting><para>Specifies the type of the module function called when it is unloaded.If a module contains a function named <link linkend="g-module-unload">g_module_unload</link>() it is calledautomatically when the module is unloaded.It is passed the <link linkend="GModule">GModule</link> structure.</para><informaltable pgwide="1" frame="none" role="params"><tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*"><tbody><row><entry align="right"><parameter>module</parameter>&nbsp;:</entry><entry>the <link linkend="GModule">GModule</link> about to be unloaded.</entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="G-MODULE-SUFFIX-CAPS">G_MODULE_SUFFIX</title><programlisting>#define G_MODULE_SUFFIX "so"</programlisting><para>Expands to the proper shared library suffix for the current platformwithout the leading dot. For the most Unices and Linux this is "so",for some HP-UX versions this is "sl" and for Windows this is "dll".</para></refsect2><refsect2><title><anchor id="G-MODULE-EXPORT-CAPS">G_MODULE_EXPORT</title><programlisting>#define     G_MODULE_EXPORT</programlisting><para>Used to declare functions exported by modules.</para></refsect2><refsect2><title><anchor id="G-MODULE-IMPORT-CAPS">G_MODULE_IMPORT</title><programlisting>#define	G_MODULE_IMPORT		extern</programlisting><para>Used to declare functions imported from modules.</para></refsect2></refsect1></refentry>

⌨️ 快捷键说明

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