Mercurial > pidgin.yaz
annotate libpurple/core.h @ 32659:3af16402f176
Add some NULL checks. Now it should not crash even if you don't have
the default theme installed (which you won't since it's not even
written yet!) You just won't see anything...
author | Elliott Sales de Andrade <qulogic@pidgin.im> |
---|---|
date | Wed, 21 Sep 2011 07:01:58 +0000 |
parents | da81195f635e |
children | 02a2e8183b1d |
rev | line source |
---|---|
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1 /** |
23371
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
2 * @file core.h Startup and shutdown of libpurple |
16195
7517e6289bc9
Relabel the Doxygen group as libpurple
Richard Laager <rlaager@wiktel.com>
parents:
15823
diff
changeset
|
3 * @defgroup core libpurple |
20799
f296be2a1039
All the links to libpurple signal pages were in the comment containing the
Will Thompson <will.thompson@collabora.co.uk>
parents:
20074
diff
changeset
|
4 * @see @ref core-signals |
20074
6bf32c9e15a7
remove gpl boilerplate from doxygen docs
Sean Egan <seanegan@gmail.com>
parents:
19680
diff
changeset
|
5 */ |
6bf32c9e15a7
remove gpl boilerplate from doxygen docs
Sean Egan <seanegan@gmail.com>
parents:
19680
diff
changeset
|
6 |
6bf32c9e15a7
remove gpl boilerplate from doxygen docs
Sean Egan <seanegan@gmail.com>
parents:
19680
diff
changeset
|
7 /* purple |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
8 * |
15823 | 9 * Purple is the legal property of its developers, whose names are too numerous |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
10 * to list here. Please refer to the COPYRIGHT file distributed with this |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
11 * source distribution. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
12 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
13 * This program is free software; you can redistribute it and/or modify |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
14 * it under the terms of the GNU General Public License as published by |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
15 * the Free Software Foundation; either version 2 of the License, or |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
16 * (at your option) any later version. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
17 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
18 * This program is distributed in the hope that it will be useful, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
21 * GNU General Public License for more details. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
22 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
23 * You should have received a copy of the GNU General Public License |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
24 * along with this program; if not, write to the Free Software |
19680
44b4e8bd759b
The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
18456
diff
changeset
|
25 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
26 */ |
28492
2f66ad9c32a9
Make the doxygen docs easier to navigate. It was either this or a main page that says "Click on 'Modules'".
Paul Aurich <paul@darkrain42.org>
parents:
27266
diff
changeset
|
27 |
2f66ad9c32a9
Make the doxygen docs easier to navigate. It was either this or a main page that says "Click on 'Modules'".
Paul Aurich <paul@darkrain42.org>
parents:
27266
diff
changeset
|
28 /*! @mainpage Pidgin/Finch/libpurple API Documentation |
2f66ad9c32a9
Make the doxygen docs easier to navigate. It was either this or a main page that says "Click on 'Modules'".
Paul Aurich <paul@darkrain42.org>
parents:
27266
diff
changeset
|
29 * |
2f66ad9c32a9
Make the doxygen docs easier to navigate. It was either this or a main page that says "Click on 'Modules'".
Paul Aurich <paul@darkrain42.org>
parents:
27266
diff
changeset
|
30 * <a href="group__core.html">libpurple</a> is intended to be the core of an IM |
2f66ad9c32a9
Make the doxygen docs easier to navigate. It was either this or a main page that says "Click on 'Modules'".
Paul Aurich <paul@darkrain42.org>
parents:
27266
diff
changeset
|
31 * program. <a href="group__pidgin.html">Pidgin</a> is a GTK+ frontend |
2f66ad9c32a9
Make the doxygen docs easier to navigate. It was either this or a main page that says "Click on 'Modules'".
Paul Aurich <paul@darkrain42.org>
parents:
27266
diff
changeset
|
32 * to libpurple, and <a href="group__finch.html">Finch</a> is an ncurses |
2f66ad9c32a9
Make the doxygen docs easier to navigate. It was either this or a main page that says "Click on 'Modules'".
Paul Aurich <paul@darkrain42.org>
parents:
27266
diff
changeset
|
33 * frontend built using <a href="group__gnt.html">libgnt</a> |
2f66ad9c32a9
Make the doxygen docs easier to navigate. It was either this or a main page that says "Click on 'Modules'".
Paul Aurich <paul@darkrain42.org>
parents:
27266
diff
changeset
|
34 * (GLib Ncurses Toolkit). |
2f66ad9c32a9
Make the doxygen docs easier to navigate. It was either this or a main page that says "Click on 'Modules'".
Paul Aurich <paul@darkrain42.org>
parents:
27266
diff
changeset
|
35 */ |
2f66ad9c32a9
Make the doxygen docs easier to navigate. It was either this or a main page that says "Click on 'Modules'".
Paul Aurich <paul@darkrain42.org>
parents:
27266
diff
changeset
|
36 |
15823 | 37 #ifndef _PURPLE_CORE_H_ |
38 #define _PURPLE_CORE_H_ | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
39 |
15823 | 40 typedef struct PurpleCore PurpleCore; |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
41 |
23371
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
42 /** Callbacks that fire at different points of the initialization and teardown |
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
43 * of libpurple, along with a hook to return descriptive information about the |
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
44 * UI. |
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
45 */ |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
46 typedef struct |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
47 { |
23371
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
48 /** Called just after the preferences subsystem is initialized; the UI |
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
49 * could use this callback to add some preferences it needs to be in |
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
50 * place when other subsystems are initialized. |
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
51 */ |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
52 void (*ui_prefs_init)(void); |
23371
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
53 /** Called just after the debug subsystem is initialized, but before |
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
54 * just about every other component's initialization. The UI should |
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
55 * use this hook to call purple_debug_set_ui_ops() so that debugging |
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
56 * information for other components can be logged during their |
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
57 * initialization. |
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
58 */ |
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
59 void (*debug_ui_init)(void); |
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
60 /** Called after all of libpurple has been initialized. The UI should |
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
61 * use this hook to set all other necessary UiOps structures. |
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
62 * |
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
63 * @see @ref ui-ops |
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
64 */ |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
65 void (*ui_init)(void); |
23371
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
66 /** Called after most of libpurple has been uninitialized. */ |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
67 void (*quit)(void); |
23371
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
68 |
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
69 /** Called by purple_core_get_ui_info(); should return the information |
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
70 * documented there. |
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
71 */ |
18292
9db52d9b8436
core support for UI info...now to do the UI piece
Nathan Walp <nwalp@pidgin.im>
parents:
17212
diff
changeset
|
72 GHashTable* (*get_ui_info)(void); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
73 |
16672
516f14bef90e
Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents:
16341
diff
changeset
|
74 void (*_purple_reserved1)(void); |
516f14bef90e
Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents:
16341
diff
changeset
|
75 void (*_purple_reserved2)(void); |
516f14bef90e
Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents:
16341
diff
changeset
|
76 void (*_purple_reserved3)(void); |
15823 | 77 } PurpleCoreUiOps; |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
78 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
79 #ifdef __cplusplus |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
80 extern "C" { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
81 #endif |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
82 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
83 /** |
15823 | 84 * Initializes the core of purple. |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
85 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
86 * This will setup preferences for all the core subsystems. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
87 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
88 * @param ui The ID of the UI using the core. This should be a |
15823 | 89 * unique ID, registered with the purple team. |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
90 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
91 * @return @c TRUE if successful, or @c FALSE otherwise. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
92 */ |
15823 | 93 gboolean purple_core_init(const char *ui); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
94 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
95 /** |
15823 | 96 * Quits the core of purple, which, depending on the UI, may quit the |
97 * application using the purple core. | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
98 */ |
15823 | 99 void purple_core_quit(void); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
100 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
101 /** |
23371
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
102 * <p> |
25415
584063555949
Remove trailing whitespace
Mark Doliner <mark@kingant.net>
parents:
23404
diff
changeset
|
103 * Calls purple_core_quit(). This can be used as the function |
584063555949
Remove trailing whitespace
Mark Doliner <mark@kingant.net>
parents:
23404
diff
changeset
|
104 * passed to purple_timeout_add() when you want to shutdown Purple |
584063555949
Remove trailing whitespace
Mark Doliner <mark@kingant.net>
parents:
23404
diff
changeset
|
105 * in a specified amount of time. When shutting down Purple |
22010
7e5ecf03b69d
Clarify a comment that was confusing me. Thanks resiak!
Richard Laager <rlaager@wiktel.com>
parents:
20799
diff
changeset
|
106 * from a plugin, you must use this instead of purple_core_quit(); |
25415
584063555949
Remove trailing whitespace
Mark Doliner <mark@kingant.net>
parents:
23404
diff
changeset
|
107 * for an immediate exit, use a timeout value of 0: |
23371
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
108 * </p> |
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
109 * |
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
110 * <code>purple_timeout_add(0, purple_core_quitcb, NULL);</code> |
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
111 * |
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
112 * <p> |
25415
584063555949
Remove trailing whitespace
Mark Doliner <mark@kingant.net>
parents:
23404
diff
changeset
|
113 * This is ensures that code from your plugin is not being |
22010
7e5ecf03b69d
Clarify a comment that was confusing me. Thanks resiak!
Richard Laager <rlaager@wiktel.com>
parents:
20799
diff
changeset
|
114 * executed when purple_core_quit() is called. If the plugin |
7e5ecf03b69d
Clarify a comment that was confusing me. Thanks resiak!
Richard Laager <rlaager@wiktel.com>
parents:
20799
diff
changeset
|
115 * called purple_core_quit() directly, you would get a core dump |
7e5ecf03b69d
Clarify a comment that was confusing me. Thanks resiak!
Richard Laager <rlaager@wiktel.com>
parents:
20799
diff
changeset
|
116 * after purple_core_quit() executes and control returns to your |
7e5ecf03b69d
Clarify a comment that was confusing me. Thanks resiak!
Richard Laager <rlaager@wiktel.com>
parents:
20799
diff
changeset
|
117 * plugin because purple_core_quit() frees all plugins. |
23371
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
118 * </p> |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
119 */ |
15823 | 120 gboolean purple_core_quit_cb(gpointer unused); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
121 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
122 /** |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
123 * Returns the version of the core library. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
124 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
125 * @return The version of the core library. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
126 */ |
15823 | 127 const char *purple_core_get_version(void); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
128 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
129 /** |
23371
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
130 * Returns the ID of the UI that is using the core, as passed to |
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
131 * purple_core_init(). |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
132 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
133 * @return The ID of the UI that is currently using the core. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
134 */ |
15823 | 135 const char *purple_core_get_ui(void); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
136 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
137 /** |
15823 | 138 * Returns a handle to the purple core. |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
139 * |
23371
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
140 * This is used to connect to @ref core-signals "core signals". |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
141 */ |
15823 | 142 PurpleCore *purple_get_core(void); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
143 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
144 /** |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
145 * Sets the UI ops for the core. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
146 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
147 * @param ops A UI ops structure for the core. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
148 */ |
15823 | 149 void purple_core_set_ui_ops(PurpleCoreUiOps *ops); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
150 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
151 /** |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
152 * Returns the UI ops for the core. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
153 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
154 * @return The core's UI ops structure. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
155 */ |
15823 | 156 PurpleCoreUiOps *purple_core_get_ui_ops(void); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
157 |
16341
786edf5e2144
The core portion of the migration code. This is implemented as I described
Richard Laager <rlaager@wiktel.com>
parents:
16195
diff
changeset
|
158 /** |
23371
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
159 * Ensures that only one instance is running. If libpurple is built with D-Bus |
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
160 * support, this checks if another process owns the libpurple bus name and if |
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
161 * so whether that process is using the same configuration directory as this |
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
162 * process. |
17123
176d0fc8bc16
Alternative dbus_uniq implementation
Gabriel Schulhof <nix@go-nix.ca>
parents:
16672
diff
changeset
|
163 * |
23371
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
164 * @return @c TRUE if this is the first instance of libpurple running; |
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
165 * @c FALSE if there is another instance running. |
17212
41ae5efe745c
Document the API changes.
Richard Laager <rlaager@wiktel.com>
parents:
17124
diff
changeset
|
166 * |
41ae5efe745c
Document the API changes.
Richard Laager <rlaager@wiktel.com>
parents:
17124
diff
changeset
|
167 * @since 2.1.0 |
17123
176d0fc8bc16
Alternative dbus_uniq implementation
Gabriel Schulhof <nix@go-nix.ca>
parents:
16672
diff
changeset
|
168 */ |
176d0fc8bc16
Alternative dbus_uniq implementation
Gabriel Schulhof <nix@go-nix.ca>
parents:
16672
diff
changeset
|
169 gboolean purple_core_ensure_single_instance(void); |
176d0fc8bc16
Alternative dbus_uniq implementation
Gabriel Schulhof <nix@go-nix.ca>
parents:
16672
diff
changeset
|
170 |
18292
9db52d9b8436
core support for UI info...now to do the UI piece
Nathan Walp <nwalp@pidgin.im>
parents:
17212
diff
changeset
|
171 /** |
23371
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
172 * Returns a hash table containing various information about the UI. The |
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
173 * following well-known entries may be in the table (along with any others the |
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
174 * UI might choose to include): |
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
175 * |
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
176 * <dl> |
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
177 * <dt><tt>name</tt></dt> |
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
178 * <dd>the user-readable name for the UI.</dd> |
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
179 * |
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
180 * <dt><tt>version</tt></dt> |
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
181 * <dd>a user-readable description of the current version of the UI.</dd> |
23404
c6b29adc22d1
Added "website" and "dev_website" items to the ui_info GHashTable,
Evan Schoenberg <evan.s@dreskin.net>
parents:
23371
diff
changeset
|
182 * |
c6b29adc22d1
Added "website" and "dev_website" items to the ui_info GHashTable,
Evan Schoenberg <evan.s@dreskin.net>
parents:
23371
diff
changeset
|
183 * <dt><tt>website</tt></dt> |
c6b29adc22d1
Added "website" and "dev_website" items to the ui_info GHashTable,
Evan Schoenberg <evan.s@dreskin.net>
parents:
23371
diff
changeset
|
184 * <dd>the UI's website, such as http://pidgin.im.</dd> |
c6b29adc22d1
Added "website" and "dev_website" items to the ui_info GHashTable,
Evan Schoenberg <evan.s@dreskin.net>
parents:
23371
diff
changeset
|
185 * |
c6b29adc22d1
Added "website" and "dev_website" items to the ui_info GHashTable,
Evan Schoenberg <evan.s@dreskin.net>
parents:
23371
diff
changeset
|
186 * <dt><tt>dev_website</tt></dt> |
c6b29adc22d1
Added "website" and "dev_website" items to the ui_info GHashTable,
Evan Schoenberg <evan.s@dreskin.net>
parents:
23371
diff
changeset
|
187 * <dd>the UI's development/support website, such as http://developer.pidgin.im.</dd> |
25836
1d3274111180
Set a value "type" in the ui_info hash table
Marcus Lundblad <ml@update.uu.se>
parents:
23404
diff
changeset
|
188 * |
25837
a95eed74fdd7
Changed "type" to "client_type" for the hash value specifying client type
Marcus Lundblad <ml@update.uu.se>
parents:
25836
diff
changeset
|
189 * <dt><tt>client_type</tt></dt> |
27266
dfa7d2a0d9b8
Clarify the usage of client_type (i.e. these values are matched against using
Paul Aurich <paul@darkrain42.org>
parents:
25978
diff
changeset
|
190 * <dd>the type of UI. Possible values include 'pc', 'console', 'phone', |
dfa7d2a0d9b8
Clarify the usage of client_type (i.e. these values are matched against using
Paul Aurich <paul@darkrain42.org>
parents:
25978
diff
changeset
|
191 * 'handheld', 'web', and 'bot'. These values are compared |
dfa7d2a0d9b8
Clarify the usage of client_type (i.e. these values are matched against using
Paul Aurich <paul@darkrain42.org>
parents:
25978
diff
changeset
|
192 * programmatically and should not be localized.</dd> |
31533
44f53d3fc54f
Remove trailing whitespace
Richard Laager <rlaager@wiktel.com>
parents:
28492
diff
changeset
|
193 * |
23371
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
194 * </dl> |
18292
9db52d9b8436
core support for UI info...now to do the UI piece
Nathan Walp <nwalp@pidgin.im>
parents:
17212
diff
changeset
|
195 * |
9db52d9b8436
core support for UI info...now to do the UI piece
Nathan Walp <nwalp@pidgin.im>
parents:
17212
diff
changeset
|
196 * @return A GHashTable with strings for keys and values. This |
23371
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
197 * hash table must not be freed and should not be modified. |
18292
9db52d9b8436
core support for UI info...now to do the UI piece
Nathan Walp <nwalp@pidgin.im>
parents:
17212
diff
changeset
|
198 * |
9db52d9b8436
core support for UI info...now to do the UI piece
Nathan Walp <nwalp@pidgin.im>
parents:
17212
diff
changeset
|
199 * @since 2.1.0 |
9db52d9b8436
core support for UI info...now to do the UI piece
Nathan Walp <nwalp@pidgin.im>
parents:
17212
diff
changeset
|
200 * |
9db52d9b8436
core support for UI info...now to do the UI piece
Nathan Walp <nwalp@pidgin.im>
parents:
17212
diff
changeset
|
201 */ |
9db52d9b8436
core support for UI info...now to do the UI piece
Nathan Walp <nwalp@pidgin.im>
parents:
17212
diff
changeset
|
202 GHashTable* purple_core_get_ui_info(void); |
9db52d9b8436
core support for UI info...now to do the UI piece
Nathan Walp <nwalp@pidgin.im>
parents:
17212
diff
changeset
|
203 |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
204 #ifdef __cplusplus |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
205 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
206 #endif |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
207 |
15823 | 208 #endif /* _PURPLE_CORE_H_ */ |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
209 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
210 /* |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
211 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
212 /===- |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
213 `//"\\ """"`---.___.-"" |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
214 ______-==| | | \\ _-"` |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
215 __--""" ,-/-==\\ | | `\ ,' |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
216 _-" /' | \\ ___ / / \ / |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
217 .' / | \\ /" "\ /' / \ /' |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
218 / ____ / | \`\.__/-"" D O \_/' / \/' |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
219 /-'" """""---__ | "-/" O G R /' _--"` |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
220 \_| / R __--_ t ), __--"" |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
221 '""--_/ T _-"_>--<_\ h '-" \ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
222 {\__--_/} / \\__>--<__\ e B \ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
223 /' (_/ _-" | |__>--<__| U | |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
224 | _/) )-" | |__>--<__| R | |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
225 / /" ,_/ / /__>---<__/ N | |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
226 o-o _// /-"_>---<__-" I / |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
227 (^(" /"_>---<__- N _-" |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
228 ,/| /__>--<__/ A _-" |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
229 ,//('( |__>--<__| T / .----_ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
230 ( ( ')) |__>--<__| | /' _---_"\ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
231 `-)) )) ( |__>--<__| O | /' / "\`\ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
232 ,/,'//( ( \__>--<__\ R \ /' // || |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
233 ,( ( ((, )) "-__>--<_"-_ "--____---"' _/'/ /' |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
234 `"/ )` ) ,/| "-_">--<_/-__ __-" _/ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
235 ._-"//( )/ )) ` ""-'_/_/ /"""""""__--" |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
236 ;'( ')/ ,)( """""""""" |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
237 ' ') '( (/ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
238 ' ' ` |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
239 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
240 */ |