/src/wrappers/gobject/library/g_closure.e

http://github.com/tybor/Liberty · Specman e · 1125 lines · 258 code · 297 blank · 570 comment · 0 complexity · 523f273d8230f92334ce0f58e906588d MD5 · raw file

  1. indexing
  2. description: " Closures - Functions as first-class objects."
  3. copyright: "(C) 2006 Paolo Redaelli "
  4. license: "LGPL v2 or later"
  5. date: "$Date:$"
  6. revision: "$Revision:$"
  7. deferred class G_CLOSURE
  8. -- A GClosure represents a callback supplied by the programmer. It
  9. -- will generally comprise a function of some kind and a marshaller
  10. -- used to call it. It is the reponsibility of the marshaller to
  11. -- convert the arguments for the invocation from GValues into a
  12. -- suitable form, perform the callback on the converted arguments,
  13. -- and transform the return value back into a GValue.
  14. -- In the case of C programs, a closure usually just holds a
  15. -- pointer to a function and maybe a data argument, and the
  16. -- marshaller converts between GValue and native C types. The
  17. -- GObject library provides the GCClosure type for this
  18. -- purpose. Bindings for other languages need marshallers which
  19. -- convert between GValues and suitable representations in the
  20. -- runtime of the language in order to use functions written in
  21. -- that languages as callbacks.
  22. -- Within GObject, closures play an important role in the
  23. -- implementation of signals. When a signal is registered, the
  24. -- c_marshaller argument to g_signal_new() specifies the default C
  25. -- marshaller for any closure which is connected to this
  26. -- signal. GObject provides a number of C marshallers for this
  27. -- purpose, see the g_cclosure_marshal_*() functions. Additional C
  28. -- marshallers can be generated with the glib-genmarshal
  29. -- utility. Closures can be explicitly connected to signals with
  30. -- g_signal_connect_closure(), but it usually more convenient to
  31. -- let GObject create a closure automatically by using one of the
  32. -- g_signal_connect_*() functions which take a callback
  33. -- function/user data pair.
  34. -- Using closures has a number of important advantages over a
  35. -- simple callback function/data pointer combination:
  36. -- o Closures allow the callee to get the types of the callback
  37. -- parameters, which means that language bindings don't have to
  38. -- write individual glue for each callback type.
  39. -- o The reference counting of GClosure makes it easy to handle
  40. -- reentrancy right; if a callback is removed while it is being
  41. -- invoked, the closure and it's parameters won't be freed until
  42. -- the invocation finishes.
  43. -- o g_closure_invalidate() and invalidation notifiers allow
  44. -- callbacks to be automatically removed when the objects they
  45. -- point to go away.
  46. inherit
  47. C_STRUCT
  48. feature -- Callback pointer
  49. callback_pointer: POINTER is
  50. -- The address of the actual Eiffel callback feature
  51. -- `function'. Even if the body of this feature is common to
  52. -- all heirs it must be nevertheless made deferred. The
  53. -- actual body is:
  54. -- callback_pointer: POINTER is
  55. -- do
  56. -- Result := get_callback_pointer ($callback)
  57. -- ensure Result.is_not_null
  58. -- end
  59. -- But callback coulnd't be declared here because it must
  60. -- follow the actual signature of the corresponding C signal
  61. -- callback feature. So even this feature must be deferred.
  62. deferred
  63. end
  64. object: G_OBJECT
  65. feature -- Creation
  66. link_to (an_object: like object) is
  67. -- Creates a new closure which invokes 'callback'
  68. -- TODO: add destroy_notify callback support
  69. require valid_object: an_object /= Void
  70. do
  71. debug
  72. print (generating_type) print(".connect (an_object=") print (an_object.to_pointer.to_string)
  73. print (" an_object.handle=") print (an_object.handle.to_string)
  74. print (") Current=") print (to_pointer.to_string)
  75. print (" Current.handle=") print (handle.to_string)
  76. print ("%N")
  77. end
  78. -- Note: the following implementation will make the C
  79. -- GClosure to call Eiffel's `callback' feature of
  80. -- `Current'. We pass the address of callback and of Current,
  81. -- which no destroy_callback since the user_data, which is
  82. -- actually a pointer to Current is handled by the Eiffel
  83. -- garbage collector.
  84. object := an_object
  85. handle := g_cclosure_new_swap (callback_pointer,
  86. $object, -- as user_data
  87. default_pointer -- i.e.: NULL as destroy callback
  88. )
  89. -- g_cclosure_new_swap creates a new closure which invokes
  90. -- callback_func with user_data with user_data as the first
  91. -- parameter. Note: this exchange is necessary to allow us to
  92. -- directly call Eiffel features, which *require* the address
  93. -- of Current as the first parameter. Paolo 2006-04-12
  94. -- This is needed to avoid long term GC bugs. The ref is required
  95. -- To notify that we have an owned reference to the closure.
  96. -- The sink is to remove the default unowned reference
  97. -- ** trixx, 20060721
  98. ref
  99. sink
  100. -- see also g_cclosure_new that creates a new closure which
  101. -- invokes callback_func with user_data with user_data as the
  102. -- last parameter.
  103. -- callback_func : the function to invoke
  104. -- user_data : user data to pass to callback_func
  105. -- destroy_data : destroy notify to be called when user_data is no longer used
  106. -- Returns : a new GCClosure
  107. end
  108. -- g_cclosure_new_object ()
  109. -- GClosure* g_cclosure_new_object (callback_func: POINTER,
  110. -- an_object: POINTER);
  111. -- A variant of g_cclosure_new() which uses object as user_data and
  112. -- calls g_object_watch_closure() on object and the created
  113. -- closure. This function is useful when you have a callback
  114. -- closely associated with a GObject, and want the callback to no
  115. -- longer run after the object is is freed.
  116. -- callback_func : the function to invoke object : a GObject
  117. -- pointer to pass to callback_func Returns : a new GCClosure
  118. -- g_cclosure_new_object_swap ()
  119. -- GClosure* g_cclosure_new_object_swap (callback_func: POINTER,
  120. -- an_object: POINTER);
  121. -- A variant of g_cclosure_new_swap() which uses object as
  122. -- user_data and calls g_object_watch_closure() on object and the
  123. -- created closure. This function is useful when you have a
  124. -- callback closely associated with a -- GObject, and want the
  125. -- callback to no longer run after the object is is freed.
  126. -- callback_func : the function to invoke object : a GObject
  127. -- pointer to pass to callback_func Returns : a new GCClosure
  128. -- g_closure_new_object ()
  129. -- GClosure* g_closure_new_object (guint sizeof_closure, an_object: POINTER);
  130. -- A variant of g_closure_new_simple() which stores object in the data field of the closure and calls
  131. -- g_object_watch_closure() on object and the created closure. This function is mainly useful when implementing
  132. -- new types of closures.
  133. -- sizeof_closure : the size of the structure to allocate, must be at least sizeof (GClosure)
  134. -- object : a GObject pointer to store in the data field of the newly allocated GClosure
  135. -- Returns : a newly allocated GClosure
  136. -- --------------------------------------------------------------------------------------------------------
  137. feature -- Reference counting and memory handling
  138. ref is
  139. local ptr: POINTER
  140. do
  141. ptr := g_closure_ref (handle)
  142. -- g_closure_ref returns the closure passed in, for
  143. -- convenience
  144. end
  145. unref is
  146. -- Decrements the reference count of a closure after it was
  147. -- previously incremented by the same caller. If no other
  148. -- callers are using the closure, then the closure will be
  149. -- destroyed and freed.
  150. do
  151. g_closure_unref (handle)
  152. end
  153. sink is
  154. -- Takes over the initial ownership of a closure. Each
  155. -- closure is initially created in afloating state, which
  156. -- means that the initial reference count is not owned by any
  157. -- caller. 'sink' checks to see if the object is still
  158. -- floating, and if so, unsets the floating state and
  159. -- decreases the reference count
  160. -- TODO: Eiffelize the rest of the documentation of this
  161. -- feature which include a C example. Paolo 2006-04-12
  162. do
  163. g_closure_sink (handle)
  164. -- Takes over the initial ownership of a closure. Each
  165. -- closure is initially created in afloating state, which
  166. -- means that the initial reference count is not owned by
  167. -- any caller. g_closure_sink() checks to see if the
  168. -- object is still floating, and if so, unsets the
  169. -- floating state and decreases the reference count. If
  170. -- the closure is not floating, g_closure_sink() does
  171. -- nothing. The reason for the existance of the floating
  172. -- state -- is to prevent cumbersome code sequences like:
  173. -- closure = g_cclosure_new (cb_func, cb_data);
  174. -- g_source_set_closure (source, closure);
  175. -- g_closure_unref (closure); /* XXX GObject doesn't really need this */
  176. -- Because g_source_set_closure() (and similar functions)
  177. -- take ownership of the initial reference count, if it --
  178. -- is unowned, we instead can write:
  179. -- g_source_set_closure (source, g_cclosure_new (cb_func, cb_data));
  180. -- Generally, this function is used together with
  181. -- g_closure_ref(). Ane example of storing a closure for
  182. -- later -- notification looks like:
  183. -- static GClosure *notify_closure = NULL;
  184. -- void
  185. -- foo_notify_set_closure (a_closure: POINTER)
  186. -- {
  187. -- if (notify_closure)
  188. -- g_closure_unref (notify_closure);
  189. -- notify_closure = closure;
  190. -- if (notify_closure)
  191. -- {
  192. -- g_closure_ref (notify_closure);
  193. -- g_closure_sink (notify_closure);
  194. -- }
  195. -- }
  196. -- Because g_closure_sink() may decrement the reference count of a closure (if it hasn't been called on closure
  197. -- yet) just like g_closure_unref(), g_closure_ref() should be called prior to this function.
  198. -- closure : GClosure to decrement the initial reference count on, if it's still being held
  199. end
  200. dispose is
  201. do
  202. -- Note: memory handling is done by gobject
  203. unref
  204. handle:=default_pointer
  205. end
  206. feature -- Invoking
  207. invoke (some_parameters: G_VALUE_ARRAY): G_VALUE is
  208. -- Invokes the closure, i.e. executes the callback
  209. -- represented by the closure.
  210. -- Heirs of G_CLOSURE which will implements callback for more
  211. -- specific closures. Note: the previous could be wrong.
  212. -- Paolo 2006-04-26
  213. require valid_parameters: some_parameters /= Void
  214. do
  215. create Result.make
  216. g_closure_invoke (handle, Result.handle,
  217. some_parameters.count, some_parameters.to_external,
  218. default_pointer -- invocation_hint : a context-dependent invocation hint
  219. )
  220. -- closure : a GClosure return_value : a GValue to store the
  221. -- return value. May be NULL if the callback of closure
  222. -- doesn't return a value. n_param_values : the length of
  223. -- the param_values array param_values : an array of GValues
  224. -- holding the arguments on which to invoke the callback of
  225. -- closure --
  226. end
  227. -- --------------------------------------------------------------------------------------------------------
  228. -- g_closure_invalidate ()
  229. -- void g_closure_invalidate (a_closure: POINTER);
  230. -- Sets a flag on the closure to indicate that it's calling environment has become invalid, and thus causes any
  231. -- future invocations of g_closure_invoke() on this closure to be ignored. Also, invalidation notifiers
  232. -- installed on the closure will be called at this point. Note that unless you are holding a reference to the
  233. -- closure yourself, the invalidation notifiers may unref the closure and cause it to be destroyed, so if you
  234. -- need to access the closure after calling g_closure_invalidate(), make sure that you've previously called
  235. -- g_closure_ref().
  236. -- Note that g_closure_invalidate() will also be called when the reference count of a closure drops to zero
  237. -- (unless it has already been invalidated before).
  238. -- closure : GClosure to invalidate
  239. -- --------------------------------------------------------------------------------------------------------
  240. -- g_closure_add_finalize_notifier ()
  241. -- void g_closure_add_finalize_notifier (a_closure: POINTER, notify_data: POINTER, notify_func: POINTER);
  242. -- Registers a finalization notifier which will be called when the reference count of closure goes down to 0.
  243. -- Multiple finalization notifiers on a single closure are invoked in unspecified order. If a single call to
  244. -- g_closure_unref() results in the closure being both invalidated and finalized, then the invalidate notifiers
  245. -- will be run before the finalize notifiers.
  246. -- closure : a GClosure
  247. -- notify_data : data to pass to notify_func
  248. -- notify_func : the callback function to register
  249. -- --------------------------------------------------------------------------------------------------------
  250. -- g_closure_add_invalidate_notifier ()
  251. -- void g_closure_add_invalidate_notifier
  252. -- (a_closure: POINTER, notify_data: POINTER, notify_func: POINTER);
  253. -- Registers an invalidation notifier which will be called when the closure is invalidated with
  254. -- g_closure_invalidate(). Invalidation notifiers are invoked before finalization notifiers, in an unspecified
  255. -- order.
  256. -- closure : a GClosure
  257. -- notify_data : data to pass to notify_func
  258. -- notify_func : the callback function to register
  259. -- --------------------------------------------------------------------------------------------------------
  260. -- g_closure_remove_finalize_notifier ()
  261. -- void g_closure_remove_finalize_notifier
  262. -- (a_closure: POINTER, notify_data: POINTER, notify_func: POINTER);
  263. -- Removes a finalization notifier. Notifiers are automatically removed after they are run.
  264. -- closure : a GClosure
  265. -- notify_data : data which was passed to g_closure_add_finalize_notifier() when registering notify_func
  266. -- notify_func : the callback function to remove
  267. -- --------------------------------------------------------------------------------------------------------
  268. -- g_closure_remove_invalidate_notifier ()
  269. -- void g_closure_remove_invalidate_notifier
  270. -- (a_closure: POINTER, notify_data: POINTER, notify_func: POINTER);
  271. -- Removes a invalidation notifier. Notifiers are automatically removed after they are run.
  272. -- closure : a GClosure
  273. -- notify_data : data which was passed to g_closure_add_invalidate_notifier() when registering notify_func
  274. -- notify_func : the callback function to remove
  275. -- --------------------------------------------------------------------------------------------------------
  276. -- g_closure_new_simple ()
  277. -- GClosure* g_closure_new_simple (guint sizeof_closure, data: POINTER);
  278. -- Allocates a struct of the given size and initializes the initial part as a GClosure. This function is mainly
  279. -- useful when implementing new types of closures.
  280. -- typedef struct _MyClosure MyClosure;
  281. -- struct _MyClosure
  282. -- {
  283. -- GClosure closure;
  284. -- /* extra data goes here */
  285. -- };
  286. -- static void
  287. -- my_closure_finalize (notify_data: POINTER, a_closure: POINTER)
  288. -- {
  289. -- MyClosure *my_closure = (MyClosure *)closure;
  290. -- /* free extra data here */
  291. -- }
  292. -- MyClosure *my_closure_new (data: POINTER)
  293. -- {
  294. -- a_closure: POINTER;
  295. -- MyClosure *my_closure;
  296. -- closure = g_closure_new_simple (sizeof (MyClosure), data);
  297. -- my_closure = (MyClosure *) closure;
  298. -- / initialize extra data here */
  299. -- g_closure_add_finalize_notifier (closure, notify_data, my_closure_finalize);
  300. -- return my_closure;
  301. -- }
  302. -- sizeof_closure : the size of the structure to allocate, must be at least sizeof (GClosure)
  303. -- data : data to store in the data field of the newly allocated GClosure
  304. -- Returns : a newly allocated GClosure
  305. -- --------------------------------------------------------------------------------------------------------
  306. -- g_closure_set_marshal ()
  307. -- void g_closure_set_marshal (a_closure: POINTER, GClosureMarshal marshal);
  308. -- Sets the marshaller of closure. The marshal_data provides a way for a meta marshaller to provide additional
  309. -- information to the marshaller. (See g_closure_set_meta_marshal().) For GObject's C predefined marshallers
  310. -- (the g_cclosure_marshal_*() functions), what it provides is a callback function to use instead of
  311. -- closure->callback.
  312. -- closure : a GClosure
  313. -- marshal : a GClosureMarshal function
  314. -- --------------------------------------------------------------------------------------------------------
  315. -- g_closure_add_marshal_guards ()
  316. -- void g_closure_add_marshal_guards (a_closure: POINTER, pre_marshal_data: POINTER, pre_marshal_notify: POINTER, post_marshal_data: POINTER, post_marshal_notify: POINTER);
  317. -- Adds a pair of notifiers which get invoked before and after the closure callback, respectively. This is
  318. -- typically used to protect the extra arguments for the duration of the callback. See g_object_watch_closure()
  319. -- for an example of marshal guards.
  320. -- closure : a GClosure
  321. -- pre_marshal_data : data to pass to pre_marshal_notify
  322. -- pre_marshal_notify : a function to call before the closure callback
  323. -- post_marshal_data : data to pass to post_marshal_notify
  324. -- post_marshal_notify : a function to call after the closure callback
  325. -- --------------------------------------------------------------------------------------------------------
  326. -- g_closure_set_meta_marshal ()
  327. -- void g_closure_set_meta_marshal (a_closure: POINTER, marshal_data: POINTER, GClosureMarshal meta_marshal);
  328. -- Sets the meta marshaller of closure. A meta marshaller wraps closure->marshal and modifies the way it is
  329. -- called in some fashion. The most common use of this facility is for C callbacks. The same marshallers
  330. -- (generated by glib-genmarshal) are used everywhere, but the way that we get the callback function differs.
  331. -- In most cases we want to use closure->callback, but in other cases we want to use use some different
  332. -- technique to retrieve the callbakc function.
  333. -- For example, class closures for signals (see g_signal_type_cclosure_new()) retrieve the callback function
  334. -- from a fixed offset in the class structure. The meta marshaller retrieves the right callback and passes it
  335. -- to the marshaller as the marshal_data argument.
  336. -- closure : a GClosure
  337. -- marshal_data : context-depend
  338. -- ent data to pass to meta_marshal
  339. -- meta_marshal : a GClosureMarshal function
  340. -- --------------------------------------------------------------------------------------------------------
  341. -- g_source_set_closure ()
  342. -- void g_source_set_closure (GSource *source, a_closure: POINTER);
  343. -- Set the callback for a source as a GClosure.
  344. -- If the source is not one of the standard GLib types, the closure_callback and closure_marshal fields of the
  345. -- GSourceFuncs structure must have been filled in with pointers to appropriate functions.
  346. -- source : the source
  347. -- closure : a GClosure
  348. -- --------------------------------------------------------------------------------------------------------
  349. -- G_TYPE_IO_CHANNEL
  350. -- #define G_TYPE_IO_CHANNEL (g_io_channel_get_type ())
  351. -- The GType for GIOChannel.
  352. -- --------------------------------------------------------------------------------------------------------
  353. -- G_TYPE_IO_CONDITION
  354. -- #define G_TYPE_IO_CONDITION (g_io_condition_get_type ())
  355. -- The GType for GIOCondition.
  356. -- --------------------------------------------------------------------------------------------------------
  357. -- g_cclosure_marshal_VOID__VOID ()
  358. -- void g_cclosure_marshal_VOID__VOID (a_closure: POINTER, GValue *return_value, guint n_param_values, const GValue *param_values, invocation_hint: POINTER, marshal_data: POINTER);
  359. -- A marshaller for a GCClosure with a callback of type void (*callback) (instance: POINTER, gpointer
  360. -- user_data).
  361. -- closure : the GClosure to which the marshaller belongs
  362. -- return_value : ignored
  363. -- n_param_values : 1
  364. -- param_values : a GValue array holding only the instance
  365. -- invocation_hint : the invocation hint given as the the last argument to g_closure_invoke()
  366. -- marshal_data : additional data specified when registering the marshaller
  367. -- --------------------------------------------------------------------------------------------------------
  368. -- g_cclosure_marshal_VOID__BOOLEAN ()
  369. -- void g_cclosure_marshal_VOID__BOOLEAN
  370. -- (a_closure: POINTER, GValue *return_value, guint n_param_values, const GValue *param_values, invocation_hint: POINTER, marshal_data: POINTER);
  371. -- A marshaller for a GCClosure with a callback of type void (*callback) (instance: POINTER, gboolean arg1, user_data: POINTER).
  372. -- closure : the GClosure to which the marshaller belongs
  373. -- return_value : ignored
  374. -- n_param_values : 2
  375. -- param_values : a GValue array holding the instance and the gboolean parameter
  376. -- invocation_hint : the invocation hint given as the the last argument to g_closure_invoke()
  377. -- marshal_data : additional data specified when registering the marshaller
  378. -- --------------------------------------------------------------------------------------------------------
  379. -- g_cclosure_marshal_VOID__CHAR ()
  380. -- void g_cclosure_marshal_VOID__CHAR (a_closure: POINTER, GValue *return_value, guint n_param_values, const GValue *param_values, invocation_hint: POINTER, marshal_data: POINTER);
  381. -- A marshaller for a GCClosure with a callback of type void (*callback) (instance: POINTER, gchar arg1, user_data: POINTER).
  382. -- closure : the GClosure to which the marshaller belongs
  383. -- return_value : ignored
  384. -- n_param_values : 2
  385. -- param_values : a GValue array holding the instance and the gchar parameter
  386. -- invocation_hint : the invocation hint given as the the last argument to g_closure_invoke()
  387. -- marshal_data : additional data specified when registering the marshaller
  388. -- --------------------------------------------------------------------------------------------------------
  389. -- g_cclosure_marshal_VOID__UCHAR ()
  390. -- void g_cclosure_marshal_VOID__UCHAR (a_closure: POINTER, GValue *return_value, guint n_param_values, const GValue *param_values, invocation_hint: POINTER, marshal_data: POINTER);
  391. -- A marshaller for a GCClosure with a callback of type void (*callback) (instance: POINTER, guchar arg1, user_data: POINTER).
  392. -- closure : the GClosure to which the marshaller belongs
  393. -- return_value : ignored
  394. -- n_param_values : 2
  395. -- param_values : a GValue array holding the instance and the guchar parameter
  396. -- invocation_hint : the invocation hint given as the the last argument to g_closure_invoke()
  397. -- marshal_data : additional data specified when registering the marshaller
  398. -- --------------------------------------------------------------------------------------------------------
  399. -- g_cclosure_marshal_VOID__INT ()
  400. -- void g_cclosure_marshal_VOID__INT (a_closure: POINTER, GValue *return_value, guint n_param_values, const GValue *param_values, invocation_hint: POINTER, marshal_data: POINTER);
  401. -- A marshaller for a GCClosure with a callback of type void (*callback) (instance: POINTER, gint arg1, user_data: POINTER).
  402. -- closure : the GClosure to which the marshaller belongs
  403. -- return_value : ignored
  404. -- n_param_values : 2
  405. -- param_values : a GValue array holding the instance and the gint parameter
  406. -- invocation_hint : the invocation hint given as the the last argument to g_closure_invoke()
  407. -- marshal_data : additional data specified when registering the marshaller
  408. -- --------------------------------------------------------------------------------------------------------
  409. -- g_cclosure_marshal_VOID__UINT ()
  410. -- void g_cclosure_marshal_VOID__UINT (a_closure: POINTER, GValue *return_value, guint n_param_values, const GValue *param_values, invocation_hint: POINTER, marshal_data: POINTER);
  411. -- A marshaller for a GCClosure with a callback of type void (*callback) (instance: POINTER, guint arg1, user_data: POINTER).
  412. -- closure : the GClosure to which the marshaller belongs
  413. -- return_value : ignored
  414. -- n_param_values : 2
  415. -- param_values : a GValue array holding the instance and the guint parameter
  416. -- invocation_hint : the invocation hint given as the the last argument to g_closure_invoke()
  417. -- marshal_data : additional data specified when registering the marshaller
  418. -- --------------------------------------------------------------------------------------------------------
  419. -- g_cclosure_marshal_VOID__LONG ()
  420. -- void g_cclosure_marshal_VOID__LONG (a_closure: POINTER, GValue *return_value, guint n_param_values, const GValue *param_values, invocation_hint: POINTER, marshal_data: POINTER);
  421. -- A marshaller for a GCClosure with a callback of type void (*callback) (instance: POINTER, glong arg1, user_data: POINTER).
  422. -- closure : the GClosure to which the marshaller belongs
  423. -- return_value : ignored
  424. -- n_param_values : 2
  425. -- param_values : a GValue array holding the instance and the glong parameter
  426. -- invocation_hint : the invocation hint given as the the last argument to g_closure_invoke()
  427. -- marshal_data : additional data specified when registering the marshaller
  428. -- --------------------------------------------------------------------------------------------------------
  429. -- g_cclosure_marshal_VOID__ULONG ()
  430. -- void g_cclosure_marshal_VOID__ULONG (a_closure: POINTER, GValue *return_value, guint n_param_values, const GValue *param_values, invocation_hint: POINTER, marshal_data: POINTER);
  431. -- A marshaller for a GCClosure with a callback of type void (*callback) (instance: POINTER, gulong arg1, user_data: POINTER).
  432. -- closure : the GClosure to which the marshaller belongs
  433. -- return_value : ignored
  434. -- n_param_values : 2
  435. -- param_values : a GValue array holding the instance and the gulong parameter
  436. -- invocation_hint : the invocation hint given as the the last argument to g_closure_invoke()
  437. -- marshal_data : additional data specified when registering the marshaller
  438. -- --------------------------------------------------------------------------------------------------------
  439. -- g_cclosure_marshal_VOID__ENUM ()
  440. -- void g_cclosure_marshal_VOID__ENUM (a_closure: POINTER, GValue *return_value, guint n_param_values, const GValue *param_values, invocation_hint: POINTER, marshal_data: POINTER);
  441. -- A marshaller for a GCClosure with a callback of type void (*callback) (instance: POINTER, gint arg1, user_data: POINTER) where the gint parameter denotes an enumeration type..
  442. -- closure : the GClosure to which the marshaller belongs
  443. -- return_value : ignored
  444. -- n_param_values : 2
  445. -- param_values : a GValue array holding the instance and the enumeration parameter
  446. -- invocation_hint : the invocation hint given as the the last argument to g_closure_invoke()
  447. -- marshal_data : additional data specified when registering the marshaller
  448. -- --------------------------------------------------------------------------------------------------------
  449. -- g_cclosure_marshal_VOID__FLAGS ()
  450. -- void g_cclosure_marshal_VOID__FLAGS (a_closure: POINTER, GValue *return_value, guint n_param_values, const GValue *param_values, invocation_hint: POINTER, marshal_data: POINTER);
  451. -- A marshaller for a GCClosure with a callback of type void (*callback) (instance: POINTER, gint arg1, user_data: POINTER) where the gint parameter denotes a flags type denotes a flags type.
  452. -- closure : the GClosure to which the marshaller belongs
  453. -- return_value : ignored
  454. -- n_param_values : 2
  455. -- param_values : a GValue array holding the instance and the flags parameter
  456. -- invocation_hint : the invocation hint given as the the last argument to g_closure_invoke()
  457. -- marshal_data : additional data specified when registering the marshaller
  458. -- --------------------------------------------------------------------------------------------------------
  459. -- g_cclosure_marshal_VOID__FLOAT ()
  460. -- void g_cclosure_marshal_VOID__FLOAT (a_closure: POINTER, GValue *return_value, guint n_param_values, const GValue *param_values, invocation_hint: POINTER, marshal_data: POINTER);
  461. -- A marshaller for a GCClosure with a callback of type void (*callback) (instance: POINTER, gfloat arg1, user_data: POINTER).
  462. -- closure : the GClosure to which the marshaller belongs
  463. -- return_value : ignored
  464. -- n_param_values : 2
  465. -- param_values : a GValue array holding the instance and the gfloat parameter
  466. -- invocation_hint : the invocation hint given as the the last argument to g_closure_invoke()
  467. -- marshal_data : additional data specified when registering the marshaller
  468. -- --------------------------------------------------------------------------------------------------------
  469. -- g_cclosure_marshal_VOID__DOUBLE ()
  470. -- void g_cclosure_marshal_VOID__DOUBLE (a_closure: POINTER, GValue *return_value, guint n_param_values, const GValue *param_values, invocation_hint: POINTER, marshal_data: POINTER);
  471. -- A marshaller for a GCClosure with a callback of type void (*callback) (instance: POINTER, gdouble arg1, user_data: POINTER).
  472. -- closure : the GClosure to which the marshaller belongs
  473. -- return_value : ignored
  474. -- n_param_values : 2
  475. -- param_values : a GValue array holding the instance and the gdouble parameter
  476. -- invocation_hint : the invocation hint given as the the last argument to g_closure_invoke()
  477. -- marshal_data : additional data specified when registering the marshaller
  478. -- --------------------------------------------------------------------------------------------------------
  479. -- g_cclosure_marshal_VOID__STRING ()
  480. -- void g_cclosure_marshal_VOID__STRING (a_closure: POINTER, GValue *return_value, guint n_param_values, const GValue *param_values, invocation_hint: POINTER, marshal_data: POINTER);
  481. -- A marshaller for a GCClosure with a callback of type void (*callback) (instance: POINTER, const gchar *arg1, user_data: POINTER).
  482. -- closure : the GClosure to which the marshaller belongs
  483. -- return_value : ignored
  484. -- n_param_values : 2
  485. -- param_values : a GValue array holding the instance and the gchar* parameter
  486. -- invocation_hint : the invocation hint given as the the last argument to g_closure_invoke()
  487. -- marshal_data : additional data specified when registering the marshaller
  488. -- --------------------------------------------------------------------------------------------------------
  489. -- g_cclosure_marshal_VOID__PARAM ()
  490. -- void g_cclosure_marshal_VOID__PARAM (a_closure: POINTER, GValue *return_value, guint n_param_values, const GValue *param_values, invocation_hint: POINTER, marshal_data: POINTER);
  491. -- A marshaller for a GCClosure with a callback of type void (*callback) (instance: POINTER, GParamSpec *arg1, user_data: POINTER).
  492. -- closure : the GClosure to which the marshaller belongs
  493. -- return_value : ignored
  494. -- n_param_values : 2
  495. -- param_values : a GValue array holding the instance and the GParamSpec* parameter
  496. -- invocation_hint : the invocation hint given as the the last argument to g_closure_invoke()
  497. -- marshal_data : additional data specified when registering the marshaller
  498. -- --------------------------------------------------------------------------------------------------------
  499. -- g_cclosure_marshal_VOID__BOXED ()
  500. -- void g_cclosure_marshal_VOID__BOXED (a_closure: POINTER, GValue *return_value, guint n_param_values, const GValue *param_values, invocation_hint: POINTER, marshal_data: POINTER);
  501. -- A marshaller for a GCClosure with a callback of type void (*callback) (instance: POINTER, GBoxed *arg1, user_data: POINTER).
  502. -- closure : the GClosure to which the marshaller belongs
  503. -- return_value : ignored
  504. -- n_param_values : 2
  505. -- param_values : a GValue array holding the instance and the GBoxed* parameter
  506. -- invocation_hint : the invocation hint given as the the last argument to g_closure_invoke()
  507. -- marshal_data : additional data specified when registering the marshaller
  508. -- --------------------------------------------------------------------------------------------------------
  509. -- g_cclosure_marshal_VOID__POINTER ()
  510. -- void g_cclosure_marshal_VOID__POINTER
  511. -- (a_closure: POINTER, GValue *return_value, guint n_param_values, const GValue *param_values, invocation_hint: POINTER, marshal_data: POINTER);
  512. -- A marshaller for a GCClosure with a callback of type void (*callback) (instance: POINTER, arg: POINTER1, user_data: POINTER).
  513. -- closure : the GClosure to which the marshaller belongs
  514. -- return_value : ignored
  515. -- n_param_values : 2
  516. -- param_values : a GValue array holding the instance and the parameter: POINTER
  517. -- invocation_hint : the invocation hint given as the the last argument to g_closure_invoke()
  518. -- marshal_data : additional data specified when registering the marshaller
  519. -- --------------------------------------------------------------------------------------------------------
  520. -- g_cclosure_marshal_VOID__OBJECT ()
  521. -- void g_cclosure_marshal_VOID__OBJECT (a_closure: POINTER, GValue *return_value, guint n_param_values, const GValue *param_values, invocation_hint: POINTER, marshal_data: POINTER);
  522. -- A marshaller for a GCClosure with a callback of type void (*callback) (instance: POINTER, GOBject *arg1, user_data: POINTER).
  523. -- closure : the GClosure to which the marshaller belongs
  524. -- return_value : ignored
  525. -- n_param_values : 2
  526. -- param_values : a GValue array holding the instance and the GObject* parameter
  527. -- invocation_hint : the invocation hint given as the the last argument to g_closure_invoke()
  528. -- marshal_data : additional data specified when registering the marshaller
  529. -- --------------------------------------------------------------------------------------------------------
  530. -- g_cclosure_marshal_STRING__OBJECT_POINTER ()
  531. -- void g_cclosure_marshal_STRING__OBJECT_POINTER
  532. -- (a_closure: POINTER, GValue *return_value, guint n_param_values, const GValue *param_values, invocation_hint: POINTER, marshal_data: POINTER);
  533. -- A marshaller for a GCClosure with a callback of type void (*callback) (instance: POINTER, GObject *arg1, arg: POINTER2, user_data: POINTER).
  534. -- closure : the GClosure to which the marshaller belongs
  535. -- return_value : ignored
  536. -- n_param_values : 3
  537. -- param_values : a GValue array holding instance, arg1 and arg2
  538. -- invocation_hint : the invocation hint given as the the last argument to g_closure_invoke()
  539. -- marshal_data : additional data specified when registering the marshaller
  540. -- --------------------------------------------------------------------------------------------------------
  541. -- g_cclosure_marshal_VOID__UINT_POINTER ()
  542. -- void g_cclosure_marshal_VOID__UINT_POINTER
  543. -- (a_closure: POINTER, GValue *return_value, guint n_param_values, const GValue *param_values, invocation_hint: POINTER, marshal_data: POINTER);
  544. -- A marshaller for a GCClosure with a callback of type void (*callback) (instance: POINTER, guint arg1, arg: POINTER2, user_data: POINTER).
  545. -- closure : the GClosure to which the marshaller belongs
  546. -- return_value : ignored
  547. -- n_param_values : 3
  548. -- param_values : a GValue array holding instance, arg1 and arg2
  549. -- invocation_hint : the invocation hint given as the the last argument to g_closure_invoke()
  550. -- marshal_data : additional data specified when registering the marshaller
  551. -- --------------------------------------------------------------------------------------------------------
  552. -- g_cclosure_marshal_BOOLEAN__FLAGS ()
  553. -- void g_cclosure_marshal_BOOLEAN__FLAGS
  554. -- (a_closure: POINTER, GValue *return_value, guint n_param_values, const GValue *param_values, invocation_hint: POINTER, marshal_data: POINTER);
  555. -- A marshaller for a GCClosure with a callback of type gboolean (*callback) (instance: POINTER, gint arg1, user_data: POINTER) where the gint parameter denotes a flags type.
  556. -- closure : the GClosure to which the marshaller belongs
  557. -- return_value : a GValue which can store the returned gboolean
  558. -- n_param_values : 2
  559. -- param_values : a GValue array holding instance and arg1
  560. -- invocation_hint : the invocation hint given as the the last argument to g_closure_invoke()
  561. -- marshal_data : additional data specified when registering the marshaller
  562. -- --------------------------------------------------------------------------------------------------------
  563. -- g_cclosure_marshal_BOOL__FLAGS
  564. -- #define g_cclosure_marshal_BOOL__FLAGS
  565. -- Another name for g_cclosure_marshal_BOOLEAN__FLAGS().
  566. feature -- size
  567. struct_size: INTEGER is
  568. external "C inline use <glib-object.h>"
  569. alias "sizeof(GCLosure)"
  570. end
  571. feature {} -- Externals
  572. g_closure_needs_marshal (a_closure: POINTER): INTEGER is
  573. -- Returns TRUE if a GClosureMarshal marshaller has not yet been
  574. -- set on closure. See g_closure_set_marshal().
  575. external "C macro use <glib-object.h>"
  576. alias "G_CLOSURE_NEEDS_MARSHAL (*($a_closure))"
  577. end
  578. g_closure_n_notifiers (a_closure: POINTER): INTEGER is
  579. -- Returns the total number of notifiers connected with the
  580. -- closure cl. The count includes the meta marshaller, the
  581. -- finalize and invalidate notifiers and the marshal
  582. -- guards. Note that each guard counts as two notifiers. See
  583. -- g_closure_set_meta_marshal,
  584. -- g_closure_add_finalize_notifier,
  585. -- g_closure_add_invalidate_notifier and
  586. -- g_closure_add_marshal_guards.
  587. external "C macro use <glib-object.h>"
  588. alias "G_CLOSURE_N_NOTIFIERS"
  589. end
  590. g_cclosure_swap_data (a_cclosure: POINTER): INTEGER is
  591. -- Returns (a gboolean, i.e. an int) whether the user data of
  592. -- the GCClosure should be passed as the first parameter to
  593. -- the callback. See g_cclosure_new_swap.
  594. external "C macro use <glib-object.h>"
  595. alias "G_CCLOSURE_SWAP_DATA"
  596. end
  597. -- void (*GCallback) (void);
  598. -- The type used for callback functions in structure definitions
  599. -- and function signatures. This doesn't mean that all callback
  600. -- functions must take no parameters and return void. The required
  601. -- signature of a callback function is determined by the context in
  602. -- which is used (e.g. the signal to which it is connected). Use
  603. -- G_CALLBACK() to cast the callback function to a GCallback.
  604. g_type_closure: INTEGER is
  605. -- The GType for GClosure.
  606. external "C macro use <glib-object.h>"
  607. alias "G_TYPE_CLOSURE"
  608. end
  609. --void (*GClosureMarshal) (GClosure *closure, GValue *return_value,
  610. --guint n_param_values, const GValue *param_values, gpointer
  611. --invocation_hint, gpointer marshal_data);
  612. --void (*GClosureNotify) (gpointer data, GClosure *closure);
  613. g_cclosure_new (callback_func, user_data, destroy_data: POINTER): POINTER is -- GClosure
  614. external "C use <glib-object.h>"
  615. end
  616. g_cclosure_new_swap (callback_func, user_data, destroy_data: POINTER): POINTER is -- GClosure
  617. external "C use <glib-object.h>"
  618. end
  619. g_cclosure_new_object (callback_func, an_object: POINTER): POINTER is -- GClosure
  620. external "C use <glib-object.h>"
  621. end
  622. g_cclosure_new_object_swap (callback_func, an_object: POINTER): POINTER is -- GClosure
  623. external "C use <glib-object.h>"
  624. end
  625. g_closure_new_object (sizeof_closure: INTEGER; an_object: POINTER): POINTER is -- GClosure
  626. -- Note: sizeof_closure is a guint/NATURAL
  627. external "C use <glib-object.h>"
  628. end
  629. g_closure_ref (a_closure: POINTER): POINTER is -- GClosure
  630. external "C use <glib-object.h>"
  631. end
  632. g_closure_sink (a_closure: POINTER) is
  633. external "C use <glib-object.h>"
  634. end
  635. g_closure_unref (a_closure: POINTER) is
  636. external "C use <glib-object.h>"
  637. end
  638. g_closure_invoke (a_closure, a_return_value: POINTER; n_param_values: INTEGER; const_gvalue_param_values, invocation_hint: POINTER) is
  639. -- Note: n_param_values is guint, i.e. a NATURAL
  640. external "C use <glib-object.h>"
  641. end
  642. g_closure_invalidate (a_closure: POINTER) is
  643. external "C use <glib-object.h>"
  644. end
  645. g_closure_add_finalize_notifier (a_closure, notify_data, notify_func: POINTER) is
  646. external "C use <glib-object.h>"
  647. end
  648. g_closure_add_invalidate_notifier (a_closure, notify_data, notify_func: POINTER) is
  649. external "C use <glib-object.h>"
  650. end
  651. g_closure_remove_finalize_notifier (a_closure, notify_data, notify_func: POINTER) is
  652. external "C use <glib-object.h>"
  653. end
  654. g_closure_remove_invalidate_notifier (a_closure, notify_data, notify_func: POINTER) is
  655. external "C use <glib-object.h>"
  656. end
  657. g_closure_new_simple (sizeof_closure: INTEGER; data: POINTER): POINTER is -- GClosure
  658. -- Note sizeof_closure is a guint/NATURAL
  659. external "C use <glib-object.h>"
  660. end
  661. g_closure_set_marshal (a_closure, a_marshal: POINTER) is
  662. external "C use <glib-object.h>"
  663. end
  664. g_closure_add_marshal_guards (a_closure, pre_marshal_data, pre_marshal_notify, post_marshal_data, post_marshal_notify: POINTER) is
  665. external "C use <glib-object.h>"
  666. end
  667. g_closure_set_meta_marshal (a_closure, marshal_data, meta_marshal: POINTER) is
  668. external "C use <glib-object.h>"
  669. end
  670. g_source_set_closure (a_gsource, a_closure: POINTER) is
  671. external "C use <glib-object.h>"
  672. end
  673. g_type_io_channel is
  674. external "C macro use <glib-object.h>"
  675. alias "G_TYPE_IO_CHANNEL"
  676. end
  677. g_type_io_condition is
  678. external "C macro use <glib-object.h>"
  679. alias "G_TYPE_IO_CONDITION"
  680. end
  681. g_cclosure_marshal_void__void (a_closure, a_return_value: POINTER; n_param_values: INTEGER;
  682. const_gvalue_param_values, invocation_hint, marshal_data: POINTER) is
  683. -- Note: n_param_values is a guint/NATURAL
  684. external "C use <glib-object.h>"
  685. alias "g_cclosure_marshal_VOID__VOID"
  686. end
  687. g_cclosure_marshal_void__boolean (a_closure, a_return_value: POINTER; n_param_values: INTEGER;
  688. const_gvalue_param_values, invocation_hint, marshal_data: POINTER) is
  689. -- Note: n_param_values is a guint/NATURAL
  690. external "C use <glib-object.h>"
  691. alias "g_cclosure_marshal_VOID__BOOLEAN"
  692. end
  693. g_cclosure_marshal_void__char (a_closure, a_return_value: POINTER; n_param_values: INTEGER;
  694. const_gvalue_param_values, invocation_hint, marshal_data: POINTER) is
  695. -- Note: n_param_values is a guint/NATURAL
  696. external "C use <glib-object.h>"
  697. alias "g_cclosure_marshal_VOID__CHAR"
  698. end
  699. g_cclosure_marshal_void__uchar (a_closure, a_return_value: POINTER; n_param_values: INTEGER;
  700. const_gvalue_param_values, invocation_hint, marshal_data: POINTER) is
  701. external "C use <glib-object.h>"
  702. alias "g_cclosure_marshal_VOID__UCHAR"
  703. end
  704. g_cclosure_marshal_void__int (a_closure, a_return_value: POINTER; n_param_values: INTEGER;
  705. const_gvalueparam_values, invocation_hint, marshal_data: POINTER) is
  706. external "C use <glib-object.h>"
  707. alias "g_cclosure_marshal_VOID__INT"
  708. end
  709. g_cclosure_marshal_void__uint (a_closure, a_return_value: POINTER; n_param_values: INTEGER;
  710. const_gvalueparam_values, invocation_hint, marshal_data: POINTER) is
  711. external "C use <glib-object.h>"
  712. alias "g_cclosure_marshal_VOID__UINT"
  713. end
  714. g_cclosure_marshal_void__long (a_closure, a_return_value: POINTER; n_param_values: INTEGER;
  715. const_gvalueparam_values, invocation_hint, marshal_data: POINTER) is
  716. external "C use <glib-object.h>"
  717. alias "g_cclosure_marshal_VOID__LONG"
  718. end
  719. g_cclosure_marshal_void__ulong (a_closure, a_return_value: POINTER; n_param_values: INTEGER;
  720. const_gvalueparam_values, invocation_hint, marshal_data: POINTER) is
  721. external "C use <glib-object.h>"
  722. alias "g_cclosure_marshal_VOID__ULONG"
  723. end
  724. g_cclosure_marshal_void__enum (a_closure, a_return_value: POINTER; n_param_values: INTEGER;
  725. const_gvalueparam_values, invocation_hint, marshal_data: POINTER) is
  726. external "C use <glib-object.h>"
  727. alias "g_cclosure_marshal_VOID__ENUM"
  728. end
  729. g_cclosure_marshal_void__flags (a_closure, a_return_value: POINTER; n_param_values: INTEGER;
  730. const_gvalueparam_values, invocation_hint, marshal_data: POINTER) is
  731. external "C use <glib-object.h>"
  732. alias "g_cclosure_marshal_VOID__FLAGS"
  733. end
  734. g_cclosure_marshal_void__float (a_closure, a_return_value: POINTER; n_param_values: INTEGER;
  735. const_gvalueparam_values, invocation_hint, marshal_data: POINTER) is
  736. external "C use <glib-object.h>"
  737. alias "g_cclosure_marshal_VOID__FLOAT"
  738. end
  739. g_cclosure_marshal_void__double (a_closure, a_return_value: POINTER; n_param_values: INTEGER;
  740. const_gvalueparam_values, invocation_hint, marshal_data: POINTER) is
  741. external "C use <glib-object.h>"
  742. alias "g_cclosure_marshal_VOID__DOUBLE"
  743. end
  744. g_cclosure_marshal_void__string (a_closure, a_return_value: POINTER; n_param_values: INTEGER;
  745. const_gvalueparam_values, invocation_hint, marshal_data: POINTER) is
  746. external "C use <glib-object.h>"
  747. alias "g_cclosure_marshal_VOID__STRING"
  748. end
  749. g_cclosure_marshal_void__param (a_closure, a_return_value: POINTER; n_param_values: INTEGER;
  750. const_gvalueparam_values, invocation_hint, marshal_data: POINTER) is
  751. external "C use <glib-object.h>"
  752. alias "g_cclosure_marshal_VOID__PARAM"
  753. end
  754. g_cclosure_marshal_void__boxed (a_closure, a_return_value: POINTER; n_param_values: INTEGER;
  755. const_gvalueparam_values, invocation_hint, marshal_data: POINTER) is
  756. external "C use <glib-object.h>"
  757. alias "g_cclosure_marshal_VOID__BOXED"
  758. end
  759. g_cclosure_marshal_void__pointer (a_closure, a_return_value: POINTER; n_param_values: INTEGER;
  760. const_gvalueparam_values, invocation_hint, marshal_data: POINTER) is
  761. external "C use <glib-object.h>"
  762. alias "g_cclosure_marshal_VOID__POINTER"
  763. end
  764. g_cclosure_marshal_void__object (a_closure, a_return_value: POINTER; n_param_values: INTEGER;
  765. const_gvalueparam_values, invocation_hint, marshal_data: POINTER) is
  766. external "C use <glib-object.h>"
  767. alias "g_cclosure_marshal_VOID__OBJECT"
  768. end
  769. g_cclosure_marshal_string__object_pointer (a_closure, a_return_value: POINTER; n_param_values: INTEGER;
  770. const_gvalueparam_values, invocation_hint, marshal_data: POINTER) is
  771. external "C use <glib-object.h>"
  772. alias "g_cclosure_marshal_STRING__OBJECT_POINTER"
  773. end
  774. g_cclosure_marshal_void__uint_pointer (a_closure, a_return_value: POINTER; n_param_values: INTEGER;
  775. const_gvalueparam_values, invocation_hint, marshal_data: POINTER) is
  776. external "C use <glib-object.h>"
  777. alias "g_cclosure_marshal_VOID__UINT_POINTER"
  778. end
  779. g_cclosure_marshal_boolean__flags (a_closure, a_return_value: POINTER; n_param_values: INTEGER;
  780. const_gvalueparam_values, invocation_hint, marshal_data: POINTER) is
  781. external "C use <glib-object.h>"
  782. alias "g_cclosure_marshal_BOOLEAN__FLAGS"
  783. end
  784. feature {}-- GClosure struct
  785. -- typedef struct { volatile guint in_marshal : 1; volatile guint
  786. -- is_invalid : 1; } GClosure;
  787. -- A GClosure represents a callback supplied by the programmer.
  788. -- volatile guint in_marshal : 1; Indicates whether the closure is
  789. -- currently being invoked with g_closure_invoke()
  790. -- volatile guint is_invalid : 1; Indicates whether the closure has
  791. -- been invalidated by g_closure_invalidate()
  792. get_gstruct_in_marshal (a_gclosure: POINTER): INTEGER is
  793. external "C struct get in_marshal use <glib-object.h>"
  794. end
  795. get_gstruct_is_invalid (a_gclosure: POINTER): INTEGER is
  796. external "C struct get is_invalid use <glib-object.h>"
  797. end
  798. feature -- GCClosure struct
  799. -- typedef struct { GClosure closure; callback: POINTER; }
  800. -- GCClosure;
  801. -- A GCClosure is a specialization of GClosure for C function
  802. -- callbacks.
  803. -- GClosure closure; the GClosure
  804. -- callback: POINTER; the callback function
  805. -- GClosureMarshal ()
  806. -- void (*GClosureMarshal) (a_closure: POINTER, GValue
  807. -- *return_value, guint n_param_values, const GValue
  808. -- *param_values, invocation_hint: POINTER, marshal_data:
  809. -- POINTER);
  810. -- The type used for marshaller functions.
  811. -- closure : the GClosure to which the marshaller belongs
  812. -- return_value : a GValue to store the return value. May be NULL
  813. -- if the callback of closure doesn't return -- a value.
  814. -- n_param_values : the length of the param_values array
  815. -- param_values : an array of GValues holding the arguments on
  816. -- which to invoke the callback of closure
  817. -- invocation_hint : the invocation hint given as the the last
  818. -- argument to g_closure_invoke()
  819. -- marshal_data : additional data specified when registering the
  820. -- marshaller, see g_closure_set_marshal() and
  821. -- g_closure_set_meta_marshal()
  822. -- GClosureNotify ()
  823. -- void (*GClosureNotify) (data: POINTER, a_closure: POINTER);
  824. -- The type used for the various notification callbacks which can be registered on closures.
  825. -- data : data specified when registering the notification
  826. -- callback
  827. -- closure : the GClosure on which the notification is emitted
  828. end