comparison src/core.h @ 6179:16e384bb7fbf

[gaim-migrate @ 6664] Core/UI split the core initialization and shutdown. I think I got all the bugs worked out. It's looking nice and stable here, but if it causes CVS to go to hell for everyone.. er, try to fix it or let me know :) I don't have this in patch form. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Thu, 17 Jul 2003 10:35:43 +0000
parents 0a210d84d9d7
children 0342af6a8b36
comparison
equal deleted inserted replaced
6178:06e28a7b72c3 6179:16e384bb7fbf
1 /** 1 /**
2 * @file core.h Gaim Core 2 * @file core.h Gaim Core API
3 * @defgroup core Gaim Core 3 * @defgroup core Gaim Core
4 * 4 *
5 * gaim 5 * gaim
6 * 6 *
7 * Copyright (C) 1998-1999, Mark Spencer <markster@marko.net> 7 * Copyright (C) 2003 Christian Hammond <chipx86@gnupdate.org>
8 * 8 *
9 * This program is free software; you can redistribute it and/or modify 9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by 10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or 11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version. 12 * (at your option) any later version.
18 * 18 *
19 * You should have received a copy of the GNU General Public License 19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software 20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 */ 22 */
23 #ifndef _GAIM_CORE_H_
24 #define _GAIM_CORE_H_
23 25
24 #ifndef _CORE_H_ 26 typedef struct GaimCore GaimCore;
25 #define _CORE_H_
26 27
27 #endif /* _CORE_H_ */ 28 typedef struct
29 {
30 void (*ui_prefs_init)(void);
31 void (*debug_ui_init)(void); /* Unfortunate necessity. */
32 void (*ui_init)(void);
33 void (*quit)(void);
34
35 } GaimCoreUiOps;
36
37 /**
38 * Initializes the core of gaim.
39 *
40 * This will setup preferences for all the core subsystems.
41 *
42 * @param ui The ID of the UI using the core. This should be a
43 * unique ID, registered with the gaim team.
44 *
45 * @return @c TRUE if successful, or @c FALSE otherwise.
46 */
47 gboolean gaim_core_init(const char *ui);
48
49 /**
50 * Quits the core of gaim, which, depending on the UI, may quit the
51 * application using the gaim core.
52 */
53 void gaim_core_quit(void);
54
55 /**
56 * Returns the ID of the UI that is using the core.
57 *
58 * @return The ID of the UI that is currently using the core.
59 */
60 const char *gaim_core_get_ui(void);
61
62 /**
63 * Returns a handle to the gaim core.
64 *
65 * This is used for such things as signals.
66 */
67 GaimCore *gaim_get_core(void);
68
69 /**
70 * Sets the UI ops for the core.
71 *
72 * @param A UI ops structure for the core.
73 */
74 void gaim_set_core_ui_ops(GaimCoreUiOps *ops);
75
76 /**
77 * Returns the UI ops for the core.
78 *
79 * @return The core's UI ops structure.
80 */
81 GaimCoreUiOps *gaim_get_core_ui_ops(void);
82
83 #endif /* _GAIM_CORE_H_ */
28 84
29 /* 85 /*
30 86
31 /===- 87 /===-
32 `//"\\ """"`---.___.-"" 88 `//"\\ """"`---.___.-""
34 __--""" ,-/-==\\ | | `\ ,' 90 __--""" ,-/-==\\ | | `\ ,'
35 _-" /' | \\ ___ / / \ / 91 _-" /' | \\ ___ / / \ /
36 .' / | \\ /" "\ /' / \ /' 92 .' / | \\ /" "\ /' / \ /'
37 / ____ / | \`\.__/-"" D O \_/' / \/' 93 / ____ / | \`\.__/-"" D O \_/' / \/'
38 /-'" """""---__ | "-/" O G R /' _--"` 94 /-'" """""---__ | "-/" O G R /' _--"`
39 \_| / R __--_ ), __--"" 95 \_| / R __--_ t ), __--""
40 '""--_/ T _-"_>--<_\the'-" \ 96 '""--_/ T _-"_>--<_\ h '-" \
41 {\__--_/} / \\__>--<__\ B \ 97 {\__--_/} / \\__>--<__\ e B \
42 /' (_/ _-" | |__>--<__| U | 98 /' (_/ _-" | |__>--<__| U |
43 | _/) )-" | |__>--<__| R | 99 | _/) )-" | |__>--<__| R |
44 / /" ,_/ / /__>---<__/ N | 100 / /" ,_/ / /__>---<__/ N |
45 o-o _// /-"_>---<__-" I / 101 o-o _// /-"_>---<__-" I /
46 (^(" /"_>---<__- N _-" 102 (^(" /"_>---<__- N _-"