GModule-2.0.gir 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277
  1. <?xml version="1.0"?>
  2. <!-- This file was automatically generated from C sources - DO NOT EDIT!
  3. To affect the contents of this file, edit the original C definitions,
  4. and/or use gtk-doc annotations. -->
  5. <repository version="1.2"
  6. xmlns="http://www.gtk.org/introspection/core/1.0"
  7. xmlns:c="http://www.gtk.org/introspection/c/1.0"
  8. xmlns:glib="http://www.gtk.org/introspection/glib/1.0">
  9. <include name="GLib" version="2.0"/>
  10. <package name="gmodule-2.0"/>
  11. <c:include name="gmodule.h"/>
  12. <namespace name="GModule"
  13. version="2.0"
  14. shared-library="libgmodule-2.0.so.0"
  15. c:identifier-prefixes="G"
  16. c:symbol-prefixes="g">
  17. <record name="Module" c:type="GModule" disguised="1">
  18. <doc xml:space="preserve">The #GModule struct is an opaque data structure to represent a
  19. [dynamically-loaded module][glib-Dynamic-Loading-of-Modules].
  20. It should only be accessed via the following functions.</doc>
  21. <method name="close" c:identifier="g_module_close">
  22. <doc xml:space="preserve">Closes a module.</doc>
  23. <return-value transfer-ownership="none">
  24. <doc xml:space="preserve">%TRUE on success</doc>
  25. <type name="gboolean" c:type="gboolean"/>
  26. </return-value>
  27. <parameters>
  28. <instance-parameter name="module" transfer-ownership="none">
  29. <doc xml:space="preserve">a #GModule to close</doc>
  30. <type name="Module" c:type="GModule*"/>
  31. </instance-parameter>
  32. </parameters>
  33. </method>
  34. <method name="make_resident" c:identifier="g_module_make_resident">
  35. <doc xml:space="preserve">Ensures that a module will never be unloaded.
  36. Any future g_module_close() calls on the module will be ignored.</doc>
  37. <return-value transfer-ownership="none">
  38. <type name="none" c:type="void"/>
  39. </return-value>
  40. <parameters>
  41. <instance-parameter name="module" transfer-ownership="none">
  42. <doc xml:space="preserve">a #GModule to make permanently resident</doc>
  43. <type name="Module" c:type="GModule*"/>
  44. </instance-parameter>
  45. </parameters>
  46. </method>
  47. <method name="name" c:identifier="g_module_name">
  48. <doc xml:space="preserve">Returns the filename that the module was opened with.
  49. If @module refers to the application itself, "main" is returned.</doc>
  50. <return-value transfer-ownership="none">
  51. <doc xml:space="preserve">the filename of the module</doc>
  52. <type name="utf8" c:type="const gchar*"/>
  53. </return-value>
  54. <parameters>
  55. <instance-parameter name="module" transfer-ownership="none">
  56. <doc xml:space="preserve">a #GModule</doc>
  57. <type name="Module" c:type="GModule*"/>
  58. </instance-parameter>
  59. </parameters>
  60. </method>
  61. <method name="symbol" c:identifier="g_module_symbol">
  62. <doc xml:space="preserve">Gets a symbol pointer from a module, such as one exported
  63. by #G_MODULE_EXPORT. Note that a valid symbol can be %NULL.</doc>
  64. <return-value transfer-ownership="none">
  65. <doc xml:space="preserve">%TRUE on success</doc>
  66. <type name="gboolean" c:type="gboolean"/>
  67. </return-value>
  68. <parameters>
  69. <instance-parameter name="module" transfer-ownership="none">
  70. <doc xml:space="preserve">a #GModule</doc>
  71. <type name="Module" c:type="GModule*"/>
  72. </instance-parameter>
  73. <parameter name="symbol_name" transfer-ownership="none">
  74. <doc xml:space="preserve">the name of the symbol to find</doc>
  75. <type name="utf8" c:type="const gchar*"/>
  76. </parameter>
  77. <parameter name="symbol"
  78. direction="out"
  79. caller-allocates="0"
  80. transfer-ownership="full"
  81. nullable="1">
  82. <doc xml:space="preserve">returns the pointer to the symbol value</doc>
  83. <type name="gpointer" c:type="gpointer*"/>
  84. </parameter>
  85. </parameters>
  86. </method>
  87. <function name="build_path" c:identifier="g_module_build_path">
  88. <doc xml:space="preserve">A portable way to build the filename of a module. The platform-specific
  89. prefix and suffix are added to the filename, if needed, and the result
  90. is added to the directory, using the correct separator character.
  91. The directory should specify the directory where the module can be found.
  92. It can be %NULL or an empty string to indicate that the module is in a
  93. standard platform-specific directory, though this is not recommended
  94. since the wrong module may be found.
  95. For example, calling g_module_build_path() on a Linux system with a
  96. @directory of `/lib` and a @module_name of "mylibrary" will return
  97. `/lib/libmylibrary.so`. On a Windows system, using `\Windows` as the
  98. directory it will return `\Windows\mylibrary.dll`.</doc>
  99. <return-value transfer-ownership="full">
  100. <doc xml:space="preserve">the complete path of the module, including the standard library
  101. prefix and suffix. This should be freed when no longer needed</doc>
  102. <type name="utf8" c:type="gchar*"/>
  103. </return-value>
  104. <parameters>
  105. <parameter name="directory"
  106. transfer-ownership="none"
  107. nullable="1"
  108. allow-none="1">
  109. <doc xml:space="preserve">the directory where the module is. This can be
  110. %NULL or the empty string to indicate that the standard platform-specific
  111. directories will be used, though that is not recommended</doc>
  112. <type name="utf8" c:type="const gchar*"/>
  113. </parameter>
  114. <parameter name="module_name" transfer-ownership="none">
  115. <doc xml:space="preserve">the name of the module</doc>
  116. <type name="utf8" c:type="const gchar*"/>
  117. </parameter>
  118. </parameters>
  119. </function>
  120. <function name="error" c:identifier="g_module_error">
  121. <doc xml:space="preserve">Gets a string describing the last module error.</doc>
  122. <return-value transfer-ownership="none">
  123. <doc xml:space="preserve">a string describing the last module error</doc>
  124. <type name="utf8" c:type="const gchar*"/>
  125. </return-value>
  126. </function>
  127. <function name="open" c:identifier="g_module_open" introspectable="0">
  128. <doc xml:space="preserve">Opens a module. If the module has already been opened,
  129. its reference count is incremented.
  130. First of all g_module_open() tries to open @file_name as a module.
  131. If that fails and @file_name has the ".la"-suffix (and is a libtool
  132. archive) it tries to open the corresponding module. If that fails
  133. and it doesn't have the proper module suffix for the platform
  134. (#G_MODULE_SUFFIX), this suffix will be appended and the corresponding
  135. module will be opended. If that fails and @file_name doesn't have the
  136. ".la"-suffix, this suffix is appended and g_module_open() tries to open
  137. the corresponding module. If eventually that fails as well, %NULL is
  138. returned.</doc>
  139. <return-value>
  140. <doc xml:space="preserve">a #GModule on success, or %NULL on failure</doc>
  141. <type name="Module" c:type="GModule*"/>
  142. </return-value>
  143. <parameters>
  144. <parameter name="file_name"
  145. transfer-ownership="none"
  146. nullable="1"
  147. allow-none="1">
  148. <doc xml:space="preserve">the name of the file containing the module, or %NULL
  149. to obtain a #GModule representing the main program itself</doc>
  150. <type name="utf8" c:type="const gchar*"/>
  151. </parameter>
  152. <parameter name="flags" transfer-ownership="none">
  153. <doc xml:space="preserve">the flags used for opening the module. This can be the
  154. logical OR of any of the #GModuleFlags</doc>
  155. <type name="ModuleFlags" c:type="GModuleFlags"/>
  156. </parameter>
  157. </parameters>
  158. </function>
  159. <function name="supported" c:identifier="g_module_supported">
  160. <doc xml:space="preserve">Checks if modules are supported on the current platform.</doc>
  161. <return-value transfer-ownership="none">
  162. <doc xml:space="preserve">%TRUE if modules are supported</doc>
  163. <type name="gboolean" c:type="gboolean"/>
  164. </return-value>
  165. </function>
  166. </record>
  167. <callback name="ModuleCheckInit" c:type="GModuleCheckInit">
  168. <doc xml:space="preserve">Specifies the type of the module initialization function.
  169. If a module contains a function named g_module_check_init() it is called
  170. automatically when the module is loaded. It is passed the #GModule structure
  171. and should return %NULL on success or a string describing the initialization
  172. error.</doc>
  173. <return-value transfer-ownership="none">
  174. <doc xml:space="preserve">%NULL on success, or a string describing the initialization error</doc>
  175. <type name="utf8" c:type="const gchar*"/>
  176. </return-value>
  177. <parameters>
  178. <parameter name="module" transfer-ownership="none">
  179. <doc xml:space="preserve">the #GModule corresponding to the module which has just been loaded</doc>
  180. <type name="Module" c:type="GModule*"/>
  181. </parameter>
  182. </parameters>
  183. </callback>
  184. <bitfield name="ModuleFlags" c:type="GModuleFlags">
  185. <doc xml:space="preserve">Flags passed to g_module_open().
  186. Note that these flags are not supported on all platforms.</doc>
  187. <member name="lazy" value="1" c:identifier="G_MODULE_BIND_LAZY">
  188. <doc xml:space="preserve">specifies that symbols are only resolved when
  189. needed. The default action is to bind all symbols when the module
  190. is loaded.</doc>
  191. </member>
  192. <member name="local" value="2" c:identifier="G_MODULE_BIND_LOCAL">
  193. <doc xml:space="preserve">specifies that symbols in the module should
  194. not be added to the global name space. The default action on most
  195. platforms is to place symbols in the module in the global name space,
  196. which may cause conflicts with existing symbols.</doc>
  197. </member>
  198. <member name="mask" value="3" c:identifier="G_MODULE_BIND_MASK">
  199. <doc xml:space="preserve">mask for all flags.</doc>
  200. </member>
  201. </bitfield>
  202. <callback name="ModuleUnload" c:type="GModuleUnload">
  203. <doc xml:space="preserve">Specifies the type of the module function called when it is unloaded.
  204. If a module contains a function named g_module_unload() it is called
  205. automatically when the module is unloaded.
  206. It is passed the #GModule structure.</doc>
  207. <return-value transfer-ownership="none">
  208. <type name="none" c:type="void"/>
  209. </return-value>
  210. <parameters>
  211. <parameter name="module" transfer-ownership="none">
  212. <doc xml:space="preserve">the #GModule about to be unloaded</doc>
  213. <type name="Module" c:type="GModule*"/>
  214. </parameter>
  215. </parameters>
  216. </callback>
  217. <function name="module_build_path"
  218. c:identifier="g_module_build_path"
  219. moved-to="Module.build_path">
  220. <doc xml:space="preserve">A portable way to build the filename of a module. The platform-specific
  221. prefix and suffix are added to the filename, if needed, and the result
  222. is added to the directory, using the correct separator character.
  223. The directory should specify the directory where the module can be found.
  224. It can be %NULL or an empty string to indicate that the module is in a
  225. standard platform-specific directory, though this is not recommended
  226. since the wrong module may be found.
  227. For example, calling g_module_build_path() on a Linux system with a
  228. @directory of `/lib` and a @module_name of "mylibrary" will return
  229. `/lib/libmylibrary.so`. On a Windows system, using `\Windows` as the
  230. directory it will return `\Windows\mylibrary.dll`.</doc>
  231. <return-value transfer-ownership="full">
  232. <doc xml:space="preserve">the complete path of the module, including the standard library
  233. prefix and suffix. This should be freed when no longer needed</doc>
  234. <type name="utf8" c:type="gchar*"/>
  235. </return-value>
  236. <parameters>
  237. <parameter name="directory"
  238. transfer-ownership="none"
  239. nullable="1"
  240. allow-none="1">
  241. <doc xml:space="preserve">the directory where the module is. This can be
  242. %NULL or the empty string to indicate that the standard platform-specific
  243. directories will be used, though that is not recommended</doc>
  244. <type name="utf8" c:type="const gchar*"/>
  245. </parameter>
  246. <parameter name="module_name" transfer-ownership="none">
  247. <doc xml:space="preserve">the name of the module</doc>
  248. <type name="utf8" c:type="const gchar*"/>
  249. </parameter>
  250. </parameters>
  251. </function>
  252. <function name="module_error"
  253. c:identifier="g_module_error"
  254. moved-to="Module.error">
  255. <doc xml:space="preserve">Gets a string describing the last module error.</doc>
  256. <return-value transfer-ownership="none">
  257. <doc xml:space="preserve">a string describing the last module error</doc>
  258. <type name="utf8" c:type="const gchar*"/>
  259. </return-value>
  260. </function>
  261. <function name="module_supported"
  262. c:identifier="g_module_supported"
  263. moved-to="Module.supported">
  264. <doc xml:space="preserve">Checks if modules are supported on the current platform.</doc>
  265. <return-value transfer-ownership="none">
  266. <doc xml:space="preserve">%TRUE if modules are supported</doc>
  267. <type name="gboolean" c:type="gboolean"/>
  268. </return-value>
  269. </function>
  270. </namespace>
  271. </repository>