]> Pileus Git - ~andy/gtk/blob - docs/reference/gtk/tmpl/gtksignal.sgml
1a5a4f3e27e616f7c1cd07d369ee283e3247611f
[~andy/gtk] / docs / reference / gtk / tmpl / gtksignal.sgml
1 <!-- ##### SECTION Title ##### -->
2 Signals
3
4 <!-- ##### SECTION Short_Description ##### -->
5 Object methods and callbacks.
6
7 <!-- ##### SECTION Long_Description ##### -->
8 <refsect2>
9 <title>What are signals?</title>
10 <para>
11 Signals are a way to get notification when something happens
12 and to customize object behavior according to the
13 user's needs.
14 Every <WordAsWord>signal</WordAsWord> is uniquely identified by a name,
15 "class_name::signal_name", where signal_name might be something like
16 "clicked" and class_name might be "GtkButton".  Note that some other class
17 may also define a "clicked" callback, so long as it doesn't derive from
18 #GtkButton.
19 </para>
20 <para>
21 When they are created, they are also assigned a unique positive integer,
22 the signal id (1 is the first signal id- 0 is used to flag an error).
23 Each is also tied to an array of types that describes
24 the prototype of the function pointer(s) (handlers) you may
25 connect to the signal.  Finally, every signal has
26 a default handler that is given by a function pointer
27 in its class structure:  it is run by default whenever the
28 signal is emitted.  (It is possible that a signal will
29 be emitted and a user-defined handler will prevent the default handler
30 from being run.)
31 </para>
32 <para>
33 Signals are used by everyone, but they are only
34 created on a per class basis-- so you should call
35 call gtk_signal_new() unless you are writing
36 a new #GtkObject type.  However, if you want to make a new signal
37 for an existing type, you may use gtk_object_class_user_signal_new()
38 to create a signal that doesn't correspond to a class's builtin
39 methods.
40 </para>
41 </refsect2>
42 <refsect2>
43 <title>How are signals used?</title>
44 <para>
45 There are two basic actions in the signal handling game.
46 If you want notification of an event, you must <Emphasis>connect</Emphasis>
47 a function pointer and a data pointer to that signal;  the data pointer
48 will be passed as the last argument to the function (so long as you
49 are using the default marshalling functions).
50 You will receive a connection id, a unique positive integer
51 corresponding to that attachment.
52 </para>
53 <para>
54 Functions that want to notify the user of certain actions,
55 <Emphasis>emit</Emphasis> signals.
56 </para>
57 </refsect2>
58 <refsect2>
59 <title>Basic Terminology</title>
60 <variablelist>
61
62 <varlistentry>
63 <term>signal</term>
64 <listitem><para>A class method, e.g. GtkButton::clicked.
65 More precisely it is a unique class-branch/signal-name pair.
66 This means you may not define a signal handler for a class which
67 derives from GtkButton that is called clicked,
68 but it is okay to share signals names if they are separate in
69 the class tree.
70 </para></listitem>
71 </varlistentry>
72
73 <varlistentry>
74 <term>default handler</term>
75 <listitem><para>The object's internal method which is invoked
76 when the signal is emitted.</para>
77 </listitem>
78 </varlistentry>
79
80 <varlistentry>
81 <term>user-defined handler</term>
82 <listitem><para>A function pointer and data connected
83 to a signal (for a particular object).</para>
84 <para>There are really two types: those which are connected
85 normally, and those which are connected by one 
86 of the connect_after functions.  The connect_after handlers
87 are always run after the default handler.</para>
88 <para>Many toolkits refer to these as <wordasword>callbacks</wordasword>.</para>
89 </listitem>
90 </varlistentry>
91
92 <varlistentry>
93 <term>emission</term>
94 <listitem><para>the whole process of emitting a signal,
95 including the invocation of all
96 the different handler types mentioned above.</para>
97 </listitem>
98 </varlistentry>
99
100 <varlistentry>
101 <term>signal id</term>
102 <listitem><para>The unique positive (nonzero) integer
103 used to identify a signal.  It can be used instead of 
104 a name to many functions for a slight performance
105 improvement.</para>
106 </listitem>
107 </varlistentry>
108
109 <varlistentry>
110 <term>connection id</term>
111 <listitem><para>The unique positive (nonzero) integer
112 used to identify the connection of a user-defined handler
113 to a signal.  Notice that it is allowed to connect the
114 same function-pointer/user-data pair twice, so
115 there is no guarantee that a function-pointer/user-data
116 maps to a unique connection id.
117 </para>
118 </listitem>
119 </varlistentry>
120
121 </variablelist>
122 </refsect2>
123
124 <refsect2><title>A brief note on how they work.</title>
125 <para>
126 The functions responsible for translating an array of #GtkArgs
127 to your C compiler's normal semantics are called Marshallers.
128 They are identified by
129 gtk_marshal_return_value__parameter_list()
130 for example a C function returning a gboolean and taking a gint
131 can be invoked by using gtk_marshal_BOOL__INT().
132 Not all possibly combinations of return/params are available,
133 of course, so if you are writing a #GtkObject with parameters
134 you might have to write a marshaller.
135 </para>
136 </refsect2>
137
138 <!-- ##### SECTION See_Also ##### -->
139 <para>
140 <variablelist>
141
142 <varlistentry>
143 <term>#GtkObject</term>
144 <listitem><para>The base class for things which emit signals.</para></listitem>
145 </varlistentry>
146
147 </variablelist>
148 </para>
149
150 <!-- ##### MACRO GTK_SIGNAL_OFFSET ##### -->
151 <para>
152
153 </para>
154
155 <!-- # Unused Parameters # -->
156 @struct: 
157 @field: 
158
159
160 <!-- ##### ENUM GtkSignalRunType ##### -->
161 <para>
162 These configure the signal's emission.  They control
163 whether the signal can be emitted recursively on an object
164 and
165 whether to run the default method before or after the user-defined handlers.
166 </para>
167
168 <variablelist>
169
170 <varlistentry>
171 <term>GTK_RUN_FIRST</term>
172 <listitem><para>Run the default handler before the connected user-defined
173 handlers.
174 </para></listitem>
175 </varlistentry>
176
177 <varlistentry>
178 <term>GTK_RUN_LAST</term>
179 <listitem><para>Run the default handler after the connected
180 user-defined handlers.
181 (Handlers registered as "after" always run after the default handler though)
182 </para></listitem>
183 </varlistentry>
184
185 <varlistentry>
186 <term>GTK_RUN_BOTH</term>
187 <listitem><para>Run the default handler twice,
188 once before the user-defined handlers,
189 and
190 once after.
191 </para></listitem>
192 </varlistentry>
193
194 <varlistentry>
195 <term>GTK_RUN_NO_RECURSE</term>
196 <listitem><para>Whether to prevent a handler or hook
197 from reemitting the signal from within itself.
198 Attempts to
199 emit the signal while it is running will result in the signal
200 emission being restarted once it is done with the current processing.
201 </para><para>
202 You must be
203 careful to avoid having two handlers endlessly reemitting signals,
204 gtk_signal_n_emissions() can be helpful.
205 </para></listitem>
206 </varlistentry>
207
208 <varlistentry>
209 <term>GTK_RUN_ACTION</term>
210 <listitem><para>The signal is an action you can 
211 invoke without any particular setup or cleanup.
212 The signal is treated no differently, but some
213 other code can determine if the signal is appropriate to
214 delegate to user control.  For example, key binding sets
215 only allow bindings of ACTION signals to keystrokes.
216 </para></listitem>
217 </varlistentry>
218
219 <varlistentry>
220 <term>GTK_RUN_NO_HOOKS</term>
221 <listitem><para>This prevents the connection of emission hooks
222 to the signal.
223 </para></listitem>
224 </varlistentry>
225
226 </variablelist>
227
228 @GTK_RUN_FIRST: 
229 @GTK_RUN_LAST: 
230 @GTK_RUN_BOTH: 
231 @GTK_RUN_NO_RECURSE: 
232 @GTK_RUN_ACTION: 
233 @GTK_RUN_NO_HOOKS: 
234
235 <!-- ##### FUNCTION gtk_signal_new ##### -->
236 <para>
237 Create a new signal type.  (This is usually done in the
238 class initializer.)
239 </para>
240
241 @name: the event name for the signal, e.g. "clicked".
242 @signal_flags: a combination of GTK_RUN flags
243 specifying detail of when the default handler is to be invoked.
244 You should at least specify #GTK_RUN_FIRST
245 or #GTK_RUN_LAST.
246 @object_type: the type of object this signal pertains to.
247 It will also pertain to derivers of this type automatically.
248 @function_offset: How many bytes the function pointer is in
249 the class structure for this type.  Used to invoke a class
250 method generically.
251 @marshaller: the function to translate between an array
252 of GtkArgs and the native calling convention.  Usually they
253 are identified just by the type of arguments they take:
254 for example, gtk_marshal_BOOL__STRING() describes a marshaller
255 which takes a string and returns a boolean value.
256 @return_val: the type of return value, or GTK_TYPE_NONE for a signal
257 without a return value.
258 @n_args: 
259 @Varargs: a list of GTK_TYPE_*, one for each parameter.
260 @Returns: the signal id.
261 <!-- # Unused Parameters # -->
262 @nparams: the number of parameter the handlers may take.
263
264
265 <!-- ##### FUNCTION gtk_signal_newv ##### -->
266 <para>
267 Create a new signal type.  (This is usually done in a
268 class initializer.)
269 </para>
270 <para>
271 This function take the types as an array, instead of a list
272 following the arguments.  Otherwise the same as gtk_signal_new().
273 </para>
274
275 @name: the name of the signal to create.
276 @signal_flags: see gtk_signal_new().
277 @object_type: the type of GtkObject to associate the signal with.
278 @function_offset: how many bytes the function pointer is in
279 the class structure for this type.
280 @marshaller: 
281 @return_val: the type of the return value, or GTK_TYPE_NONE if
282 you don't want a return value.
283 @n_args: 
284 @args: 
285 @Returns: the signal id.
286 <!-- # Unused Parameters # -->
287 @nparams: the number of parameters to the user-defined handlers.
288 @params: an array of GtkTypes, describing the prototype to
289 the callbacks.
290
291
292 <!-- ##### FUNCTION gtk_signal_lookup ##### -->
293 <para>
294 Given the name of the signal and the type of object it connects
295 to, get the signal's identifying integer.  Emitting the signal
296 by number is somewhat faster than using the name each time.
297 </para>
298 <para>
299 It also tries the ancestors of the given type.
300 </para>
301
302 @name: the signal's name, e.g. clicked.
303 @object_type: the type that the signal operates on, e.g. #GTK_TYPE_BUTTON.
304 @Returns: the signal's identifying number, or 0 if no signal was found.
305
306
307 <!-- ##### FUNCTION gtk_signal_name ##### -->
308 <para>
309 Given the signal's identifier, find its name.
310 </para>
311 <para>
312 Two different signals may have the same name, if they have differing types.
313 </para>
314
315 @signal_id: the signal's identifying number.
316 @Returns: the signal name, or NULL if the signal number was invalid.
317
318
319 <!-- ##### FUNCTION gtk_signal_emit ##### -->
320 <para>
321 Emit a signal.  This causes the default handler and user-defined
322 handlers to be run.
323 </para>
324 <para>
325 Here is what gtk_signal_emit() does:
326 </para>
327 <para>
328 1.  Calls the default handler and the user-connected handlers.
329 The default handler will be called first if
330 GTK_RUN_FIRST is set, and last if GTK_RUN_LAST is set.
331 </para>
332 <para>
333 2.  Calls all handlers connected with the "after" flag set.
334 </para>
335
336 @object: the object that emits the signal.
337 @signal_id: the signal identifier.
338 @Varargs: the parameters to the function, followed
339 by a pointer to the return type, if any.
340
341
342 <!-- ##### FUNCTION gtk_signal_emit_by_name ##### -->
343 <para>
344 Emit a signal.  This causes the default handler and user-connected
345 handlers to be run.
346 </para>
347
348 @object: the object that emits the signal.
349 @name: the name of the signal.
350 @Varargs: the parameters to the function, followed
351 by a pointer to the return type, if any.
352
353
354 <!-- ##### FUNCTION gtk_signal_emitv ##### -->
355 <para>
356 Emit a signal.  This causes the default handler and user-connected
357 handlers to be run.  This differs from gtk_signal_emit() by taking
358 an array of GtkArgs instead of using C's varargs mechanism.
359 </para>
360
361 @object: the object to emit the signal to.
362 @signal_id: the signal identifier.
363 @args: 
364 <!-- # Unused Parameters # -->
365 @params: an array of GtkArgs, one for each parameter,
366 followed by one which is a pointer to the return type.
367
368
369 <!-- ##### FUNCTION gtk_signal_emitv_by_name ##### -->
370 <para>
371 Emit a signal by name.  This causes the default handler and user-connected
372 handlers to be run.  This differs from gtk_signal_emit() by taking
373 an array of GtkArgs instead of using C's varargs mechanism.
374 </para>
375
376 @object: the object to emit the signal to.
377 @name: the name of the signal.
378 @args: 
379 <!-- # Unused Parameters # -->
380 @params: an array of GtkArgs, one for each parameter,
381 followed by one which is a pointer to the return type.
382
383
384 <!-- ##### FUNCTION gtk_signal_emit_stop ##### -->
385 <para>
386 This function aborts a signal's current emission.
387 </para>
388 <para>
389 It will prevent the default method from running,
390 if the signal was #GTK_RUN_LAST and you connected
391 normally (i.e. without the "after" flag).
392 </para>
393 <para>
394 It will print a warning if used on a signal which
395 isn't being emitted.
396 </para>
397
398 @object: the object whose signal handlers you wish to stop.
399 @signal_id: the signal identifier, as returned by gtk_signal_lookup().
400 <!-- # Unused Parameters # -->
401 @i: 
402 @s: 
403
404
405 <!-- ##### FUNCTION gtk_signal_emit_stop_by_name ##### -->
406 <para>
407 This function aborts a signal's current emission.
408 </para>
409 <para>It is just like
410 gtk_signal_emit_stop()
411 except it will lookup the signal id for you.
412 </para>
413
414 @object: the object whose signal handlers you wish to stop.
415 @name: the name of the signal you wish to stop.
416
417
418 <!-- ##### FUNCTION gtk_signal_connect ##### -->
419 <para>
420 Attach a function pointer and user data to a signal for
421 a particular object.
422 </para>
423 <para>
424 The GtkSignalFunction takes a <StructName>GtkObject</StructName> as its first parameter.
425 It will be the same object as the one you're connecting
426 the hook to.  The func_data will be passed as the last parameter
427 to the hook.
428 </para>
429 <para>
430 All else being equal, signal handlers are invoked in the order 
431 connected (see gtk_signal_emit() for the other details of
432 which order things are called in).
433 </para>
434 <para>
435 Here is how one passes an integer as user data,
436 for when you just want to specify a constant int
437 as parameter to your function:
438 </para>
439 <informalexample>
440 <programlisting>
441 static void button_clicked_int(GtkButton* button, gpointer func_data)
442 {
443         g_print("button pressed: %d\n", GPOINTER_TO_INT(func_data));
444 }
445
446 /* By calling this function, you will make the g_print above
447  * execute, printing the number passed as `to_print'. */
448 static void attach_print_signal(GtkButton* button, gint to_print)
449 {
450         gtk_signal_connect(GTK_OBJECT(button), "clicked",
451                 GTK_SIGNAL_FUNC(button_clicked_int),
452                 GINT_TO_POINTER(to_print));
453 }
454 </programlisting>
455 </informalexample>
456
457 @object: the object associated with the signal, e.g. if a button
458 is getting pressed, this is that button.
459 @name: name of the signal.
460 @func: function pointer to attach to the signal.
461 @func_data: value to pass as to your function (through the marshaller).
462 @Returns: the connection id.
463 <!-- # Unused Parameters # -->
464 @o: 
465 @s: 
466 @f: 
467 @d: 
468
469
470 <!-- ##### FUNCTION gtk_signal_connect_after ##### -->
471 <para>
472 Attach a function pointer and user data to a signal
473 so that this handler will be called after the other handlers.
474 </para>
475
476 @object: the object associated with the signal.
477 @name: name of the signal.
478 @func: function pointer to attach to the signal.
479 @func_data: value to pass as to your function (through the marshaller).
480 @Returns: the unique identifier for this attachment:  the connection id.
481 <!-- # Unused Parameters # -->
482 @o: 
483 @s: 
484 @f: 
485 @d: 
486
487
488 <!-- ##### FUNCTION gtk_signal_connect_object ##### -->
489 <para>
490 This function is for registering a callback that will
491 call another object's callback.  That is,
492 instead of passing the object which is responsible
493 for the event as the first parameter of the callback,
494 it is switched with the user data (so the object which emits
495 the signal will be the last parameter, which is where the
496 user data usually is).
497 </para>
498 <para>
499 This is useful for passing a standard function in as a callback.
500 For example, if you wanted a button's press to gtk_widget_show()
501 some widget, you could write:
502 </para>
503 <informalexample>
504 <programlisting>
505 gtk_signal_connect_object(button, "clicked", gtk_widget_show, window);
506 </programlisting>
507 </informalexample>
508
509 @object: the object which emits the signal.
510 @name: the name of the signal.
511 @func: the function to callback.
512 @slot_object: the object to pass as the first parameter to func.
513 (Though it pretends to take an object, you can
514 really pass any gpointer as the #slot_object .)
515 @Returns: the connection id.
516 <!-- # Unused Parameters # -->
517 @o: 
518 @s: 
519 @f: 
520 @d: 
521
522
523 <!-- ##### FUNCTION gtk_signal_connect_object_after ##### -->
524 <para>
525 Attach a signal hook to a signal, passing in an alternate
526 object as the first parameter, and guaranteeing 
527 that the default handler and all normal
528 handlers are called first.
529 </para>
530
531 @object: the object associated with the signal.
532 @name: name of the signal.
533 @func: function pointer to attach to the signal.
534 @slot_object: the object to pass as the first parameter to #func.
535 @Returns: the connection id.
536 <!-- # Unused Parameters # -->
537 @o: 
538 @s: 
539 @f: 
540 @d: 
541
542
543 <!-- ##### FUNCTION gtk_signal_connect_full ##### -->
544 <para>
545 Attach a function pointer and user data to a signal with
546 more control.
547 </para>
548
549 @object: the object which emits the signal.  For example, a button
550 in the button press signal.
551 @name: the name of the signal.
552 @func: function pointer to attach to the signal.
553 @unsupported: 
554 @data: the user data associated with the function.
555 @destroy_func: function to call when this particular hook is 
556 disconnected.
557 @object_signal: whether this is an object signal-- basically an "object
558 signal" is one that wants its user_data and object fields switched,
559 which is useful for calling functions which operate on another
560 object primarily.
561 @after: whether to invoke the user-defined handler after the signal, or to let 
562 the signal's default behavior preside (i.e. depending on #GTK_RUN_FIRST
563 and #GTK_RUN_LAST).
564 @Returns: the connection id.
565 <!-- # Unused Parameters # -->
566 @marshal: the function marshal, see the gtkmarshall documentation for
567 more details, but briefly: the marshaller is a function which takes
568 the #GtkObject which emits the signal, the user data, the number of the
569 arguments, and the array of arguments.  It is responsible for
570 calling the function in the appropriate calling convention.
571 gtk_signal_default_marshaller is usually fine.
572 (This shows up, for example, when worrying about matching
573 c++ or other languages' calling conventions.)
574
575
576 <!-- ##### FUNCTION gtk_signal_connect_while_alive ##### -->
577 <para>
578 Attach a function pointer and another GtkObject to a signal.
579 </para>
580 <para>
581 This function takes an object whose "destroy" signal
582 should be trapped.
583 That way, you don't have to clean up the
584 signal handler when you destroy the object.
585 It is a little less efficient though.
586 </para>
587 <para>
588 (Instead you may call gtk_signal_disconnect_by_data(), if you want
589 to explicitly delete all attachments to this object.  This
590 is perhaps not recommended since it could be confused
591 with an integer masquerading as a pointer (through GINT_AS_POINTER).)
592 </para>
593
594 @object: the object that emits the signal.
595 @signal: 
596 @func: function pointer to attach to the signal.
597 @func_data: pointer to pass to func.
598 @alive_object: object whose death should cause the handler connection
599 to be destroyed.
600 <!-- # Unused Parameters # -->
601 @name: name of the signal.
602
603
604 <!-- ##### FUNCTION gtk_signal_connect_object_while_alive ##### -->
605 <para>
606 These signal connectors are for signals which refer to objects,
607 so they must not be called after the object is deleted.
608 </para>
609 <para>
610 Unlike gtk_signal_connect_while_alive(),
611 this swaps the object and user data, making it suitable for
612 use with functions which primarily operate on the user data.
613 </para>
614 <para>
615 This function acts just like gtk_signal_connect_object() except
616 it traps the "destroy" signal to prevent you from having to
617 clean up the handler.
618 </para>
619
620 @object: the object associated with the signal.
621 @signal: 
622 @func: function pointer to attach to the signal.
623 @alive_object: the user data, which must be an object, whose destruction
624 should signal the removal of this signal.
625 <!-- # Unused Parameters # -->
626 @name: name of the signal.
627
628
629 <!-- ##### FUNCTION gtk_signal_disconnect ##### -->
630 <para>
631 Destroy a user-defined handler connection.
632 </para>
633
634 @object: the object which the handler pertains to.
635 @handler_id: the connection id.
636
637
638 <!-- ##### FUNCTION gtk_signal_disconnect_by_func ##### -->
639 <para>
640 Destroy all connections for a particular object, with
641 the given function-pointer and user-data.
642 </para>
643
644 @object: the object which emits the signal.
645 @func: the function pointer to search for.
646 @data: the user data to search for.
647 <!-- # Unused Parameters # -->
648 @o: 
649 @f: 
650 @d: 
651
652
653 <!-- ##### FUNCTION gtk_signal_disconnect_by_data ##### -->
654 <para>
655 Destroy all connections for a particular object, with
656 the given user-data.
657 </para>
658
659 @object: the object which emits the signal.
660 @data: the user data to search for.
661 <!-- # Unused Parameters # -->
662 @o: 
663 @d: 
664
665
666 <!-- ##### FUNCTION gtk_signal_handler_block ##### -->
667 <para>
668 Prevent an user-defined handler from being invoked.  All other
669 signal processing will go on as normal, but this particular
670 handler will ignore it.
671 </para>
672
673 @object: the object which emits the signal to block.
674 @handler_id: the connection id.
675
676
677 <!-- ##### FUNCTION gtk_signal_handler_block_by_func ##### -->
678 <para>
679 Prevent a user-defined handler from being invoked, by reference to
680 the user-defined handler's function pointer and user data.  (It may result in
681 multiple hooks being blocked, if you've called connect multiple times.)
682 </para>
683
684 @object: the object which emits the signal to block.
685 @func: the function pointer of the handler to block.
686 @data: the user data of the handler to block.
687 <!-- # Unused Parameters # -->
688 @o: 
689 @f: 
690 @d: 
691
692
693 <!-- ##### FUNCTION gtk_signal_handler_block_by_data ##### -->
694 <para>
695 Prevent all user-defined handlers with a certain user data from being invoked.
696 </para>
697
698 @object: the object which emits the signal we want to block.
699 @data: the user data of the handlers to block.
700 <!-- # Unused Parameters # -->
701 @o: 
702 @d: 
703
704
705 <!-- ##### FUNCTION gtk_signal_handler_unblock ##### -->
706 <para>
707 Undo a block, by connection id.  Note that undoing a block doesn't
708 necessarily make the hook callable, because if you block a
709 hook twice, you must unblock it twice.
710 </para>
711
712 @object: the object which emits the signal we want to unblock.
713 @handler_id: the emission handler identifier, as returned by
714 gtk_signal_connect(), etc.
715
716
717 <!-- ##### FUNCTION gtk_signal_handler_unblock_by_func ##### -->
718 <para>
719 Undo a block, by function pointer and data.
720 Note that undoing a block doesn't
721 necessarily make the hook callable, because if you block a
722 hook twice, you must unblock it twice.
723 </para>
724
725 @object: the object which emits the signal we want to unblock.
726 @func: the function pointer to search for.
727 @data: the user data to search for.
728 <!-- # Unused Parameters # -->
729 @o: 
730 @f: 
731 @d: 
732
733
734 <!-- ##### FUNCTION gtk_signal_handler_unblock_by_data ##### -->
735 <para>
736 Undo block(s), to all signals for a particular object
737 with a particular user-data pointer
738 </para>
739
740 @object: the object which emits the signal we want to unblock.
741 @data: the user data to search for.
742 <!-- # Unused Parameters # -->
743 @o: 
744 @d: 
745
746
747 <!-- ##### FUNCTION gtk_signal_handler_pending ##### -->
748 <para>
749 Returns a connection id corresponding to a given signal id and object.
750 </para>
751 <para>
752 One example of when you might use this is when the arguments
753 to the signal are difficult to compute.  A class implementor
754 may opt to not emit the signal if no one is attached anyway,
755 thus saving the cost of building the arguments.
756 </para>
757
758 @object: the object to search for the desired user-defined handler.
759 @signal_id: the number of the signal to search for.
760 @may_be_blocked: whether it is acceptable to return a blocked
761 handler.
762 @Returns: the connection id, if a connection was found.  0 otherwise.
763 <!-- # Unused Parameters # -->
764 @i: 
765 @s: 
766 @b: 
767
768
769 <!-- ##### FUNCTION gtk_signal_handler_pending_by_func ##### -->
770 <para>
771 Returns a connection id corresponding to a given signal id, object, function
772 pointer and user data.
773 </para>
774
775 @object: the object to search for the desired handler.
776 @signal_id: the number of the signal to search for.
777 @may_be_blocked: whether it is acceptable to return a blocked
778 handler.
779 @func: the function pointer to search for.
780 @data: the user data to search for.
781 @Returns: the connection id, if a handler was found.  0 otherwise.
782 <!-- # Unused Parameters # -->
783 @o: 
784 @s: 
785 @b: 
786 @f: 
787 @d: 
788
789
790 <!-- ##### MACRO gtk_signal_default_marshaller ##### -->
791 <para>
792 A marshaller that returns void and takes no extra parameters.
793 </para>
794
795
796