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

📄 glib-dynamic-loading-of-modules.html

📁 最新gtk中文资料集
💻 HTML
📖 第 1 页 / 共 2 页
字号:
</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td><td>a <a class="link" href="glib-Dynamic-Loading-of-Modules.html#GModule"><span class="type">GModule</span></a> on success, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on failure.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2918159"></a><h3><a name="GModuleFlags"></a>enum GModuleFlags</h3><a class="indexterm" name="id2918171"></a><pre class="programlisting">typedef enum{  G_MODULE_BIND_LAZY	= 1 &lt;&lt; 0,  G_MODULE_BIND_LOCAL	= 1 &lt;&lt; 1,  G_MODULE_BIND_MASK	= 0x03} GModuleFlags;</pre><p>Flags passed to <a class="link" href="glib-Dynamic-Loading-of-Modules.html#g-module-open"><code class="function">g_module_open()</code></a>. Note that these flags arenot supported on all platforms.</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><a name="G-MODULE-BIND-LAZY:CAPS"></a><code class="literal">G_MODULE_BIND_LAZY</code></span></p></td><td>specifies that symbols are only resolved when needed.  The default action is to bind all symbols when the module is loaded.</td></tr><tr><td><p><span class="term"><a name="G-MODULE-BIND-LOCAL:CAPS"></a><code class="literal">G_MODULE_BIND_LOCAL</code></span></p></td><td>specifies that symbols in the module should  not be added to the global name space.  The default action on most  platforms is to place symbols in the module in the global name space,  which may cause conflicts with existing symbols.</td></tr><tr><td><p><span class="term"><a name="G-MODULE-BIND-MASK:CAPS"></a><code class="literal">G_MODULE_BIND_MASK</code></span></p></td><td>mask for all flags.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2918280"></a><h3><a name="g-module-symbol"></a>g_module_symbol ()</h3><a class="indexterm" name="id2918293"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean">gboolean</a>            g_module_symbol                     (<a class="link" href="glib-Dynamic-Loading-of-Modules.html#GModule">GModule</a> *module,                                                         const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *symbol_name,                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> *symbol);</pre><p>Gets a symbol pointer from a module, such as one exported by <a class="link" href="glib-Dynamic-Loading-of-Modules.html#G-MODULE-EXPORT:CAPS"><span class="type">G_MODULE_EXPORT</span></a>.</p><p>Note that a valid symbol can be <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>module</code></em>&#160;:</span></p></td><td>a <a class="link" href="glib-Dynamic-Loading-of-Modules.html#GModule"><span class="type">GModule</span></a>.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>symbol_name</code></em>&#160;:</span></p></td><td>the name of the symbol to find.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>symbol</code></em>&#160;:</span></p></td><td>returns the pointer to the symbol value.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td><td><a class="link" href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on success.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2918434"></a><h3><a name="g-module-name"></a>g_module_name ()</h3><a class="indexterm" name="id2918446"></a><pre class="programlisting">const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a>*        g_module_name                       (<a class="link" href="glib-Dynamic-Loading-of-Modules.html#GModule">GModule</a> *module);</pre><p>Gets the filename from a <a class="link" href="glib-Dynamic-Loading-of-Modules.html#GModule"><span class="type">GModule</span></a>.</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>module</code></em>&#160;:</span></p></td><td>a <a class="link" href="glib-Dynamic-Loading-of-Modules.html#GModule"><span class="type">GModule</span></a>.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td><td>the filename of the module, or "main" if the module is the mainprogram itself.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2918521"></a><h3><a name="g-module-make-resident"></a>g_module_make_resident ()</h3><a class="indexterm" name="id2918534"></a><pre class="programlisting">void                g_module_make_resident              (<a class="link" href="glib-Dynamic-Loading-of-Modules.html#GModule">GModule</a> *module);</pre><p>Ensures that a module will never be unloaded.Any future <a class="link" href="glib-Dynamic-Loading-of-Modules.html#g-module-close"><code class="function">g_module_close()</code></a> calls on the module will be ignored.</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>module</code></em>&#160;:</span></p></td><td>a <a class="link" href="glib-Dynamic-Loading-of-Modules.html#GModule"><span class="type">GModule</span></a> to make permanently resident.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2918600"></a><h3><a name="g-module-close"></a>g_module_close ()</h3><a class="indexterm" name="id2918613"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean">gboolean</a>            g_module_close                      (<a class="link" href="glib-Dynamic-Loading-of-Modules.html#GModule">GModule</a> *module);</pre><p>Closes a module.</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>module</code></em>&#160;:</span></p></td><td>a <a class="link" href="glib-Dynamic-Loading-of-Modules.html#GModule"><span class="type">GModule</span></a> to close.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td><td><a class="link" href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on success.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2918687"></a><h3><a name="g-module-error"></a>g_module_error ()</h3><a class="indexterm" name="id2918700"></a><pre class="programlisting">const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a>*        g_module_error                      (void);</pre><p>Gets a string describing the last module error.</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td><td>a string describing the last module error.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2918739"></a><h3><a name="GModuleCheckInit"></a>GModuleCheckInit ()</h3><a class="indexterm" name="id2918752"></a><pre class="programlisting">const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a>*        (*GModuleCheckInit)                 (<a class="link" href="glib-Dynamic-Loading-of-Modules.html#GModule">GModule</a> *module);</pre><p>Specifies the type of the module initialization function.If a module contains a function named <code class="function">g_module_check_init()</code> it is calledautomatically when the module is loaded. It is passed the <a class="link" href="glib-Dynamic-Loading-of-Modules.html#GModule"><span class="type">GModule</span></a> structureand should return <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on success or a string describing the initializationerror.</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>module</code></em>&#160;:</span></p></td><td>the <a class="link" href="glib-Dynamic-Loading-of-Modules.html#GModule"><span class="type">GModule</span></a> corresponding to the module which has just been loaded.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td><td><a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on success, or a string describing the initialization error.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2918863"></a><h3><a name="GModuleUnload"></a>GModuleUnload ()</h3><a class="indexterm" name="id2918876"></a><pre class="programlisting">void                (*GModuleUnload)                    (<a class="link" href="glib-Dynamic-Loading-of-Modules.html#GModule">GModule</a> *module);</pre><p>Specifies the type of the module function called when it is unloaded.If a module contains a function named <code class="function">g_module_unload()</code> it is calledautomatically when the module is unloaded.It is passed the <a class="link" href="glib-Dynamic-Loading-of-Modules.html#GModule"><span class="type">GModule</span></a> structure.</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>module</code></em>&#160;:</span></p></td><td>the <a class="link" href="glib-Dynamic-Loading-of-Modules.html#GModule"><span class="type">GModule</span></a> about to be unloaded.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2918954"></a><h3><a name="G-MODULE-SUFFIX:CAPS"></a>G_MODULE_SUFFIX</h3><a class="indexterm" name="id2918968"></a><pre class="programlisting">#define G_MODULE_SUFFIX "so"</pre><p>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".</p></div><hr><div class="refsect2" lang="en"><a name="id2918986"></a><h3><a name="G-MODULE-EXPORT:CAPS"></a>G_MODULE_EXPORT</h3><a class="indexterm" name="id2919000"></a><pre class="programlisting">#define             G_MODULE_EXPORT</pre><p>Used to declare functions exported by modules. This is a no-op on Linux andUnices, but when compiling for Windows, it marks a symbol to be exported fromthe library or executable being built.</p></div><hr><div class="refsect2" lang="en"><a name="id2919018"></a><h3><a name="G-MODULE-IMPORT:CAPS"></a>G_MODULE_IMPORT</h3><a class="indexterm" name="id2919032"></a><pre class="programlisting">#define	G_MODULE_IMPORT		extern</pre><p>Used to declare functions imported from modules.</p></div></div><div class="refsect1" lang="en"><a name="id2919049"></a><div class="refsect2" lang="en"><a name="id2919050"></a></div><hr><div class="refsect2" lang="en"><a name="id2919051"></a></div></div></div></body></html>

⌨️ 快捷键说明

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