1 <!-- ##### SECTION Title ##### -->
4 <!-- ##### SECTION Short_Description ##### -->
5 Functions as first-class objects
7 <!-- ##### SECTION Long_Description ##### -->
9 A #GClosure represents a callback supplied by the programmer. It will generally
10 comprise a function of some kind and a marshaller used to call it. It is the
11 reponsibility of the marshaller to convert the arguments for the invocation
12 from #GValue<!-- -->s into a suitable form, perform the callback on the
13 converted arguments, and transform the return value back into a #GValue.
16 In the case of C programs, a closure usually just holds a pointer to a function
17 and maybe a data argument, and the marshaller converts between #GValue<!-- -->
18 and native C types. The GObject library provides the #GCClosure type for this
19 purpose. Bindings for other languages need marshallers which
20 convert between #GValue<!-- -->s and suitable representations in the runtime
21 of the language in order to use functions written in that languages as
25 Within GObject, closures play an important role in the implementation of
26 signals. When a signal is registered, the @c_marshaller argument to
27 g_signal_new() specifies the default C marshaller for any closure which is
28 connected to this signal. GObject provides a number of C marshallers
29 for this purpose, see the g_cclosure_marshal_*() functions. Additional
30 C marshallers can be generated with the <link linkend="glib-genmarshal"
31 >glib-genmarshal</link> utility.
32 Closures can be explicitly connected to signals with
33 g_signal_connect_closure(), but it usually more convenient to let GObject
34 create a closure automatically by using one of the g_signal_connect_*()
35 functions which take a callback function/user data pair.
38 Using closures has a number of important advantages over a simple
39 callback function/data pointer combination:
42 Closures allow the callee to get the types of the callback parameters,
43 which means that language bindings don't have to write individual glue
44 for each callback type.
47 The reference counting of #GClosure makes it easy to handle reentrancy
48 right; if a callback is removed while it is being invoked, the closure
49 and it's parameters won't be freed until the invocation finishes.
52 g_closure_invalidate() and invalidation notifiers allow callbacks to be
53 automatically removed when the objects they point to go away.
58 <!-- ##### SECTION See_Also ##### -->
63 <!-- ##### SECTION Stability_Level ##### -->
66 <!-- ##### MACRO G_CLOSURE_NEEDS_MARSHAL ##### -->
68 Returns %TRUE if a #GClosureMarshal marshaller has not yet been set on
69 @closure. See g_closure_set_marshal().
75 <!-- ##### MACRO G_CLOSURE_N_NOTIFIERS ##### -->
77 Returns the total number of notifiers connected with the closure @cl.
78 The count includes the meta marshaller, the finalize and invalidate notifiers
79 and the marshal guards. Note that each guard counts as two notifiers.
80 See g_closure_set_meta_marshal(), g_closure_add_finalize_notifier(),
81 g_closure_add_invalidate_notifier() and g_closure_add_marshal_guards().
87 <!-- ##### MACRO G_CCLOSURE_SWAP_DATA ##### -->
89 Returns whether the user data of the #GCClosure should be passed as the
90 first parameter to the callback. See g_cclosure_new_swap().
93 @cclosure: a #GCClosure
96 <!-- ##### MACRO G_CALLBACK ##### -->
98 Cast a function pointer to a #GCallback.
101 @f: a function pointer.
104 <!-- ##### USER_FUNCTION GCallback ##### -->
106 The type used for callback functions in structure definitions and function
107 signatures. This doesn't mean that all callback functions must take no
108 parameters and return void. The required signature of a callback function
109 is determined by the context in which is used (e.g. the signal to which it
110 is connected). Use G_CALLBACK() to cast the callback function to a #GCallback.
115 <!-- ##### STRUCT GClosure ##### -->
117 A #GClosure represents a callback supplied by the programmer.
120 @in_marshal: Indicates whether the closure is currently being invoked with
122 @is_invalid: Indicates whether the closure has been invalidated by
123 g_closure_invalidate()
125 <!-- ##### MACRO G_TYPE_CLOSURE ##### -->
127 The #GType for #GClosure.
132 <!-- ##### STRUCT GCClosure ##### -->
134 A #GCClosure is a specialization of #GClosure for C function callbacks.
137 @closure: the #GClosure
138 @callback: the callback function
140 <!-- ##### USER_FUNCTION GClosureMarshal ##### -->
142 The type used for marshaller functions.
145 @closure: the #GClosure to which the marshaller belongs
146 @return_value: a #GValue to store the return value. May be %NULL if the
147 callback of @closure doesn't return a value.
148 @n_param_values: the length of the @param_values array
149 @param_values: an array of #GValue<!-- -->s holding the arguments on
150 which to invoke the callback of @closure
151 @invocation_hint: the invocation hint given as the the last argument
152 to g_closure_invoke()
153 @marshal_data: additional data specified when registering the marshaller,
154 see g_closure_set_marshal() and g_closure_set_meta_marshal()
157 <!-- ##### USER_FUNCTION GClosureNotify ##### -->
159 The type used for the various notification callbacks which can be registered
163 @data: data specified when registering the notification callback
164 @closure: the #GClosure on which the notification is emitted
167 <!-- ##### FUNCTION g_cclosure_new ##### -->
169 Creates a new closure which invokes @callback_func with @user_data as
173 @callback_func: the function to invoke
174 @user_data: user data to pass to @callback_func
175 @destroy_data: destroy notify to be called when @user_data is no longer used
176 @Returns: a new #GCClosure
179 <!-- ##### FUNCTION g_cclosure_new_swap ##### -->
181 Creates a new closure which invokes @callback_func with @user_data as
185 @callback_func: the function to invoke
186 @user_data: user data to pass to @callback_func
187 @destroy_data: destroy notify to be called when @user_data is no longer used
188 @Returns: a new #GCClosure
191 <!-- ##### FUNCTION g_cclosure_new_object ##### -->
193 A variant of g_cclosure_new() which uses @object as @user_data and calls
194 g_object_watch_closure() on @object and the created closure. This function
195 is useful when you have a callback closely associated with a #GObject,
196 and want the callback to no longer run after the object is is freed.
199 @callback_func: the function to invoke
200 @object: a #GObject pointer to pass to @callback_func
201 @Returns: a new #GCClosure
204 <!-- ##### FUNCTION g_cclosure_new_object_swap ##### -->
206 A variant of g_cclosure_new_swap() which uses @object as @user_data and calls
207 g_object_watch_closure() on @object and the created closure. This function
208 is useful when you have a callback closely associated with a #GObject,
209 and want the callback to no longer run after the object is is freed.
212 @callback_func: the function to invoke
213 @object: a #GObject pointer to pass to @callback_func
214 @Returns: a new #GCClosure
217 <!-- ##### FUNCTION g_closure_new_object ##### -->
219 A variant of g_closure_new_simple() which stores @object in the @data
220 field of the closure and calls g_object_watch_closure() on @object and the
221 created closure. This function is mainly useful when implementing new types
225 @sizeof_closure: the size of the structure to allocate, must be at least
226 <literal>sizeof (GClosure)</literal>
227 @object: a #GObject pointer to store in the @data field of the newly
229 @Returns: a newly allocated #GClosure
232 <!-- ##### FUNCTION g_closure_ref ##### -->
234 Increments the reference count on a closure to force it staying
235 alive while the caller holds a pointer to it.
238 @closure: #GClosure to increment the reference count on
239 @Returns: The @closure passed in, for convenience
242 <!-- ##### FUNCTION g_closure_sink ##### -->
244 Takes over the initial ownership of a closure.
245 Each closure is initially created in a<firstterm>floating</firstterm> state,
246 which means that the initial reference count is not owned by any caller.
247 g_closure_sink() checks to see if the object is still floating, and if so,
248 unsets the floating state and decreases the reference count. If the closure
249 is not floating, g_closure_sink() does nothing. The reason for the existance
250 of the floating state is to prevent cumbersome code sequences like:
252 closure = g_cclosure_new (cb_func, cb_data);
253 g_source_set_closure (source, closure);
254 g_closure_unref (closure); /* XXX GObject doesn't really need this */
256 Because g_source_set_closure() (and similar functions) take ownership of the
257 initial reference count, if it is unowned, we instead can write:
259 g_source_set_closure (source, g_cclosure_new (cb_func, cb_data));
263 Generally, this function is used together with g_closure_ref(). Ane example
264 of storing a closure for later notification looks like:
265 <informalexample><programlisting>
266 static GClosure *notify_closure = NULL;
268 foo_notify_set_closure (GClosure *closure)
271 g_closure_unref (notify_closure);
272 notify_closure = closure;
275 g_closure_ref (notify_closure);
276 g_closure_sink (notify_closure);
279 </programlisting></informalexample>
282 Because g_closure_sink() may decrement the reference count of a closure
283 (if it hasn't been called on @closure yet) just like g_closure_unref(),
284 g_closure_ref() should be called prior to this function.
287 @closure: #GClosure to decrement the initial reference count on, if it's
291 <!-- ##### FUNCTION g_closure_unref ##### -->
293 Decrements the reference count of a closure after it was previously
294 incremented by the same caller. If no other callers are using the closure,
295 then the closure will be destroyed and freed.
298 @closure: #GClosure to decrement the reference count on
301 <!-- ##### FUNCTION g_closure_invoke ##### -->
303 Invokes the closure, i.e. executes the callback represented by the @closure.
306 @closure: a #GClosure
307 @return_value: a #GValue to store the return value. May be %NULL if the
308 callback of @closure doesn't return a value.
309 @n_param_values: the length of the @param_values array
310 @param_values: an array of #GValue<!-- -->s holding the arguments on
311 which to invoke the callback of @closure
312 @invocation_hint: a context-dependent invocation hint
315 <!-- ##### FUNCTION g_closure_invalidate ##### -->
317 Sets a flag on the closure to indicate that it's calling environment has
318 become invalid, and thus causes any future invocations of g_closure_invoke()
319 on this @closure to be ignored. Also, invalidation notifiers installed on
320 the closure will be called at this point. Note that unless you are holding
321 a reference to the closure yourself, the invalidation notifiers may unref
322 the closure and cause it to be destroyed, so if you need to access the
323 closure after calling g_closure_invalidate(), make sure that you've
324 previously called g_closure_ref().
327 Note that g_closure_invalidate() will also be called when the reference count
328 of a closure drops to zero (unless it has already been invalidated before).
331 @closure: GClosure to invalidate
334 <!-- ##### FUNCTION g_closure_add_finalize_notifier ##### -->
336 Registers a finalization notifier which will be called when the reference
337 count of @closure goes down to 0. Multiple finalization notifiers on a
338 single closure are invoked in unspecified order. If a single call to
339 g_closure_unref() results in the closure being both invalidated and
340 finalized, then the invalidate notifiers will be run before the finalize
344 @closure: a #GClosure
345 @notify_data: data to pass to @notify_func
346 @notify_func: the callback function to register
349 <!-- ##### FUNCTION g_closure_add_invalidate_notifier ##### -->
351 Registers an invalidation notifier which will be called when the @closure
352 is invalidated with g_closure_invalidate(). Invalidation notifiers are
353 invoked before finalization notifiers, in an unspecified order.
356 @closure: a #GClosure
357 @notify_data: data to pass to @notify_func
358 @notify_func: the callback function to register
361 <!-- ##### FUNCTION g_closure_remove_finalize_notifier ##### -->
363 Removes a finalization notifier. Notifiers are automatically removed after
367 @closure: a #GClosure
368 @notify_data: data which was passed to g_closure_add_finalize_notifier()
369 when registering @notify_func
370 @notify_func: the callback function to remove
373 <!-- ##### FUNCTION g_closure_remove_invalidate_notifier ##### -->
375 Removes a invalidation notifier. Notifiers are automatically removed after
379 @closure: a #GClosure
380 @notify_data: data which was passed to g_closure_add_invalidate_notifier()
381 when registering @notify_func
382 @notify_func: the callback function to remove
385 <!-- ##### FUNCTION g_closure_new_simple ##### -->
387 Allocates a struct of the given size and initializes the initial part
388 as a #GClosure. This function is mainly useful when implementing new types
393 typedef struct _MyClosure MyClosure;
397 /* extra data goes here */
402 my_closure_finalize (gpointer notify_data,
405 MyClosure *my_closure = (MyClosure *)closure;
407 /* free extra data here */
410 MyClosure *my_closure_new (gpointer data)
413 MyClosure *my_closure;
415 closure = g_closure_new_simple (sizeof (MyClosure), data);
416 my_closure = (MyClosure *) closure;
418 / initialize extra data here */
420 g_closure_add_finalize_notifier (closure, notify_data,
421 my_closure_finalize);
427 @sizeof_closure: the size of the structure to allocate, must be at least
428 <literal>sizeof (GClosure)</literal>
429 @data: data to store in the @data field of the newly allocated #GClosure
430 @Returns: a newly allocated #GClosure
433 <!-- ##### FUNCTION g_closure_set_marshal ##### -->
435 Sets the marshaller of @closure. The @marshal_data provides a way for a
436 meta marshaller to provide additional information to the marshaller.
437 (See g_closure_set_meta_marshal().) For GObject's C predefined marshallers
438 (the g_cclosure_marshal_*() functions), what it provides is a callback
439 function to use instead of @closure->callback.
442 @closure: a #GClosure
443 @marshal: a #GClosureMarshal function
446 <!-- ##### FUNCTION g_closure_add_marshal_guards ##### -->
448 Adds a pair of notifiers which get invoked before and after the closure
449 callback, respectively. This is typically used to protect the extra arguments
450 for the duration of the callback. See g_object_watch_closure() for an
451 example of marshal guards.
454 @closure: a #GClosure
455 @pre_marshal_data: data to pass to @pre_marshal_notify
456 @pre_marshal_notify: a function to call before the closure callback
457 @post_marshal_data: data to pass to @post_marshal_notify
458 @post_marshal_notify: a function to call after the closure callback
461 <!-- ##### FUNCTION g_closure_set_meta_marshal ##### -->
463 Sets the meta marshaller of @closure.
464 A meta marshaller wraps @closure->marshal and modifies the way it is called
465 in some fashion. The most common use of this facility is for C callbacks.
466 The same marshallers (generated by
467 <link linkend="glib-genmarshal">glib-genmarshal</link>) are used everywhere,
468 but the way that we get the callback function differs. In most cases we want
469 to use @closure->callback, but in other cases we want to use use some
470 different technique to retrieve the callbakc function.
473 For example, class closures for signals (see g_signal_type_cclosure_new())
474 retrieve the callback function from a fixed offset in the class structure.
475 The meta marshaller retrieves the right callback and passes it to the
476 marshaller as the @marshal_data argument.
479 @closure: a #GClosure
480 @marshal_data: context-dependent data to pass to @meta_marshal
481 @meta_marshal: a #GClosureMarshal function
484 <!-- ##### FUNCTION g_source_set_closure ##### -->
486 Set the callback for a source as a #GClosure.
489 If the source is not one of the standard GLib types, the @closure_callback
490 and @closure_marshal fields of the GSourceFuncs structure must have been
491 filled in with pointers to appropriate functions.
495 @closure: a #GClosure
498 <!-- ##### MACRO G_TYPE_IO_CHANNEL ##### -->
500 The #GType for #GIOChannel.
505 <!-- ##### MACRO G_TYPE_IO_CONDITION ##### -->
507 The #GType for #GIOCondition.
512 <!-- ##### FUNCTION g_cclosure_marshal_VOID__VOID ##### -->
514 A marshaller for a #GCClosure with a callback of type
515 <literal>void (*callback) (gpointer instance, gpointer user_data)</literal>.
518 @closure: the #GClosure to which the marshaller belongs
519 @return_value: ignored
521 @param_values: a #GValue array holding only the instance
522 @invocation_hint: the invocation hint given as the the last argument
523 to g_closure_invoke()
524 @marshal_data: additional data specified when registering the marshaller
527 <!-- ##### FUNCTION g_cclosure_marshal_VOID__BOOLEAN ##### -->
529 A marshaller for a #GCClosure with a callback of type
530 <literal>void (*callback) (gpointer instance, gboolean arg1, gpointer user_data)</literal>.
533 @closure: the #GClosure to which the marshaller belongs
534 @return_value: ignored
536 @param_values: a #GValue array holding the instance and the #gboolean parameter
537 @invocation_hint: the invocation hint given as the the last argument
538 to g_closure_invoke()
539 @marshal_data: additional data specified when registering the marshaller
542 <!-- ##### FUNCTION g_cclosure_marshal_VOID__CHAR ##### -->
544 A marshaller for a #GCClosure with a callback of type
545 <literal>void (*callback) (gpointer instance, gchar arg1, gpointer user_data)</literal>.
548 @closure: the #GClosure to which the marshaller belongs
549 @return_value: ignored
551 @param_values: a #GValue array holding the instance and the #gchar parameter
552 @invocation_hint: the invocation hint given as the the last argument
553 to g_closure_invoke()
554 @marshal_data: additional data specified when registering the marshaller
557 <!-- ##### FUNCTION g_cclosure_marshal_VOID__UCHAR ##### -->
559 A marshaller for a #GCClosure with a callback of type
560 <literal>void (*callback) (gpointer instance, guchar arg1, gpointer user_data)</literal>.
563 @closure: the #GClosure to which the marshaller belongs
564 @return_value: ignored
566 @param_values: a #GValue array holding the instance and the #guchar parameter
567 @invocation_hint: the invocation hint given as the the last argument
568 to g_closure_invoke()
569 @marshal_data: additional data specified when registering the marshaller
572 <!-- ##### FUNCTION g_cclosure_marshal_VOID__INT ##### -->
574 A marshaller for a #GCClosure with a callback of type
575 <literal>void (*callback) (gpointer instance, gint arg1, gpointer user_data)</literal>.
578 @closure: the #GClosure to which the marshaller belongs
579 @return_value: ignored
581 @param_values: a #GValue array holding the instance and the #gint parameter
582 @invocation_hint: the invocation hint given as the the last argument
583 to g_closure_invoke()
584 @marshal_data: additional data specified when registering the marshaller
587 <!-- ##### FUNCTION g_cclosure_marshal_VOID__UINT ##### -->
589 A marshaller for a #GCClosure with a callback of type
590 <literal>void (*callback) (gpointer instance, guint arg1, gpointer user_data)</literal>.
593 @closure: the #GClosure to which the marshaller belongs
594 @return_value: ignored
596 @param_values: a #GValue array holding the instance and the #guint parameter
597 @invocation_hint: the invocation hint given as the the last argument
598 to g_closure_invoke()
599 @marshal_data: additional data specified when registering the marshaller
602 <!-- ##### FUNCTION g_cclosure_marshal_VOID__LONG ##### -->
604 A marshaller for a #GCClosure with a callback of type
605 <literal>void (*callback) (gpointer instance, glong arg1, gpointer user_data)</literal>.
608 @closure: the #GClosure to which the marshaller belongs
609 @return_value: ignored
611 @param_values: a #GValue array holding the instance and the #glong parameter
612 @invocation_hint: the invocation hint given as the the last argument
613 to g_closure_invoke()
614 @marshal_data: additional data specified when registering the marshaller
617 <!-- ##### FUNCTION g_cclosure_marshal_VOID__ULONG ##### -->
619 A marshaller for a #GCClosure with a callback of type
620 <literal>void (*callback) (gpointer instance, gulong arg1, gpointer user_data)</literal>.
623 @closure: the #GClosure to which the marshaller belongs
624 @return_value: ignored
626 @param_values: a #GValue array holding the instance and the #gulong parameter
627 @invocation_hint: the invocation hint given as the the last argument
628 to g_closure_invoke()
629 @marshal_data: additional data specified when registering the marshaller
632 <!-- ##### FUNCTION g_cclosure_marshal_VOID__ENUM ##### -->
634 A marshaller for a #GCClosure with a callback of type
635 <literal>void (*callback) (gpointer instance, gint arg1, gpointer user_data)</literal> where the #gint parameter denotes an enumeration type..
638 @closure: the #GClosure to which the marshaller belongs
639 @return_value: ignored
641 @param_values: a #GValue array holding the instance and the enumeration parameter
642 @invocation_hint: the invocation hint given as the the last argument
643 to g_closure_invoke()
644 @marshal_data: additional data specified when registering the marshaller
647 <!-- ##### FUNCTION g_cclosure_marshal_VOID__FLAGS ##### -->
649 A marshaller for a #GCClosure with a callback of type
650 <literal>void (*callback) (gpointer instance, gint arg1, gpointer user_data)</literal> where the #gint parameter denotes a flags type
651 denotes a flags type.
654 @closure: the #GClosure to which the marshaller belongs
655 @return_value: ignored
657 @param_values: a #GValue array holding the instance and the flags parameter
658 @invocation_hint: the invocation hint given as the the last argument
659 to g_closure_invoke()
660 @marshal_data: additional data specified when registering the marshaller
663 <!-- ##### FUNCTION g_cclosure_marshal_VOID__FLOAT ##### -->
665 A marshaller for a #GCClosure with a callback of type
666 <literal>void (*callback) (gpointer instance, gfloat arg1, gpointer user_data)</literal>.
669 @closure: the #GClosure to which the marshaller belongs
670 @return_value: ignored
672 @param_values: a #GValue array holding the instance and the #gfloat parameter
673 @invocation_hint: the invocation hint given as the the last argument
674 to g_closure_invoke()
675 @marshal_data: additional data specified when registering the marshaller
678 <!-- ##### FUNCTION g_cclosure_marshal_VOID__DOUBLE ##### -->
680 A marshaller for a #GCClosure with a callback of type
681 <literal>void (*callback) (gpointer instance, gdouble arg1, gpointer user_data)</literal>.
684 @closure: the #GClosure to which the marshaller belongs
685 @return_value: ignored
687 @param_values: a #GValue array holding the instance and the #gdouble parameter
688 @invocation_hint: the invocation hint given as the the last argument
689 to g_closure_invoke()
690 @marshal_data: additional data specified when registering the marshaller
693 <!-- ##### FUNCTION g_cclosure_marshal_VOID__STRING ##### -->
695 A marshaller for a #GCClosure with a callback of type
696 <literal>void (*callback) (gpointer instance, const gchar *arg1, gpointer user_data)</literal>.
699 @closure: the #GClosure to which the marshaller belongs
700 @return_value: ignored
702 @param_values: a #GValue array holding the instance and the #gchar* parameter
703 @invocation_hint: the invocation hint given as the the last argument
704 to g_closure_invoke()
705 @marshal_data: additional data specified when registering the marshaller
708 <!-- ##### FUNCTION g_cclosure_marshal_VOID__PARAM ##### -->
710 A marshaller for a #GCClosure with a callback of type
711 <literal>void (*callback) (gpointer instance, GParamSpec *arg1, gpointer user_data)</literal>.
714 @closure: the #GClosure to which the marshaller belongs
715 @return_value: ignored
717 @param_values: a #GValue array holding the instance and the #GParamSpec* parameter
718 @invocation_hint: the invocation hint given as the the last argument
719 to g_closure_invoke()
720 @marshal_data: additional data specified when registering the marshaller
723 <!-- ##### FUNCTION g_cclosure_marshal_VOID__BOXED ##### -->
725 A marshaller for a #GCClosure with a callback of type
726 <literal>void (*callback) (gpointer instance, GBoxed *arg1, gpointer user_data)</literal>.
729 @closure: the #GClosure to which the marshaller belongs
730 @return_value: ignored
732 @param_values: a #GValue array holding the instance and the #GBoxed* parameter
733 @invocation_hint: the invocation hint given as the the last argument
734 to g_closure_invoke()
735 @marshal_data: additional data specified when registering the marshaller
738 <!-- ##### FUNCTION g_cclosure_marshal_VOID__POINTER ##### -->
740 A marshaller for a #GCClosure with a callback of type
741 <literal>void (*callback) (gpointer instance, gpointer arg1, gpointer user_data)</literal>.
744 @closure: the #GClosure to which the marshaller belongs
745 @return_value: ignored
747 @param_values: a #GValue array holding the instance and the #gpointer parameter
748 @invocation_hint: the invocation hint given as the the last argument
749 to g_closure_invoke()
750 @marshal_data: additional data specified when registering the marshaller
753 <!-- ##### FUNCTION g_cclosure_marshal_VOID__OBJECT ##### -->
755 A marshaller for a #GCClosure with a callback of type
756 <literal>void (*callback) (gpointer instance, GOBject *arg1, gpointer user_data)</literal>.
759 @closure: the #GClosure to which the marshaller belongs
760 @return_value: ignored
762 @param_values: a #GValue array holding the instance and the #GObject* parameter
763 @invocation_hint: the invocation hint given as the the last argument
764 to g_closure_invoke()
765 @marshal_data: additional data specified when registering the marshaller
768 <!-- ##### FUNCTION g_cclosure_marshal_STRING__OBJECT_POINTER ##### -->
770 A marshaller for a #GCClosure with a callback of type
771 <literal>void (*callback) (gpointer instance, GObject *arg1, gpointer arg2, gpointer user_data)</literal>.
774 @closure: the #GClosure to which the marshaller belongs
775 @return_value: ignored
777 @param_values: a #GValue array holding instance, arg1 and arg2
778 @invocation_hint: the invocation hint given as the the last argument
779 to g_closure_invoke()
780 @marshal_data: additional data specified when registering the marshaller
783 <!-- ##### FUNCTION g_cclosure_marshal_VOID__UINT_POINTER ##### -->
785 A marshaller for a #GCClosure with a callback of type
786 <literal>void (*callback) (gpointer instance, guint arg1, gpointer arg2, gpointer user_data)</literal>.
789 @closure: the #GClosure to which the marshaller belongs
790 @return_value: ignored
792 @param_values: a #GValue array holding instance, arg1 and arg2
793 @invocation_hint: the invocation hint given as the the last argument
794 to g_closure_invoke()
795 @marshal_data: additional data specified when registering the marshaller
798 <!-- ##### FUNCTION g_cclosure_marshal_BOOLEAN__FLAGS ##### -->
800 A marshaller for a #GCClosure with a callback of type
801 <literal>gboolean (*callback) (gpointer instance, gint arg1, gpointer user_data)</literal> where the #gint parameter
802 denotes a flags type.
805 @closure: the #GClosure to which the marshaller belongs
806 @return_value: a #GValue which can store the returned #gboolean
808 @param_values: a #GValue array holding instance and arg1
809 @invocation_hint: the invocation hint given as the the last argument
810 to g_closure_invoke()
811 @marshal_data: additional data specified when registering the marshaller
814 <!-- ##### MACRO g_cclosure_marshal_BOOL__FLAGS ##### -->
816 Another name for g_cclosure_marshal_BOOLEAN__FLAGS().