/usr/share/gtk-doc/html/libgwymodule/libgwymodule-gwymoduleloader.html is in libgwyddion20-doc 2.44-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>gwymoduleloader: Gwyddion Module Library Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
<link rel="home" href="index.html" title="Gwyddion Module Library Reference Manual">
<link rel="up" href="ModuleLibrary.html" title="Gwyddion Module Library">
<link rel="prev" href="libgwymodule-gwymoduleenums.html" title="gwymoduleenums">
<link rel="next" href="libgwymodule-gwymodule-file.html" title="gwymodule-file">
<meta name="generator" content="GTK-Doc V1.19 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</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="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span>
<a href="#libgwymodule-gwymoduleloader.description" class="shortcut">Description</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="ModuleLibrary.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="libgwymodule-gwymoduleenums.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="libgwymodule-gwymodule-file.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="libgwymodule-gwymoduleloader"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="libgwymodule-gwymoduleloader.top_of_page"></a>gwymoduleloader</span></h2>
<p>gwymoduleloader — Basic module loader interface</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="libgwymodule-gwymoduleloader.functions"></a><h2>Functions</h2>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="functions_return">
<col class="functions_name">
</colgroup>
<tbody>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name">
<a class="link" href="libgwymodule-gwymoduleloader.html#GWY-MODULE-QUERY:CAPS" title="GWY_MODULE_QUERY()">GWY_MODULE_QUERY</a><span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<span class="c_punctuation">(</span><a class="link" href="libgwymodule-gwymoduleloader.html#GwyModuleRegisterFunc" title="GwyModuleRegisterFunc ()">*GwyModuleRegisterFunc</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="libgwymodule-gwymoduleloader.html#GwyModuleInfo" title="struct GwyModuleInfo"><span class="returnvalue">GwyModuleInfo</span></a> *
</td>
<td class="function_name">
<span class="c_punctuation">(</span><a class="link" href="libgwymodule-gwymoduleloader.html#GwyModuleQueryFunc" title="GwyModuleQueryFunc ()">*GwyModuleQueryFunc</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Quarks.html#GQuark"><span class="returnvalue">GQuark</span></a>
</td>
<td class="function_name">
<a class="link" href="libgwymodule-gwymoduleloader.html#gwy-module-error-quark" title="gwy_module_error_quark ()">gwy_module_error_quark</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="libgwymodule-gwymoduleloader.html#gwy-module-register-modules" title="gwy_module_register_modules ()">gwy_module_register_modules</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <a class="link" href="libgwymodule-gwymoduleloader.html#GwyModuleInfo" title="struct GwyModuleInfo"><span class="returnvalue">GwyModuleInfo</span></a> *
</td>
<td class="function_name">
<a class="link" href="libgwymodule-gwymoduleloader.html#gwy-module-lookup" title="gwy_module_lookup ()">gwy_module_lookup</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
</td>
<td class="function_name">
<a class="link" href="libgwymodule-gwymoduleloader.html#gwy-module-get-filename" title="gwy_module_get_filename ()">gwy_module_get_filename</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Singly-Linked-Lists.html#GSList"><span class="returnvalue">GSList</span></a> *
</td>
<td class="function_name">
<a class="link" href="libgwymodule-gwymoduleloader.html#gwy-module-get-functions" title="gwy_module_get_functions ()">gwy_module_get_functions</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="libgwymodule-gwymoduleloader.html#gwy-module-foreach" title="gwy_module_foreach ()">gwy_module_foreach</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <a class="link" href="libgwymodule-gwymoduleloader.html#GwyModuleInfo" title="struct GwyModuleInfo"><span class="returnvalue">GwyModuleInfo</span></a> *
</td>
<td class="function_name">
<a class="link" href="libgwymodule-gwymoduleloader.html#gwy-module-register-module" title="gwy_module_register_module ()">gwy_module_register_module</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="libgwymodule-gwymoduleloader.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="name">
<col class="description">
</colgroup>
<tbody>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="libgwymodule-gwymoduleloader.html#GWY-MODULE-ABI-VERSION:CAPS" title="GWY_MODULE_ABI_VERSION">GWY_MODULE_ABI_VERSION</a></td>
</tr>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="libgwymodule-gwymoduleloader.html#GwyModuleError" title="enum GwyModuleError">GwyModuleError</a></td>
</tr>
<tr>
<td class="datatype_keyword">struct</td>
<td class="function_name"><a class="link" href="libgwymodule-gwymoduleloader.html#GwyModuleInfo" title="struct GwyModuleInfo">GwyModuleInfo</a></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="libgwymodule-gwymoduleloader.includes"></a><h2>Includes</h2>
<pre class="synopsis">#include <libgwymodule/gwymodule.h>
</pre>
</div>
<div class="refsect1">
<a name="libgwymodule-gwymoduleloader.description"></a><h2>Description</h2>
</div>
<div class="refsect1">
<a name="libgwymodule-gwymoduleloader.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="GWY-MODULE-QUERY:CAPS"></a><h3>GWY_MODULE_QUERY()</h3>
<pre class="programlisting">#define GWY_MODULE_QUERY(mod_info)</pre>
<p>The module query must be the ONLY exported symbol from a module.</p>
<p>This macro does The Right Thing necessary to export module info in a way
Gwyddion understands it. Put <a class="link" href="libgwymodule-gwymoduleloader.html#GWY-MODULE-QUERY:CAPS" title="GWY_MODULE_QUERY()"><span class="type">GWY_MODULE_QUERY</span></a> with the module info
(<a class="link" href="libgwymodule-gwymoduleloader.html#GwyModuleInfo" title="struct GwyModuleInfo"><span class="type">GwyModuleInfo</span></a>) of your module as its argument on a line (with NO
semicolon after).</p>
<p>If you write a module in C++ note the module query must have C linkage.
This is achieved by marking it <code class="literal">extern "C"</code>:</p>
<div class="informalexample">
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="listing_lines" align="right"><pre>1
2
3</pre></td>
<td class="listing_code"><pre class="programlisting"><span class="keyword">extern</span><span class="normal"> </span><span class="string">"C"</span><span class="normal"> </span><span class="cbracket">{</span>
<span class="function"><a href="#GWY-MODULE-QUERY:CAPS">GWY_MODULE_QUERY</a></span><span class="symbol">(</span><span class="normal">module_info</span><span class="symbol">)</span>
<span class="cbracket">}</span></pre></td>
</tr>
</tbody>
</table>
</div>
<p>
This has to be done manually in versions up to 2.24; since version 2.25
<a class="link" href="libgwymodule-gwymoduleloader.html#GWY-MODULE-QUERY:CAPS" title="GWY_MODULE_QUERY()"><code class="function">GWY_MODULE_QUERY()</code></a> includes <code class="literal">extern "C"</code> automatically if
it is compiled using a C++ compiler.</p>
<div class="refsect3">
<a name="id-1.2.3.7.2.9"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>mod_info</p></td>
<td class="parameter_description"><p>The <a class="link" href="libgwymodule-gwymoduleloader.html#GwyModuleInfo" title="struct GwyModuleInfo"><span class="type">GwyModuleInfo</span></a> structure to return as module info.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="GwyModuleRegisterFunc"></a><h3>GwyModuleRegisterFunc ()</h3>
<pre class="programlisting"><a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<span class="c_punctuation">(</span>*GwyModuleRegisterFunc<span class="c_punctuation">)</span> (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Module registration function type.</p>
<p>It actually runs particular featrue registration functions, like
<a class="link" href="libgwymodule-gwymodule-file.html#gwy-file-func-register" title="gwy_file_func_register ()"><code class="function">gwy_file_func_register()</code></a> and <a class="link" href="libgwymodule-gwymodule-process.html#gwy-process-func-register" title="gwy_process_func_register ()"><code class="function">gwy_process_func_register()</code></a>.</p>
<div class="refsect3">
<a name="id-1.2.3.7.3.6"></a><h4>Returns</h4>
<p> Whether the registration succeeded. When it returns <a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>, the
module and its features are unloaded (FIXME: maybe. Currenly only
module is unloaded, features are NOT unregistered, this can lead
to all kinds of disasters).</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="GwyModuleQueryFunc"></a><h3>GwyModuleQueryFunc ()</h3>
<pre class="programlisting"><a class="link" href="libgwymodule-gwymoduleloader.html#GwyModuleInfo" title="struct GwyModuleInfo"><span class="returnvalue">GwyModuleInfo</span></a> *
<span class="c_punctuation">(</span>*GwyModuleQueryFunc<span class="c_punctuation">)</span> (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Module query function type.</p>
<p>The module query function should be simply declared as
GWY_MODULE_QUERY(mod_info), where mod_info is module info struct for
the module.</p>
<div class="refsect3">
<a name="id-1.2.3.7.4.6"></a><h4>Returns</h4>
<p> The module info struct.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-module-error-quark"></a><h3>gwy_module_error_quark ()</h3>
<pre class="programlisting"><a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Quarks.html#GQuark"><span class="returnvalue">GQuark</span></a>
gwy_module_error_quark (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Returns error domain for module loading.</p>
<p>See and use <code class="literal">GWY_MODULE_ERROR</code>.</p>
<div class="refsect3">
<a name="id-1.2.3.7.5.6"></a><h4>Returns</h4>
<p> The error domain.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-module-register-modules"></a><h3>gwy_module_register_modules ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gwy_module_register_modules (<em class="parameter"><code>const <a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> **paths</code></em>);</pre>
<p>Registers all modules in given directories.</p>
<p>It can be called several times (on different directories). No errors are
reported, register modules individually with <a class="link" href="libgwymodule-gwymoduleloader.html#gwy-module-register-module" title="gwy_module_register_module ()"><code class="function">gwy_module_register_module()</code></a>
to get registration errors.</p>
<div class="refsect3">
<a name="id-1.2.3.7.6.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>paths</p></td>
<td class="parameter_description"><p>A <a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>-terminated list of directory names.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-module-lookup"></a><h3>gwy_module_lookup ()</h3>
<pre class="programlisting">const <a class="link" href="libgwymodule-gwymoduleloader.html#GwyModuleInfo" title="struct GwyModuleInfo"><span class="returnvalue">GwyModuleInfo</span></a> *
gwy_module_lookup (<em class="parameter"><code>const <a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>);</pre>
<p>Returns information about one module.</p>
<div class="refsect3">
<a name="id-1.2.3.7.7.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>name</p></td>
<td class="parameter_description"><p>A module name.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.2.3.7.7.6"></a><h4>Returns</h4>
<p> The module info, of <a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if not found. It must be considered
constant and never modified or freed.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-module-get-filename"></a><h3>gwy_module_get_filename ()</h3>
<pre class="programlisting">const <a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
gwy_module_get_filename (<em class="parameter"><code>const <a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>);</pre>
<p>Returns full file name of a module.</p>
<div class="refsect3">
<a name="id-1.2.3.7.8.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>name</p></td>
<td class="parameter_description"><p>A module name.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.2.3.7.8.6"></a><h4>Returns</h4>
<p> Module file name as a string that must be modified or freed.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-module-get-functions"></a><h3>gwy_module_get_functions ()</h3>
<pre class="programlisting"><a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Singly-Linked-Lists.html#GSList"><span class="returnvalue">GSList</span></a> *
gwy_module_get_functions (<em class="parameter"><code>const <a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>);</pre>
<p>Returns list of names of functions a module implements.</p>
<div class="refsect3">
<a name="id-1.2.3.7.9.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>name</p></td>
<td class="parameter_description"><p>A module name.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.2.3.7.9.6"></a><h4>Returns</h4>
<p> List of module function names, as a <a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a> that is owned by
module loader and must not be modified or freed.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-module-foreach"></a><h3>gwy_module_foreach ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gwy_module_foreach (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Hash-Tables.html#GHFunc"><span class="type">GHFunc</span></a> function</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>);</pre>
<p>Runs <em class="parameter"><code>function</code></em>
on each registered module.</p>
<p>It passes module name as the key and pointer to module
info (<a class="link" href="libgwymodule-gwymoduleloader.html#GwyModuleInfo" title="struct GwyModuleInfo"><span class="type">GwyModuleInfo</span></a>) as the value. Neither should be modified.</p>
<div class="refsect3">
<a name="id-1.2.3.7.10.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>function</p></td>
<td class="parameter_description"><p>A <a href="/usr/share/gtk-doc/html/glib/glib-Hash-Tables.html#GHFunc"><span class="type">GHFunc</span></a> run for each module.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>data</p></td>
<td class="parameter_description"><p>User data.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-module-register-module"></a><h3>gwy_module_register_module ()</h3>
<pre class="programlisting">const <a class="link" href="libgwymodule-gwymoduleloader.html#GwyModuleInfo" title="struct GwyModuleInfo"><span class="returnvalue">GwyModuleInfo</span></a> *
gwy_module_register_module (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>Loads a single module.</p>
<div class="refsect3">
<a name="id-1.2.3.7.11.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>name</p></td>
<td class="parameter_description"><p>Module file name to load, including full path and extension.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>Location to store error, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore them. Errors from
<a class="link" href="libgwymodule-gwymoduleloader.html#GwyModuleError" title="enum GwyModuleError"><span class="type">GwyModuleError</span></a> domain can occur.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.2.3.7.11.6"></a><h4>Returns</h4>
<p> Module info on success, <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on failure.</p>
</div>
</div>
</div>
<div class="refsect1">
<a name="libgwymodule-gwymoduleloader.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="GWY-MODULE-ABI-VERSION:CAPS"></a><h3>GWY_MODULE_ABI_VERSION</h3>
<pre class="programlisting">#define GWY_MODULE_ABI_VERSION 2
</pre>
<p>Gwyddion module ABI version.</p>
<p>To be filled as <em class="parameter"><code>abi_version</code></em>
in <a class="link" href="libgwymodule-gwymoduleloader.html#GwyModuleInfo" title="struct GwyModuleInfo"><span class="type">GwyModuleInfo</span></a>.</p>
</div>
<hr>
<div class="refsect2">
<a name="GwyModuleError"></a><h3>enum GwyModuleError</h3>
<p>Type of module loading and registration error.</p>
<div class="refsect3">
<a name="id-1.2.3.8.3.4"></a><h4>Members</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="300px" class="enum_members_name">
<col class="enum_members_description">
<col width="200px" class="enum_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="enum_member_name"><p><a name="GWY-MODULE-ERROR-NAME:CAPS"></a>GWY_MODULE_ERROR_NAME</p></td>
<td class="enum_member_description">
<p>Module has an invalid name. It is recommended that
module names are valid C identifiers, possibly with
dashes instead of underscores, but only really
broken names are rejected.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GWY-MODULE-ERROR-DUPLICATE:CAPS"></a>GWY_MODULE_ERROR_DUPLICATE</p></td>
<td class="enum_member_description">
<p>A module of the same name has already been
registered.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GWY-MODULE-ERROR-OPEN:CAPS"></a>GWY_MODULE_ERROR_OPEN</p></td>
<td class="enum_member_description">
<p>Calling <a href="/usr/share/gtk-doc/html/glib/glib-Dynamic-Loading-of-Modules.html#g-module-open"><code class="function">g_module_open()</code></a> on the module failed.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GWY-MODULE-ERROR-QUERY:CAPS"></a>GWY_MODULE_ERROR_QUERY</p></td>
<td class="enum_member_description">
<p>Module does not contain any query function.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GWY-MODULE-ERROR-ABI:CAPS"></a>GWY_MODULE_ERROR_ABI</p></td>
<td class="enum_member_description">
<p>Module has different ABI version than
expected/supported; or required info field are
missing.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GWY-MODULE-ERROR-INFO:CAPS"></a>GWY_MODULE_ERROR_INFO</p></td>
<td class="enum_member_description">
<p>Module query function provided <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> info.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GWY-MODULE-ERROR-REGISTER:CAPS"></a>GWY_MODULE_ERROR_REGISTER</p></td>
<td class="enum_member_description">
<p>The registration function returned <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>; or
the module did not register any function.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="GwyModuleInfo"></a><h3>struct GwyModuleInfo</h3>
<pre class="programlisting">struct GwyModuleInfo {
guint32 abi_version;
GwyModuleRegisterFunc register_func;
const gchar *blurb;
const gchar *author;
const gchar *version;
const gchar *copyright;
const gchar *date;
};
</pre>
<p>Module information returned by <a class="link" href="libgwymodule-gwymoduleloader.html#GWY-MODULE-QUERY:CAPS" title="GWY_MODULE_QUERY()"><code class="function">GWY_MODULE_QUERY()</code></a>.</p>
<div class="refsect3">
<a name="id-1.2.3.8.4.5"></a><h4>Members</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="300px" class="struct_members_name">
<col class="struct_members_description">
<col width="200px" class="struct_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="struct_member_name"><p><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> <em class="structfield"><code><a name="GwyModuleInfo.abi-version"></a>abi_version</code></em>;</p></td>
<td class="struct_member_description"><p>Gwyddion module ABI version, should be always
<a class="link" href="libgwymodule-gwymoduleloader.html#GWY-MODULE-ABI-VERSION:CAPS" title="GWY_MODULE_ABI_VERSION"><span class="type">GWY_MODULE_ABI_VERSION</span></a>.</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><a class="link" href="libgwymodule-gwymoduleloader.html#GwyModuleRegisterFunc" title="GwyModuleRegisterFunc ()"><span class="type">GwyModuleRegisterFunc</span></a> <em class="structfield"><code><a name="GwyModuleInfo.register-func"></a>register_func</code></em>;</p></td>
<td class="struct_member_description"><p>Module registration function (the function run by Gwyddion
module system, actually registering particular module
features).</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *<em class="structfield"><code><a name="GwyModuleInfo.blurb"></a>blurb</code></em>;</p></td>
<td class="struct_member_description"><p>Some module description.</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *<em class="structfield"><code><a name="GwyModuleInfo.author"></a>author</code></em>;</p></td>
<td class="struct_member_description"><p>Module author(s).</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *<em class="structfield"><code><a name="GwyModuleInfo.version"></a>version</code></em>;</p></td>
<td class="struct_member_description"><p>Module version.</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *<em class="structfield"><code><a name="GwyModuleInfo.copyright"></a>copyright</code></em>;</p></td>
<td class="struct_member_description"><p>Who has copyright on this module.</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *<em class="structfield"><code><a name="GwyModuleInfo.date"></a>date</code></em>;</p></td>
<td class="struct_member_description"><p>Date (year).</p></td>
<td class="struct_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.19</div>
</body>
</html>
|