Sun, 15 Apr 2007 02:10:37 +0000
propagate from branch 'im.pidgin.gaim' (head b2836a24d81e7a1bd1d21b3aea8794b094391344)
to branch 'im.pidgin.rlaager.merging.soc-msnp13-to-svn18164' (head 463b4fa9f067b279f843520d95a822adc86a0a1b)
|
5034
077678f7b048
[gaim-migrate @ 5377]
Christian Hammond <chipx86@chipx86.com>
parents:
5032
diff
changeset
|
1 | /** |
|
077678f7b048
[gaim-migrate @ 5377]
Christian Hammond <chipx86@chipx86.com>
parents:
5032
diff
changeset
|
2 | * @defgroup core Gaim Core |
|
077678f7b048
[gaim-migrate @ 5377]
Christian Hammond <chipx86@chipx86.com>
parents:
5032
diff
changeset
|
3 | * |
| 2417 | 4 | * gaim |
| 5 | * | |
| 8046 | 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. | |
|
6612
aac6af649208
[gaim-migrate @ 7136]
Christian Hammond <chipx86@chipx86.com>
parents:
6314
diff
changeset
|
9 | * |
| 2417 | 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 | */ | |
|
6179
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6169
diff
changeset
|
24 | #ifndef _GAIM_CORE_H_ |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6169
diff
changeset
|
25 | #define _GAIM_CORE_H_ |
| 2417 | 26 | |
|
6179
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6169
diff
changeset
|
27 | typedef struct GaimCore GaimCore; |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6169
diff
changeset
|
28 | |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6169
diff
changeset
|
29 | typedef struct |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6169
diff
changeset
|
30 | { |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6169
diff
changeset
|
31 | void (*ui_prefs_init)(void); |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6169
diff
changeset
|
32 | void (*debug_ui_init)(void); /* Unfortunate necessity. */ |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6169
diff
changeset
|
33 | void (*ui_init)(void); |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6169
diff
changeset
|
34 | void (*quit)(void); |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6169
diff
changeset
|
35 | |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6169
diff
changeset
|
36 | } GaimCoreUiOps; |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6169
diff
changeset
|
37 | |
|
6314
25bba03c42cd
[gaim-migrate @ 6813]
Christian Hammond <chipx86@chipx86.com>
parents:
6182
diff
changeset
|
38 | #ifdef __cplusplus |
|
25bba03c42cd
[gaim-migrate @ 6813]
Christian Hammond <chipx86@chipx86.com>
parents:
6182
diff
changeset
|
39 | extern "C" { |
|
25bba03c42cd
[gaim-migrate @ 6813]
Christian Hammond <chipx86@chipx86.com>
parents:
6182
diff
changeset
|
40 | #endif |
|
25bba03c42cd
[gaim-migrate @ 6813]
Christian Hammond <chipx86@chipx86.com>
parents:
6182
diff
changeset
|
41 | |
|
6179
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6169
diff
changeset
|
42 | /** |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6169
diff
changeset
|
43 | * Initializes the core of gaim. |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6169
diff
changeset
|
44 | * |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6169
diff
changeset
|
45 | * This will setup preferences for all the core subsystems. |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6169
diff
changeset
|
46 | * |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6169
diff
changeset
|
47 | * @param ui The ID of the UI using the core. This should be a |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6169
diff
changeset
|
48 | * unique ID, registered with the gaim team. |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6169
diff
changeset
|
49 | * |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6169
diff
changeset
|
50 | * @return @c TRUE if successful, or @c FALSE otherwise. |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6169
diff
changeset
|
51 | */ |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6169
diff
changeset
|
52 | gboolean gaim_core_init(const char *ui); |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6169
diff
changeset
|
53 | |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6169
diff
changeset
|
54 | /** |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6169
diff
changeset
|
55 | * Quits the core of gaim, which, depending on the UI, may quit the |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6169
diff
changeset
|
56 | * application using the gaim core. |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6169
diff
changeset
|
57 | */ |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6169
diff
changeset
|
58 | void gaim_core_quit(void); |
| 2417 | 59 | |
|
6179
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6169
diff
changeset
|
60 | /** |
|
7646
6806a6893ac0
[gaim-migrate @ 8289]
Mark Doliner <markdoliner@pidgin.im>
parents:
7082
diff
changeset
|
61 | * Calls gaim_core_quit(). This can be used as the function |
| 8273 | 62 | * passed to gaim_timeout_add() when you want to shutdown Gaim |
|
7646
6806a6893ac0
[gaim-migrate @ 8289]
Mark Doliner <markdoliner@pidgin.im>
parents:
7082
diff
changeset
|
63 | * in a specified amount of time. When shutting down Gaim |
|
6806a6893ac0
[gaim-migrate @ 8289]
Mark Doliner <markdoliner@pidgin.im>
parents:
7082
diff
changeset
|
64 | * from a plugin, you must use this with a timeout value of 0: |
| 8273 | 65 | * gaim_timeout_add(0, gaim_core_quitcb, NULL); |
|
7646
6806a6893ac0
[gaim-migrate @ 8289]
Mark Doliner <markdoliner@pidgin.im>
parents:
7082
diff
changeset
|
66 | * This is ensures that code from your plugin is not being |
|
6806a6893ac0
[gaim-migrate @ 8289]
Mark Doliner <markdoliner@pidgin.im>
parents:
7082
diff
changeset
|
67 | * executed when gaim_core_quit() is called. Otherwise you |
|
6806a6893ac0
[gaim-migrate @ 8289]
Mark Doliner <markdoliner@pidgin.im>
parents:
7082
diff
changeset
|
68 | * would get a core dump after gaim_core_quit() executes and |
|
6806a6893ac0
[gaim-migrate @ 8289]
Mark Doliner <markdoliner@pidgin.im>
parents:
7082
diff
changeset
|
69 | * control returns to your plugin because gaim_core_quit() frees |
|
6806a6893ac0
[gaim-migrate @ 8289]
Mark Doliner <markdoliner@pidgin.im>
parents:
7082
diff
changeset
|
70 | * all plugins. |
|
6806a6893ac0
[gaim-migrate @ 8289]
Mark Doliner <markdoliner@pidgin.im>
parents:
7082
diff
changeset
|
71 | */ |
|
6806a6893ac0
[gaim-migrate @ 8289]
Mark Doliner <markdoliner@pidgin.im>
parents:
7082
diff
changeset
|
72 | gboolean gaim_core_quit_cb(gpointer unused); |
|
6806a6893ac0
[gaim-migrate @ 8289]
Mark Doliner <markdoliner@pidgin.im>
parents:
7082
diff
changeset
|
73 | |
|
6806a6893ac0
[gaim-migrate @ 8289]
Mark Doliner <markdoliner@pidgin.im>
parents:
7082
diff
changeset
|
74 | /** |
|
6612
aac6af649208
[gaim-migrate @ 7136]
Christian Hammond <chipx86@chipx86.com>
parents:
6314
diff
changeset
|
75 | * Returns the version of the core library. |
|
aac6af649208
[gaim-migrate @ 7136]
Christian Hammond <chipx86@chipx86.com>
parents:
6314
diff
changeset
|
76 | * |
|
aac6af649208
[gaim-migrate @ 7136]
Christian Hammond <chipx86@chipx86.com>
parents:
6314
diff
changeset
|
77 | * @return The version of the core library. |
|
aac6af649208
[gaim-migrate @ 7136]
Christian Hammond <chipx86@chipx86.com>
parents:
6314
diff
changeset
|
78 | */ |
|
aac6af649208
[gaim-migrate @ 7136]
Christian Hammond <chipx86@chipx86.com>
parents:
6314
diff
changeset
|
79 | const char *gaim_core_get_version(void); |
|
aac6af649208
[gaim-migrate @ 7136]
Christian Hammond <chipx86@chipx86.com>
parents:
6314
diff
changeset
|
80 | |
|
aac6af649208
[gaim-migrate @ 7136]
Christian Hammond <chipx86@chipx86.com>
parents:
6314
diff
changeset
|
81 | /** |
|
6179
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6169
diff
changeset
|
82 | * Returns the ID of the UI that is using the core. |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6169
diff
changeset
|
83 | * |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6169
diff
changeset
|
84 | * @return The ID of the UI that is currently using the core. |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6169
diff
changeset
|
85 | */ |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6169
diff
changeset
|
86 | const char *gaim_core_get_ui(void); |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6169
diff
changeset
|
87 | |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6169
diff
changeset
|
88 | /** |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6169
diff
changeset
|
89 | * Returns a handle to the gaim core. |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6169
diff
changeset
|
90 | * |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6169
diff
changeset
|
91 | * This is used for such things as signals. |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6169
diff
changeset
|
92 | */ |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6169
diff
changeset
|
93 | GaimCore *gaim_get_core(void); |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6169
diff
changeset
|
94 | |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6169
diff
changeset
|
95 | /** |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6169
diff
changeset
|
96 | * Sets the UI ops for the core. |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6169
diff
changeset
|
97 | * |
|
12369
5635c1f02708
[gaim-migrate @ 14673]
Peter Lawler <pidgin@bleeter.id.au>
parents:
11035
diff
changeset
|
98 | * @param ops A UI ops structure for the core. |
|
6179
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6169
diff
changeset
|
99 | */ |
|
7035
76bca80cd91d
[gaim-migrate @ 7598]
Christian Hammond <chipx86@chipx86.com>
parents:
6612
diff
changeset
|
100 | void gaim_core_set_ui_ops(GaimCoreUiOps *ops); |
|
6179
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6169
diff
changeset
|
101 | |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6169
diff
changeset
|
102 | /** |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6169
diff
changeset
|
103 | * Returns the UI ops for the core. |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6169
diff
changeset
|
104 | * |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6169
diff
changeset
|
105 | * @return The core's UI ops structure. |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6169
diff
changeset
|
106 | */ |
|
7035
76bca80cd91d
[gaim-migrate @ 7598]
Christian Hammond <chipx86@chipx86.com>
parents:
6612
diff
changeset
|
107 | GaimCoreUiOps *gaim_core_get_ui_ops(void); |
|
6179
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6169
diff
changeset
|
108 | |
|
6314
25bba03c42cd
[gaim-migrate @ 6813]
Christian Hammond <chipx86@chipx86.com>
parents:
6182
diff
changeset
|
109 | #ifdef __cplusplus |
|
25bba03c42cd
[gaim-migrate @ 6813]
Christian Hammond <chipx86@chipx86.com>
parents:
6182
diff
changeset
|
110 | } |
|
25bba03c42cd
[gaim-migrate @ 6813]
Christian Hammond <chipx86@chipx86.com>
parents:
6182
diff
changeset
|
111 | #endif |
|
25bba03c42cd
[gaim-migrate @ 6813]
Christian Hammond <chipx86@chipx86.com>
parents:
6182
diff
changeset
|
112 | |
|
6179
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6169
diff
changeset
|
113 | #endif /* _GAIM_CORE_H_ */ |
| 5862 | 114 | |
| 115 | /* | |
| 116 | ||
| 117 | /===- | |
| 118 | `//"\\ """"`---.___.-"" | |
| 119 | ______-==| | | \\ _-"` | |
| 120 | __--""" ,-/-==\\ | | `\ ,' | |
| 121 | _-" /' | \\ ___ / / \ / | |
| 122 | .' / | \\ /" "\ /' / \ /' | |
|
6169
d23c0f0228ae
[gaim-migrate @ 6652]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
123 | / ____ / | \`\.__/-"" D O \_/' / \/' |
|
d23c0f0228ae
[gaim-migrate @ 6652]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
124 | /-'" """""---__ | "-/" O G R /' _--"` |
|
6179
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6169
diff
changeset
|
125 | \_| / R __--_ t ), __--"" |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6169
diff
changeset
|
126 | '""--_/ T _-"_>--<_\ h '-" \ |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6169
diff
changeset
|
127 | {\__--_/} / \\__>--<__\ e B \ |
|
6169
d23c0f0228ae
[gaim-migrate @ 6652]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
128 | /' (_/ _-" | |__>--<__| U | |
|
d23c0f0228ae
[gaim-migrate @ 6652]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
129 | | _/) )-" | |__>--<__| R | |
|
d23c0f0228ae
[gaim-migrate @ 6652]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
130 | / /" ,_/ / /__>---<__/ N | |
|
d23c0f0228ae
[gaim-migrate @ 6652]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
131 | o-o _// /-"_>---<__-" I / |
|
d23c0f0228ae
[gaim-migrate @ 6652]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
132 | (^(" /"_>---<__- N _-" |
|
d23c0f0228ae
[gaim-migrate @ 6652]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
133 | ,/| /__>--<__/ A _-" |
|
d23c0f0228ae
[gaim-migrate @ 6652]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
134 | ,//('( |__>--<__| T / .----_ |
| 5862 | 135 | ( ( ')) |__>--<__| | /' _---_"\ |
|
6169
d23c0f0228ae
[gaim-migrate @ 6652]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
136 | `-)) )) ( |__>--<__| O | /' / "\`\ |
|
d23c0f0228ae
[gaim-migrate @ 6652]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
137 | ,/,'//( ( \__>--<__\ R \ /' // || |
| 5862 | 138 | ,( ( ((, )) "-__>--<_"-_ "--____---"' _/'/ /' |
| 139 | `"/ )` ) ,/| "-_">--<_/-__ __-" _/ | |
| 140 | ._-"//( )/ )) ` ""-'_/_/ /"""""""__--" | |
| 141 | ;'( ')/ ,)( """""""""" | |
| 142 | ' ') '( (/ | |
| 143 | ' ' ` | |
| 144 | ||
| 145 | */ |