Fri, 18 Jan 2013 03:51:05 -0500
Move blist loading into purple_core_init.
The comments say we want to move this into purple_blist_init, but that
seems like it would be problematic. We need the UI ops to be set, which
moves blist init after UI init. But stuff needs blist signals to be
registered before UI init, etc., etc. It seemed like a pain to work that
all out. I made purple_blist_boot for purple_core_init to call after the
UI init happened. It could have been called _load, but I didn't want
people to accidentally continue calling it.
| 6485 | 1 | /** |
|
6488
6a47a95e4dbb
[gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents:
6485
diff
changeset
|
2 | * @file signals.h Signal API |
| 6485 | 3 | * @ingroup core |
|
20147
66f05a854eee
applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
4 | */ |
|
66f05a854eee
applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
5 | |
|
66f05a854eee
applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
6 | /* purple |
| 6485 | 7 | * |
| 15884 | 8 | * Purple is the legal property of its developers, whose names are too numerous |
| 8046 | 9 | * to list here. Please refer to the COPYRIGHT file distributed with this |
| 10 | * source distribution. | |
| 6485 | 11 | * |
| 12 | * This program is free software; you can redistribute it and/or modify | |
| 13 | * it under the terms of the GNU General Public License as published by | |
| 14 | * the Free Software Foundation; either version 2 of the License, or | |
| 15 | * (at your option) any later version. | |
| 16 | * | |
| 17 | * This program is distributed in the hope that it will be useful, | |
| 18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 20 | * GNU General Public License for more details. | |
| 21 | * | |
| 22 | * You should have received a copy of the GNU General Public License | |
| 23 | * along with this program; if not, write to the Free Software | |
|
19859
71d37b57eff2
The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
18744
diff
changeset
|
24 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
| 6485 | 25 | */ |
| 15884 | 26 | #ifndef _PURPLE_SIGNALS_H_ |
| 27 | #define _PURPLE_SIGNALS_H_ | |
| 6485 | 28 | |
| 29 | #include <glib.h> | |
|
6564
a7a2c1927544
[gaim-migrate @ 7086]
Christian Hammond <chipx86@chipx86.com>
parents:
6562
diff
changeset
|
30 | #include "value.h" |
| 6485 | 31 | |
| 15884 | 32 | #define PURPLE_CALLBACK(func) ((PurpleCallback)func) |
| 6485 | 33 | |
| 15884 | 34 | typedef void (*PurpleCallback)(void); |
| 35 | typedef void (*PurpleSignalMarshalFunc)(PurpleCallback cb, va_list args, | |
| 6485 | 36 | void *data, void **return_val); |
| 37 | ||
|
32787
7072f190d6ad
Use G_BEGIN/END_DECLS in public libpurple files. This was
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
31669
diff
changeset
|
38 | G_BEGIN_DECLS |
| 6485 | 39 | |
| 40 | /**************************************************************************/ | |
| 41 | /** @name Signal API */ | |
| 42 | /**************************************************************************/ | |
| 43 | /*@{*/ | |
| 44 | ||
|
22080
39cf44dceb93
Clarify documentation of confusingly-named and -valued signal priority
Will Thompson <resiak@pidgin.im>
parents:
21285
diff
changeset
|
45 | /** The priority of a signal connected using purple_signal_connect(). |
|
39cf44dceb93
Clarify documentation of confusingly-named and -valued signal priority
Will Thompson <resiak@pidgin.im>
parents:
21285
diff
changeset
|
46 | * |
|
39cf44dceb93
Clarify documentation of confusingly-named and -valued signal priority
Will Thompson <resiak@pidgin.im>
parents:
21285
diff
changeset
|
47 | * @see purple_signal_connect_priority() |
| 10656 | 48 | */ |
| 15884 | 49 | #define PURPLE_SIGNAL_PRIORITY_DEFAULT 0 |
|
22080
39cf44dceb93
Clarify documentation of confusingly-named and -valued signal priority
Will Thompson <resiak@pidgin.im>
parents:
21285
diff
changeset
|
50 | /** The largest signal priority; signals with this priority will be called |
|
39cf44dceb93
Clarify documentation of confusingly-named and -valued signal priority
Will Thompson <resiak@pidgin.im>
parents:
21285
diff
changeset
|
51 | * <em>last</em>. (This is highest as in numerical value, not as in order of |
|
39cf44dceb93
Clarify documentation of confusingly-named and -valued signal priority
Will Thompson <resiak@pidgin.im>
parents:
21285
diff
changeset
|
52 | * importance.) |
|
39cf44dceb93
Clarify documentation of confusingly-named and -valued signal priority
Will Thompson <resiak@pidgin.im>
parents:
21285
diff
changeset
|
53 | * |
|
39cf44dceb93
Clarify documentation of confusingly-named and -valued signal priority
Will Thompson <resiak@pidgin.im>
parents:
21285
diff
changeset
|
54 | * @see purple_signal_connect_priority(). |
|
39cf44dceb93
Clarify documentation of confusingly-named and -valued signal priority
Will Thompson <resiak@pidgin.im>
parents:
21285
diff
changeset
|
55 | */ |
| 15884 | 56 | #define PURPLE_SIGNAL_PRIORITY_HIGHEST 9999 |
|
22080
39cf44dceb93
Clarify documentation of confusingly-named and -valued signal priority
Will Thompson <resiak@pidgin.im>
parents:
21285
diff
changeset
|
57 | /** The smallest signal priority; signals with this priority will be called |
|
39cf44dceb93
Clarify documentation of confusingly-named and -valued signal priority
Will Thompson <resiak@pidgin.im>
parents:
21285
diff
changeset
|
58 | * <em>first</em>. (This is lowest as in numerical value, not as in order of |
|
39cf44dceb93
Clarify documentation of confusingly-named and -valued signal priority
Will Thompson <resiak@pidgin.im>
parents:
21285
diff
changeset
|
59 | * importance.) |
|
39cf44dceb93
Clarify documentation of confusingly-named and -valued signal priority
Will Thompson <resiak@pidgin.im>
parents:
21285
diff
changeset
|
60 | * |
|
39cf44dceb93
Clarify documentation of confusingly-named and -valued signal priority
Will Thompson <resiak@pidgin.im>
parents:
21285
diff
changeset
|
61 | * @see purple_signal_connect_priority(). |
|
39cf44dceb93
Clarify documentation of confusingly-named and -valued signal priority
Will Thompson <resiak@pidgin.im>
parents:
21285
diff
changeset
|
62 | */ |
| 15884 | 63 | #define PURPLE_SIGNAL_PRIORITY_LOWEST -9999 |
| 10656 | 64 | |
| 65 | /** | |
| 6485 | 66 | * Registers a signal in an instance. |
| 67 | * | |
|
6720
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6564
diff
changeset
|
68 | * @param instance The instance to register the signal for. |
|
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6564
diff
changeset
|
69 | * @param signal The signal name. |
|
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6564
diff
changeset
|
70 | * @param marshal The marshal function. |
|
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6564
diff
changeset
|
71 | * @param ret_value The return value type, or NULL for no return value. |
|
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6564
diff
changeset
|
72 | * @param num_values The number of values to be passed to the callbacks. |
|
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6564
diff
changeset
|
73 | * @param ... The values to pass to the callbacks. |
| 6485 | 74 | * |
| 75 | * @return The signal ID local to that instance, or 0 if the signal | |
| 76 | * couldn't be registered. | |
|
6564
a7a2c1927544
[gaim-migrate @ 7086]
Christian Hammond <chipx86@chipx86.com>
parents:
6562
diff
changeset
|
77 | * |
| 15884 | 78 | * @see PurpleValue |
| 6485 | 79 | */ |
| 15884 | 80 | gulong purple_signal_register(void *instance, const char *signal, |
| 81 | PurpleSignalMarshalFunc marshal, | |
| 82 | PurpleValue *ret_value, int num_values, ...); | |
| 6485 | 83 | |
| 84 | /** | |
| 85 | * Unregisters a signal in an instance. | |
| 86 | * | |
| 87 | * @param instance The instance to unregister the signal for. | |
| 88 | * @param signal The signal name. | |
| 89 | */ | |
| 15884 | 90 | void purple_signal_unregister(void *instance, const char *signal); |
| 6485 | 91 | |
| 92 | /** | |
| 93 | * Unregisters all signals in an instance. | |
| 94 | * | |
| 95 | * @param instance The instance to unregister the signal for. | |
| 96 | */ | |
| 15884 | 97 | void purple_signals_unregister_by_instance(void *instance); |
| 6485 | 98 | |
| 99 | /** | |
|
6564
a7a2c1927544
[gaim-migrate @ 7086]
Christian Hammond <chipx86@chipx86.com>
parents:
6562
diff
changeset
|
100 | * Returns a list of value types used for a signal. |
|
a7a2c1927544
[gaim-migrate @ 7086]
Christian Hammond <chipx86@chipx86.com>
parents:
6562
diff
changeset
|
101 | * |
|
a7a2c1927544
[gaim-migrate @ 7086]
Christian Hammond <chipx86@chipx86.com>
parents:
6562
diff
changeset
|
102 | * @param instance The instance the signal is registered to. |
|
a7a2c1927544
[gaim-migrate @ 7086]
Christian Hammond <chipx86@chipx86.com>
parents:
6562
diff
changeset
|
103 | * @param signal The signal. |
|
6720
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6564
diff
changeset
|
104 | * @param ret_value The return value from the last signal handler. |
|
6564
a7a2c1927544
[gaim-migrate @ 7086]
Christian Hammond <chipx86@chipx86.com>
parents:
6562
diff
changeset
|
105 | * @param num_values The returned number of values. |
|
a7a2c1927544
[gaim-migrate @ 7086]
Christian Hammond <chipx86@chipx86.com>
parents:
6562
diff
changeset
|
106 | * @param values The returned list of values. |
|
a7a2c1927544
[gaim-migrate @ 7086]
Christian Hammond <chipx86@chipx86.com>
parents:
6562
diff
changeset
|
107 | */ |
| 15884 | 108 | void purple_signal_get_values(void *instance, const char *signal, |
| 109 | PurpleValue **ret_value, | |
| 110 | int *num_values, PurpleValue ***values); | |
|
6564
a7a2c1927544
[gaim-migrate @ 7086]
Christian Hammond <chipx86@chipx86.com>
parents:
6562
diff
changeset
|
111 | |
|
a7a2c1927544
[gaim-migrate @ 7086]
Christian Hammond <chipx86@chipx86.com>
parents:
6562
diff
changeset
|
112 | /** |
| 6485 | 113 | * Connects a signal handler to a signal for a particular object. |
| 114 | * | |
| 15884 | 115 | * Take care not to register a handler function twice. Purple will |
| 6485 | 116 | * not correct any mistakes for you in this area. |
| 117 | * | |
| 118 | * @param instance The instance to connect to. | |
| 119 | * @param signal The name of the signal to connect. | |
| 120 | * @param handle The handle of the receiver. | |
| 121 | * @param func The callback function. | |
| 122 | * @param data The data to pass to the callback function. | |
|
22080
39cf44dceb93
Clarify documentation of confusingly-named and -valued signal priority
Will Thompson <resiak@pidgin.im>
parents:
21285
diff
changeset
|
123 | * @param priority The priority with which the handler should be called. Signal |
|
39cf44dceb93
Clarify documentation of confusingly-named and -valued signal priority
Will Thompson <resiak@pidgin.im>
parents:
21285
diff
changeset
|
124 | * handlers are called in ascending numerical order of @a |
|
39cf44dceb93
Clarify documentation of confusingly-named and -valued signal priority
Will Thompson <resiak@pidgin.im>
parents:
21285
diff
changeset
|
125 | * priority from #PURPLE_SIGNAL_PRIORITY_LOWEST to |
|
39cf44dceb93
Clarify documentation of confusingly-named and -valued signal priority
Will Thompson <resiak@pidgin.im>
parents:
21285
diff
changeset
|
126 | * #PURPLE_SIGNAL_PRIORITY_HIGHEST. |
| 10656 | 127 | * |
| 128 | * @return The signal handler ID. | |
| 129 | * | |
| 15884 | 130 | * @see purple_signal_disconnect() |
| 10656 | 131 | */ |
| 15884 | 132 | gulong purple_signal_connect_priority(void *instance, const char *signal, |
|
22080
39cf44dceb93
Clarify documentation of confusingly-named and -valued signal priority
Will Thompson <resiak@pidgin.im>
parents:
21285
diff
changeset
|
133 | void *handle, PurpleCallback func, void *data, int priority); |
| 10656 | 134 | |
| 135 | /** | |
| 136 | * Connects a signal handler to a signal for a particular object. | |
|
22080
39cf44dceb93
Clarify documentation of confusingly-named and -valued signal priority
Will Thompson <resiak@pidgin.im>
parents:
21285
diff
changeset
|
137 | * (Its priority defaults to 0, aka #PURPLE_SIGNAL_PRIORITY_DEFAULT.) |
|
25888
d0fdd378a635
Remove trailing whitespace
Mark Doliner <markdoliner@pidgin.im>
parents:
22080
diff
changeset
|
138 | * |
| 15884 | 139 | * Take care not to register a handler function twice. Purple will |
| 10656 | 140 | * not correct any mistakes for you in this area. |
| 141 | * | |
| 142 | * @param instance The instance to connect to. | |
| 143 | * @param signal The name of the signal to connect. | |
| 144 | * @param handle The handle of the receiver. | |
| 145 | * @param func The callback function. | |
| 146 | * @param data The data to pass to the callback function. | |
| 6485 | 147 | * |
| 148 | * @return The signal handler ID. | |
| 149 | * | |
| 15884 | 150 | * @see purple_signal_disconnect() |
| 6485 | 151 | */ |
| 15884 | 152 | gulong purple_signal_connect(void *instance, const char *signal, |
|
22080
39cf44dceb93
Clarify documentation of confusingly-named and -valued signal priority
Will Thompson <resiak@pidgin.im>
parents:
21285
diff
changeset
|
153 | void *handle, PurpleCallback func, void *data); |
| 6485 | 154 | |
| 155 | /** | |
|
6548
40da3b90b19f
[gaim-migrate @ 7070]
Christian Hammond <chipx86@chipx86.com>
parents:
6509
diff
changeset
|
156 | * Connects a signal handler to a signal for a particular object. |
|
40da3b90b19f
[gaim-migrate @ 7070]
Christian Hammond <chipx86@chipx86.com>
parents:
6509
diff
changeset
|
157 | * |
|
40da3b90b19f
[gaim-migrate @ 7070]
Christian Hammond <chipx86@chipx86.com>
parents:
6509
diff
changeset
|
158 | * The signal handler will take a va_args of arguments, instead of |
|
40da3b90b19f
[gaim-migrate @ 7070]
Christian Hammond <chipx86@chipx86.com>
parents:
6509
diff
changeset
|
159 | * individual arguments. |
|
40da3b90b19f
[gaim-migrate @ 7070]
Christian Hammond <chipx86@chipx86.com>
parents:
6509
diff
changeset
|
160 | * |
| 15884 | 161 | * Take care not to register a handler function twice. Purple will |
|
6548
40da3b90b19f
[gaim-migrate @ 7070]
Christian Hammond <chipx86@chipx86.com>
parents:
6509
diff
changeset
|
162 | * not correct any mistakes for you in this area. |
|
40da3b90b19f
[gaim-migrate @ 7070]
Christian Hammond <chipx86@chipx86.com>
parents:
6509
diff
changeset
|
163 | * |
|
40da3b90b19f
[gaim-migrate @ 7070]
Christian Hammond <chipx86@chipx86.com>
parents:
6509
diff
changeset
|
164 | * @param instance The instance to connect to. |
|
40da3b90b19f
[gaim-migrate @ 7070]
Christian Hammond <chipx86@chipx86.com>
parents:
6509
diff
changeset
|
165 | * @param signal The name of the signal to connect. |
|
40da3b90b19f
[gaim-migrate @ 7070]
Christian Hammond <chipx86@chipx86.com>
parents:
6509
diff
changeset
|
166 | * @param handle The handle of the receiver. |
|
40da3b90b19f
[gaim-migrate @ 7070]
Christian Hammond <chipx86@chipx86.com>
parents:
6509
diff
changeset
|
167 | * @param func The callback function. |
|
40da3b90b19f
[gaim-migrate @ 7070]
Christian Hammond <chipx86@chipx86.com>
parents:
6509
diff
changeset
|
168 | * @param data The data to pass to the callback function. |
|
22080
39cf44dceb93
Clarify documentation of confusingly-named and -valued signal priority
Will Thompson <resiak@pidgin.im>
parents:
21285
diff
changeset
|
169 | * @param priority The priority with which the handler should be called. Signal |
|
39cf44dceb93
Clarify documentation of confusingly-named and -valued signal priority
Will Thompson <resiak@pidgin.im>
parents:
21285
diff
changeset
|
170 | * handlers are called in ascending numerical order of @a |
|
39cf44dceb93
Clarify documentation of confusingly-named and -valued signal priority
Will Thompson <resiak@pidgin.im>
parents:
21285
diff
changeset
|
171 | * priority from #PURPLE_SIGNAL_PRIORITY_LOWEST to |
|
39cf44dceb93
Clarify documentation of confusingly-named and -valued signal priority
Will Thompson <resiak@pidgin.im>
parents:
21285
diff
changeset
|
172 | * #PURPLE_SIGNAL_PRIORITY_HIGHEST. |
| 10656 | 173 | * |
| 174 | * @return The signal handler ID. | |
| 175 | * | |
| 15884 | 176 | * @see purple_signal_disconnect() |
| 10656 | 177 | */ |
| 15884 | 178 | gulong purple_signal_connect_priority_vargs(void *instance, const char *signal, |
|
22080
39cf44dceb93
Clarify documentation of confusingly-named and -valued signal priority
Will Thompson <resiak@pidgin.im>
parents:
21285
diff
changeset
|
179 | void *handle, PurpleCallback func, void *data, int priority); |
| 10656 | 180 | |
| 181 | /** | |
| 182 | * Connects a signal handler to a signal for a particular object. | |
|
22080
39cf44dceb93
Clarify documentation of confusingly-named and -valued signal priority
Will Thompson <resiak@pidgin.im>
parents:
21285
diff
changeset
|
183 | * (Its priority defaults to 0, aka #PURPLE_SIGNAL_PRIORITY_DEFAULT.) |
|
39cf44dceb93
Clarify documentation of confusingly-named and -valued signal priority
Will Thompson <resiak@pidgin.im>
parents:
21285
diff
changeset
|
184 | * |
| 10656 | 185 | * The signal handler will take a va_args of arguments, instead of |
| 186 | * individual arguments. | |
| 187 | * | |
| 15884 | 188 | * Take care not to register a handler function twice. Purple will |
| 10656 | 189 | * not correct any mistakes for you in this area. |
| 190 | * | |
| 191 | * @param instance The instance to connect to. | |
| 192 | * @param signal The name of the signal to connect. | |
| 193 | * @param handle The handle of the receiver. | |
| 194 | * @param func The callback function. | |
| 195 | * @param data The data to pass to the callback function. | |
|
6548
40da3b90b19f
[gaim-migrate @ 7070]
Christian Hammond <chipx86@chipx86.com>
parents:
6509
diff
changeset
|
196 | * |
|
40da3b90b19f
[gaim-migrate @ 7070]
Christian Hammond <chipx86@chipx86.com>
parents:
6509
diff
changeset
|
197 | * @return The signal handler ID. |
|
40da3b90b19f
[gaim-migrate @ 7070]
Christian Hammond <chipx86@chipx86.com>
parents:
6509
diff
changeset
|
198 | * |
| 15884 | 199 | * @see purple_signal_disconnect() |
|
6548
40da3b90b19f
[gaim-migrate @ 7070]
Christian Hammond <chipx86@chipx86.com>
parents:
6509
diff
changeset
|
200 | */ |
| 15884 | 201 | gulong purple_signal_connect_vargs(void *instance, const char *signal, |
|
22080
39cf44dceb93
Clarify documentation of confusingly-named and -valued signal priority
Will Thompson <resiak@pidgin.im>
parents:
21285
diff
changeset
|
202 | void *handle, PurpleCallback func, void *data); |
|
6548
40da3b90b19f
[gaim-migrate @ 7070]
Christian Hammond <chipx86@chipx86.com>
parents:
6509
diff
changeset
|
203 | |
|
40da3b90b19f
[gaim-migrate @ 7070]
Christian Hammond <chipx86@chipx86.com>
parents:
6509
diff
changeset
|
204 | /** |
| 6485 | 205 | * Disconnects a signal handler from a signal on an object. |
| 206 | * | |
| 207 | * @param instance The instance to disconnect from. | |
| 208 | * @param signal The name of the signal to disconnect. | |
| 209 | * @param handle The handle of the receiver. | |
| 210 | * @param func The registered function to disconnect. | |
| 211 | * | |
| 15884 | 212 | * @see purple_signal_connect() |
| 6485 | 213 | */ |
| 15884 | 214 | void purple_signal_disconnect(void *instance, const char *signal, |
| 215 | void *handle, PurpleCallback func); | |
| 6485 | 216 | |
| 217 | /** | |
| 218 | * Removes all callbacks associated with a receiver handle. | |
| 219 | * | |
| 220 | * @param handle The receiver handle. | |
| 221 | */ | |
| 15884 | 222 | void purple_signals_disconnect_by_handle(void *handle); |
| 6485 | 223 | |
| 224 | /** | |
| 225 | * Emits a signal. | |
| 226 | * | |
| 227 | * @param instance The instance emitting the signal. | |
| 228 | * @param signal The signal being emitted. | |
| 229 | * | |
| 15884 | 230 | * @see purple_signal_connect() |
| 231 | * @see purple_signal_disconnect() | |
| 6485 | 232 | */ |
| 15884 | 233 | void purple_signal_emit(void *instance, const char *signal, ...); |
| 6485 | 234 | |
| 235 | /** | |
| 236 | * Emits a signal, using a va_list of arguments. | |
| 237 | * | |
| 238 | * @param instance The instance emitting the signal. | |
| 239 | * @param signal The signal being emitted. | |
| 240 | * @param args The arguments list. | |
| 241 | * | |
| 15884 | 242 | * @see purple_signal_connect() |
| 243 | * @see purple_signal_disconnect() | |
| 6485 | 244 | */ |
| 15884 | 245 | void purple_signal_emit_vargs(void *instance, const char *signal, va_list args); |
| 6485 | 246 | |
| 247 | /** | |
|
10789
cabd145237d8
[gaim-migrate @ 12431]
Richard Laager <rlaager@pidgin.im>
parents:
10656
diff
changeset
|
248 | * Emits a signal and returns the first non-NULL return value. |
|
cabd145237d8
[gaim-migrate @ 12431]
Richard Laager <rlaager@pidgin.im>
parents:
10656
diff
changeset
|
249 | * |
|
cabd145237d8
[gaim-migrate @ 12431]
Richard Laager <rlaager@pidgin.im>
parents:
10656
diff
changeset
|
250 | * Further signal handlers are NOT called after a handler returns |
|
cabd145237d8
[gaim-migrate @ 12431]
Richard Laager <rlaager@pidgin.im>
parents:
10656
diff
changeset
|
251 | * something other than NULL. |
| 6485 | 252 | * |
| 253 | * @param instance The instance emitting the signal. | |
| 254 | * @param signal The signal being emitted. | |
| 255 | * | |
|
10789
cabd145237d8
[gaim-migrate @ 12431]
Richard Laager <rlaager@pidgin.im>
parents:
10656
diff
changeset
|
256 | * @return The first non-NULL return value |
| 6485 | 257 | */ |
| 15884 | 258 | void *purple_signal_emit_return_1(void *instance, const char *signal, ...); |
| 6485 | 259 | |
| 260 | /** | |
|
10789
cabd145237d8
[gaim-migrate @ 12431]
Richard Laager <rlaager@pidgin.im>
parents:
10656
diff
changeset
|
261 | * Emits a signal and returns the first non-NULL return value. |
|
cabd145237d8
[gaim-migrate @ 12431]
Richard Laager <rlaager@pidgin.im>
parents:
10656
diff
changeset
|
262 | * |
|
cabd145237d8
[gaim-migrate @ 12431]
Richard Laager <rlaager@pidgin.im>
parents:
10656
diff
changeset
|
263 | * Further signal handlers are NOT called after a handler returns |
|
cabd145237d8
[gaim-migrate @ 12431]
Richard Laager <rlaager@pidgin.im>
parents:
10656
diff
changeset
|
264 | * something other than NULL. |
| 6485 | 265 | * |
| 266 | * @param instance The instance emitting the signal. | |
| 267 | * @param signal The signal being emitted. | |
| 268 | * @param args The arguments list. | |
| 269 | * | |
|
10789
cabd145237d8
[gaim-migrate @ 12431]
Richard Laager <rlaager@pidgin.im>
parents:
10656
diff
changeset
|
270 | * @return The first non-NULL return value |
| 6485 | 271 | */ |
| 15884 | 272 | void *purple_signal_emit_vargs_return_1(void *instance, const char *signal, |
| 6485 | 273 | va_list args); |
| 274 | ||
| 275 | /** | |
| 276 | * Initializes the signals subsystem. | |
| 277 | */ | |
| 15884 | 278 | void purple_signals_init(void); |
| 6485 | 279 | |
| 280 | /** | |
| 281 | * Uninitializes the signals subsystem. | |
| 282 | */ | |
| 15884 | 283 | void purple_signals_uninit(void); |
| 6485 | 284 | |
| 285 | /*@}*/ | |
| 286 | ||
| 287 | /**************************************************************************/ | |
| 288 | /** @name Marshal Functions */ | |
| 289 | /**************************************************************************/ | |
| 290 | /*@{*/ | |
| 291 | ||
| 15884 | 292 | void purple_marshal_VOID( |
| 293 | PurpleCallback cb, va_list args, void *data, void **return_val); | |
| 294 | void purple_marshal_VOID__INT( | |
| 295 | PurpleCallback cb, va_list args, void *data, void **return_val); | |
| 296 | void purple_marshal_VOID__INT_INT( | |
| 297 | PurpleCallback cb, va_list args, void *data, void **return_val); | |
| 298 | void purple_marshal_VOID__POINTER( | |
| 299 | PurpleCallback cb, va_list args, void *data, void **return_val); | |
| 300 | void purple_marshal_VOID__POINTER_UINT( | |
| 301 | PurpleCallback cb, va_list args, void *data, void **return_val); | |
| 302 | void purple_marshal_VOID__POINTER_INT_INT( | |
| 303 | PurpleCallback cb, va_list args, void *data, void **return_val); | |
|
21285
ca8cb8706802
I figured a signal firing on a connection error would be useful.
Will Thompson <resiak@pidgin.im>
parents:
20826
diff
changeset
|
304 | void purple_marshal_VOID__POINTER_INT_POINTER( |
|
ca8cb8706802
I figured a signal firing on a connection error would be useful.
Will Thompson <resiak@pidgin.im>
parents:
20826
diff
changeset
|
305 | PurpleCallback cb, va_list args, void *data, void **return_val); |
| 15884 | 306 | void purple_marshal_VOID__POINTER_POINTER( |
| 307 | PurpleCallback cb, va_list args, void *data, void **return_val); | |
| 308 | void purple_marshal_VOID__POINTER_POINTER_UINT( | |
| 309 | PurpleCallback cb, va_list args, void *data, void **return_val); | |
| 310 | void purple_marshal_VOID__POINTER_POINTER_UINT_UINT( | |
| 311 | PurpleCallback cb, va_list args, void *data, void **return_val); | |
| 312 | void purple_marshal_VOID__POINTER_POINTER_POINTER( | |
| 313 | PurpleCallback cb, va_list args, void *data, void **return_val); | |
| 314 | void purple_marshal_VOID__POINTER_POINTER_POINTER_POINTER( | |
| 315 | PurpleCallback cb, va_list args, void *data, void **return_val); | |
| 316 | void purple_marshal_VOID__POINTER_POINTER_POINTER_POINTER_POINTER( | |
| 317 | PurpleCallback cb, va_list args, void *data, void **return_val); | |
| 318 | void purple_marshal_VOID__POINTER_POINTER_POINTER_UINT( | |
| 319 | PurpleCallback cb, va_list args, void *data, void **return_val); | |
| 320 | void purple_marshal_VOID__POINTER_POINTER_POINTER_POINTER_UINT( | |
| 321 | PurpleCallback cb, va_list args, void *data, void **return_val); | |
| 322 | void purple_marshal_VOID__POINTER_POINTER_POINTER_UINT_UINT( | |
| 323 | PurpleCallback cb, va_list args, void *data, void **return_val); | |
| 6485 | 324 | |
| 15884 | 325 | void purple_marshal_INT__INT( |
| 326 | PurpleCallback cb, va_list args, void *data, void **return_val); | |
| 327 | void purple_marshal_INT__INT_INT( | |
| 328 | PurpleCallback cb, va_list args, void *data, void **return_val); | |
|
20826
7d3e1c66e07c
Add marshalling functions for the authorization signals.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20147
diff
changeset
|
329 | void purple_marshal_INT__POINTER_POINTER( |
|
7d3e1c66e07c
Add marshalling functions for the authorization signals.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20147
diff
changeset
|
330 | PurpleCallback cb, va_list args, void *data, void **return_val); |
|
31325
2bb18e0658e7
Patch from Stefan Ott to add the account-authorization-requested-with-message
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
29828
diff
changeset
|
331 | void purple_marshal_INT__POINTER_POINTER_POINTER( |
|
2bb18e0658e7
Patch from Stefan Ott to add the account-authorization-requested-with-message
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
29828
diff
changeset
|
332 | PurpleCallback cb, va_list args, void *data, void **return_val); |
| 15884 | 333 | void purple_marshal_INT__POINTER_POINTER_POINTER_POINTER_POINTER( |
| 334 | PurpleCallback cb, va_list args, void *data, void **return_val); | |
|
6822
4adcde13ad17
[gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
335 | |
| 15884 | 336 | void purple_marshal_BOOLEAN__POINTER( |
| 337 | PurpleCallback cb, va_list args, void *data, void **return_val); | |
| 338 | void purple_marshal_BOOLEAN__POINTER_POINTER( | |
| 339 | PurpleCallback cb, va_list args, void *data, void **return_val); | |
|
31669
e2a864098c7d
Restructure that patch a bit. The marshal function should have been with all
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
31325
diff
changeset
|
340 | void purple_marshal_BOOLEAN__POINTER_BOOLEAN( |
|
e2a864098c7d
Restructure that patch a bit. The marshal function should have been with all
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
31325
diff
changeset
|
341 | PurpleCallback cb, va_list args, void *data, void **return_val); |
| 15884 | 342 | void purple_marshal_BOOLEAN__POINTER_POINTER_POINTER( |
| 343 | PurpleCallback cb, va_list args, void *data, void **return_val); | |
| 344 | void purple_marshal_BOOLEAN__POINTER_POINTER_UINT( | |
| 345 | PurpleCallback cb, va_list args, void *data, void **return_val); | |
| 346 | void purple_marshal_BOOLEAN__POINTER_POINTER_POINTER_UINT( | |
| 347 | PurpleCallback cb, va_list args, void *data, void **return_val); | |
| 348 | void purple_marshal_BOOLEAN__POINTER_POINTER_POINTER_POINTER( | |
| 349 | PurpleCallback cb, va_list args, void *data, void **return_val); | |
| 350 | void purple_marshal_BOOLEAN__POINTER_POINTER_POINTER_POINTER_POINTER( | |
| 351 | PurpleCallback cb, va_list args, void *data, void **return_val); | |
|
18744
e6b4c7abe951
Fix up writing-im-msg and writing-chat-msg to use a marshaller which treats the
Will Thompson <resiak@pidgin.im>
parents:
15884
diff
changeset
|
352 | void purple_marshal_BOOLEAN__POINTER_POINTER_POINTER_POINTER_UINT( |
|
e6b4c7abe951
Fix up writing-im-msg and writing-chat-msg to use a marshaller which treats the
Will Thompson <resiak@pidgin.im>
parents:
15884
diff
changeset
|
353 | PurpleCallback cb, va_list args, void *data, void **return_val); |
|
27161
2c917049469f
Duh, it helps to use the right marshallers.
Paul Aurich <darkrain42@pidgin.im>
parents:
25888
diff
changeset
|
354 | void purple_marshal_BOOLEAN__POINTER_POINTER_POINTER_POINTER_POINTER_POINTER( |
|
2c917049469f
Duh, it helps to use the right marshallers.
Paul Aurich <darkrain42@pidgin.im>
parents:
25888
diff
changeset
|
355 | PurpleCallback cb, va_list args, void *data, void **return_val); |
| 6485 | 356 | |
| 15884 | 357 | void purple_marshal_BOOLEAN__INT_POINTER( |
| 358 | PurpleCallback cb, va_list args, void *data, void **return_val); | |
| 12291 | 359 | |
|
29828
715c9453a8fa
Add purple_marshal_POINTER__POINTER(), which sadrul says should be used for the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
27161
diff
changeset
|
360 | void purple_marshal_POINTER__POINTER( |
|
715c9453a8fa
Add purple_marshal_POINTER__POINTER(), which sadrul says should be used for the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
27161
diff
changeset
|
361 | PurpleCallback cb, va_list args, void *data, void **return_val); |
| 15884 | 362 | void purple_marshal_POINTER__POINTER_INT( |
| 363 | PurpleCallback cb, va_list args, void *data, void **return_val); | |
| 364 | void purple_marshal_POINTER__POINTER_INT64( | |
| 365 | PurpleCallback cb, va_list args, void *data, void **return_val); | |
| 366 | void purple_marshal_POINTER__POINTER_INT_BOOLEAN( | |
| 367 | PurpleCallback cb, va_list args, void *data, void **return_val); | |
| 368 | void purple_marshal_POINTER__POINTER_INT64_BOOLEAN( | |
| 369 | PurpleCallback cb, va_list args, void *data, void **return_val); | |
| 370 | void purple_marshal_POINTER__POINTER_POINTER( | |
| 371 | PurpleCallback cb, va_list args, void *data, void **return_val); | |
| 6485 | 372 | /*@}*/ |
| 373 | ||
|
32787
7072f190d6ad
Use G_BEGIN/END_DECLS in public libpurple files. This was
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
31669
diff
changeset
|
374 | G_END_DECLS |
| 6485 | 375 | |
| 15884 | 376 | #endif /* _PURPLE_SIGNALS_H_ */ |
|
32787
7072f190d6ad
Use G_BEGIN/END_DECLS in public libpurple files. This was
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
31669
diff
changeset
|
377 |