]> Pileus Git - ~andy/gtk/blob - docs/reference/gtk/tmpl/gtksignal.sgml
new function, turns off decorations for a window.
[~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 <!-- ##### TYPEDEF GtkEmissionHook ##### -->
161 <para>
162 A simple function pointer to get invoked when the
163 signal is emitted.  This allows you tie a hook to the signal type,
164 so that it will trap all emissions of that signal, from any object.
165 </para>
166 <para>
167 You may not attach these to signals created with the
168 #GTK_RUN_NO_HOOKS flag.
169 </para>
170
171
172 <!-- ##### ENUM GtkSignalRunType ##### -->
173 <para>
174 These configure the signal's emission.  They control
175 whether the signal can be emitted recursively on an object
176 and
177 whether to run the default method before or after the user-defined handlers.
178 </para>
179
180 <variablelist>
181
182 <varlistentry>
183 <term>GTK_RUN_FIRST</term>
184 <listitem><para>Run the default handler before the connected user-defined
185 handlers.
186 </para></listitem>
187 </varlistentry>
188
189 <varlistentry>
190 <term>GTK_RUN_LAST</term>
191 <listitem><para>Run the default handler after the connected
192 user-defined handlers.
193 (Handlers registered as "after" always run after the default handler though)
194 </para></listitem>
195 </varlistentry>
196
197 <varlistentry>
198 <term>GTK_RUN_BOTH</term>
199 <listitem><para>Run the default handler twice,
200 once before the user-defined handlers,
201 and
202 once after.
203 </para></listitem>
204 </varlistentry>
205
206 <varlistentry>
207 <term>GTK_RUN_NO_RECURSE</term>
208 <listitem><para>Whether to prevent a handler or hook
209 from reemitting the signal from within itself.
210 Attempts to
211 emit the signal while it is running will result in the signal
212 emission being restarted once it is done with the current processing.
213 </para><para>
214 You must be
215 careful to avoid having two handlers endlessly reemitting signals,
216 gtk_signal_n_emissions() can be helpful.
217 </para></listitem>
218 </varlistentry>
219
220 <varlistentry>
221 <term>GTK_RUN_ACTION</term>
222 <listitem><para>The signal is an action you can 
223 invoke without any particular setup or cleanup.
224 The signal is treated no differently, but some
225 other code can determine if the signal is appropriate to
226 delegate to user control.  For example, key binding sets
227 only allow bindings of ACTION signals to keystrokes.
228 </para></listitem>
229 </varlistentry>
230
231 <varlistentry>
232 <term>GTK_RUN_NO_HOOKS</term>
233 <listitem><para>This prevents the connection of emission hooks
234 to the signal.
235 </para></listitem>
236 </varlistentry>
237
238 </variablelist>
239
240 @GTK_RUN_FIRST: 
241 @GTK_RUN_LAST: 
242 @GTK_RUN_BOTH: 
243 @GTK_RUN_NO_RECURSE: 
244 @GTK_RUN_ACTION: 
245 @GTK_RUN_NO_HOOKS: 
246
247 <!-- ##### FUNCTION gtk_signal_new ##### -->
248 <para>
249 Create a new signal type.  (This is usually done in the
250 class initializer.)
251 </para>
252
253 @name: the event name for the signal, e.g. "clicked".
254 @signal_flags: a combination of GTK_RUN flags
255 specifying detail of when the default handler is to be invoked.
256 You should at least specify #GTK_RUN_FIRST
257 or #GTK_RUN_LAST.
258 @object_type: the type of object this signal pertains to.
259 It will also pertain to derivers of this type automatically.
260 @function_offset: How many bytes the function pointer is in
261 the class structure for this type.  Used to invoke a class
262 method generically.
263 @marshaller: the function to translate between an array
264 of GtkArgs and the native calling convention.  Usually they
265 are identified just by the type of arguments they take:
266 for example, gtk_marshal_BOOL__STRING() describes a marshaller
267 which takes a string and returns a boolean value.
268 @return_val: the type of return value, or GTK_TYPE_NONE for a signal
269 without a return value.
270 @n_args: 
271 @Varargs: a list of GTK_TYPE_*, one for each parameter.
272 @Returns: the signal id.
273 <!-- # Unused Parameters # -->
274 @nparams: the number of parameter the handlers may take.
275
276
277 <!-- ##### FUNCTION gtk_signal_newv ##### -->
278 <para>
279 Create a new signal type.  (This is usually done in a
280 class initializer.)
281 </para>
282 <para>
283 This function take the types as an array, instead of a list
284 following the arguments.  Otherwise the same as gtk_signal_new().
285 </para>
286
287 @name: the name of the signal to create.
288 @signal_flags: see gtk_signal_new().
289 @object_type: the type of GtkObject to associate the signal with.
290 @function_offset: how many bytes the function pointer is in
291 the class structure for this type.
292 @marshaller: 
293 @return_val: the type of the return value, or GTK_TYPE_NONE if
294 you don't want a return value.
295 @n_args: 
296 @args: 
297 @Returns: the signal id.
298 <!-- # Unused Parameters # -->
299 @nparams: the number of parameters to the user-defined handlers.
300 @params: an array of GtkTypes, describing the prototype to
301 the callbacks.
302
303
304 <!-- ##### MACRO gtk_signal_lookup ##### -->
305 <para>
306 Given the name of the signal and the type of object it connects
307 to, get the signal's identifying integer.  Emitting the signal
308 by number is somewhat faster than using the name each time.
309 </para>
310 <para>
311 It also tries the ancestors of the given type.
312 </para>
313
314 @Returns: the signal's identifying number, or 0 if no signal was found.
315 <!-- # Unused Parameters # -->
316 @name: the signal's name, e.g. clicked.
317 @object_type: the type that the signal operates on, e.g. #GTK_TYPE_BUTTON.
318
319
320 <!-- ##### MACRO gtk_signal_name ##### -->
321 <para>
322 Given the signal's identifier, find its name.
323 </para>
324 <para>
325 Two different signals may have the same name, if they have differing types.
326 </para>
327
328 @Returns: the signal name, or NULL if the signal number was invalid.
329 <!-- # Unused Parameters # -->
330 @signal_id: the signal's identifying number.
331
332
333 <!-- ##### FUNCTION gtk_signal_emit ##### -->
334 <para>
335 Emit a signal.  This causes the default handler and user-defined
336 handlers to be run.
337 </para>
338 <para>
339 Here is what gtk_signal_emit() does:
340 </para>
341 <para>
342 1.  Calls the default handler and the user-connected handlers.
343 The default handler will be called first if
344 GTK_RUN_FIRST is set, and last if GTK_RUN_LAST is set.
345 </para>
346 <para>
347 2.  Calls all handlers connected with the "after" flag set.
348 </para>
349
350 @object: the object that emits the signal.
351 @signal_id: the signal identifier.
352 @Varargs: the parameters to the function, followed
353 by a pointer to the return type, if any.
354
355
356 <!-- ##### FUNCTION gtk_signal_emit_by_name ##### -->
357 <para>
358 Emit a signal.  This causes the default handler and user-connected
359 handlers to be run.
360 </para>
361
362 @object: the object that emits the signal.
363 @name: the name of the signal.
364 @Varargs: the parameters to the function, followed
365 by a pointer to the return type, if any.
366
367
368 <!-- ##### FUNCTION gtk_signal_emitv ##### -->
369 <para>
370 Emit a signal.  This causes the default handler and user-connected
371 handlers to be run.  This differs from gtk_signal_emit() by taking
372 an array of GtkArgs instead of using C's varargs mechanism.
373 </para>
374
375 @object: the object to emit the signal to.
376 @signal_id: the signal identifier.
377 @args: 
378 <!-- # Unused Parameters # -->
379 @params: an array of GtkArgs, one for each parameter,
380 followed by one which is a pointer to the return type.
381
382
383 <!-- ##### FUNCTION gtk_signal_emitv_by_name ##### -->
384 <para>
385 Emit a signal by name.  This causes the default handler and user-connected
386 handlers to be run.  This differs from gtk_signal_emit() by taking
387 an array of GtkArgs instead of using C's varargs mechanism.
388 </para>
389
390 @object: the object to emit the signal to.
391 @name: the name of the signal.
392 @args: 
393 <!-- # Unused Parameters # -->
394 @params: an array of GtkArgs, one for each parameter,
395 followed by one which is a pointer to the return type.
396
397
398 <!-- ##### MACRO gtk_signal_emit_stop ##### -->
399 <para>
400 This function aborts a signal's current emission.
401 </para>
402 <para>
403 It will prevent the default method from running,
404 if the signal was #GTK_RUN_LAST and you connected
405 normally (i.e. without the "after" flag).
406 </para>
407 <para>
408 It will print a warning if used on a signal which
409 isn't being emitted.
410 </para>
411
412 @i: 
413 @s: 
414 <!-- # Unused Parameters # -->
415 @object: the object whose signal handlers you wish to stop.
416 @signal_id: the signal identifier, as returned by gtk_signal_lookup().
417
418
419 <!-- ##### FUNCTION gtk_signal_emit_stop_by_name ##### -->
420 <para>
421 This function aborts a signal's current emission.
422 </para>
423 <para>It is just like
424 gtk_signal_emit_stop()
425 except it will lookup the signal id for you.
426 </para>
427
428 @object: the object whose signal handlers you wish to stop.
429 @name: the name of the signal you wish to stop.
430
431
432 <!-- ##### MACRO gtk_signal_connect ##### -->
433 <para>
434 Attach a function pointer and user data to a signal for
435 a particular object.
436 </para>
437 <para>
438 The GtkSignalFunction takes a <StructName>GtkObject</StructName> as its first parameter.
439 It will be the same object as the one you're connecting
440 the hook to.  The func_data will be passed as the last parameter
441 to the hook.
442 </para>
443 <para>
444 All else being equal, signal handlers are invoked in the order 
445 connected (see gtk_signal_emit() for the other details of
446 which order things are called in).
447 </para>
448 <para>
449 Here is how one passes an integer as user data,
450 for when you just want to specify a constant int
451 as parameter to your function:
452 </para>
453 <informalexample>
454 <programlisting>
455 static void button_clicked_int(GtkButton* button, gpointer func_data)
456 {
457         g_print("button pressed: %d\n", GPOINTER_TO_INT(func_data));
458 }
459
460 /* By calling this function, you will make the g_print above
461  * execute, printing the number passed as `to_print'. */
462 static void attach_print_signal(GtkButton* button, gint to_print)
463 {
464         gtk_signal_connect(GTK_OBJECT(button), "clicked",
465                 GTK_SIGNAL_FUNC(button_clicked_int),
466                 GINT_TO_POINTER(to_print));
467 }
468 </programlisting>
469 </informalexample>
470
471 @o: 
472 @s: 
473 @f: 
474 @d: 
475 @Returns: the connection id.
476 <!-- # Unused Parameters # -->
477 @object: the object associated with the signal, e.g. if a button
478 is getting pressed, this is that button.
479 @name: name of the signal.
480 @func: function pointer to attach to the signal.
481 @func_data: value to pass as to your function (through the marshaller).
482
483
484 <!-- ##### MACRO gtk_signal_connect_after ##### -->
485 <para>
486 Attach a function pointer and user data to a signal
487 so that this handler will be called after the other handlers.
488 </para>
489
490 @o: 
491 @s: 
492 @f: 
493 @d: 
494 @Returns: the unique identifier for this attachment:  the connection id.
495 <!-- # Unused Parameters # -->
496 @object: the object associated with the signal.
497 @name: name of the signal.
498 @func: function pointer to attach to the signal.
499 @func_data: value to pass as to your function (through the marshaller).
500
501
502 <!-- ##### MACRO gtk_signal_connect_object ##### -->
503 <para>
504 This function is for registering a callback that will
505 call another object's callback.  That is,
506 instead of passing the object which is responsible
507 for the event as the first parameter of the callback,
508 it is switched with the user data (so the object which emits
509 the signal will be the last parameter, which is where the
510 user data usually is).
511 </para>
512 <para>
513 This is useful for passing a standard function in as a callback.
514 For example, if you wanted a button's press to gtk_widget_show()
515 some widget, you could write:
516 </para>
517 <informalexample>
518 <programlisting>
519 gtk_signal_connect_object(button, "clicked", gtk_widget_show, window);
520 </programlisting>
521 </informalexample>
522
523 @o: 
524 @s: 
525 @f: 
526 @d: 
527 @Returns: the connection id.
528 <!-- # Unused Parameters # -->
529 @object: the object which emits the signal.
530 @name: the name of the signal.
531 @func: the function to callback.
532 @slot_object: the object to pass as the first parameter to func.
533 (Though it pretends to take an object, you can
534 really pass any gpointer as the #slot_object .)
535
536
537 <!-- ##### MACRO gtk_signal_connect_object_after ##### -->
538 <para>
539 Attach a signal hook to a signal, passing in an alternate
540 object as the first parameter, and guaranteeing 
541 that the default handler and all normal
542 handlers are called first.
543 </para>
544
545 @o: 
546 @s: 
547 @f: 
548 @d: 
549 @Returns: the connection id.
550 <!-- # Unused Parameters # -->
551 @object: the object associated with the signal.
552 @name: name of the signal.
553 @func: function pointer to attach to the signal.
554 @slot_object: the object to pass as the first parameter to #func.
555
556
557 <!-- ##### FUNCTION gtk_signal_connect_full ##### -->
558 <para>
559 Attach a function pointer and user data to a signal with
560 more control.
561 </para>
562
563 @object: the object which emits the signal.  For example, a button
564 in the button press signal.
565 @name: the name of the signal.
566 @func: function pointer to attach to the signal.
567 @unsupported: 
568 @data: the user data associated with the function.
569 @destroy_func: function to call when this particular hook is 
570 disconnected.
571 @object_signal: whether this is an object signal-- basically an "object
572 signal" is one that wants its user_data and object fields switched,
573 which is useful for calling functions which operate on another
574 object primarily.
575 @after: whether to invoke the user-defined handler after the signal, or to let 
576 the signal's default behavior preside (i.e. depending on #GTK_RUN_FIRST
577 and #GTK_RUN_LAST).
578 @Returns: the connection id.
579 <!-- # Unused Parameters # -->
580 @marshal: the function marshal, see the gtkmarshall documentation for
581 more details, but briefly: the marshaller is a function which takes
582 the #GtkObject which emits the signal, the user data, the number of the
583 arguments, and the array of arguments.  It is responsible for
584 calling the function in the appropriate calling convention.
585 gtk_signal_default_marshaller is usually fine.
586 (This shows up, for example, when worrying about matching
587 c++ or other languages' calling conventions.)
588
589
590 <!-- ##### FUNCTION gtk_signal_connect_while_alive ##### -->
591 <para>
592 Attach a function pointer and another GtkObject to a signal.
593 </para>
594 <para>
595 This function takes an object whose "destroy" signal
596 should be trapped.
597 That way, you don't have to clean up the
598 signal handler when you destroy the object.
599 It is a little less efficient though.
600 </para>
601 <para>
602 (Instead you may call gtk_signal_disconnect_by_data(), if you want
603 to explicitly delete all attachments to this object.  This
604 is perhaps not recommended since it could be confused
605 with an integer masquerading as a pointer (through GINT_AS_POINTER).)
606 </para>
607
608 @object: the object that emits the signal.
609 @signal: 
610 @func: function pointer to attach to the signal.
611 @func_data: pointer to pass to func.
612 @alive_object: object whose death should cause the handler connection
613 to be destroyed.
614 <!-- # Unused Parameters # -->
615 @name: name of the signal.
616
617
618 <!-- ##### FUNCTION gtk_signal_connect_object_while_alive ##### -->
619 <para>
620 These signal connectors are for signals which refer to objects,
621 so they must not be called after the object is deleted.
622 </para>
623 <para>
624 Unlike gtk_signal_connect_while_alive(),
625 this swaps the object and user data, making it suitable for
626 use with functions which primarily operate on the user data.
627 </para>
628 <para>
629 This function acts just like gtk_signal_connect_object() except
630 it traps the "destroy" signal to prevent you from having to
631 clean up the handler.
632 </para>
633
634 @object: the object associated with the signal.
635 @signal: 
636 @func: function pointer to attach to the signal.
637 @alive_object: the user data, which must be an object, whose destruction
638 should signal the removal of this signal.
639 <!-- # Unused Parameters # -->
640 @name: name of the signal.
641
642
643 <!-- ##### MACRO gtk_signal_disconnect ##### -->
644 <para>
645 Destroy a user-defined handler connection.
646 </para>
647
648 <!-- # Unused Parameters # -->
649 @object: the object which the handler pertains to.
650 @handler_id: the connection id.
651
652
653 <!-- ##### MACRO gtk_signal_disconnect_by_func ##### -->
654 <para>
655 Destroy all connections for a particular object, with
656 the given function-pointer and user-data.
657 </para>
658
659 @o: 
660 @f: 
661 @d: 
662 <!-- # Unused Parameters # -->
663 @object: the object which emits the signal.
664 @func: the function pointer to search for.
665 @data: the user data to search for.
666
667
668 <!-- ##### MACRO gtk_signal_disconnect_by_data ##### -->
669 <para>
670 Destroy all connections for a particular object, with
671 the given user-data.
672 </para>
673
674 @o: 
675 @d: 
676 <!-- # Unused Parameters # -->
677 @object: the object which emits the signal.
678 @data: the user data to search for.
679
680
681 <!-- ##### MACRO gtk_signal_handler_block ##### -->
682 <para>
683 Prevent an user-defined handler from being invoked.  All other
684 signal processing will go on as normal, but this particular
685 handler will ignore it.
686 </para>
687
688 <!-- # Unused Parameters # -->
689 @object: the object which emits the signal to block.
690 @handler_id: the connection id.
691
692
693 <!-- ##### MACRO gtk_signal_handler_block_by_func ##### -->
694 <para>
695 Prevent a user-defined handler from being invoked, by reference to
696 the user-defined handler's function pointer and user data.  (It may result in
697 multiple hooks being blocked, if you've called connect multiple times.)
698 </para>
699
700 @o: 
701 @f: 
702 @d: 
703 <!-- # Unused Parameters # -->
704 @object: the object which emits the signal to block.
705 @func: the function pointer of the handler to block.
706 @data: the user data of the handler to block.
707
708
709 <!-- ##### MACRO gtk_signal_handler_block_by_data ##### -->
710 <para>
711 Prevent all user-defined handlers with a certain user data from being invoked.
712 </para>
713
714 @o: 
715 @d: 
716 <!-- # Unused Parameters # -->
717 @object: the object which emits the signal we want to block.
718 @data: the user data of the handlers to block.
719
720
721 <!-- ##### MACRO gtk_signal_handler_unblock ##### -->
722 <para>
723 Undo a block, by connection id.  Note that undoing a block doesn't
724 necessarily make the hook callable, because if you block a
725 hook twice, you must unblock it twice.
726 </para>
727
728 <!-- # Unused Parameters # -->
729 @object: the object which emits the signal we want to unblock.
730 @handler_id: the emission handler identifier, as returned by
731 gtk_signal_connect(), etc.
732
733
734 <!-- ##### MACRO gtk_signal_handler_unblock_by_func ##### -->
735 <para>
736 Undo a block, by function pointer and data.
737 Note that undoing a block doesn't
738 necessarily make the hook callable, because if you block a
739 hook twice, you must unblock it twice.
740 </para>
741
742 @o: 
743 @f: 
744 @d: 
745 <!-- # Unused Parameters # -->
746 @object: the object which emits the signal we want to unblock.
747 @func: the function pointer to search for.
748 @data: the user data to search for.
749
750
751 <!-- ##### MACRO gtk_signal_handler_unblock_by_data ##### -->
752 <para>
753 Undo block(s), to all signals for a particular object
754 with a particular user-data pointer
755 </para>
756
757 @o: 
758 @d: 
759 <!-- # Unused Parameters # -->
760 @object: the object which emits the signal we want to unblock.
761 @data: the user data to search for.
762
763
764 <!-- ##### MACRO gtk_signal_handler_pending ##### -->
765 <para>
766 Returns a connection id corresponding to a given signal id and object.
767 </para>
768 <para>
769 One example of when you might use this is when the arguments
770 to the signal are difficult to compute.  A class implementor
771 may opt to not emit the signal if no one is attached anyway,
772 thus saving the cost of building the arguments.
773 </para>
774
775 @i: 
776 @s: 
777 @b: 
778 @Returns: the connection id, if a connection was found.  0 otherwise.
779 <!-- # Unused Parameters # -->
780 @object: the object to search for the desired user-defined handler.
781 @signal_id: the number of the signal to search for.
782 @may_be_blocked: whether it is acceptable to return a blocked
783 handler.
784
785
786 <!-- ##### MACRO gtk_signal_handler_pending_by_func ##### -->
787 <para>
788 Returns a connection id corresponding to a given signal id, object, function
789 pointer and user data.
790 </para>
791
792 @o: 
793 @s: 
794 @b: 
795 @f: 
796 @d: 
797 @Returns: the connection id, if a handler was found.  0 otherwise.
798 <!-- # Unused Parameters # -->
799 @object: the object to search for the desired handler.
800 @signal_id: the number of the signal to search for.
801 @may_be_blocked: whether it is acceptable to return a blocked
802 handler.
803 @func: the function pointer to search for.
804 @data: the user data to search for.
805
806
807 <!-- ##### MACRO gtk_signal_add_emission_hook ##### -->
808 <para>
809 Add an emission hook for a type of signal, for any object.
810 </para>
811
812 @i: 
813 @h: 
814 @d: 
815 @Returns: the id (that you may pass as a parameter
816 to gtk_signal_remove_emission_hook()).
817 <!-- # Unused Parameters # -->
818 @signal_id: the type of signal to hook for.
819 @hook_func: the function to invoke to handle the emission hook.
820 @data: the user data passed in to hook_func.
821
822
823 <!-- ##### MACRO gtk_signal_remove_emission_hook ##### -->
824 <para>
825 Delete an emission hook. (see gtk_signal_add_emission_hook())
826 </para>
827
828 @i: 
829 @h: 
830 <!-- # Unused Parameters # -->
831 @signal_id: the id of the signal type.
832 @hook_id: the id of the emission handler, returned by add_emission_hook().
833
834
835 <!-- ##### MACRO gtk_signal_default_marshaller ##### -->
836 <para>
837 A marshaller that returns void and takes no extra parameters.
838 </para>
839
840
841