Mercurial > pidgin
comparison src/core.h @ 8273:f24172f53650
[gaim-migrate @ 8997]
This is Scott Lamb's eventloop abstraction patch. If it breaks things,
Scott Lamb will be glad to take the punishment. If it doesn't, it should
make integration into other event loops easier. Well, no, not easier,
harder actually, but it'll be done more appropriately and less hackily..
er, hacky. Is hackily a word?
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Tue, 17 Feb 2004 02:17:48 +0000 |
parents | fa6395637e2c |
children | 11e465b55fe6 |
comparison
equal
deleted
inserted
replaced
8272:9af78e73f0b2 | 8273:f24172f53650 |
---|---|
58 */ | 58 */ |
59 void gaim_core_quit(void); | 59 void gaim_core_quit(void); |
60 | 60 |
61 /** | 61 /** |
62 * Calls gaim_core_quit(). This can be used as the function | 62 * Calls gaim_core_quit(). This can be used as the function |
63 * passed to g_timeout_add() when you want to shutdown Gaim | 63 * passed to gaim_timeout_add() when you want to shutdown Gaim |
64 * in a specified amount of time. When shutting down Gaim | 64 * in a specified amount of time. When shutting down Gaim |
65 * from a plugin, you must use this with a timeout value of 0: | 65 * from a plugin, you must use this with a timeout value of 0: |
66 * g_timeout_add(0, gaim_core_quitcb, NULL); | 66 * gaim_timeout_add(0, gaim_core_quitcb, NULL); |
67 * This is ensures that code from your plugin is not being | 67 * This is ensures that code from your plugin is not being |
68 * executed when gaim_core_quit() is called. Otherwise you | 68 * executed when gaim_core_quit() is called. Otherwise you |
69 * would get a core dump after gaim_core_quit() executes and | 69 * would get a core dump after gaim_core_quit() executes and |
70 * control returns to your plugin because gaim_core_quit() frees | 70 * control returns to your plugin because gaim_core_quit() frees |
71 * all plugins. | 71 * all plugins. |
76 * Returns the version of the core library. | 76 * Returns the version of the core library. |
77 * | 77 * |
78 * @return The version of the core library. | 78 * @return The version of the core library. |
79 */ | 79 */ |
80 const char *gaim_core_get_version(void); | 80 const char *gaim_core_get_version(void); |
81 | |
82 /** | |
83 * Returns whether or not there are any mainloop events pending. | |
84 * | |
85 * @return TRUE if there are mainloop events pending. FALSE otherwise. | |
86 */ | |
87 gboolean gaim_core_mainloop_events_pending(void); | |
88 | |
89 /** | |
90 * Iterates once through the gaim mainloop. | |
91 * | |
92 * This is in actuality a wrapper around glib's mainloop iteration | |
93 * function, but provides a nice, healthy level of abstraction. | |
94 * | |
95 * All UIs not using glib must call this in a timer. | |
96 */ | |
97 void gaim_core_mainloop_iteration(void); | |
98 | |
99 /** | |
100 * Iterates through all remaining events in the mainloop. | |
101 */ | |
102 void gaim_core_mainloop_finish_events(void); | |
103 | 81 |
104 /** | 82 /** |
105 * Returns the ID of the UI that is using the core. | 83 * Returns the ID of the UI that is using the core. |
106 * | 84 * |
107 * @return The ID of the UI that is currently using the core. | 85 * @return The ID of the UI that is currently using the core. |