pidgin 2.14.14dev
Loading...
Searching...
No Matches
signals.h
Go to the documentation of this file.
1
6/* purple
7 *
8 * Purple is the legal property of its developers, whose names are too numerous
9 * to list here. Please refer to the COPYRIGHT file distributed with this
10 * source distribution.
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
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
25 */
26#ifndef _PURPLE_SIGNALS_H_
27#define _PURPLE_SIGNALS_H_
28
29#include <glib.h>
30#include "value.h"
31
32#define PURPLE_CALLBACK(func) ((PurpleCallback)func)
33
34typedef void (*PurpleCallback)(void);
35typedef void (*PurpleSignalMarshalFunc)(PurpleCallback cb, va_list args,
36 void *data, void **return_val);
37
38#ifdef __cplusplus
39extern "C" {
40#endif
41
42/**************************************************************************/
44/**************************************************************************/
51#define PURPLE_SIGNAL_PRIORITY_DEFAULT 0
58#define PURPLE_SIGNAL_PRIORITY_HIGHEST 9999
65#define PURPLE_SIGNAL_PRIORITY_LOWEST -9999
66
82gulong purple_signal_register(void *instance, const char *signal,
83 PurpleSignalMarshalFunc marshal,
84 PurpleValue *ret_value, int num_values, ...);
85
92void purple_signal_unregister(void *instance, const char *signal);
93
100
110void purple_signal_get_values(void *instance, const char *signal,
111 PurpleValue **ret_value,
112 int *num_values, PurpleValue ***values);
113
134gulong purple_signal_connect_priority(void *instance, const char *signal,
135 void *handle, PurpleCallback func, void *data, int priority);
136
154gulong purple_signal_connect(void *instance, const char *signal,
155 void *handle, PurpleCallback func, void *data);
156
180gulong purple_signal_connect_priority_vargs(void *instance, const char *signal,
181 void *handle, PurpleCallback func, void *data, int priority);
182
203gulong purple_signal_connect_vargs(void *instance, const char *signal,
204 void *handle, PurpleCallback func, void *data);
205
216void purple_signal_disconnect(void *instance, const char *signal,
217 void *handle, PurpleCallback func);
218
225
235void purple_signal_emit(void *instance, const char *signal, ...);
236
247void purple_signal_emit_vargs(void *instance, const char *signal, va_list args);
248
260void *purple_signal_emit_return_1(void *instance, const char *signal, ...);
261
274void *purple_signal_emit_vargs_return_1(void *instance, const char *signal,
275 va_list args);
276
281
286
289/**************************************************************************/
291/**************************************************************************/
294void purple_marshal_VOID(
295 PurpleCallback cb, va_list args, void *data, void **return_val);
296void purple_marshal_VOID__INT(
297 PurpleCallback cb, va_list args, void *data, void **return_val);
298void purple_marshal_VOID__INT_INT(
299 PurpleCallback cb, va_list args, void *data, void **return_val);
300void purple_marshal_VOID__POINTER(
301 PurpleCallback cb, va_list args, void *data, void **return_val);
302void purple_marshal_VOID__POINTER_UINT(
303 PurpleCallback cb, va_list args, void *data, void **return_val);
304void purple_marshal_VOID__POINTER_INT_INT(
305 PurpleCallback cb, va_list args, void *data, void **return_val);
306void purple_marshal_VOID__POINTER_INT_POINTER(
307 PurpleCallback cb, va_list args, void *data, void **return_val);
308void purple_marshal_VOID__POINTER_POINTER(
309 PurpleCallback cb, va_list args, void *data, void **return_val);
310void purple_marshal_VOID__POINTER_POINTER_UINT(
311 PurpleCallback cb, va_list args, void *data, void **return_val);
312void purple_marshal_VOID__POINTER_POINTER_UINT_UINT(
313 PurpleCallback cb, va_list args, void *data, void **return_val);
314void purple_marshal_VOID__POINTER_POINTER_POINTER(
315 PurpleCallback cb, va_list args, void *data, void **return_val);
316void purple_marshal_VOID__POINTER_POINTER_POINTER_POINTER(
317 PurpleCallback cb, va_list args, void *data, void **return_val);
318void purple_marshal_VOID__POINTER_POINTER_POINTER_POINTER_POINTER(
319 PurpleCallback cb, va_list args, void *data, void **return_val);
320void purple_marshal_VOID__POINTER_POINTER_POINTER_UINT(
321 PurpleCallback cb, va_list args, void *data, void **return_val);
322void purple_marshal_VOID__POINTER_POINTER_POINTER_POINTER_UINT(
323 PurpleCallback cb, va_list args, void *data, void **return_val);
324void purple_marshal_VOID__POINTER_POINTER_POINTER_UINT_UINT(
325 PurpleCallback cb, va_list args, void *data, void **return_val);
326
327void purple_marshal_INT__INT(
328 PurpleCallback cb, va_list args, void *data, void **return_val);
329void purple_marshal_INT__INT_INT(
330 PurpleCallback cb, va_list args, void *data, void **return_val);
331void purple_marshal_INT__POINTER_POINTER(
332 PurpleCallback cb, va_list args, void *data, void **return_val);
333void purple_marshal_INT__POINTER_POINTER_POINTER(
334 PurpleCallback cb, va_list args, void *data, void **return_val);
335void purple_marshal_INT__POINTER_POINTER_POINTER_POINTER_POINTER(
336 PurpleCallback cb, va_list args, void *data, void **return_val);
337
338void purple_marshal_BOOLEAN__POINTER(
339 PurpleCallback cb, va_list args, void *data, void **return_val);
340void purple_marshal_BOOLEAN__POINTER_POINTER(
341 PurpleCallback cb, va_list args, void *data, void **return_val);
342void purple_marshal_BOOLEAN__POINTER_BOOLEAN(
343 PurpleCallback cb, va_list args, void *data, void **return_val);
344void purple_marshal_BOOLEAN__POINTER_POINTER_POINTER(
345 PurpleCallback cb, va_list args, void *data, void **return_val);
346void purple_marshal_BOOLEAN__POINTER_POINTER_UINT(
347 PurpleCallback cb, va_list args, void *data, void **return_val);
348void purple_marshal_BOOLEAN__POINTER_POINTER_POINTER_UINT(
349 PurpleCallback cb, va_list args, void *data, void **return_val);
350void purple_marshal_BOOLEAN__POINTER_POINTER_POINTER_POINTER(
351 PurpleCallback cb, va_list args, void *data, void **return_val);
352void purple_marshal_BOOLEAN__POINTER_POINTER_POINTER_POINTER_POINTER(
353 PurpleCallback cb, va_list args, void *data, void **return_val);
354void purple_marshal_BOOLEAN__POINTER_POINTER_POINTER_POINTER_UINT(
355 PurpleCallback cb, va_list args, void *data, void **return_val);
356void purple_marshal_BOOLEAN__POINTER_POINTER_POINTER_POINTER_POINTER_POINTER(
357 PurpleCallback cb, va_list args, void *data, void **return_val);
358
359void purple_marshal_BOOLEAN__INT_POINTER(
360 PurpleCallback cb, va_list args, void *data, void **return_val);
361
362void purple_marshal_POINTER__POINTER(
363 PurpleCallback cb, va_list args, void *data, void **return_val);
364void purple_marshal_POINTER__POINTER_INT(
365 PurpleCallback cb, va_list args, void *data, void **return_val);
366void purple_marshal_POINTER__POINTER_INT64(
367 PurpleCallback cb, va_list args, void *data, void **return_val);
368void purple_marshal_POINTER__POINTER_INT_BOOLEAN(
369 PurpleCallback cb, va_list args, void *data, void **return_val);
370void purple_marshal_POINTER__POINTER_INT64_BOOLEAN(
371 PurpleCallback cb, va_list args, void *data, void **return_val);
372void purple_marshal_POINTER__POINTER_POINTER(
373 PurpleCallback cb, va_list args, void *data, void **return_val);
376#ifdef __cplusplus
377}
378#endif
379
380#endif /* _PURPLE_SIGNALS_H_ */
gulong purple_signal_connect_priority_vargs(void *instance, const char *signal, void *handle, PurpleCallback func, void *data, int priority)
Connects a signal handler to a signal for a particular object.
gulong purple_signal_connect_vargs(void *instance, const char *signal, void *handle, PurpleCallback func, void *data)
Connects a signal handler to a signal for a particular object.
gulong purple_signal_register(void *instance, const char *signal, PurpleSignalMarshalFunc marshal, PurpleValue *ret_value, int num_values,...)
Registers a signal in an instance.
void purple_signal_get_values(void *instance, const char *signal, PurpleValue **ret_value, int *num_values, PurpleValue ***values)
Returns a list of value types used for a signal.
gulong purple_signal_connect(void *instance, const char *signal, void *handle, PurpleCallback func, void *data)
Connects a signal handler to a signal for a particular object.
void purple_signals_unregister_by_instance(void *instance)
Unregisters all signals in an instance.
void purple_signal_emit_vargs(void *instance, const char *signal, va_list args)
Emits a signal, using a va_list of arguments.
gulong purple_signal_connect_priority(void *instance, const char *signal, void *handle, PurpleCallback func, void *data, int priority)
Connects a signal handler to a signal for a particular object.
void * purple_signal_emit_vargs_return_1(void *instance, const char *signal, va_list args)
Emits a signal and returns the first non-NULL return value.
void purple_signals_disconnect_by_handle(void *handle)
Removes all callbacks associated with a receiver handle.
void purple_signal_disconnect(void *instance, const char *signal, void *handle, PurpleCallback func)
Disconnects a signal handler from a signal on an object.
void purple_signals_init(void)
Initializes the signals subsystem.
void purple_signal_emit(void *instance, const char *signal,...)
Emits a signal.
void * purple_signal_emit_return_1(void *instance, const char *signal,...)
Emits a signal and returns the first non-NULL return value.
void purple_signals_uninit(void)
Uninitializes the signals subsystem.
void purple_signal_unregister(void *instance, const char *signal)
Unregisters a signal in an instance.
A wrapper for a type, subtype, and specific type of value.
Definition value.h:90
Value wrapper API.