comparison libpurple/core.h @ 15374:5fe8042783c1

Rename gtk/ and libgaim/ to pidgin/ and libpurple/
author Sean Egan <seanegan@gmail.com>
date Sat, 20 Jan 2007 02:32:10 +0000
parents
children 32c366eeeb99
comparison
equal deleted inserted replaced
15373:f79e0f4df793 15374:5fe8042783c1
1 /**
2 * @defgroup core Gaim Core
3 *
4 * gaim
5 *
6 * Gaim is the legal property of its developers, whose names are too numerous
7 * to list here. Please refer to the COPYRIGHT file distributed with this
8 * source distribution.
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 */
24 #ifndef _GAIM_CORE_H_
25 #define _GAIM_CORE_H_
26
27 typedef struct GaimCore GaimCore;
28
29 typedef struct
30 {
31 void (*ui_prefs_init)(void);
32 void (*debug_ui_init)(void); /* Unfortunate necessity. */
33 void (*ui_init)(void);
34 void (*quit)(void);
35
36 } GaimCoreUiOps;
37
38 #ifdef __cplusplus
39 extern "C" {
40 #endif
41
42 /**
43 * Initializes the core of gaim.
44 *
45 * This will setup preferences for all the core subsystems.
46 *
47 * @param ui The ID of the UI using the core. This should be a
48 * unique ID, registered with the gaim team.
49 *
50 * @return @c TRUE if successful, or @c FALSE otherwise.
51 */
52 gboolean gaim_core_init(const char *ui);
53
54 /**
55 * Quits the core of gaim, which, depending on the UI, may quit the
56 * application using the gaim core.
57 */
58 void gaim_core_quit(void);
59
60 /**
61 * Calls gaim_core_quit(). This can be used as the function
62 * passed to gaim_timeout_add() when you want to shutdown Gaim
63 * in a specified amount of time. When shutting down Gaim
64 * from a plugin, you must use this with a timeout value of 0:
65 * gaim_timeout_add(0, gaim_core_quitcb, NULL);
66 * This is ensures that code from your plugin is not being
67 * executed when gaim_core_quit() is called. Otherwise you
68 * would get a core dump after gaim_core_quit() executes and
69 * control returns to your plugin because gaim_core_quit() frees
70 * all plugins.
71 */
72 gboolean gaim_core_quit_cb(gpointer unused);
73
74 /**
75 * Returns the version of the core library.
76 *
77 * @return The version of the core library.
78 */
79 const char *gaim_core_get_version(void);
80
81 /**
82 * Returns the ID of the UI that is using the core.
83 *
84 * @return The ID of the UI that is currently using the core.
85 */
86 const char *gaim_core_get_ui(void);
87
88 /**
89 * Returns a handle to the gaim core.
90 *
91 * This is used for such things as signals.
92 */
93 GaimCore *gaim_get_core(void);
94
95 /**
96 * Sets the UI ops for the core.
97 *
98 * @param ops A UI ops structure for the core.
99 */
100 void gaim_core_set_ui_ops(GaimCoreUiOps *ops);
101
102 /**
103 * Returns the UI ops for the core.
104 *
105 * @return The core's UI ops structure.
106 */
107 GaimCoreUiOps *gaim_core_get_ui_ops(void);
108
109 #ifdef __cplusplus
110 }
111 #endif
112
113 #endif /* _GAIM_CORE_H_ */
114
115 /*
116
117 /===-
118 `//"\\ """"`---.___.-""
119 ______-==| | | \\ _-"`
120 __--""" ,-/-==\\ | | `\ ,'
121 _-" /' | \\ ___ / / \ /
122 .' / | \\ /" "\ /' / \ /'
123 / ____ / | \`\.__/-"" D O \_/' / \/'
124 /-'" """""---__ | "-/" O G R /' _--"`
125 \_| / R __--_ t ), __--""
126 '""--_/ T _-"_>--<_\ h '-" \
127 {\__--_/} / \\__>--<__\ e B \
128 /' (_/ _-" | |__>--<__| U |
129 | _/) )-" | |__>--<__| R |
130 / /" ,_/ / /__>---<__/ N |
131 o-o _// /-"_>---<__-" I /
132 (^(" /"_>---<__- N _-"
133 ,/| /__>--<__/ A _-"
134 ,//('( |__>--<__| T / .----_
135 ( ( ')) |__>--<__| | /' _---_"\
136 `-)) )) ( |__>--<__| O | /' / "\`\
137 ,/,'//( ( \__>--<__\ R \ /' // ||
138 ,( ( ((, )) "-__>--<_"-_ "--____---"' _/'/ /'
139 `"/ )` ) ,/| "-_">--<_/-__ __-" _/
140 ._-"//( )/ )) ` ""-'_/_/ /"""""""__--"
141 ;'( ')/ ,)( """"""""""
142 ' ') '( (/
143 ' ' `
144
145 */