annotate src/signals.h @ 7342:c9ac24f6c09e

[gaim-migrate @ 7932] Well, it won't make any thing worse, and it should let incoming or outgoing or something file transfers work on comps with ipv6 enabled in the kernel. Or something. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Mon, 27 Oct 2003 02:15:34 +0000
parents 7dba3e17cb21
children fa6395637e2c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6485
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1 /**
6488
e5e8d21bd4d8 [gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents: 6485
diff changeset
2 * @file signals.h Signal API
6485
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
3 * @ingroup core
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
4 *
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
5 * gaim
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
6 *
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
7 * Copyright (C) 2003 Christian Hammond <chipx86@gnupdate.org>
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
8 *
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
9 * This program is free software; you can redistribute it and/or modify
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
10 * it under the terms of the GNU General Public License as published by
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
11 * the Free Software Foundation; either version 2 of the License, or
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
12 * (at your option) any later version.
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
13 *
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
14 * This program is distributed in the hope that it will be useful,
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
17 * GNU General Public License for more details.
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
18 *
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
19 * You should have received a copy of the GNU General Public License
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
20 * along with this program; if not, write to the Free Software
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
22 */
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
23 #ifndef _GAIM_SIGNAL_H_
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
24 #define _GAIM_SIGNAL_H_
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
25
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
26 #include <glib.h>
6564
800ef4a51096 [gaim-migrate @ 7086]
Christian Hammond <chipx86@chipx86.com>
parents: 6562
diff changeset
27 #include "value.h"
6485
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
28
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
29 #define GAIM_CALLBACK(func) ((GaimCallback)func)
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
30
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
31 typedef void (*GaimCallback)(void);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
32 typedef void (*GaimSignalMarshalFunc)(GaimCallback cb, va_list args,
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
33 void *data, void **return_val);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
34
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
35 #ifdef __cplusplus
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
36 extern "C" {
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
37 #endif
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
38
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
39 /**************************************************************************/
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
40 /** @name Signal API */
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
41 /**************************************************************************/
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
42 /*@{*/
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
43
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
44 /**
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
45 * Registers a signal in an instance.
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
46 *
6720
41120df7ed94 [gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents: 6564
diff changeset
47 * @param instance The instance to register the signal for.
41120df7ed94 [gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents: 6564
diff changeset
48 * @param signal The signal name.
41120df7ed94 [gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents: 6564
diff changeset
49 * @param marshal The marshal function.
41120df7ed94 [gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents: 6564
diff changeset
50 * @param ret_value The return value type, or NULL for no return value.
41120df7ed94 [gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents: 6564
diff changeset
51 * @param num_values The number of values to be passed to the callbacks.
41120df7ed94 [gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents: 6564
diff changeset
52 * @param ... The values to pass to the callbacks.
6485
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
53 *
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
54 * @return The signal ID local to that instance, or 0 if the signal
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
55 * couldn't be registered.
6564
800ef4a51096 [gaim-migrate @ 7086]
Christian Hammond <chipx86@chipx86.com>
parents: 6562
diff changeset
56 *
800ef4a51096 [gaim-migrate @ 7086]
Christian Hammond <chipx86@chipx86.com>
parents: 6562
diff changeset
57 * @see GaimValue
6485
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
58 */
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
59 gulong gaim_signal_register(void *instance, const char *signal,
6564
800ef4a51096 [gaim-migrate @ 7086]
Christian Hammond <chipx86@chipx86.com>
parents: 6562
diff changeset
60 GaimSignalMarshalFunc marshal,
800ef4a51096 [gaim-migrate @ 7086]
Christian Hammond <chipx86@chipx86.com>
parents: 6562
diff changeset
61 GaimValue *ret_value, int num_values, ...);
6485
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
62
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
63 /**
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
64 * Unregisters a signal in an instance.
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
65 *
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
66 * @param instance The instance to unregister the signal for.
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
67 * @param signal The signal name.
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
68 */
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
69 void gaim_signal_unregister(void *instance, const char *signal);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
70
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
71 /**
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
72 * Unregisters all signals in an instance.
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
73 *
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
74 * @param instance The instance to unregister the signal for.
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
75 */
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
76 void gaim_signals_unregister_by_instance(void *instance);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
77
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
78 /**
6564
800ef4a51096 [gaim-migrate @ 7086]
Christian Hammond <chipx86@chipx86.com>
parents: 6562
diff changeset
79 * Returns a list of value types used for a signal.
800ef4a51096 [gaim-migrate @ 7086]
Christian Hammond <chipx86@chipx86.com>
parents: 6562
diff changeset
80 *
800ef4a51096 [gaim-migrate @ 7086]
Christian Hammond <chipx86@chipx86.com>
parents: 6562
diff changeset
81 * @param instance The instance the signal is registered to.
800ef4a51096 [gaim-migrate @ 7086]
Christian Hammond <chipx86@chipx86.com>
parents: 6562
diff changeset
82 * @param signal The signal.
6720
41120df7ed94 [gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents: 6564
diff changeset
83 * @param ret_value The return value from the last signal handler.
6564
800ef4a51096 [gaim-migrate @ 7086]
Christian Hammond <chipx86@chipx86.com>
parents: 6562
diff changeset
84 * @param num_values The returned number of values.
800ef4a51096 [gaim-migrate @ 7086]
Christian Hammond <chipx86@chipx86.com>
parents: 6562
diff changeset
85 * @param values The returned list of values.
800ef4a51096 [gaim-migrate @ 7086]
Christian Hammond <chipx86@chipx86.com>
parents: 6562
diff changeset
86 */
800ef4a51096 [gaim-migrate @ 7086]
Christian Hammond <chipx86@chipx86.com>
parents: 6562
diff changeset
87 void gaim_signal_get_values(void *instance, const char *signal,
800ef4a51096 [gaim-migrate @ 7086]
Christian Hammond <chipx86@chipx86.com>
parents: 6562
diff changeset
88 GaimValue **ret_value,
800ef4a51096 [gaim-migrate @ 7086]
Christian Hammond <chipx86@chipx86.com>
parents: 6562
diff changeset
89 int *num_values, GaimValue ***values);
800ef4a51096 [gaim-migrate @ 7086]
Christian Hammond <chipx86@chipx86.com>
parents: 6562
diff changeset
90
800ef4a51096 [gaim-migrate @ 7086]
Christian Hammond <chipx86@chipx86.com>
parents: 6562
diff changeset
91 /**
6485
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
92 * Connects a signal handler to a signal for a particular object.
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
93 *
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
94 * Take care not to register a handler function twice. Gaim will
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
95 * not correct any mistakes for you in this area.
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
96 *
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
97 * @param instance The instance to connect to.
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
98 * @param signal The name of the signal to connect.
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
99 * @param handle The handle of the receiver.
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
100 * @param func The callback function.
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
101 * @param data The data to pass to the callback function.
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
102 *
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
103 * @return The signal handler ID.
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
104 *
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
105 * @see gaim_signal_disconnect()
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
106 */
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
107 gulong gaim_signal_connect(void *instance, const char *signal,
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
108 void *handle, GaimCallback func, void *data);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
109
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
110 /**
6548
d01ba50e3f3e [gaim-migrate @ 7070]
Christian Hammond <chipx86@chipx86.com>
parents: 6509
diff changeset
111 * Connects a signal handler to a signal for a particular object.
d01ba50e3f3e [gaim-migrate @ 7070]
Christian Hammond <chipx86@chipx86.com>
parents: 6509
diff changeset
112 *
d01ba50e3f3e [gaim-migrate @ 7070]
Christian Hammond <chipx86@chipx86.com>
parents: 6509
diff changeset
113 * The signal handler will take a va_args of arguments, instead of
d01ba50e3f3e [gaim-migrate @ 7070]
Christian Hammond <chipx86@chipx86.com>
parents: 6509
diff changeset
114 * individual arguments.
d01ba50e3f3e [gaim-migrate @ 7070]
Christian Hammond <chipx86@chipx86.com>
parents: 6509
diff changeset
115 *
d01ba50e3f3e [gaim-migrate @ 7070]
Christian Hammond <chipx86@chipx86.com>
parents: 6509
diff changeset
116 * Take care not to register a handler function twice. Gaim will
d01ba50e3f3e [gaim-migrate @ 7070]
Christian Hammond <chipx86@chipx86.com>
parents: 6509
diff changeset
117 * not correct any mistakes for you in this area.
d01ba50e3f3e [gaim-migrate @ 7070]
Christian Hammond <chipx86@chipx86.com>
parents: 6509
diff changeset
118 *
d01ba50e3f3e [gaim-migrate @ 7070]
Christian Hammond <chipx86@chipx86.com>
parents: 6509
diff changeset
119 * @param instance The instance to connect to.
d01ba50e3f3e [gaim-migrate @ 7070]
Christian Hammond <chipx86@chipx86.com>
parents: 6509
diff changeset
120 * @param signal The name of the signal to connect.
d01ba50e3f3e [gaim-migrate @ 7070]
Christian Hammond <chipx86@chipx86.com>
parents: 6509
diff changeset
121 * @param handle The handle of the receiver.
d01ba50e3f3e [gaim-migrate @ 7070]
Christian Hammond <chipx86@chipx86.com>
parents: 6509
diff changeset
122 * @param func The callback function.
d01ba50e3f3e [gaim-migrate @ 7070]
Christian Hammond <chipx86@chipx86.com>
parents: 6509
diff changeset
123 * @param data The data to pass to the callback function.
d01ba50e3f3e [gaim-migrate @ 7070]
Christian Hammond <chipx86@chipx86.com>
parents: 6509
diff changeset
124 *
d01ba50e3f3e [gaim-migrate @ 7070]
Christian Hammond <chipx86@chipx86.com>
parents: 6509
diff changeset
125 * @return The signal handler ID.
d01ba50e3f3e [gaim-migrate @ 7070]
Christian Hammond <chipx86@chipx86.com>
parents: 6509
diff changeset
126 *
d01ba50e3f3e [gaim-migrate @ 7070]
Christian Hammond <chipx86@chipx86.com>
parents: 6509
diff changeset
127 * @see gaim_signal_disconnect()
d01ba50e3f3e [gaim-migrate @ 7070]
Christian Hammond <chipx86@chipx86.com>
parents: 6509
diff changeset
128 */
d01ba50e3f3e [gaim-migrate @ 7070]
Christian Hammond <chipx86@chipx86.com>
parents: 6509
diff changeset
129 gulong gaim_signal_connect_vargs(void *instance, const char *signal,
d01ba50e3f3e [gaim-migrate @ 7070]
Christian Hammond <chipx86@chipx86.com>
parents: 6509
diff changeset
130 void *handle, GaimCallback func, void *data);
d01ba50e3f3e [gaim-migrate @ 7070]
Christian Hammond <chipx86@chipx86.com>
parents: 6509
diff changeset
131
d01ba50e3f3e [gaim-migrate @ 7070]
Christian Hammond <chipx86@chipx86.com>
parents: 6509
diff changeset
132 /**
6485
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
133 * Disconnects a signal handler from a signal on an object.
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
134 *
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
135 * @param instance The instance to disconnect from.
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
136 * @param signal The name of the signal to disconnect.
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
137 * @param handle The handle of the receiver.
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
138 * @param func The registered function to disconnect.
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
139 *
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
140 * @see gaim_signal_connect()
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
141 */
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
142 void gaim_signal_disconnect(void *instance, const char *signal,
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
143 void *handle, GaimCallback func);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
144
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
145 /**
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
146 * Removes all callbacks associated with a receiver handle.
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
147 *
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
148 * @param handle The receiver handle.
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
149 */
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
150 void gaim_signals_disconnect_by_handle(void *handle);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
151
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
152 /**
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
153 * Emits a signal.
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
154 *
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
155 * @param instance The instance emitting the signal.
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
156 * @param signal The signal being emitted.
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
157 *
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
158 * @see gaim_signal_connect()
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
159 * @see gaim_signal_disconnect()
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
160 */
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
161 void gaim_signal_emit(void *instance, const char *signal, ...);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
162
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
163 /**
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
164 * Emits a signal, using a va_list of arguments.
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
165 *
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
166 * @param instance The instance emitting the signal.
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
167 * @param signal The signal being emitted.
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
168 * @param args The arguments list.
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
169 *
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
170 * @see gaim_signal_connect()
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
171 * @see gaim_signal_disconnect()
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
172 */
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
173 void gaim_signal_emit_vargs(void *instance, const char *signal, va_list args);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
174
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
175 /**
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
176 * Emits a signal and returns the return value from the last handler.
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
177 *
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
178 * @param instance The instance emitting the signal.
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
179 * @param signal The signal being emitted.
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
180 *
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
181 * @return The return value from the last handler.
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
182 */
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
183 void *gaim_signal_emit_return_1(void *instance, const char *signal, ...);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
184
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
185 /**
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
186 * Emits a signal and returns the return value from the last handler.
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
187 *
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
188 * @param instance The instance emitting the signal.
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
189 * @param signal The signal being emitted.
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
190 * @param args The arguments list.
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
191 *
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
192 * @return The return value from the last handler.
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
193 */
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
194 void *gaim_signal_emit_vargs_return_1(void *instance, const char *signal,
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
195 va_list args);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
196
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
197 /**
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
198 * Initializes the signals subsystem.
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
199 */
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
200 void gaim_signals_init();
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
201
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
202 /**
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
203 * Uninitializes the signals subsystem.
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
204 */
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
205 void gaim_signals_uninit();
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
206
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
207 /*@}*/
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
208
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
209 /**************************************************************************/
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
210 /** @name Marshal Functions */
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
211 /**************************************************************************/
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
212 /*@{*/
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
213
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
214 void gaim_marshal_VOID(
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
215 GaimCallback cb, va_list args, void *data, void **return_val);
6822
7dba3e17cb21 [gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
216 void gaim_marshal_VOID__INT(
7dba3e17cb21 [gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
217 GaimCallback cb, va_list args, void *data, void **return_val);
7dba3e17cb21 [gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
218 void gaim_marshal_VOID__INT_INT(
7dba3e17cb21 [gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
219 GaimCallback cb, va_list args, void *data, void **return_val);
6485
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
220 void gaim_marshal_VOID__POINTER(
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
221 GaimCallback cb, va_list args, void *data, void **return_val);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
222 void gaim_marshal_VOID__POINTER_POINTER(
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
223 GaimCallback cb, va_list args, void *data, void **return_val);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
224 void gaim_marshal_VOID__POINTER_POINTER_UINT(
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
225 GaimCallback cb, va_list args, void *data, void **return_val);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
226 void gaim_marshal_VOID__POINTER_POINTER_POINTER(
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
227 GaimCallback cb, va_list args, void *data, void **return_val);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
228 void gaim_marshal_VOID__POINTER_POINTER_POINTER_POINTER(
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
229 GaimCallback cb, va_list args, void *data, void **return_val);
6509
e74e378e86bf [gaim-migrate @ 7026]
Ethan Blanton <elb@pidgin.im>
parents: 6488
diff changeset
230 void gaim_marshal_VOID__POINTER_POINTER_POINTER_UINT(
e74e378e86bf [gaim-migrate @ 7026]
Ethan Blanton <elb@pidgin.im>
parents: 6488
diff changeset
231 GaimCallback cb, va_list args, void *data, void **return_val);
6485
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
232 void gaim_marshal_VOID__POINTER_POINTER_POINTER_UINT_UINT(
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
233 GaimCallback cb, va_list args, void *data, void **return_val);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
234
6822
7dba3e17cb21 [gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
235 void gaim_marshal_INT__INT(
7dba3e17cb21 [gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
236 GaimCallback cb, va_list args, void *data, void **return_val);
7dba3e17cb21 [gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
237 void gaim_marshal_INT__INT_INT(
7dba3e17cb21 [gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
238 GaimCallback cb, va_list args, void *data, void **return_val);
7dba3e17cb21 [gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
239
6485
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
240 void gaim_marshal_BOOLEAN__POINTER(
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
241 GaimCallback cb, va_list args, void *data, void **return_val);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
242 void gaim_marshal_BOOLEAN__POINTER_POINTER(
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
243 GaimCallback cb, va_list args, void *data, void **return_val);
6509
e74e378e86bf [gaim-migrate @ 7026]
Ethan Blanton <elb@pidgin.im>
parents: 6488
diff changeset
244 void gaim_marshal_BOOLEAN__POINTER_POINTER_POINTER(
e74e378e86bf [gaim-migrate @ 7026]
Ethan Blanton <elb@pidgin.im>
parents: 6488
diff changeset
245 GaimCallback cb, va_list args, void *data, void **return_val);
e74e378e86bf [gaim-migrate @ 7026]
Ethan Blanton <elb@pidgin.im>
parents: 6488
diff changeset
246 void gaim_marshal_BOOLEAN__POINTER_POINTER_UINT(
e74e378e86bf [gaim-migrate @ 7026]
Ethan Blanton <elb@pidgin.im>
parents: 6488
diff changeset
247 GaimCallback cb, va_list args, void *data, void **return_val);
6485
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
248 void gaim_marshal_BOOLEAN__POINTER_POINTER_POINTER_UINT(
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
249 GaimCallback cb, va_list args, void *data, void **return_val);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
250 void gaim_marshal_BOOLEAN__POINTER_POINTER_POINTER_POINTER(
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
251 GaimCallback cb, va_list args, void *data, void **return_val);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
252 void gaim_marshal_BOOLEAN__POINTER_POINTER_POINTER_POINTER_POINTER(
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
253 GaimCallback cb, va_list args, void *data, void **return_val);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
254
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
255 /*@}*/
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
256
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
257 #ifdef __cplusplus
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
258 }
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
259 #endif
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
260
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
261 #endif /* _GAIM_SIGNAL_H_ */