Tizen 2.1 base
[platform/upstream/glib2.0.git] / docs / reference / glib / tmpl / main.sgml
1 <!-- ##### SECTION Title ##### -->
2 The Main Event Loop
3
4 <!-- ##### SECTION Short_Description ##### -->
5 manages all available sources of events
6
7 <!-- ##### SECTION Long_Description ##### -->
8   <para>
9     The main event loop manages all the available sources of events for
10     GLib and GTK+ applications. These events can come from any number of
11     different types of sources such as file descriptors (plain files,
12     pipes or sockets) and timeouts.  New types of event sources can also
13     be added using g_source_attach().
14   </para>
15   <para>
16     To allow multiple independent sets of sources to be handled in
17     different threads, each source is associated with a #GMainContext.
18     A #GMainContext can only be running in a single thread, but
19     sources can be added to it and removed from it from other threads.
20   </para>
21   <para>
22     Each event source is assigned a priority.  The default priority,
23     #G_PRIORITY_DEFAULT, is 0.  Values less than 0 denote higher
24     priorities.  Values greater than 0 denote lower priorities.  Events
25     from high priority sources are always processed before events from
26     lower priority sources.
27   </para>
28   <para>
29     Idle functions can also be added, and assigned a priority. These will
30     be run whenever no events with a higher priority are ready to be
31     processed.
32   </para>
33   <para>
34     The #GMainLoop data type represents a main event loop.  A #GMainLoop
35     is created with g_main_loop_new(). After adding the initial event sources,
36     g_main_loop_run() is called. This continuously checks for new events from
37     each of the event sources and dispatches them.  Finally, the
38     processing of an event from one of the sources leads to a call to
39     g_main_loop_quit() to exit the main loop, and g_main_loop_run() returns.
40   </para>
41   <para>
42     It is possible to create new instances of #GMainLoop recursively.
43     This is often used in GTK+ applications when showing modal dialog
44     boxes. Note that event sources are associated with a particular
45     #GMainContext, and will be checked and dispatched for all main
46     loops associated with that #GMainContext.
47   </para>
48   <para>
49     GTK+ contains wrappers of some of these functions, e.g. gtk_main(),
50     gtk_main_quit() and gtk_events_pending(). 
51   </para>
52   <refsect2>
53     <title>Creating new sources types</title>
54     <para>
55       One of the unusual features of the GTK+ main loop functionality
56       is that new types of event source can be created and used in
57       addition to the builtin type of event source. A new event source
58       type is used for handling GDK events. A new source type is
59       created by <firstterm>deriving</firstterm> from the #GSource
60       structure. The derived type of source is represented by a
61       structure that has the #GSource structure as a first element,
62       and other elements specific to the new source type. To create
63       an instance of the new source type, call g_source_new() passing
64       in the size of the derived structure and a table of functions.
65       These #GSourceFuncs determine the behavior of the new source
66       types.
67     </para>
68     <para>
69       New source types basically interact with the main context
70       in two ways. Their prepare function in #GSourceFuncs can set
71       a timeout to determine the maximum amount of time that the
72       main loop will sleep before checking the source again.  In
73       addition, or as well, the source can add file descriptors to
74       the set that the main context checks using g_source_add_poll().
75     </para>
76   </refsect2>
77   <refsect2>
78     <title>Customizing the main loop iteration</title>
79     <para>
80       Single iterations of a #GMainContext can be run with
81       g_main_context_iteration(). In some cases, more detailed control
82       of exactly how the details of the main loop work is desired,
83       for instance, when integrating the #GMainLoop with an external
84       main loop. In such cases, you can call the component functions
85       of g_main_context_iteration() directly. These functions
86       are g_main_context_prepare(), g_main_context_query(),
87       g_main_context_check() and g_main_context_dispatch().
88     </para>
89     <para>
90       The operation of these functions can best be seen in terms
91       of a state diagram, as shown in <xref linkend="mainloop-states"/>.
92     </para>
93     <figure id="mainloop-states">
94       <title>States of a Main Context</title>
95       <graphic fileref="mainloop-states.gif" format="GIF"></graphic>
96     </figure>
97   </refsect2>
98
99 <!-- ##### SECTION See_Also ##### -->
100 <para>
101
102 </para>
103
104 <!-- ##### SECTION Stability_Level ##### -->
105
106
107 <!-- ##### STRUCT GMainLoop ##### -->
108 <para>
109 The <structname>GMainLoop</structname> struct is an opaque data type 
110 representing the main event loop of a GLib or GTK+ application.
111 </para>
112
113
114 <!-- ##### FUNCTION g_main_loop_new ##### -->
115 <para>
116
117 </para>
118
119 @context: 
120 @is_running: 
121 @Returns: 
122
123
124 <!-- ##### FUNCTION g_main_loop_ref ##### -->
125 <para>
126
127 </para>
128
129 @loop: 
130 @Returns: 
131
132
133 <!-- ##### FUNCTION g_main_loop_unref ##### -->
134 <para>
135
136 </para>
137
138 @loop: 
139
140
141 <!-- ##### FUNCTION g_main_loop_run ##### -->
142 <para>
143
144 </para>
145
146 @loop: 
147
148
149 <!-- ##### FUNCTION g_main_loop_quit ##### -->
150 <para>
151
152 </para>
153
154 @loop: 
155
156
157 <!-- ##### FUNCTION g_main_loop_is_running ##### -->
158 <para>
159
160 </para>
161
162 @loop: 
163 @Returns: 
164
165
166 <!-- ##### FUNCTION g_main_loop_get_context ##### -->
167 <para>
168
169 </para>
170
171 @loop: 
172 @Returns: 
173
174
175 <!-- ##### MACRO g_main_new ##### -->
176 <para>
177 Creates a new #GMainLoop for the default main loop. 
178 </para>
179
180 @is_running: set to %TRUE to indicate that the loop is running. This is not
181 very important since calling g_main_run() will set this to %TRUE anyway.
182 @Returns: a new #GMainLoop.
183 @Deprecated: 2.2: Use g_main_loop_new() instead.
184
185
186 <!-- ##### MACRO g_main_destroy ##### -->
187 <para>
188 Frees the memory allocated for the #GMainLoop. 
189 </para>
190
191 @loop: a #GMainLoop.
192 @Deprecated: 2.2: Use g_main_loop_unref() instead.
193
194
195 <!-- ##### MACRO g_main_run ##### -->
196 <para>
197 Runs a main loop until it stops running. 
198 </para>
199
200 @loop: a #GMainLoop.
201 @Deprecated: 2.2: Use g_main_loop_run() instead.
202
203
204 <!-- ##### MACRO g_main_quit ##### -->
205 <para>
206 Stops the #GMainLoop. If g_main_run() was called to run the #GMainLoop,
207 it will now return. 
208 </para>
209
210 @loop: a #GMainLoop.
211 @Deprecated: 2.2: Use g_main_loop_quit() instead.
212
213
214 <!-- ##### MACRO g_main_is_running ##### -->
215 <para>
216 Checks if the main loop is running. 
217 </para>
218
219 @loop: a #GMainLoop.
220 @Returns: %TRUE if the main loop is running.
221 @Deprecated: 2.2: USe g_main_loop_is_running() instead.
222
223
224 <!-- ##### MACRO G_PRIORITY_HIGH ##### -->
225 <para>
226 Use this for high priority event sources.
227 It is not used within GLib or GTK+.
228 </para>
229
230
231
232 <!-- ##### MACRO G_PRIORITY_DEFAULT ##### -->
233 <para>
234 Use this for default priority event sources.
235 In GLib this priority is used when adding timeout functions with
236 g_timeout_add().
237 In GDK this priority is used for events from the X server.
238 </para>
239
240
241
242 <!-- ##### MACRO G_PRIORITY_HIGH_IDLE ##### -->
243 <para>
244 Use this for high priority idle functions.
245 GTK+ uses #G_PRIORITY_HIGH_IDLE + 10 for resizing operations, and
246 #G_PRIORITY_HIGH_IDLE + 20 for redrawing operations. (This is done to
247 ensure that any pending resizes are processed before any pending redraws,
248 so that widgets are not redrawn twice unnecessarily.)
249 </para>
250
251
252
253 <!-- ##### MACRO G_PRIORITY_DEFAULT_IDLE ##### -->
254 <para>
255 Use this for default priority idle functions.
256 In GLib this priority is used when adding idle functions with g_idle_add().
257 </para>
258
259
260
261 <!-- ##### MACRO G_PRIORITY_LOW ##### -->
262 <para>
263 Use this for very low priority background tasks.
264 It is not used within GLib or GTK+.
265 </para>
266
267
268
269 <!-- ##### STRUCT GMainContext ##### -->
270 <para>
271 The <structname>GMainContext</structname> struct is an opaque data type 
272 representing a set of sources to be handled in a main loop. 
273 </para>
274
275
276 <!-- ##### FUNCTION g_main_context_new ##### -->
277 <para>
278
279 </para>
280
281 @Returns: 
282
283
284 <!-- ##### FUNCTION g_main_context_ref ##### -->
285 <para>
286
287 </para>
288
289 @context: 
290 @Returns: 
291
292
293 <!-- ##### FUNCTION g_main_context_unref ##### -->
294 <para>
295
296 </para>
297
298 @context: 
299
300
301 <!-- ##### FUNCTION g_main_context_default ##### -->
302 <para>
303
304 </para>
305
306 @Returns: 
307
308
309 <!-- ##### FUNCTION g_main_context_iteration ##### -->
310 <para>
311
312 </para>
313
314 @context: 
315 @may_block: 
316 @Returns: 
317
318
319 <!-- ##### MACRO g_main_iteration ##### -->
320 <para>
321 Runs a single iteration for the default #GMainContext.
322 </para>
323
324 @may_block: set to %TRUE if it should block (i.e. wait) until an event source
325 becomes ready. It will return after an event source has been processed.
326 If set to %FALSE it will return immediately if no event source is ready to be
327 processed.
328 @Returns: %TRUE if more events are pending.
329 @Deprecated: 2.2: Use g_main_context_iteration() instead.
330
331
332 <!-- ##### FUNCTION g_main_context_pending ##### -->
333 <para>
334
335 </para>
336
337 @context: 
338 @Returns: 
339
340
341 <!-- ##### MACRO g_main_pending ##### -->
342 <para>
343 Checks if any events are pending for the default #GMainContext
344 (i.e. ready to be processed).  
345 </para>
346
347 @Returns: %TRUE if any events are pending.
348 @Deprecated: 2.2: Use g_main_context_pending() instead.
349
350
351 <!-- ##### FUNCTION g_main_context_find_source_by_id ##### -->
352 <para>
353
354 </para>
355
356 @context: 
357 @source_id: 
358 @Returns: 
359
360
361 <!-- ##### FUNCTION g_main_context_find_source_by_user_data ##### -->
362 <para>
363
364 </para>
365
366 @context: 
367 @user_data: 
368 @Returns: 
369
370
371 <!-- ##### FUNCTION g_main_context_find_source_by_funcs_user_data ##### -->
372 <para>
373
374 </para>
375
376 @context: 
377 @funcs: 
378 @user_data: 
379 @Returns: 
380
381
382 <!-- ##### FUNCTION g_main_context_wakeup ##### -->
383 <para>
384
385 </para>
386
387 @context: 
388
389
390 <!-- ##### FUNCTION g_main_context_acquire ##### -->
391 <para>
392
393 </para>
394
395 @context: 
396 @Returns: 
397
398
399 <!-- ##### FUNCTION g_main_context_release ##### -->
400 <para>
401
402 </para>
403
404 @context: 
405
406
407 <!-- ##### FUNCTION g_main_context_is_owner ##### -->
408 <para>
409
410 </para>
411
412 @context: 
413 @Returns: 
414
415
416 <!-- ##### FUNCTION g_main_context_wait ##### -->
417 <para>
418
419 </para>
420
421 @context: 
422 @cond: 
423 @mutex: 
424 @Returns: 
425
426
427 <!-- ##### FUNCTION g_main_context_prepare ##### -->
428 <para>
429
430 </para>
431
432 @context: 
433 @priority: 
434 @Returns: 
435
436
437 <!-- ##### FUNCTION g_main_context_query ##### -->
438 <para>
439
440 </para>
441
442 @context: 
443 @max_priority: 
444 @timeout_: 
445 @fds: 
446 @n_fds: 
447 @Returns: 
448
449
450 <!-- ##### FUNCTION g_main_context_check ##### -->
451 <para>
452
453 </para>
454
455 @context: 
456 @max_priority: 
457 @fds: 
458 @n_fds: 
459 @Returns: 
460
461
462 <!-- ##### FUNCTION g_main_context_dispatch ##### -->
463 <para>
464
465 </para>
466
467 @context: 
468
469
470 <!-- ##### FUNCTION g_main_context_set_poll_func ##### -->
471 <para>
472
473 </para>
474
475 @context: 
476 @func: 
477
478
479 <!-- ##### FUNCTION g_main_context_get_poll_func ##### -->
480 <para>
481
482 </para>
483
484 @context: 
485 @Returns: 
486
487
488 <!-- ##### USER_FUNCTION GPollFunc ##### -->
489 <para>
490 Specifies the type of function passed to g_main_context_set_poll_func().
491 The semantics of the function should match those of the
492 <function>poll()</function> system call.
493 </para>
494
495 @ufds: an array of #GPollFD elements.
496 @nfsd: the number of elements in @ufds.
497 @timeout_: the maximum time to wait for an event of the file descriptors.
498           A negative value indicates an infinite timeout.
499 @Returns: the number of #GPollFD elements which have events or errors reported,
500 or -1 if an error occurred.
501
502
503 <!-- ##### FUNCTION g_main_context_add_poll ##### -->
504 <para>
505
506 </para>
507
508 @context: 
509 @fd: 
510 @priority: 
511
512
513 <!-- ##### FUNCTION g_main_context_remove_poll ##### -->
514 <para>
515
516 </para>
517
518 @context: 
519 @fd: 
520
521
522 <!-- ##### FUNCTION g_main_depth ##### -->
523 <para>
524
525 </para>
526
527 @Returns: 
528
529
530 <!-- ##### FUNCTION g_main_current_source ##### -->
531 <para>
532
533 </para>
534
535 @Returns: 
536
537
538 <!-- ##### MACRO g_main_set_poll_func ##### -->
539 <para>
540 Sets the function to use for the handle polling of file descriptors
541 for the default main context. 
542 </para>
543
544 @func: the function to call to poll all file descriptors.
545 @Deprecated: 2.2: Use g_main_context_set_poll_func() instead.
546
547
548 <!-- ##### FUNCTION g_main_context_get_thread_default ##### -->
549 <para>
550
551 </para>
552
553 @Returns: 
554
555
556 <!-- ##### FUNCTION g_main_context_push_thread_default ##### -->
557 <para>
558
559 </para>
560
561 @context: 
562
563
564 <!-- ##### FUNCTION g_main_context_pop_thread_default ##### -->
565 <para>
566
567 </para>
568
569 @context: 
570
571
572 <!-- ##### FUNCTION g_timeout_source_new ##### -->
573 <para>
574
575 </para>
576
577 @interval: 
578 @Returns: 
579
580
581 <!-- ##### FUNCTION g_timeout_source_new_seconds ##### -->
582 <para>
583
584 </para>
585
586 @interval: 
587 @Returns: 
588
589
590 <!-- ##### FUNCTION g_timeout_add ##### -->
591 <para>
592 </para>
593
594 @interval: 
595 @function: 
596 @data: 
597 @Returns: 
598
599
600 <!-- ##### FUNCTION g_timeout_add_full ##### -->
601 <para>
602 </para>
603
604 @priority: 
605 @interval: 
606 @function: 
607 @data: 
608 @notify: 
609 @Returns: 
610
611
612 <!-- ##### FUNCTION g_timeout_add_seconds ##### -->
613 <para>
614
615 </para>
616
617 @interval: 
618 @function: 
619 @data: 
620 @Returns: 
621
622
623 <!-- ##### FUNCTION g_timeout_add_seconds_full ##### -->
624 <para>
625
626 </para>
627
628 @priority: 
629 @interval: 
630 @function: 
631 @data: 
632 @notify: 
633 @Returns: 
634
635
636 <!-- ##### FUNCTION g_idle_source_new ##### -->
637 <para>
638
639 </para>
640
641 @Returns: 
642
643
644 <!-- ##### FUNCTION g_idle_add ##### -->
645 <para>
646 </para>
647
648 @function: 
649 @data: 
650 @Returns: 
651
652
653 <!-- ##### FUNCTION g_idle_add_full ##### -->
654 <para>
655 </para>
656
657 @priority: 
658 @function: 
659 @data: 
660 @notify: 
661 @Returns: 
662
663
664 <!-- ##### FUNCTION g_idle_remove_by_data ##### -->
665 <para>
666 </para>
667
668 @data: 
669 @Returns: 
670
671
672 <!-- ##### TYPEDEF GPid ##### -->
673 <para>
674 A type which is used to hold a process identification. 
675 On Unix, processes are identified by a process id (an 
676 integer), while Windows uses process handles (which are 
677 pointers).
678 </para>
679
680
681 <!-- ##### USER_FUNCTION GChildWatchFunc ##### -->
682 <para>
683 The type of functions to be called when a child exists.
684 </para>
685
686 @pid: the process id of the child process
687 @status: Status information about the child process,
688   see waitpid(2) for more information about this field
689 @data: user data passed to g_child_watch_add()
690
691
692 <!-- ##### FUNCTION g_child_watch_source_new ##### -->
693 <para>
694
695 </para>
696
697 @pid: 
698 @Returns: 
699
700
701 <!-- ##### FUNCTION g_child_watch_add ##### -->
702 <para>
703
704 </para>
705
706 @pid: 
707 @function: 
708 @data: 
709 @Returns: 
710
711
712 <!-- ##### FUNCTION g_child_watch_add_full ##### -->
713 <para>
714
715 </para>
716
717 @priority: 
718 @pid: 
719 @function: 
720 @data: 
721 @notify: 
722 @Returns: 
723
724
725 <!-- ##### STRUCT GPollFD ##### -->
726 <para>
727
728 <informaltable pgwide="1" frame="none" role="struct">
729 <tgroup cols="2"><colspec colwidth="2*"/><colspec colwidth="8*"/>
730 <tbody>
731
732 <row>
733 <entry>#gint fd;</entry>
734 <entry>the file descriptor to poll (or a <type>HANDLE</type> on Win32 platforms).</entry>
735 </row>
736
737 <row>
738 <entry>#gushort events;</entry>
739 <entry>a bitwise combination of flags from #GIOCondition, specifying which
740 events should be polled for. Typically for reading from a file descriptor
741 you would use %G_IO_IN | %G_IO_HUP | %G_IO_ERR, and for writing you would use
742 %G_IO_OUT | %G_IO_ERR.
743 </entry>
744 </row>
745
746 <row>
747 <entry>#gushort revents;</entry>
748 <entry>a bitwise combination of flags from #GIOCondition, returned from the
749 <function>poll()</function> function to indicate which events occurred.
750 </entry>
751 </row>
752 </tbody></tgroup></informaltable>
753
754 </para>
755
756 @fd: 
757 @fd: 
758 @events: 
759 @revents: 
760
761 <!-- ##### FUNCTION g_poll ##### -->
762 <para>
763
764 </para>
765
766 @fds: 
767 @nfds: 
768 @timeout: 
769 @Returns: 
770
771
772 <!-- ##### MACRO G_POLLFD_FORMAT ##### -->
773 <para>
774
775 </para>
776
777
778
779 <!-- ##### STRUCT GSource ##### -->
780 <para>
781 The <structname>GSource</structname> struct is an opaque data type representing
782 an event source.
783 </para>
784
785
786 <!-- ##### USER_FUNCTION GSourceDummyMarshal ##### -->
787 <para>
788 This is just a placeholder for #GClosureMarshal, which cannot be used here
789 for dependency reasons.
790 </para>
791
792
793
794 <!-- ##### STRUCT GSourceFuncs ##### -->
795 <para>
796 The #GSourceFuncs struct contains a table of functions used to handle
797 event sources in a generic manner.
798 </para>
799 <para>
800 For idle sources, the prepare and check functions always return %TRUE to
801 indicate that the source is always ready to be processed.
802 The prepare function also returns a timeout value of 0 to ensure that the
803 poll() call doesn't block (since that would be time 
804 wasted which could have been spent running the idle function).
805 </para>
806 <para>
807 For timeout sources, the prepare and check functions both return %TRUE if the
808 timeout interval has expired. The prepare function also returns a timeout 
809 value to ensure that the poll() call doesn't block too 
810 long and miss the next timeout.
811 </para>
812 <para>
813 For file descriptor sources, the prepare function typically returns %FALSE,
814 since it must wait until poll() has been called before 
815 it knows whether any events need to be processed. It sets the returned 
816 timeout to -1 to indicate that it doesn't mind how long the 
817 poll() call blocks.
818 In the check function, it tests the results of the poll()
819 call to see if the required condition has been met, and returns %TRUE if so.
820 </para>
821
822 @prepare: Called before all the file descriptors are polled.
823 If the source can determine that it is ready here (without waiting for the
824 results of the poll() call) it should return %TRUE.
825 It can also return a @timeout_ value which should be the maximum timeout
826 (in milliseconds) which should be passed to the poll() call.
827 The actual timeout used will be -1 if all sources returned -1, or it will
828 be the minimum of all the @timeout_ values returned which were >= 0.
829 @check: Called after all the file descriptors are polled.
830 The source should return %TRUE if it is ready to be dispatched.
831 Note that some time may have passed since the previous prepare function was
832 called, so the source should be checked again here.
833 @dispatch: Called to dispatch the event source, after it has returned %TRUE in
834 either its @prepare or its @check function. The @dispatch function is
835 passed in a callback function and data. The callback function may be
836 %NULL if the source was never connected to a callback using
837 g_source_set_callback(). The @dispatch function should call the
838 callback function with @user_data and whatever additional parameters are
839 needed for this type of event source.
840 @finalize: Called when the source is finalized.
841 @closure_callback: 
842 @closure_marshal: 
843
844 <!-- ##### STRUCT GSourceCallbackFuncs ##### -->
845 <para>
846 The <structname>GSourceCallbackFuncs</structname> struct contains
847 functions for managing callback objects. 
848 </para>
849
850 @ref: Called when a reference is added to the callback object.
851 @unref: Called when a reference to the callback object is dropped.
852 @get: Called to extract the callback function and data from the callback object.
853
854 <!-- ##### FUNCTION g_source_new ##### -->
855 <para>
856
857 </para>
858
859 @source_funcs: 
860 @struct_size: 
861 @Returns: 
862
863
864 <!-- ##### FUNCTION g_source_ref ##### -->
865 <para>
866
867 </para>
868
869 @source: 
870 @Returns: 
871
872
873 <!-- ##### FUNCTION g_source_unref ##### -->
874 <para>
875
876 </para>
877
878 @source: 
879
880
881 <!-- ##### FUNCTION g_source_set_funcs ##### -->
882 <para>
883
884 </para>
885
886 @source: 
887 @funcs: 
888
889
890 <!-- ##### FUNCTION g_source_attach ##### -->
891 <para>
892
893 </para>
894
895 @source: 
896 @context: 
897 @Returns: 
898
899
900 <!-- ##### FUNCTION g_source_destroy ##### -->
901 <para>
902
903 </para>
904
905 @source: 
906
907
908 <!-- ##### FUNCTION g_source_is_destroyed ##### -->
909 <para>
910
911 </para>
912
913 @source: 
914 @Returns: 
915
916
917 <!-- ##### FUNCTION g_source_set_priority ##### -->
918 <para>
919
920 </para>
921
922 @source: 
923 @priority: 
924
925
926 <!-- ##### FUNCTION g_source_get_priority ##### -->
927 <para>
928
929 </para>
930
931 @source: 
932 @Returns: 
933
934
935 <!-- ##### FUNCTION g_source_set_can_recurse ##### -->
936 <para>
937
938 </para>
939
940 @source: 
941 @can_recurse: 
942
943
944 <!-- ##### FUNCTION g_source_get_can_recurse ##### -->
945 <para>
946
947 </para>
948
949 @source: 
950 @Returns: 
951
952
953 <!-- ##### FUNCTION g_source_get_id ##### -->
954 <para>
955
956 </para>
957
958 @source: 
959 @Returns: 
960
961
962 <!-- ##### FUNCTION g_source_get_context ##### -->
963 <para>
964
965 </para>
966
967 @source: 
968 @Returns: 
969
970
971 <!-- ##### FUNCTION g_source_set_callback ##### -->
972 <para>
973
974 </para>
975
976 @source: 
977 @func: 
978 @data: 
979 @notify: 
980
981
982 <!-- ##### USER_FUNCTION GSourceFunc ##### -->
983 <para>
984 Specifies the type of function passed to g_timeout_add(), g_timeout_add_full(),
985 g_idle_add(), and g_idle_add_full().
986 </para>
987
988 @data: data passed to the function, set when the source was created with one
989 of the above functions.
990 @Returns: it should return %FALSE if the source should be removed.
991
992
993 <!-- ##### FUNCTION g_source_set_callback_indirect ##### -->
994 <para>
995
996 </para>
997
998 @source: 
999 @callback_data: 
1000 @callback_funcs: 
1001
1002
1003 <!-- ##### FUNCTION g_source_add_poll ##### -->
1004 <para>
1005
1006 </para>
1007
1008 @source: 
1009 @fd: 
1010
1011
1012 <!-- ##### FUNCTION g_source_remove_poll ##### -->
1013 <para>
1014
1015 </para>
1016
1017 @source: 
1018 @fd: 
1019
1020
1021 <!-- ##### FUNCTION g_source_get_current_time ##### -->
1022 <para>
1023
1024 </para>
1025
1026 @source: 
1027 @timeval: 
1028
1029
1030 <!-- ##### FUNCTION g_source_remove ##### -->
1031 <para>
1032 </para>
1033
1034 @tag: 
1035 @Returns: 
1036
1037
1038 <!-- ##### FUNCTION g_source_remove_by_funcs_user_data ##### -->
1039 <para>
1040 </para>
1041
1042 @funcs: 
1043 @user_data: 
1044 @Returns: 
1045
1046
1047 <!-- ##### FUNCTION g_source_remove_by_user_data ##### -->
1048 <para>
1049 </para>
1050
1051 @user_data: 
1052 @Returns: 
1053
1054 <!--
1055 Local variables:
1056 mode: sgml
1057 sgml-parent-document: ("../glib-docs.sgml" "book" "refsect2" "")
1058 End:
1059 -->
1060
1061