GClosure docu fixes from Guillaume Cottenceau, #383155.
[platform/upstream/glib.git] / docs / reference / gobject / tmpl / gclosure.sgml
1 <!-- ##### SECTION Title ##### -->
2 Closures
3
4 <!-- ##### SECTION Short_Description ##### -->
5 Functions as first-class objects
6
7 <!-- ##### SECTION Long_Description ##### -->
8 <para>
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.
14 </para>
15 <para>
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 
22 callbacks.
23 </para>
24 <para>
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.
36 </para>
37 <para>
38 Using closures has a number of important advantages over a simple
39 callback function/data pointer combination:
40 <itemizedlist>
41 <listitem><para>
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.
45 </para></listitem>
46 <listitem><para>
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. 
50 </para></listitem>
51 <listitem><para>
52 g_closure_invalidate() and invalidation notifiers allow callbacks to be
53 automatically removed when the objects they point to go away.
54 </para></listitem>
55 </itemizedlist>
56 </para>
57
58 <!-- ##### SECTION See_Also ##### -->
59 <para>
60
61 </para>
62
63 <!-- ##### SECTION Stability_Level ##### -->
64
65
66 <!-- ##### MACRO G_CLOSURE_NEEDS_MARSHAL ##### -->
67 <para>
68 Returns %TRUE if a #GClosureMarshal marshaller has not yet been set on 
69 @closure. See g_closure_set_marshal().
70 </para>
71
72 @closure: a #GClosure
73
74
75 <!-- ##### MACRO G_CLOSURE_N_NOTIFIERS ##### -->
76 <para>
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().
82 </para>
83
84 @cl: a #GClosure
85
86
87 <!-- ##### MACRO G_CCLOSURE_SWAP_DATA ##### -->
88 <para>
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().
91 </para>
92
93 @cclosure: a #GCClosure
94
95
96 <!-- ##### MACRO G_CALLBACK ##### -->
97 <para>
98 Cast a function pointer to a #GCallback.
99 </para>
100
101 @f: a function pointer.
102
103
104 <!-- ##### USER_FUNCTION GCallback ##### -->
105 <para>
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. 
111 </para>
112
113
114
115 <!-- ##### STRUCT GClosure ##### -->
116 <para>
117 A #GClosure represents a callback supplied by the programmer.
118 </para>
119
120 @in_marshal: Indicates whether the closure is currently being invoked with 
121   g_closure_invoke()
122 @is_invalid: Indicates whether the closure has been invalidated by 
123   g_closure_invalidate()
124
125 <!-- ##### MACRO G_TYPE_CLOSURE ##### -->
126 <para>
127 The #GType for #GClosure.
128 </para>
129
130
131
132 <!-- ##### STRUCT GCClosure ##### -->
133 <para>
134 A #GCClosure is a specialization of #GClosure for C function callbacks.
135 </para>
136
137 @closure: the #GClosure
138 @callback: the callback function
139
140 <!-- ##### USER_FUNCTION GClosureMarshal ##### -->
141 <para>
142 The type used for marshaller functions.
143 </para>
144
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()
155
156
157 <!-- ##### USER_FUNCTION GClosureNotify ##### -->
158 <para>
159 The type used for the various notification callbacks which can be registered
160 on closures.
161 </para>
162
163 @data: data specified when registering the notification callback
164 @closure: the #GClosure on which the notification is emitted
165
166
167 <!-- ##### FUNCTION g_cclosure_new ##### -->
168 <para>
169 Creates a new closure which invokes @callback_func with @user_data as 
170 the last parameter. 
171 </para>
172
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
177
178
179 <!-- ##### FUNCTION g_cclosure_new_swap ##### -->
180 <para>
181 Creates a new closure which invokes @callback_func with @user_data as 
182 the first parameter. 
183 </para>
184
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
189
190
191 <!-- ##### FUNCTION g_cclosure_new_object ##### -->
192 <para>
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.
197 </para>
198
199 @callback_func: the function to invoke
200 @object: a #GObject pointer to pass to @callback_func
201 @Returns: a new #GCClosure
202
203
204 <!-- ##### FUNCTION g_cclosure_new_object_swap ##### -->
205 <para>
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.
210 </para>
211
212 @callback_func: the function to invoke
213 @object: a #GObject pointer to pass to @callback_func
214 @Returns: a new #GCClosure
215
216
217 <!-- ##### FUNCTION g_closure_new_object ##### -->
218 <para>
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 
222 of closures.
223 </para>
224
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 
228   allocated #GClosure
229 @Returns: a newly allocated #GClosure
230
231
232 <!-- ##### FUNCTION g_closure_ref ##### -->
233 <para>
234 Increments the reference count on a closure to force it staying
235 alive while the caller holds a pointer to it.
236 </para>
237
238 @closure: #GClosure to increment the reference count on
239 @Returns: The @closure passed in, for convenience
240
241
242 <!-- ##### FUNCTION g_closure_sink ##### -->
243 <para>
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: 
251 <programlisting>
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 */
255 </programlisting>
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: 
258 <programlisting>
259 g_source_set_closure (source, g_cclosure_new (cb_func, cb_data));
260 </programlisting>
261 </para>
262 <para>
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;
267 void
268 foo_notify_set_closure (GClosure *closure)
269 {
270   if (notify_closure)
271     g_closure_unref (notify_closure);
272   notify_closure = closure;
273   if (notify_closure)
274     {
275       g_closure_ref (notify_closure);
276       g_closure_sink (notify_closure);
277     }
278 }
279 </programlisting></informalexample>
280 </para>
281 <para>
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.
285 </para>
286
287 @closure: #GClosure to decrement the initial reference count on, if it's
288           still being held
289
290
291 <!-- ##### FUNCTION g_closure_unref ##### -->
292 <para>
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.
296 </para>
297
298 @closure: #GClosure to decrement the reference count on
299
300
301 <!-- ##### FUNCTION g_closure_invoke ##### -->
302 <para>
303 Invokes the closure, i.e. executes the callback represented by the @closure.
304 </para>
305
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
313
314
315 <!-- ##### FUNCTION g_closure_invalidate ##### -->
316 <para>
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().
325 </para>
326 <para>
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).
329 </para>
330
331 @closure: GClosure to invalidate
332
333
334 <!-- ##### FUNCTION g_closure_add_finalize_notifier ##### -->
335 <para>
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 
341 notifiers.
342 </para>
343
344 @closure: a #GClosure
345 @notify_data: data to pass to @notify_func
346 @notify_func: the callback function to register
347
348
349 <!-- ##### FUNCTION g_closure_add_invalidate_notifier ##### -->
350 <para>
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.
354 </para>
355
356 @closure: a #GClosure
357 @notify_data: data to pass to @notify_func
358 @notify_func: the callback function to register
359
360
361 <!-- ##### FUNCTION g_closure_remove_finalize_notifier ##### -->
362 <para>
363 Removes a finalization notifier.
364 </para>
365 <para>
366 Notice that notifiers are automatically removed after they are run.
367 </para>
368
369 @closure: a #GClosure
370 @notify_data: data which was passed to g_closure_add_finalize_notifier()
371  when registering @notify_func
372 @notify_func: the callback function to remove
373
374
375 <!-- ##### FUNCTION g_closure_remove_invalidate_notifier ##### -->
376 <para>
377 Removes an invalidation notifier.
378 </para>
379
380 <para>
381 Notice that notifiers are automatically removed after they are run.
382 </para>
383
384 @closure: a #GClosure
385 @notify_data: data which was passed to g_closure_add_invalidate_notifier()
386  when registering @notify_func
387 @notify_func: the callback function to remove
388
389
390 <!-- ##### FUNCTION g_closure_new_simple ##### -->
391 <para>
392 Allocates a struct of the given size and initializes the initial part
393 as a #GClosure. This function is mainly useful when implementing new types 
394 of closures.
395 </para>
396 <informalexample>
397 <programlisting>
398 typedef struct _MyClosure MyClosure;
399 struct _MyClosure 
400 {
401   GClosure closure;
402   /* extra data goes here */
403 };
404     
405
406 static void
407 my_closure_finalize (gpointer  notify_data, 
408                      GClosure *closure)
409 {
410   MyClosure *my_closure = (MyClosure *)closure;
411
412   /* free extra data here */
413 }
414
415 MyClosure *my_closure_new (gpointer data)
416 {
417   GClosure *closure;
418   MyClosure *my_closure;
419   
420   closure = g_closure_new_simple (sizeof (MyClosure), data);
421   my_closure = (MyClosure *) closure;
422
423   / initialize extra data here */
424
425   g_closure_add_finalize_notifier (closure, notify_data,
426                                    my_closure_finalize);
427   return my_closure;
428 }
429 </programlisting>
430 </informalexample>
431
432 @sizeof_closure: the size of the structure to allocate, must be at least 
433 <literal>sizeof (GClosure)</literal>
434 @data: data to store in the @data field of the newly allocated #GClosure
435 @Returns: a newly allocated #GClosure
436
437
438 <!-- ##### FUNCTION g_closure_set_marshal ##### -->
439 <para>
440 Sets the marshaller of @closure. The <literal>marshal_data</literal>
441 of @marshal provides a way for a meta marshaller to provide additional
442 information to the marshaller. (See g_closure_set_meta_marshal().) For
443 GObject's C predefined marshallers (the g_cclosure_marshal_*()
444 functions), what it provides is a callback function to use instead of
445 @closure->callback.
446 </para>
447
448 @closure: a #GClosure
449 @marshal: a #GClosureMarshal function
450
451
452 <!-- ##### FUNCTION g_closure_add_marshal_guards ##### -->
453 <para>
454 Adds a pair of notifiers which get invoked before and after the closure 
455 callback, respectively. This is typically used to protect the extra arguments
456 for the duration of the callback. See g_object_watch_closure() for an
457 example of marshal guards.
458 </para>
459
460 @closure: a #GClosure
461 @pre_marshal_data: data to pass to @pre_marshal_notify
462 @pre_marshal_notify: a function to call before the closure callback
463 @post_marshal_data: data to pass to @post_marshal_notify
464 @post_marshal_notify: a function to call after the closure callback
465
466
467 <!-- ##### FUNCTION g_closure_set_meta_marshal ##### -->
468 <para>
469 Sets the meta marshaller of @closure. 
470 A meta marshaller wraps @closure->marshal and modifies the way it is called 
471 in some fashion. The most common use of this facility is for C callbacks. 
472 The same marshallers (generated by 
473 <link linkend="glib-genmarshal">glib-genmarshal</link>) are used everywhere,
474 but the way that we get the callback function differs. In most cases we want 
475 to use @closure->callback, but in other cases we want to use some 
476 different technique to retrieve the callback function.
477 </para>
478 <para>
479 For example, class closures for signals (see g_signal_type_cclosure_new()) 
480 retrieve the callback function from a fixed offset in the class structure. 
481 The meta marshaller retrieves the right callback and passes it to the 
482 marshaller as the @marshal_data argument.
483 </para>
484
485 @closure: a #GClosure
486 @marshal_data: context-dependent data to pass to @meta_marshal
487 @meta_marshal: a #GClosureMarshal function
488
489
490 <!-- ##### FUNCTION g_source_set_closure ##### -->
491 <para>
492 Set the callback for a source as a #GClosure.
493 </para>
494 <para>
495 If the source is not one of the standard GLib types, the @closure_callback
496 and @closure_marshal fields of the #GSourceFuncs structure must have been
497 filled in with pointers to appropriate functions.
498 </para>
499
500 @source: the source
501 @closure: a #GClosure
502
503
504 <!-- ##### MACRO G_TYPE_IO_CHANNEL ##### -->
505 <para>
506 The #GType for #GIOChannel.
507 </para>
508
509
510
511 <!-- ##### MACRO G_TYPE_IO_CONDITION ##### -->
512 <para>
513 The #GType for #GIOCondition.
514 </para>
515
516
517
518 <!-- ##### FUNCTION g_cclosure_marshal_VOID__VOID ##### -->
519 <para>
520 A marshaller for a #GCClosure with a callback of type
521 <literal>void (*callback) (gpointer instance, gpointer user_data)</literal>.
522 </para>
523
524 @closure: the #GClosure to which the marshaller belongs
525 @return_value: ignored
526 @n_param_values: 1
527 @param_values: a #GValue array holding only the instance
528 @invocation_hint: the invocation hint given as the the last argument
529   to g_closure_invoke()
530 @marshal_data: additional data specified when registering the marshaller
531
532
533 <!-- ##### FUNCTION g_cclosure_marshal_VOID__BOOLEAN ##### -->
534 <para>
535 A marshaller for a #GCClosure with a callback of type
536 <literal>void (*callback) (gpointer instance, gboolean arg1, gpointer user_data)</literal>.
537 </para>
538
539 @closure: the #GClosure to which the marshaller belongs
540 @return_value: ignored
541 @n_param_values: 2
542 @param_values: a #GValue array holding the instance and the #gboolean parameter
543 @invocation_hint: the invocation hint given as the the last argument
544   to g_closure_invoke()
545 @marshal_data: additional data specified when registering the marshaller
546
547
548 <!-- ##### FUNCTION g_cclosure_marshal_VOID__CHAR ##### -->
549 <para>
550 A marshaller for a #GCClosure with a callback of type
551 <literal>void (*callback) (gpointer instance, gchar arg1, gpointer user_data)</literal>.
552 </para>
553
554 @closure: the #GClosure to which the marshaller belongs
555 @return_value: ignored
556 @n_param_values: 2
557 @param_values: a #GValue array holding the instance and the #gchar parameter
558 @invocation_hint: the invocation hint given as the the last argument
559   to g_closure_invoke()
560 @marshal_data: additional data specified when registering the marshaller
561
562
563 <!-- ##### FUNCTION g_cclosure_marshal_VOID__UCHAR ##### -->
564 <para>
565 A marshaller for a #GCClosure with a callback of type
566 <literal>void (*callback) (gpointer instance, guchar arg1, gpointer user_data)</literal>.
567 </para>
568
569 @closure: the #GClosure to which the marshaller belongs
570 @return_value: ignored
571 @n_param_values: 2
572 @param_values: a #GValue array holding the instance and the #guchar parameter
573 @invocation_hint: the invocation hint given as the the last argument
574   to g_closure_invoke()
575 @marshal_data: additional data specified when registering the marshaller
576
577
578 <!-- ##### FUNCTION g_cclosure_marshal_VOID__INT ##### -->
579 <para>
580 A marshaller for a #GCClosure with a callback of type
581 <literal>void (*callback) (gpointer instance, gint arg1, gpointer user_data)</literal>.
582 </para>
583
584 @closure: the #GClosure to which the marshaller belongs
585 @return_value: ignored
586 @n_param_values: 2
587 @param_values: a #GValue array holding the instance and the #gint parameter
588 @invocation_hint: the invocation hint given as the the last argument
589   to g_closure_invoke()
590 @marshal_data: additional data specified when registering the marshaller
591
592
593 <!-- ##### FUNCTION g_cclosure_marshal_VOID__UINT ##### -->
594 <para>
595 A marshaller for a #GCClosure with a callback of type
596 <literal>void (*callback) (gpointer instance, guint arg1, gpointer user_data)</literal>.
597 </para>
598
599 @closure: the #GClosure to which the marshaller belongs
600 @return_value: ignored
601 @n_param_values: 2
602 @param_values: a #GValue array holding the instance and the #guint parameter
603 @invocation_hint: the invocation hint given as the the last argument
604   to g_closure_invoke()
605 @marshal_data: additional data specified when registering the marshaller
606
607
608 <!-- ##### FUNCTION g_cclosure_marshal_VOID__LONG ##### -->
609 <para>
610 A marshaller for a #GCClosure with a callback of type
611 <literal>void (*callback) (gpointer instance, glong arg1, gpointer user_data)</literal>.
612 </para>
613
614 @closure: the #GClosure to which the marshaller belongs
615 @return_value: ignored
616 @n_param_values: 2
617 @param_values: a #GValue array holding the instance and the #glong parameter
618 @invocation_hint: the invocation hint given as the the last argument
619   to g_closure_invoke()
620 @marshal_data: additional data specified when registering the marshaller
621
622
623 <!-- ##### FUNCTION g_cclosure_marshal_VOID__ULONG ##### -->
624 <para>
625 A marshaller for a #GCClosure with a callback of type
626 <literal>void (*callback) (gpointer instance, gulong arg1, gpointer user_data)</literal>.
627 </para>
628
629 @closure: the #GClosure to which the marshaller belongs
630 @return_value: ignored
631 @n_param_values: 2
632 @param_values: a #GValue array holding the instance and the #gulong parameter
633 @invocation_hint: the invocation hint given as the the last argument
634   to g_closure_invoke()
635 @marshal_data: additional data specified when registering the marshaller
636
637
638 <!-- ##### FUNCTION g_cclosure_marshal_VOID__ENUM ##### -->
639 <para>
640 A marshaller for a #GCClosure with a callback of type
641 <literal>void (*callback) (gpointer instance, gint arg1, gpointer user_data)</literal> where the #gint parameter denotes an enumeration type..
642 </para>
643
644 @closure: the #GClosure to which the marshaller belongs
645 @return_value: ignored
646 @n_param_values: 2
647 @param_values: a #GValue array holding the instance and the enumeration parameter
648 @invocation_hint: the invocation hint given as the the last argument
649   to g_closure_invoke()
650 @marshal_data: additional data specified when registering the marshaller
651
652
653 <!-- ##### FUNCTION g_cclosure_marshal_VOID__FLAGS ##### -->
654 <para>
655 A marshaller for a #GCClosure with a callback of type
656 <literal>void (*callback) (gpointer instance, gint arg1, gpointer user_data)</literal> where the #gint parameter denotes a flags type
657 denotes a flags type.
658 </para>
659
660 @closure: the #GClosure to which the marshaller belongs
661 @return_value: ignored
662 @n_param_values: 2
663 @param_values: a #GValue array holding the instance and the flags parameter
664 @invocation_hint: the invocation hint given as the the last argument
665   to g_closure_invoke()
666 @marshal_data: additional data specified when registering the marshaller
667
668
669 <!-- ##### FUNCTION g_cclosure_marshal_VOID__FLOAT ##### -->
670 <para>
671 A marshaller for a #GCClosure with a callback of type
672 <literal>void (*callback) (gpointer instance, gfloat arg1, gpointer user_data)</literal>.
673 </para>
674
675 @closure: the #GClosure to which the marshaller belongs
676 @return_value: ignored
677 @n_param_values: 2
678 @param_values: a #GValue array holding the instance and the #gfloat parameter
679 @invocation_hint: the invocation hint given as the the last argument
680   to g_closure_invoke()
681 @marshal_data: additional data specified when registering the marshaller
682
683
684 <!-- ##### FUNCTION g_cclosure_marshal_VOID__DOUBLE ##### -->
685 <para>
686 A marshaller for a #GCClosure with a callback of type
687 <literal>void (*callback) (gpointer instance, gdouble arg1, gpointer user_data)</literal>.
688 </para>
689
690 @closure: the #GClosure to which the marshaller belongs
691 @return_value: ignored
692 @n_param_values: 2
693 @param_values: a #GValue array holding the instance and the #gdouble parameter
694 @invocation_hint: the invocation hint given as the the last argument
695   to g_closure_invoke()
696 @marshal_data: additional data specified when registering the marshaller
697
698
699 <!-- ##### FUNCTION g_cclosure_marshal_VOID__STRING ##### -->
700 <para>
701 A marshaller for a #GCClosure with a callback of type
702 <literal>void (*callback) (gpointer instance, const gchar *arg1, gpointer user_data)</literal>.
703 </para>
704
705 @closure: the #GClosure to which the marshaller belongs
706 @return_value: ignored
707 @n_param_values: 2
708 @param_values: a #GValue array holding the instance and the #gchar* parameter
709 @invocation_hint: the invocation hint given as the the last argument
710   to g_closure_invoke()
711 @marshal_data: additional data specified when registering the marshaller
712
713
714 <!-- ##### FUNCTION g_cclosure_marshal_VOID__PARAM ##### -->
715 <para>
716 A marshaller for a #GCClosure with a callback of type
717 <literal>void (*callback) (gpointer instance, GParamSpec *arg1, gpointer user_data)</literal>.
718 </para>
719
720 @closure: the #GClosure to which the marshaller belongs
721 @return_value: ignored
722 @n_param_values: 2
723 @param_values: a #GValue array holding the instance and the #GParamSpec* parameter
724 @invocation_hint: the invocation hint given as the the last argument
725   to g_closure_invoke()
726 @marshal_data: additional data specified when registering the marshaller
727
728
729 <!-- ##### FUNCTION g_cclosure_marshal_VOID__BOXED ##### -->
730 <para>
731 A marshaller for a #GCClosure with a callback of type
732 <literal>void (*callback) (gpointer instance, GBoxed *arg1, gpointer user_data)</literal>.
733 </para>
734
735 @closure: the #GClosure to which the marshaller belongs
736 @return_value: ignored
737 @n_param_values: 2
738 @param_values: a #GValue array holding the instance and the #GBoxed* parameter
739 @invocation_hint: the invocation hint given as the the last argument
740   to g_closure_invoke()
741 @marshal_data: additional data specified when registering the marshaller
742
743
744 <!-- ##### FUNCTION g_cclosure_marshal_VOID__POINTER ##### -->
745 <para>
746 A marshaller for a #GCClosure with a callback of type
747 <literal>void (*callback) (gpointer instance, gpointer arg1, gpointer user_data)</literal>.
748 </para>
749
750 @closure: the #GClosure to which the marshaller belongs
751 @return_value: ignored
752 @n_param_values: 2
753 @param_values: a #GValue array holding the instance and the #gpointer parameter
754 @invocation_hint: the invocation hint given as the the last argument
755   to g_closure_invoke()
756 @marshal_data: additional data specified when registering the marshaller
757
758
759 <!-- ##### FUNCTION g_cclosure_marshal_VOID__OBJECT ##### -->
760 <para>
761 A marshaller for a #GCClosure with a callback of type
762 <literal>void (*callback) (gpointer instance, GOBject *arg1, gpointer user_data)</literal>.
763 </para>
764
765 @closure: the #GClosure to which the marshaller belongs
766 @return_value: ignored
767 @n_param_values: 2
768 @param_values: a #GValue array holding the instance and the #GObject* parameter
769 @invocation_hint: the invocation hint given as the the last argument
770   to g_closure_invoke()
771 @marshal_data: additional data specified when registering the marshaller
772
773
774 <!-- ##### FUNCTION g_cclosure_marshal_STRING__OBJECT_POINTER ##### -->
775 <para>
776 A marshaller for a #GCClosure with a callback of type
777 <literal>void (*callback) (gpointer instance, GObject *arg1, gpointer arg2, gpointer user_data)</literal>.
778 </para>
779
780 @closure: the #GClosure to which the marshaller belongs
781 @return_value: ignored
782 @n_param_values: 3
783 @param_values: a #GValue array holding instance, arg1 and arg2
784 @invocation_hint: the invocation hint given as the the last argument
785   to g_closure_invoke()
786 @marshal_data: additional data specified when registering the marshaller
787
788
789 <!-- ##### FUNCTION g_cclosure_marshal_VOID__UINT_POINTER ##### -->
790 <para>
791 A marshaller for a #GCClosure with a callback of type
792 <literal>void (*callback) (gpointer instance, guint arg1, gpointer arg2, gpointer user_data)</literal>.
793 </para>
794
795 @closure: the #GClosure to which the marshaller belongs
796 @return_value: ignored
797 @n_param_values: 3
798 @param_values: a #GValue array holding instance, arg1 and arg2
799 @invocation_hint: the invocation hint given as the the last argument
800   to g_closure_invoke()
801 @marshal_data: additional data specified when registering the marshaller
802
803
804 <!-- ##### FUNCTION g_cclosure_marshal_BOOLEAN__FLAGS ##### -->
805 <para>
806 A marshaller for a #GCClosure with a callback of type
807 <literal>gboolean (*callback) (gpointer instance, gint arg1, gpointer user_data)</literal> where the #gint parameter
808 denotes a flags type.
809 </para>
810
811 @closure: the #GClosure to which the marshaller belongs
812 @return_value: a #GValue which can store the returned #gboolean
813 @n_param_values: 2
814 @param_values: a #GValue array holding instance and arg1
815 @invocation_hint: the invocation hint given as the the last argument
816   to g_closure_invoke()
817 @marshal_data: additional data specified when registering the marshaller
818
819
820 <!-- ##### MACRO g_cclosure_marshal_BOOL__FLAGS ##### -->
821 <para>
822 Another name for g_cclosure_marshal_BOOLEAN__FLAGS().
823 </para>
824
825
826