annotate src/core.h @ 6207:f78a42ef3101

[gaim-migrate @ 6693] bah. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Fri, 18 Jul 2003 03:27:01 +0000
parents 0342af6a8b36
children 2d3c3a0cb7b1
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5034
4691c5936c01 [gaim-migrate @ 5377]
Christian Hammond <chipx86@chipx86.com>
parents: 5032
diff changeset
1 /**
6179
16e384bb7fbf [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
2 * @file core.h Gaim Core API
5034
4691c5936c01 [gaim-migrate @ 5377]
Christian Hammond <chipx86@chipx86.com>
parents: 5032
diff changeset
3 * @defgroup core Gaim Core
4691c5936c01 [gaim-migrate @ 5377]
Christian Hammond <chipx86@chipx86.com>
parents: 5032
diff changeset
4 *
2417
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
5 * gaim
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
6 *
6179
16e384bb7fbf [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
7 * Copyright (C) 2003 Christian Hammond <chipx86@gnupdate.org>
2417
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
8 *
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
9 * This program is free software; you can redistribute it and/or modify
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
10 * it under the terms of the GNU General Public License as published by
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
11 * the Free Software Foundation; either version 2 of the License, or
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
12 * (at your option) any later version.
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
13 *
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
14 * This program is distributed in the hope that it will be useful,
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
17 * GNU General Public License for more details.
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
18 *
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
19 * You should have received a copy of the GNU General Public License
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
20 * along with this program; if not, write to the Free Software
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
22 */
6179
16e384bb7fbf [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
23 #ifndef _GAIM_CORE_H_
16e384bb7fbf [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
24 #define _GAIM_CORE_H_
2417
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
25
6179
16e384bb7fbf [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
26 typedef struct GaimCore GaimCore;
16e384bb7fbf [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
27
16e384bb7fbf [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
28 typedef struct
16e384bb7fbf [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
29 {
16e384bb7fbf [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
30 void (*ui_prefs_init)(void);
16e384bb7fbf [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
31 void (*debug_ui_init)(void); /* Unfortunate necessity. */
16e384bb7fbf [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
32 void (*ui_init)(void);
16e384bb7fbf [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
33 void (*quit)(void);
16e384bb7fbf [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
34
16e384bb7fbf [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
35 } GaimCoreUiOps;
16e384bb7fbf [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
36
16e384bb7fbf [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
37 /**
16e384bb7fbf [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
38 * Initializes the core of gaim.
16e384bb7fbf [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
39 *
16e384bb7fbf [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
40 * This will setup preferences for all the core subsystems.
16e384bb7fbf [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
41 *
16e384bb7fbf [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
42 * @param ui The ID of the UI using the core. This should be a
16e384bb7fbf [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
43 * unique ID, registered with the gaim team.
16e384bb7fbf [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
44 *
16e384bb7fbf [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
45 * @return @c TRUE if successful, or @c FALSE otherwise.
16e384bb7fbf [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
46 */
16e384bb7fbf [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
47 gboolean gaim_core_init(const char *ui);
16e384bb7fbf [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
48
16e384bb7fbf [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
49 /**
16e384bb7fbf [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
50 * Quits the core of gaim, which, depending on the UI, may quit the
16e384bb7fbf [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
51 * application using the gaim core.
16e384bb7fbf [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
52 */
16e384bb7fbf [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
53 void gaim_core_quit(void);
2417
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
54
6179
16e384bb7fbf [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
55 /**
6182
0342af6a8b36 [gaim-migrate @ 6668]
Christian Hammond <chipx86@chipx86.com>
parents: 6179
diff changeset
56 * Iterates once through the gaim mainloop.
0342af6a8b36 [gaim-migrate @ 6668]
Christian Hammond <chipx86@chipx86.com>
parents: 6179
diff changeset
57 *
0342af6a8b36 [gaim-migrate @ 6668]
Christian Hammond <chipx86@chipx86.com>
parents: 6179
diff changeset
58 * This is in actuality a wrapper around glib's mainloop iteration
0342af6a8b36 [gaim-migrate @ 6668]
Christian Hammond <chipx86@chipx86.com>
parents: 6179
diff changeset
59 * function, but provides a nice, healthy level of abstraction.
0342af6a8b36 [gaim-migrate @ 6668]
Christian Hammond <chipx86@chipx86.com>
parents: 6179
diff changeset
60 *
0342af6a8b36 [gaim-migrate @ 6668]
Christian Hammond <chipx86@chipx86.com>
parents: 6179
diff changeset
61 * All UIs not using glib must call this in a timer.
0342af6a8b36 [gaim-migrate @ 6668]
Christian Hammond <chipx86@chipx86.com>
parents: 6179
diff changeset
62 */
0342af6a8b36 [gaim-migrate @ 6668]
Christian Hammond <chipx86@chipx86.com>
parents: 6179
diff changeset
63 void gaim_core_mainloop_iteration(void);
0342af6a8b36 [gaim-migrate @ 6668]
Christian Hammond <chipx86@chipx86.com>
parents: 6179
diff changeset
64
0342af6a8b36 [gaim-migrate @ 6668]
Christian Hammond <chipx86@chipx86.com>
parents: 6179
diff changeset
65 /**
6179
16e384bb7fbf [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
66 * Returns the ID of the UI that is using the core.
16e384bb7fbf [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
67 *
16e384bb7fbf [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
68 * @return The ID of the UI that is currently using the core.
16e384bb7fbf [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
69 */
16e384bb7fbf [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
70 const char *gaim_core_get_ui(void);
16e384bb7fbf [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
71
16e384bb7fbf [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
72 /**
16e384bb7fbf [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
73 * Returns a handle to the gaim core.
16e384bb7fbf [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
74 *
16e384bb7fbf [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
75 * This is used for such things as signals.
16e384bb7fbf [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
76 */
16e384bb7fbf [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
77 GaimCore *gaim_get_core(void);
16e384bb7fbf [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
78
16e384bb7fbf [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
79 /**
16e384bb7fbf [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
80 * Sets the UI ops for the core.
16e384bb7fbf [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
81 *
16e384bb7fbf [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
82 * @param A UI ops structure for the core.
16e384bb7fbf [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
83 */
16e384bb7fbf [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
84 void gaim_set_core_ui_ops(GaimCoreUiOps *ops);
16e384bb7fbf [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
85
16e384bb7fbf [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
86 /**
16e384bb7fbf [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
87 * Returns the UI ops for the core.
16e384bb7fbf [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
88 *
16e384bb7fbf [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
89 * @return The core's UI ops structure.
16e384bb7fbf [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
90 */
16e384bb7fbf [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
91 GaimCoreUiOps *gaim_get_core_ui_ops(void);
16e384bb7fbf [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
92
16e384bb7fbf [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
93 #endif /* _GAIM_CORE_H_ */
5862
d0a311def860 [gaim-migrate @ 6293]
Sean Egan <seanegan@gmail.com>
parents: 5859
diff changeset
94
d0a311def860 [gaim-migrate @ 6293]
Sean Egan <seanegan@gmail.com>
parents: 5859
diff changeset
95 /*
d0a311def860 [gaim-migrate @ 6293]
Sean Egan <seanegan@gmail.com>
parents: 5859
diff changeset
96
d0a311def860 [gaim-migrate @ 6293]
Sean Egan <seanegan@gmail.com>
parents: 5859
diff changeset
97 /===-
d0a311def860 [gaim-migrate @ 6293]
Sean Egan <seanegan@gmail.com>
parents: 5859
diff changeset
98 `//"\\ """"`---.___.-""
d0a311def860 [gaim-migrate @ 6293]
Sean Egan <seanegan@gmail.com>
parents: 5859
diff changeset
99 ______-==| | | \\ _-"`
d0a311def860 [gaim-migrate @ 6293]
Sean Egan <seanegan@gmail.com>
parents: 5859
diff changeset
100 __--""" ,-/-==\\ | | `\ ,'
d0a311def860 [gaim-migrate @ 6293]
Sean Egan <seanegan@gmail.com>
parents: 5859
diff changeset
101 _-" /' | \\ ___ / / \ /
d0a311def860 [gaim-migrate @ 6293]
Sean Egan <seanegan@gmail.com>
parents: 5859
diff changeset
102 .' / | \\ /" "\ /' / \ /'
6169
0a210d84d9d7 [gaim-migrate @ 6652]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
103 / ____ / | \`\.__/-"" D O \_/' / \/'
0a210d84d9d7 [gaim-migrate @ 6652]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
104 /-'" """""---__ | "-/" O G R /' _--"`
6179
16e384bb7fbf [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
105 \_| / R __--_ t ), __--""
16e384bb7fbf [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
106 '""--_/ T _-"_>--<_\ h '-" \
16e384bb7fbf [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
107 {\__--_/} / \\__>--<__\ e B \
6169
0a210d84d9d7 [gaim-migrate @ 6652]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
108 /' (_/ _-" | |__>--<__| U |
0a210d84d9d7 [gaim-migrate @ 6652]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
109 | _/) )-" | |__>--<__| R |
0a210d84d9d7 [gaim-migrate @ 6652]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
110 / /" ,_/ / /__>---<__/ N |
0a210d84d9d7 [gaim-migrate @ 6652]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
111 o-o _// /-"_>---<__-" I /
0a210d84d9d7 [gaim-migrate @ 6652]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
112 (^(" /"_>---<__- N _-"
0a210d84d9d7 [gaim-migrate @ 6652]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
113 ,/| /__>--<__/ A _-"
0a210d84d9d7 [gaim-migrate @ 6652]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
114 ,//('( |__>--<__| T / .----_
5862
d0a311def860 [gaim-migrate @ 6293]
Sean Egan <seanegan@gmail.com>
parents: 5859
diff changeset
115 ( ( ')) |__>--<__| | /' _---_"\
6169
0a210d84d9d7 [gaim-migrate @ 6652]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
116 `-)) )) ( |__>--<__| O | /' / "\`\
0a210d84d9d7 [gaim-migrate @ 6652]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
117 ,/,'//( ( \__>--<__\ R \ /' // ||
5862
d0a311def860 [gaim-migrate @ 6293]
Sean Egan <seanegan@gmail.com>
parents: 5859
diff changeset
118 ,( ( ((, )) "-__>--<_"-_ "--____---"' _/'/ /'
d0a311def860 [gaim-migrate @ 6293]
Sean Egan <seanegan@gmail.com>
parents: 5859
diff changeset
119 `"/ )` ) ,/| "-_">--<_/-__ __-" _/
d0a311def860 [gaim-migrate @ 6293]
Sean Egan <seanegan@gmail.com>
parents: 5859
diff changeset
120 ._-"//( )/ )) ` ""-'_/_/ /"""""""__--"
d0a311def860 [gaim-migrate @ 6293]
Sean Egan <seanegan@gmail.com>
parents: 5859
diff changeset
121 ;'( ')/ ,)( """"""""""
d0a311def860 [gaim-migrate @ 6293]
Sean Egan <seanegan@gmail.com>
parents: 5859
diff changeset
122 ' ') '( (/
d0a311def860 [gaim-migrate @ 6293]
Sean Egan <seanegan@gmail.com>
parents: 5859
diff changeset
123 ' ' `
d0a311def860 [gaim-migrate @ 6293]
Sean Egan <seanegan@gmail.com>
parents: 5859
diff changeset
124
d0a311def860 [gaim-migrate @ 6293]
Sean Egan <seanegan@gmail.com>
parents: 5859
diff changeset
125 */