Thu, 16 Dec 2010 02:49:59 +0000
This function doesn't exist.
| 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 | ||
| 38 | #ifdef __cplusplus | |
| 39 | extern "C" { | |
| 40 | #endif | |
| 41 | ||
| 42 | /**************************************************************************/ | |
| 43 | /** @name Signal API */ | |
| 44 | /**************************************************************************/ | |
| 45 | /*@{*/ | |
| 46 | ||
|
22080
39cf44dceb93
Clarify documentation of confusingly-named and -valued signal priority
Will Thompson <resiak@pidgin.im>
parents:
21285
diff
changeset
|
47 | /** 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
|
48 | * |
|
39cf44dceb93
Clarify documentation of confusingly-named and -valued signal priority
Will Thompson <resiak@pidgin.im>
parents:
21285
diff
changeset
|
49 | * @see purple_signal_connect_priority() |
| 10656 | 50 | */ |
| 15884 | 51 | #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
|
52 | /** 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
|
53 | * <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
|
54 | * importance.) |
|
39cf44dceb93
Clarify documentation of confusingly-named and -valued signal priority
Will Thompson <resiak@pidgin.im>
parents:
21285
diff
changeset
|
55 | * |
|
39cf44dceb93
Clarify documentation of confusingly-named and -valued signal priority
Will Thompson <resiak@pidgin.im>
parents:
21285
diff
changeset
|
56 | * @see purple_signal_connect_priority(). |
|
39cf44dceb93
Clarify documentation of confusingly-named and -valued signal priority
Will Thompson <resiak@pidgin.im>
parents:
21285
diff
changeset
|
57 | */ |
| 15884 | 58 | #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
|
59 | /** 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
|
60 | * <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
|
61 | * importance.) |
|
39cf44dceb93
Clarify documentation of confusingly-named and -valued signal priority
Will Thompson <resiak@pidgin.im>
parents:
21285
diff
changeset
|
62 | * |
|
39cf44dceb93
Clarify documentation of confusingly-named and -valued signal priority
Will Thompson <resiak@pidgin.im>
parents:
21285
diff
changeset
|
63 | * @see purple_signal_connect_priority(). |
|
39cf44dceb93
Clarify documentation of confusingly-named and -valued signal priority
Will Thompson <resiak@pidgin.im>
parents:
21285
diff
changeset
|
64 | */ |
| 15884 | 65 | #define PURPLE_SIGNAL_PRIORITY_LOWEST -9999 |
| 10656 | 66 | |
| 67 | /** | |
| 6485 | 68 | * Registers a signal in an instance. |
| 69 | * | |
|
6720
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6564
diff
changeset
|
70 | * @param instance The instance to register the signal for. |
|
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6564
diff
changeset
|
71 | * @param signal The signal name. |
|
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6564
diff
changeset
|
72 | * @param marshal The marshal function. |
|
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6564
diff
changeset
|
73 | * @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
|
74 | * @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
|
75 | * @param ... The values to pass to the callbacks. |
| 6485 | 76 | * |
| 77 | * @return The signal ID local to that instance, or 0 if the signal | |
| 78 | * couldn't be registered. | |
|
6564
a7a2c1927544
[gaim-migrate @ 7086]
Christian Hammond <chipx86@chipx86.com>
parents:
6562
diff
changeset
|
79 | * |
| 15884 | 80 | * @see PurpleValue |
| 6485 | 81 | */ |
| 15884 | 82 | gulong purple_signal_register(void *instance, const char *signal, |
| 83 | PurpleSignalMarshalFunc marshal, | |
| 84 | PurpleValue *ret_value, int num_values, ...); | |
| 6485 | 85 | |
| 86 | /** | |
| 87 | * Unregisters a signal in an instance. | |
| 88 | * | |
| 89 | * @param instance The instance to unregister the signal for. | |
| 90 | * @param signal The signal name. | |
| 91 | */ | |
| 15884 | 92 | void purple_signal_unregister(void *instance, const char *signal); |
| 6485 | 93 | |
| 94 | /** | |
| 95 | * Unregisters all signals in an instance. | |
| 96 | * | |
| 97 | * @param instance The instance to unregister the signal for. | |
| 98 | */ | |
| 15884 | 99 | void purple_signals_unregister_by_instance(void *instance); |
| 6485 | 100 | |
| 101 | /** | |
|
6564
a7a2c1927544
[gaim-migrate @ 7086]
Christian Hammond <chipx86@chipx86.com>
parents:
6562
diff
changeset
|
102 | * Returns a list of value types used for a signal. |
|
a7a2c1927544
[gaim-migrate @ 7086]
Christian Hammond <chipx86@chipx86.com>
parents:
6562
diff
changeset
|
103 | * |
|
a7a2c1927544
[gaim-migrate @ 7086]
Christian Hammond <chipx86@chipx86.com>
parents:
6562
diff
changeset
|
104 | * @param instance The instance the signal is registered to. |
|
a7a2c1927544
[gaim-migrate @ 7086]
Christian Hammond <chipx86@chipx86.com>
parents:
6562
diff
changeset
|
105 | * @param signal The signal. |
|
6720
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6564
diff
changeset
|
106 | * @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
|
107 | * @param num_values The returned number of values. |
|
a7a2c1927544
[gaim-migrate @ 7086]
Christian Hammond <chipx86@chipx86.com>
parents:
6562
diff
changeset
|
108 | * @param values The returned list of values. |
|
a7a2c1927544
[gaim-migrate @ 7086]
Christian Hammond <chipx86@chipx86.com>
parents:
6562
diff
changeset
|
109 | */ |
| 15884 | 110 | void purple_signal_get_values(void *instance, const char *signal, |
| 111 | PurpleValue **ret_value, | |
| 112 | int *num_values, PurpleValue ***values); | |
|
6564
a7a2c1927544
[gaim-migrate @ 7086]
Christian Hammond <chipx86@chipx86.com>
parents:
6562
diff
changeset
|
113 | |
|
a7a2c1927544
[gaim-migrate @ 7086]
Christian Hammond <chipx86@chipx86.com>
parents:
6562
diff
changeset
|
114 | /** |
| 6485 | 115 | * Connects a signal handler to a signal for a particular object. |
| 116 | * | |
| 15884 | 117 | * Take care not to register a handler function twice. Purple will |
| 6485 | 118 | * not correct any mistakes for you in this area. |
| 119 | * | |
| 120 | * @param instance The instance to connect to. | |
| 121 | * @param signal The name of the signal to connect. | |
| 122 | * @param handle The handle of the receiver. | |
| 123 | * @param func The callback function. | |
| 124 | * @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
|
125 | * @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
|
126 | * 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
|
127 | * 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
|
128 | * #PURPLE_SIGNAL_PRIORITY_HIGHEST. |
| 10656 | 129 | * |
| 130 | * @return The signal handler ID. | |
| 131 | * | |
| 15884 | 132 | * @see purple_signal_disconnect() |
| 10656 | 133 | */ |
| 15884 | 134 | 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
|
135 | void *handle, PurpleCallback func, void *data, int priority); |
| 10656 | 136 | |
| 137 | /** | |
| 138 | * 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
|
139 | * (Its priority defaults to 0, aka #PURPLE_SIGNAL_PRIORITY_DEFAULT.) |
|
25888
d0fdd378a635
Remove trailing whitespace
Mark Doliner <markdoliner@pidgin.im>
parents:
22080
diff
changeset
|
140 | * |
| 15884 | 141 | * Take care not to register a handler function twice. Purple will |
| 10656 | 142 | * not correct any mistakes for you in this area. |
| 143 | * | |
| 144 | * @param instance The instance to connect to. | |
| 145 | * @param signal The name of the signal to connect. | |
| 146 | * @param handle The handle of the receiver. | |
| 147 | * @param func The callback function. | |
| 148 | * @param data The data to pass to the callback function. | |
| 6485 | 149 | * |
| 150 | * @return The signal handler ID. | |
| 151 | * | |
| 15884 | 152 | * @see purple_signal_disconnect() |
| 6485 | 153 | */ |
| 15884 | 154 | 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
|
155 | void *handle, PurpleCallback func, void *data); |
| 6485 | 156 | |
| 157 | /** | |
|
6548
40da3b90b19f
[gaim-migrate @ 7070]
Christian Hammond <chipx86@chipx86.com>
parents:
6509
diff
changeset
|
158 | * Connects a signal handler to a signal for a particular object. |
|
40da3b90b19f
[gaim-migrate @ 7070]
Christian Hammond <chipx86@chipx86.com>
parents:
6509
diff
changeset
|
159 | * |
|
40da3b90b19f
[gaim-migrate @ 7070]
Christian Hammond <chipx86@chipx86.com>
parents:
6509
diff
changeset
|
160 | * 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
|
161 | * individual arguments. |
|
40da3b90b19f
[gaim-migrate @ 7070]
Christian Hammond <chipx86@chipx86.com>
parents:
6509
diff
changeset
|
162 | * |
| 15884 | 163 | * 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
|
164 | * not correct any mistakes for you in this area. |
|
40da3b90b19f
[gaim-migrate @ 7070]
Christian Hammond <chipx86@chipx86.com>
parents:
6509
diff
changeset
|
165 | * |
|
40da3b90b19f
[gaim-migrate @ 7070]
Christian Hammond <chipx86@chipx86.com>
parents:
6509
diff
changeset
|
166 | * @param instance The instance to connect to. |
|
40da3b90b19f
[gaim-migrate @ 7070]
Christian Hammond <chipx86@chipx86.com>
parents:
6509
diff
changeset
|
167 | * @param signal The name of the signal to connect. |
|
40da3b90b19f
[gaim-migrate @ 7070]
Christian Hammond <chipx86@chipx86.com>
parents:
6509
diff
changeset
|
168 | * @param handle The handle of the receiver. |
|
40da3b90b19f
[gaim-migrate @ 7070]
Christian Hammond <chipx86@chipx86.com>
parents:
6509
diff
changeset
|
169 | * @param func The callback function. |
|
40da3b90b19f
[gaim-migrate @ 7070]
Christian Hammond <chipx86@chipx86.com>
parents:
6509
diff
changeset
|
170 | * @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
|
171 | * @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
|
172 | * 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
|
173 | * 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
|
174 | * #PURPLE_SIGNAL_PRIORITY_HIGHEST. |
| 10656 | 175 | * |
| 176 | * @return The signal handler ID. | |
| 177 | * | |
| 15884 | 178 | * @see purple_signal_disconnect() |
| 10656 | 179 | */ |
| 15884 | 180 | 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
|
181 | void *handle, PurpleCallback func, void *data, int priority); |
| 10656 | 182 | |
| 183 | /** | |
| 184 | * 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
|
185 | * (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
|
186 | * |
| 10656 | 187 | * The signal handler will take a va_args of arguments, instead of |
| 188 | * individual arguments. | |
| 189 | * | |
| 15884 | 190 | * Take care not to register a handler function twice. Purple will |
| 10656 | 191 | * not correct any mistakes for you in this area. |
| 192 | * | |
| 193 | * @param instance The instance to connect to. | |
| 194 | * @param signal The name of the signal to connect. | |
| 195 | * @param handle The handle of the receiver. | |
| 196 | * @param func The callback function. | |
| 197 | * @param data The data to pass to the callback function. | |
|
6548
40da3b90b19f
[gaim-migrate @ 7070]
Christian Hammond <chipx86@chipx86.com>
parents:
6509
diff
changeset
|
198 | * |
|
40da3b90b19f
[gaim-migrate @ 7070]
Christian Hammond <chipx86@chipx86.com>
parents:
6509
diff
changeset
|
199 | * @return The signal handler ID. |
|
40da3b90b19f
[gaim-migrate @ 7070]
Christian Hammond <chipx86@chipx86.com>
parents:
6509
diff
changeset
|
200 | * |
| 15884 | 201 | * @see purple_signal_disconnect() |
|
6548
40da3b90b19f
[gaim-migrate @ 7070]
Christian Hammond <chipx86@chipx86.com>
parents:
6509
diff
changeset
|
202 | */ |
| 15884 | 203 | 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
|
204 | void *handle, PurpleCallback func, void *data); |
|
6548
40da3b90b19f
[gaim-migrate @ 7070]
Christian Hammond <chipx86@chipx86.com>
parents:
6509
diff
changeset
|
205 | |
|
40da3b90b19f
[gaim-migrate @ 7070]
Christian Hammond <chipx86@chipx86.com>
parents:
6509
diff
changeset
|
206 | /** |
| 6485 | 207 | * Disconnects a signal handler from a signal on an object. |
| 208 | * | |
| 209 | * @param instance The instance to disconnect from. | |
| 210 | * @param signal The name of the signal to disconnect. | |
| 211 | * @param handle The handle of the receiver. | |
| 212 | * @param func The registered function to disconnect. | |
| 213 | * | |
| 15884 | 214 | * @see purple_signal_connect() |
| 6485 | 215 | */ |
| 15884 | 216 | void purple_signal_disconnect(void *instance, const char *signal, |
| 217 | void *handle, PurpleCallback func); | |
| 6485 | 218 | |
| 219 | /** | |
| 220 | * Removes all callbacks associated with a receiver handle. | |
| 221 | * | |
| 222 | * @param handle The receiver handle. | |
| 223 | */ | |
| 15884 | 224 | void purple_signals_disconnect_by_handle(void *handle); |
| 6485 | 225 | |
| 226 | /** | |
| 227 | * Emits a signal. | |
| 228 | * | |
| 229 | * @param instance The instance emitting the signal. | |
| 230 | * @param signal The signal being emitted. | |
| 231 | * | |
| 15884 | 232 | * @see purple_signal_connect() |
| 233 | * @see purple_signal_disconnect() | |
| 6485 | 234 | */ |
| 15884 | 235 | void purple_signal_emit(void *instance, const char *signal, ...); |
| 6485 | 236 | |
| 237 | /** | |
| 238 | * Emits a signal, using a va_list of arguments. | |
| 239 | * | |
| 240 | * @param instance The instance emitting the signal. | |
| 241 | * @param signal The signal being emitted. | |
| 242 | * @param args The arguments list. | |
| 243 | * | |
| 15884 | 244 | * @see purple_signal_connect() |
| 245 | * @see purple_signal_disconnect() | |
| 6485 | 246 | */ |
| 15884 | 247 | void purple_signal_emit_vargs(void *instance, const char *signal, va_list args); |
| 6485 | 248 | |
| 249 | /** | |
|
10789
cabd145237d8
[gaim-migrate @ 12431]
Richard Laager <rlaager@pidgin.im>
parents:
10656
diff
changeset
|
250 | * Emits a signal and returns the first non-NULL return value. |
|
cabd145237d8
[gaim-migrate @ 12431]
Richard Laager <rlaager@pidgin.im>
parents:
10656
diff
changeset
|
251 | * |
|
cabd145237d8
[gaim-migrate @ 12431]
Richard Laager <rlaager@pidgin.im>
parents:
10656
diff
changeset
|
252 | * Further signal handlers are NOT called after a handler returns |
|
cabd145237d8
[gaim-migrate @ 12431]
Richard Laager <rlaager@pidgin.im>
parents:
10656
diff
changeset
|
253 | * something other than NULL. |
| 6485 | 254 | * |
| 255 | * @param instance The instance emitting the signal. | |
| 256 | * @param signal The signal being emitted. | |
| 257 | * | |
|
10789
cabd145237d8
[gaim-migrate @ 12431]
Richard Laager <rlaager@pidgin.im>
parents:
10656
diff
changeset
|
258 | * @return The first non-NULL return value |
| 6485 | 259 | */ |
| 15884 | 260 | void *purple_signal_emit_return_1(void *instance, const char *signal, ...); |
| 6485 | 261 | |
| 262 | /** | |
|
10789
cabd145237d8
[gaim-migrate @ 12431]
Richard Laager <rlaager@pidgin.im>
parents:
10656
diff
changeset
|
263 | * Emits a signal and returns the first non-NULL return value. |
|
cabd145237d8
[gaim-migrate @ 12431]
Richard Laager <rlaager@pidgin.im>
parents:
10656
diff
changeset
|
264 | * |
|
cabd145237d8
[gaim-migrate @ 12431]
Richard Laager <rlaager@pidgin.im>
parents:
10656
diff
changeset
|
265 | * Further signal handlers are NOT called after a handler returns |
|
cabd145237d8
[gaim-migrate @ 12431]
Richard Laager <rlaager@pidgin.im>
parents:
10656
diff
changeset
|
266 | * something other than NULL. |
| 6485 | 267 | * |
| 268 | * @param instance The instance emitting the signal. | |
| 269 | * @param signal The signal being emitted. | |
| 270 | * @param args The arguments list. | |
| 271 | * | |
|
10789
cabd145237d8
[gaim-migrate @ 12431]
Richard Laager <rlaager@pidgin.im>
parents:
10656
diff
changeset
|
272 | * @return The first non-NULL return value |
| 6485 | 273 | */ |
| 15884 | 274 | void *purple_signal_emit_vargs_return_1(void *instance, const char *signal, |
| 6485 | 275 | va_list args); |
| 276 | ||
| 277 | /** | |
| 278 | * Initializes the signals subsystem. | |
| 279 | */ | |
| 15884 | 280 | void purple_signals_init(void); |
| 6485 | 281 | |
| 282 | /** | |
| 283 | * Uninitializes the signals subsystem. | |
| 284 | */ | |
| 15884 | 285 | void purple_signals_uninit(void); |
| 6485 | 286 | |
| 287 | /*@}*/ | |
| 288 | ||
| 289 | /**************************************************************************/ | |
| 290 | /** @name Marshal Functions */ | |
| 291 | /**************************************************************************/ | |
| 292 | /*@{*/ | |
| 293 | ||
| 15884 | 294 | void purple_marshal_VOID( |
| 295 | PurpleCallback cb, va_list args, void *data, void **return_val); | |
| 296 | void purple_marshal_VOID__INT( | |
| 297 | PurpleCallback cb, va_list args, void *data, void **return_val); | |
| 298 | void purple_marshal_VOID__INT_INT( | |
| 299 | PurpleCallback cb, va_list args, void *data, void **return_val); | |
| 300 | void purple_marshal_VOID__POINTER( | |
| 301 | PurpleCallback cb, va_list args, void *data, void **return_val); | |
| 302 | void purple_marshal_VOID__POINTER_UINT( | |
| 303 | PurpleCallback cb, va_list args, void *data, void **return_val); | |
| 304 | void purple_marshal_VOID__POINTER_INT_INT( | |
| 305 | 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
|
306 | 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
|
307 | PurpleCallback cb, va_list args, void *data, void **return_val); |
| 15884 | 308 | void purple_marshal_VOID__POINTER_POINTER( |
| 309 | PurpleCallback cb, va_list args, void *data, void **return_val); | |
| 310 | void purple_marshal_VOID__POINTER_POINTER_UINT( | |
| 311 | PurpleCallback cb, va_list args, void *data, void **return_val); | |
| 312 | void purple_marshal_VOID__POINTER_POINTER_UINT_UINT( | |
| 313 | PurpleCallback cb, va_list args, void *data, void **return_val); | |
| 314 | void purple_marshal_VOID__POINTER_POINTER_POINTER( | |
| 315 | PurpleCallback cb, va_list args, void *data, void **return_val); | |
| 316 | void purple_marshal_VOID__POINTER_POINTER_POINTER_POINTER( | |
| 317 | PurpleCallback cb, va_list args, void *data, void **return_val); | |
| 318 | void purple_marshal_VOID__POINTER_POINTER_POINTER_POINTER_POINTER( | |
| 319 | PurpleCallback cb, va_list args, void *data, void **return_val); | |
| 320 | void purple_marshal_VOID__POINTER_POINTER_POINTER_UINT( | |
| 321 | PurpleCallback cb, va_list args, void *data, void **return_val); | |
| 322 | void purple_marshal_VOID__POINTER_POINTER_POINTER_POINTER_UINT( | |
| 323 | PurpleCallback cb, va_list args, void *data, void **return_val); | |
| 324 | void purple_marshal_VOID__POINTER_POINTER_POINTER_UINT_UINT( | |
| 325 | PurpleCallback cb, va_list args, void *data, void **return_val); | |
| 6485 | 326 | |
| 15884 | 327 | void purple_marshal_INT__INT( |
| 328 | PurpleCallback cb, va_list args, void *data, void **return_val); | |
| 329 | void purple_marshal_INT__INT_INT( | |
| 330 | 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
|
331 | void purple_marshal_INT__POINTER_POINTER( |
|
7d3e1c66e07c
Add marshalling functions for the authorization signals.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20147
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); | |
| 340 | void purple_marshal_BOOLEAN__POINTER_POINTER_POINTER( | |
| 341 | PurpleCallback cb, va_list args, void *data, void **return_val); | |
| 342 | void purple_marshal_BOOLEAN__POINTER_POINTER_UINT( | |
| 343 | PurpleCallback cb, va_list args, void *data, void **return_val); | |
| 344 | void purple_marshal_BOOLEAN__POINTER_POINTER_POINTER_UINT( | |
| 345 | PurpleCallback cb, va_list args, void *data, void **return_val); | |
| 346 | void purple_marshal_BOOLEAN__POINTER_POINTER_POINTER_POINTER( | |
| 347 | PurpleCallback cb, va_list args, void *data, void **return_val); | |
| 348 | void purple_marshal_BOOLEAN__POINTER_POINTER_POINTER_POINTER_POINTER( | |
| 349 | 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
|
350 | 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
|
351 | 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
|
352 | 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
|
353 | PurpleCallback cb, va_list args, void *data, void **return_val); |
| 6485 | 354 | |
| 15884 | 355 | void purple_marshal_BOOLEAN__INT_POINTER( |
| 356 | PurpleCallback cb, va_list args, void *data, void **return_val); | |
| 12291 | 357 | |
|
29828
715c9453a8fa
Add purple_marshal_POINTER__POINTER(), which sadrul says should be used for the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
27161
diff
changeset
|
358 | 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
|
359 | PurpleCallback cb, va_list args, void *data, void **return_val); |
| 15884 | 360 | void purple_marshal_POINTER__POINTER_INT( |
| 361 | PurpleCallback cb, va_list args, void *data, void **return_val); | |
| 362 | void purple_marshal_POINTER__POINTER_INT64( | |
| 363 | PurpleCallback cb, va_list args, void *data, void **return_val); | |
| 364 | void purple_marshal_POINTER__POINTER_INT_BOOLEAN( | |
| 365 | PurpleCallback cb, va_list args, void *data, void **return_val); | |
| 366 | void purple_marshal_POINTER__POINTER_INT64_BOOLEAN( | |
| 367 | PurpleCallback cb, va_list args, void *data, void **return_val); | |
| 368 | void purple_marshal_POINTER__POINTER_POINTER( | |
| 369 | PurpleCallback cb, va_list args, void *data, void **return_val); | |
| 6485 | 370 | /*@}*/ |
| 371 | ||
| 372 | #ifdef __cplusplus | |
| 373 | } | |
| 374 | #endif | |
| 375 | ||
| 15884 | 376 | #endif /* _PURPLE_SIGNALS_H_ */ |