/usr/include/glib-2.0/gobject/gsignal.h
Line | Count | Source (jump to first uncovered line) |
1 | | /* GObject - GLib Type, Object, Parameter and Signal Library |
2 | | * Copyright (C) 2000-2001 Red Hat, Inc. |
3 | | * |
4 | | * This library is free software; you can redistribute it and/or |
5 | | * modify it under the terms of the GNU Lesser General Public |
6 | | * License as published by the Free Software Foundation; either |
7 | | * version 2.1 of the License, or (at your option) any later version. |
8 | | * |
9 | | * This library is distributed in the hope that it will be useful, |
10 | | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
12 | | * Lesser General Public License for more details. |
13 | | * |
14 | | * You should have received a copy of the GNU Lesser General |
15 | | * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. |
16 | | */ |
17 | | #ifndef __G_SIGNAL_H__ |
18 | | #define __G_SIGNAL_H__ |
19 | | |
20 | | #if !defined (__GLIB_GOBJECT_H_INSIDE__) && !defined (GOBJECT_COMPILATION) |
21 | | #error "Only <glib-object.h> can be included directly." |
22 | | #endif |
23 | | |
24 | | #include <gobject/gclosure.h> |
25 | | #include <gobject/gvalue.h> |
26 | | #include <gobject/gparam.h> |
27 | | #include <gobject/gmarshal.h> |
28 | | |
29 | | G_BEGIN_DECLS |
30 | | |
31 | | /* --- typedefs --- */ |
32 | | typedef struct _GSignalQuery GSignalQuery; |
33 | | typedef struct _GSignalInvocationHint GSignalInvocationHint; |
34 | | /** |
35 | | * GSignalCMarshaller: |
36 | | * |
37 | | * This is the signature of marshaller functions, required to marshall |
38 | | * arrays of parameter values to signal emissions into C language callback |
39 | | * invocations. It is merely an alias to #GClosureMarshal since the #GClosure |
40 | | * mechanism takes over responsibility of actual function invocation for the |
41 | | * signal system. |
42 | | */ |
43 | | typedef GClosureMarshal GSignalCMarshaller; |
44 | | /** |
45 | | * GSignalCVaMarshaller: |
46 | | * |
47 | | * This is the signature of va_list marshaller functions, an optional |
48 | | * marshaller that can be used in some situations to avoid |
49 | | * marshalling the signal argument into GValues. |
50 | | */ |
51 | | typedef GVaClosureMarshal GSignalCVaMarshaller; |
52 | | /** |
53 | | * GSignalEmissionHook: |
54 | | * @ihint: Signal invocation hint, see #GSignalInvocationHint. |
55 | | * @n_param_values: the number of parameters to the function, including |
56 | | * the instance on which the signal was emitted. |
57 | | * @param_values: (array length=n_param_values): the instance on which |
58 | | * the signal was emitted, followed by the parameters of the emission. |
59 | | * @data: user data associated with the hook. |
60 | | * |
61 | | * A simple function pointer to get invoked when the signal is emitted. This |
62 | | * allows you to tie a hook to the signal type, so that it will trap all |
63 | | * emissions of that signal, from any object. |
64 | | * |
65 | | * You may not attach these to signals created with the #G_SIGNAL_NO_HOOKS flag. |
66 | | * |
67 | | * Returns: whether it wants to stay connected. If it returns %FALSE, the signal |
68 | | * hook is disconnected (and destroyed). |
69 | | */ |
70 | | typedef gboolean (*GSignalEmissionHook) (GSignalInvocationHint *ihint, |
71 | | guint n_param_values, |
72 | | const GValue *param_values, |
73 | | gpointer data); |
74 | | /** |
75 | | * GSignalAccumulator: |
76 | | * @ihint: Signal invocation hint, see #GSignalInvocationHint. |
77 | | * @return_accu: Accumulator to collect callback return values in, this |
78 | | * is the return value of the current signal emission. |
79 | | * @handler_return: A #GValue holding the return value of the signal handler. |
80 | | * @data: Callback data that was specified when creating the signal. |
81 | | * |
82 | | * The signal accumulator is a special callback function that can be used |
83 | | * to collect return values of the various callbacks that are called |
84 | | * during a signal emission. The signal accumulator is specified at signal |
85 | | * creation time, if it is left %NULL, no accumulation of callback return |
86 | | * values is performed. The return value of signal emissions is then the |
87 | | * value returned by the last callback. |
88 | | * |
89 | | * Returns: The accumulator function returns whether the signal emission |
90 | | * should be aborted. Returning %FALSE means to abort the |
91 | | * current emission and %TRUE is returned for continuation. |
92 | | */ |
93 | | typedef gboolean (*GSignalAccumulator) (GSignalInvocationHint *ihint, |
94 | | GValue *return_accu, |
95 | | const GValue *handler_return, |
96 | | gpointer data); |
97 | | |
98 | | |
99 | | /* --- run, match and connect types --- */ |
100 | | /** |
101 | | * GSignalFlags: |
102 | | * @G_SIGNAL_RUN_FIRST: Invoke the object method handler in the first emission stage. |
103 | | * @G_SIGNAL_RUN_LAST: Invoke the object method handler in the third emission stage. |
104 | | * @G_SIGNAL_RUN_CLEANUP: Invoke the object method handler in the last emission stage. |
105 | | * @G_SIGNAL_NO_RECURSE: Signals being emitted for an object while currently being in |
106 | | * emission for this very object will not be emitted recursively, |
107 | | * but instead cause the first emission to be restarted. |
108 | | * @G_SIGNAL_DETAILED: This signal supports "::detail" appendices to the signal name |
109 | | * upon handler connections and emissions. |
110 | | * @G_SIGNAL_ACTION: Action signals are signals that may freely be emitted on alive |
111 | | * objects from user code via g_signal_emit() and friends, without |
112 | | * the need of being embedded into extra code that performs pre or |
113 | | * post emission adjustments on the object. They can also be thought |
114 | | * of as object methods which can be called generically by |
115 | | * third-party code. |
116 | | * @G_SIGNAL_NO_HOOKS: No emissions hooks are supported for this signal. |
117 | | * @G_SIGNAL_MUST_COLLECT: Varargs signal emission will always collect the |
118 | | * arguments, even if there are no signal handlers connected. Since 2.30. |
119 | | * @G_SIGNAL_DEPRECATED: The signal is deprecated and will be removed |
120 | | * in a future version. A warning will be generated if it is connected while |
121 | | * running with G_ENABLE_DIAGNOSTIC=1. Since 2.32. |
122 | | * |
123 | | * The signal flags are used to specify a signal's behaviour, the overall |
124 | | * signal description outlines how especially the RUN flags control the |
125 | | * stages of a signal emission. |
126 | | */ |
127 | | typedef enum |
128 | | { |
129 | | G_SIGNAL_RUN_FIRST = 1 << 0, |
130 | | G_SIGNAL_RUN_LAST = 1 << 1, |
131 | | G_SIGNAL_RUN_CLEANUP = 1 << 2, |
132 | | G_SIGNAL_NO_RECURSE = 1 << 3, |
133 | | G_SIGNAL_DETAILED = 1 << 4, |
134 | | G_SIGNAL_ACTION = 1 << 5, |
135 | | G_SIGNAL_NO_HOOKS = 1 << 6, |
136 | | G_SIGNAL_MUST_COLLECT = 1 << 7, |
137 | | G_SIGNAL_DEPRECATED = 1 << 8 |
138 | | } GSignalFlags; |
139 | | /** |
140 | | * G_SIGNAL_FLAGS_MASK: |
141 | | * |
142 | | * A mask for all #GSignalFlags bits. |
143 | | */ |
144 | | #define G_SIGNAL_FLAGS_MASK 0x1ff |
145 | | /** |
146 | | * GConnectFlags: |
147 | | * @G_CONNECT_AFTER: whether the handler should be called before or after the |
148 | | * default handler of the signal. |
149 | | * @G_CONNECT_SWAPPED: whether the instance and data should be swapped when |
150 | | * calling the handler; see g_signal_connect_swapped() for an example. |
151 | | * |
152 | | * The connection flags are used to specify the behaviour of a signal's |
153 | | * connection. |
154 | | */ |
155 | | typedef enum |
156 | | { |
157 | | G_CONNECT_AFTER = 1 << 0, |
158 | | G_CONNECT_SWAPPED = 1 << 1 |
159 | | } GConnectFlags; |
160 | | /** |
161 | | * GSignalMatchType: |
162 | | * @G_SIGNAL_MATCH_ID: The signal id must be equal. |
163 | | * @G_SIGNAL_MATCH_DETAIL: The signal detail must be equal. |
164 | | * @G_SIGNAL_MATCH_CLOSURE: The closure must be the same. |
165 | | * @G_SIGNAL_MATCH_FUNC: The C closure callback must be the same. |
166 | | * @G_SIGNAL_MATCH_DATA: The closure data must be the same. |
167 | | * @G_SIGNAL_MATCH_UNBLOCKED: Only unblocked signals may be matched. |
168 | | * |
169 | | * The match types specify what g_signal_handlers_block_matched(), |
170 | | * g_signal_handlers_unblock_matched() and g_signal_handlers_disconnect_matched() |
171 | | * match signals by. |
172 | | */ |
173 | | typedef enum |
174 | | { |
175 | | G_SIGNAL_MATCH_ID = 1 << 0, |
176 | | G_SIGNAL_MATCH_DETAIL = 1 << 1, |
177 | | G_SIGNAL_MATCH_CLOSURE = 1 << 2, |
178 | | G_SIGNAL_MATCH_FUNC = 1 << 3, |
179 | | G_SIGNAL_MATCH_DATA = 1 << 4, |
180 | | G_SIGNAL_MATCH_UNBLOCKED = 1 << 5 |
181 | | } GSignalMatchType; |
182 | | /** |
183 | | * G_SIGNAL_MATCH_MASK: |
184 | | * |
185 | | * A mask for all #GSignalMatchType bits. |
186 | | */ |
187 | | #define G_SIGNAL_MATCH_MASK 0x3f |
188 | | /** |
189 | | * G_SIGNAL_TYPE_STATIC_SCOPE: |
190 | | * |
191 | | * This macro flags signal argument types for which the signal system may |
192 | | * assume that instances thereof remain persistent across all signal emissions |
193 | | * they are used in. This is only useful for non ref-counted, value-copy types. |
194 | | * |
195 | | * To flag a signal argument in this way, add `| G_SIGNAL_TYPE_STATIC_SCOPE` |
196 | | * to the corresponding argument of g_signal_new(). |
197 | | * |[ |
198 | | * g_signal_new ("size_request", |
199 | | * G_TYPE_FROM_CLASS (gobject_class), |
200 | | * G_SIGNAL_RUN_FIRST, |
201 | | * G_STRUCT_OFFSET (GtkWidgetClass, size_request), |
202 | | * NULL, NULL, |
203 | | * _gtk_marshal_VOID__BOXED, |
204 | | * G_TYPE_NONE, 1, |
205 | | * GTK_TYPE_REQUISITION | G_SIGNAL_TYPE_STATIC_SCOPE); |
206 | | * ]| |
207 | | */ |
208 | | #define G_SIGNAL_TYPE_STATIC_SCOPE (G_TYPE_FLAG_RESERVED_ID_BIT) |
209 | | |
210 | | |
211 | | /* --- signal information --- */ |
212 | | /** |
213 | | * GSignalInvocationHint: |
214 | | * @signal_id: The signal id of the signal invoking the callback |
215 | | * @detail: The detail passed on for this emission |
216 | | * @run_type: The stage the signal emission is currently in, this |
217 | | * field will contain one of %G_SIGNAL_RUN_FIRST, |
218 | | * %G_SIGNAL_RUN_LAST or %G_SIGNAL_RUN_CLEANUP. |
219 | | * |
220 | | * The #GSignalInvocationHint structure is used to pass on additional information |
221 | | * to callbacks during a signal emission. |
222 | | */ |
223 | | struct _GSignalInvocationHint |
224 | | { |
225 | | guint signal_id; |
226 | | GQuark detail; |
227 | | GSignalFlags run_type; |
228 | | }; |
229 | | /** |
230 | | * GSignalQuery: |
231 | | * @signal_id: The signal id of the signal being queried, or 0 if the |
232 | | * signal to be queried was unknown. |
233 | | * @signal_name: The signal name. |
234 | | * @itype: The interface/instance type that this signal can be emitted for. |
235 | | * @signal_flags: The signal flags as passed in to g_signal_new(). |
236 | | * @return_type: The return type for user callbacks. |
237 | | * @n_params: The number of parameters that user callbacks take. |
238 | | * @param_types: (array length=n_params): The individual parameter types for |
239 | | * user callbacks, note that the effective callback signature is: |
240 | | * |[<!-- language="C" --> |
241 | | * @return_type callback (#gpointer data1, |
242 | | * [param_types param_names,] |
243 | | * gpointer data2); |
244 | | * ]| |
245 | | * |
246 | | * A structure holding in-depth information for a specific signal. It is |
247 | | * filled in by the g_signal_query() function. |
248 | | */ |
249 | | struct _GSignalQuery |
250 | | { |
251 | | guint signal_id; |
252 | | const gchar *signal_name; |
253 | | GType itype; |
254 | | GSignalFlags signal_flags; |
255 | | GType return_type; /* mangled with G_SIGNAL_TYPE_STATIC_SCOPE flag */ |
256 | | guint n_params; |
257 | | const GType *param_types; /* mangled with G_SIGNAL_TYPE_STATIC_SCOPE flag */ |
258 | | }; |
259 | | |
260 | | |
261 | | /* --- signals --- */ |
262 | | GLIB_AVAILABLE_IN_ALL |
263 | | guint g_signal_newv (const gchar *signal_name, |
264 | | GType itype, |
265 | | GSignalFlags signal_flags, |
266 | | GClosure *class_closure, |
267 | | GSignalAccumulator accumulator, |
268 | | gpointer accu_data, |
269 | | GSignalCMarshaller c_marshaller, |
270 | | GType return_type, |
271 | | guint n_params, |
272 | | GType *param_types); |
273 | | GLIB_AVAILABLE_IN_ALL |
274 | | guint g_signal_new_valist (const gchar *signal_name, |
275 | | GType itype, |
276 | | GSignalFlags signal_flags, |
277 | | GClosure *class_closure, |
278 | | GSignalAccumulator accumulator, |
279 | | gpointer accu_data, |
280 | | GSignalCMarshaller c_marshaller, |
281 | | GType return_type, |
282 | | guint n_params, |
283 | | va_list args); |
284 | | GLIB_AVAILABLE_IN_ALL |
285 | | guint g_signal_new (const gchar *signal_name, |
286 | | GType itype, |
287 | | GSignalFlags signal_flags, |
288 | | guint class_offset, |
289 | | GSignalAccumulator accumulator, |
290 | | gpointer accu_data, |
291 | | GSignalCMarshaller c_marshaller, |
292 | | GType return_type, |
293 | | guint n_params, |
294 | | ...); |
295 | | GLIB_AVAILABLE_IN_ALL |
296 | | guint g_signal_new_class_handler (const gchar *signal_name, |
297 | | GType itype, |
298 | | GSignalFlags signal_flags, |
299 | | GCallback class_handler, |
300 | | GSignalAccumulator accumulator, |
301 | | gpointer accu_data, |
302 | | GSignalCMarshaller c_marshaller, |
303 | | GType return_type, |
304 | | guint n_params, |
305 | | ...); |
306 | | GLIB_AVAILABLE_IN_ALL |
307 | | void g_signal_set_va_marshaller (guint signal_id, |
308 | | GType instance_type, |
309 | | GSignalCVaMarshaller va_marshaller); |
310 | | |
311 | | GLIB_AVAILABLE_IN_ALL |
312 | | void g_signal_emitv (const GValue *instance_and_params, |
313 | | guint signal_id, |
314 | | GQuark detail, |
315 | | GValue *return_value); |
316 | | GLIB_AVAILABLE_IN_ALL |
317 | | void g_signal_emit_valist (gpointer instance, |
318 | | guint signal_id, |
319 | | GQuark detail, |
320 | | va_list var_args); |
321 | | GLIB_AVAILABLE_IN_ALL |
322 | | void g_signal_emit (gpointer instance, |
323 | | guint signal_id, |
324 | | GQuark detail, |
325 | | ...); |
326 | | GLIB_AVAILABLE_IN_ALL |
327 | | void g_signal_emit_by_name (gpointer instance, |
328 | | const gchar *detailed_signal, |
329 | | ...); |
330 | | GLIB_AVAILABLE_IN_ALL |
331 | | guint g_signal_lookup (const gchar *name, |
332 | | GType itype); |
333 | | GLIB_AVAILABLE_IN_ALL |
334 | | const gchar * g_signal_name (guint signal_id); |
335 | | GLIB_AVAILABLE_IN_ALL |
336 | | void g_signal_query (guint signal_id, |
337 | | GSignalQuery *query); |
338 | | GLIB_AVAILABLE_IN_ALL |
339 | | guint* g_signal_list_ids (GType itype, |
340 | | guint *n_ids); |
341 | | GLIB_AVAILABLE_IN_ALL |
342 | | gboolean g_signal_parse_name (const gchar *detailed_signal, |
343 | | GType itype, |
344 | | guint *signal_id_p, |
345 | | GQuark *detail_p, |
346 | | gboolean force_detail_quark); |
347 | | GLIB_AVAILABLE_IN_ALL |
348 | | GSignalInvocationHint* g_signal_get_invocation_hint (gpointer instance); |
349 | | |
350 | | |
351 | | /* --- signal emissions --- */ |
352 | | GLIB_AVAILABLE_IN_ALL |
353 | | void g_signal_stop_emission (gpointer instance, |
354 | | guint signal_id, |
355 | | GQuark detail); |
356 | | GLIB_AVAILABLE_IN_ALL |
357 | | void g_signal_stop_emission_by_name (gpointer instance, |
358 | | const gchar *detailed_signal); |
359 | | GLIB_AVAILABLE_IN_ALL |
360 | | gulong g_signal_add_emission_hook (guint signal_id, |
361 | | GQuark detail, |
362 | | GSignalEmissionHook hook_func, |
363 | | gpointer hook_data, |
364 | | GDestroyNotify data_destroy); |
365 | | GLIB_AVAILABLE_IN_ALL |
366 | | void g_signal_remove_emission_hook (guint signal_id, |
367 | | gulong hook_id); |
368 | | |
369 | | |
370 | | /* --- signal handlers --- */ |
371 | | GLIB_AVAILABLE_IN_ALL |
372 | | gboolean g_signal_has_handler_pending (gpointer instance, |
373 | | guint signal_id, |
374 | | GQuark detail, |
375 | | gboolean may_be_blocked); |
376 | | GLIB_AVAILABLE_IN_ALL |
377 | | gulong g_signal_connect_closure_by_id (gpointer instance, |
378 | | guint signal_id, |
379 | | GQuark detail, |
380 | | GClosure *closure, |
381 | | gboolean after); |
382 | | GLIB_AVAILABLE_IN_ALL |
383 | | gulong g_signal_connect_closure (gpointer instance, |
384 | | const gchar *detailed_signal, |
385 | | GClosure *closure, |
386 | | gboolean after); |
387 | | GLIB_AVAILABLE_IN_ALL |
388 | | gulong g_signal_connect_data (gpointer instance, |
389 | | const gchar *detailed_signal, |
390 | | GCallback c_handler, |
391 | | gpointer data, |
392 | | GClosureNotify destroy_data, |
393 | | GConnectFlags connect_flags); |
394 | | GLIB_AVAILABLE_IN_ALL |
395 | | void g_signal_handler_block (gpointer instance, |
396 | | gulong handler_id); |
397 | | GLIB_AVAILABLE_IN_ALL |
398 | | void g_signal_handler_unblock (gpointer instance, |
399 | | gulong handler_id); |
400 | | GLIB_AVAILABLE_IN_ALL |
401 | | void g_signal_handler_disconnect (gpointer instance, |
402 | | gulong handler_id); |
403 | | GLIB_AVAILABLE_IN_ALL |
404 | | gboolean g_signal_handler_is_connected (gpointer instance, |
405 | | gulong handler_id); |
406 | | GLIB_AVAILABLE_IN_ALL |
407 | | gulong g_signal_handler_find (gpointer instance, |
408 | | GSignalMatchType mask, |
409 | | guint signal_id, |
410 | | GQuark detail, |
411 | | GClosure *closure, |
412 | | gpointer func, |
413 | | gpointer data); |
414 | | GLIB_AVAILABLE_IN_ALL |
415 | | guint g_signal_handlers_block_matched (gpointer instance, |
416 | | GSignalMatchType mask, |
417 | | guint signal_id, |
418 | | GQuark detail, |
419 | | GClosure *closure, |
420 | | gpointer func, |
421 | | gpointer data); |
422 | | GLIB_AVAILABLE_IN_ALL |
423 | | guint g_signal_handlers_unblock_matched (gpointer instance, |
424 | | GSignalMatchType mask, |
425 | | guint signal_id, |
426 | | GQuark detail, |
427 | | GClosure *closure, |
428 | | gpointer func, |
429 | | gpointer data); |
430 | | GLIB_AVAILABLE_IN_ALL |
431 | | guint g_signal_handlers_disconnect_matched (gpointer instance, |
432 | | GSignalMatchType mask, |
433 | | guint signal_id, |
434 | | GQuark detail, |
435 | | GClosure *closure, |
436 | | gpointer func, |
437 | | gpointer data); |
438 | | |
439 | | GLIB_AVAILABLE_IN_2_62 |
440 | | void g_clear_signal_handler (gulong *handler_id_ptr, |
441 | | gpointer instance); |
442 | | |
443 | | #define g_clear_signal_handler(handler_id_ptr, instance) \ |
444 | | G_STMT_START { \ |
445 | | G_STATIC_ASSERT (sizeof *(handler_id_ptr) == sizeof (gulong)); \ |
446 | | gulong _handler_id = *(handler_id_ptr); \ |
447 | | \ |
448 | | if (_handler_id > 0) \ |
449 | | { \ |
450 | | g_signal_handler_disconnect ((instance), _handler_id); \ |
451 | | *(handler_id_ptr) = 0; \ |
452 | | } \ |
453 | | } G_STMT_END \ |
454 | | GLIB_AVAILABLE_MACRO_IN_2_62 |
455 | | |
456 | | /* --- overriding and chaining --- */ |
457 | | GLIB_AVAILABLE_IN_ALL |
458 | | void g_signal_override_class_closure (guint signal_id, |
459 | | GType instance_type, |
460 | | GClosure *class_closure); |
461 | | GLIB_AVAILABLE_IN_ALL |
462 | | void g_signal_override_class_handler (const gchar *signal_name, |
463 | | GType instance_type, |
464 | | GCallback class_handler); |
465 | | GLIB_AVAILABLE_IN_ALL |
466 | | void g_signal_chain_from_overridden (const GValue *instance_and_params, |
467 | | GValue *return_value); |
468 | | GLIB_AVAILABLE_IN_ALL |
469 | | void g_signal_chain_from_overridden_handler (gpointer instance, |
470 | | ...); |
471 | | |
472 | | |
473 | | /* --- convenience --- */ |
474 | | /** |
475 | | * g_signal_connect: |
476 | | * @instance: the instance to connect to. |
477 | | * @detailed_signal: a string of the form "signal-name::detail". |
478 | | * @c_handler: the #GCallback to connect. |
479 | | * @data: data to pass to @c_handler calls. |
480 | | * |
481 | | * Connects a #GCallback function to a signal for a particular object. |
482 | | * |
483 | | * The handler will be called before the default handler of the signal. |
484 | | * |
485 | | * See [memory management of signal handlers][signal-memory-management] for |
486 | | * details on how to handle the return value and memory management of @data. |
487 | | * |
488 | | * Returns: the handler ID, of type #gulong (always greater than 0 for successful connections) |
489 | | */ |
490 | | #define g_signal_connect(instance, detailed_signal, c_handler, data) \ |
491 | 0 | g_signal_connect_data ((instance), (detailed_signal), (c_handler), (data), NULL, (GConnectFlags) 0) Unexecuted instantiation: ConnectivityManagerImpl.cpp:chip::DeviceLayer::ConnectivityManagerImpl::_OnWpaInterfaceProxyReady(_GObject*, _GAsyncResult*)::$_0::operator()(_WpaFiW1Wpa_supplicant1Interface*, _GVariant*, chip::DeviceLayer::ConnectivityManagerImpl*) const Unexecuted instantiation: ConnectivityManagerImpl.cpp:chip::DeviceLayer::ConnectivityManagerImpl::_OnWpaInterfaceProxyReady(_GObject*, _GAsyncResult*)::$_1::operator()(_WpaFiW1Wpa_supplicant1Interface*, int, chip::DeviceLayer::ConnectivityManagerImpl*) const Unexecuted instantiation: ConnectivityManagerImpl.cpp:chip::DeviceLayer::ConnectivityManagerImpl::_OnWpaProxyReady(_GObject*, _GAsyncResult*)::$_0::operator()(_WpaFiW1Wpa_supplicant1*, char const*, _GVariant*, chip::DeviceLayer::ConnectivityManagerImpl*) const Unexecuted instantiation: ConnectivityManagerImpl.cpp:chip::DeviceLayer::ConnectivityManagerImpl::_OnWpaProxyReady(_GObject*, _GAsyncResult*)::$_1::operator()(_WpaFiW1Wpa_supplicant1*, char const*, _GVariant*, chip::DeviceLayer::ConnectivityManagerImpl*) const Unexecuted instantiation: BluezAdvertisement.cpp:chip::DeviceLayer::Internal::BluezAdvertisement::CreateLEAdvertisement()::$_0::operator()(_BluezLEAdvertisement1*, _GDBusMethodInvocation*, chip::DeviceLayer::Internal::BluezAdvertisement*) const Unexecuted instantiation: BluezEndpoint.cpp:chip::DeviceLayer::Internal::BluezEndpoint::SetupGattService()::$_0::operator()(_BluezGattCharacteristic1*, _GDBusMethodInvocation*, _GVariant*, chip::DeviceLayer::Internal::BluezEndpoint*) const Unexecuted instantiation: BluezEndpoint.cpp:chip::DeviceLayer::Internal::BluezEndpoint::SetupGattService()::$_1::operator()(_BluezGattCharacteristic1*, _GDBusMethodInvocation*, _GUnixFDList*, _GVariant*, chip::DeviceLayer::Internal::BluezEndpoint*) const Unexecuted instantiation: BluezEndpoint.cpp:chip::DeviceLayer::Internal::BluezEndpoint::SetupGattService()::$_2::operator()(_BluezGattCharacteristic1*, _GDBusMethodInvocation*, _GVariant*, chip::DeviceLayer::Internal::BluezEndpoint*) const Unexecuted instantiation: BluezEndpoint.cpp:chip::DeviceLayer::Internal::BluezEndpoint::SetupGattService()::$_3::operator()(_BluezGattCharacteristic1*, _GDBusMethodInvocation*, _GUnixFDList*, _GVariant*, chip::DeviceLayer::Internal::BluezEndpoint*) const Unexecuted instantiation: BluezEndpoint.cpp:chip::DeviceLayer::Internal::BluezEndpoint::SetupGattService()::$_4::operator()(_BluezGattCharacteristic1*, _GDBusMethodInvocation*, chip::DeviceLayer::Internal::BluezEndpoint*) const Unexecuted instantiation: BluezObjectManager.cpp:chip::DeviceLayer::Internal::BluezObjectManager::SetupObjectManager()::$_0::operator()(_GDBusObjectManager*, _GDBusObject*, chip::DeviceLayer::Internal::BluezObjectManager*) const Unexecuted instantiation: BluezObjectManager.cpp:chip::DeviceLayer::Internal::BluezObjectManager::SetupObjectManager()::$_1::operator()(_GDBusObjectManager*, _GDBusObject*, chip::DeviceLayer::Internal::BluezObjectManager*) const Unexecuted instantiation: BluezObjectManager.cpp:chip::DeviceLayer::Internal::BluezObjectManager::SetupObjectManager()::$_2::operator()(_GDBusObjectManagerClient*, _GDBusObjectProxy*, _GDBusProxy*, _GVariant*, char const* const*, chip::DeviceLayer::Internal::BluezObjectManager*) const |
492 | | /** |
493 | | * g_signal_connect_after: |
494 | | * @instance: the instance to connect to. |
495 | | * @detailed_signal: a string of the form "signal-name::detail". |
496 | | * @c_handler: the #GCallback to connect. |
497 | | * @data: data to pass to @c_handler calls. |
498 | | * |
499 | | * Connects a #GCallback function to a signal for a particular object. |
500 | | * |
501 | | * The handler will be called after the default handler of the signal. |
502 | | * |
503 | | * Returns: the handler ID, of type #gulong (always greater than 0 for successful connections) |
504 | | */ |
505 | | #define g_signal_connect_after(instance, detailed_signal, c_handler, data) \ |
506 | | g_signal_connect_data ((instance), (detailed_signal), (c_handler), (data), NULL, G_CONNECT_AFTER) |
507 | | /** |
508 | | * g_signal_connect_swapped: |
509 | | * @instance: the instance to connect to. |
510 | | * @detailed_signal: a string of the form "signal-name::detail". |
511 | | * @c_handler: the #GCallback to connect. |
512 | | * @data: data to pass to @c_handler calls. |
513 | | * |
514 | | * Connects a #GCallback function to a signal for a particular object. |
515 | | * |
516 | | * The instance on which the signal is emitted and @data will be swapped when |
517 | | * calling the handler. This is useful when calling pre-existing functions to |
518 | | * operate purely on the @data, rather than the @instance: swapping the |
519 | | * parameters avoids the need to write a wrapper function. |
520 | | * |
521 | | * For example, this allows the shorter code: |
522 | | * |[<!-- language="C" --> |
523 | | * g_signal_connect_swapped (button, "clicked", |
524 | | * (GCallback) gtk_widget_hide, other_widget); |
525 | | * ]| |
526 | | * |
527 | | * Rather than the cumbersome: |
528 | | * |[<!-- language="C" --> |
529 | | * static void |
530 | | * button_clicked_cb (GtkButton *button, GtkWidget *other_widget) |
531 | | * { |
532 | | * gtk_widget_hide (other_widget); |
533 | | * } |
534 | | * |
535 | | * ... |
536 | | * |
537 | | * g_signal_connect (button, "clicked", |
538 | | * (GCallback) button_clicked_cb, other_widget); |
539 | | * ]| |
540 | | * |
541 | | * Returns: the handler ID, of type #gulong (always greater than 0 for successful connections) |
542 | | */ |
543 | | #define g_signal_connect_swapped(instance, detailed_signal, c_handler, data) \ |
544 | | g_signal_connect_data ((instance), (detailed_signal), (c_handler), (data), NULL, G_CONNECT_SWAPPED) |
545 | | /** |
546 | | * g_signal_handlers_disconnect_by_func: |
547 | | * @instance: The instance to remove handlers from. |
548 | | * @func: The C closure callback of the handlers (useless for non-C closures). |
549 | | * @data: The closure data of the handlers' closures. |
550 | | * |
551 | | * Disconnects all handlers on an instance that match @func and @data. |
552 | | * |
553 | | * Returns: The number of handlers that matched. |
554 | | */ |
555 | | #define g_signal_handlers_disconnect_by_func(instance, func, data) \ |
556 | | g_signal_handlers_disconnect_matched ((instance), \ |
557 | | (GSignalMatchType) (G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA), \ |
558 | | 0, 0, NULL, (func), (data)) |
559 | | |
560 | | /** |
561 | | * g_signal_handlers_disconnect_by_data: |
562 | | * @instance: The instance to remove handlers from |
563 | | * @data: the closure data of the handlers' closures |
564 | | * |
565 | | * Disconnects all handlers on an instance that match @data. |
566 | | * |
567 | | * Returns: The number of handlers that matched. |
568 | | * |
569 | | * Since: 2.32 |
570 | | */ |
571 | | #define g_signal_handlers_disconnect_by_data(instance, data) \ |
572 | 0 | g_signal_handlers_disconnect_matched ((instance), G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, (data)) |
573 | | |
574 | | /** |
575 | | * g_signal_handlers_block_by_func: |
576 | | * @instance: The instance to block handlers from. |
577 | | * @func: The C closure callback of the handlers (useless for non-C closures). |
578 | | * @data: The closure data of the handlers' closures. |
579 | | * |
580 | | * Blocks all handlers on an instance that match @func and @data. |
581 | | * |
582 | | * Returns: The number of handlers that matched. |
583 | | */ |
584 | | #define g_signal_handlers_block_by_func(instance, func, data) \ |
585 | | g_signal_handlers_block_matched ((instance), \ |
586 | | (GSignalMatchType) (G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA), \ |
587 | | 0, 0, NULL, (func), (data)) |
588 | | /** |
589 | | * g_signal_handlers_unblock_by_func: |
590 | | * @instance: The instance to unblock handlers from. |
591 | | * @func: The C closure callback of the handlers (useless for non-C closures). |
592 | | * @data: The closure data of the handlers' closures. |
593 | | * |
594 | | * Unblocks all handlers on an instance that match @func and @data. |
595 | | * |
596 | | * Returns: The number of handlers that matched. |
597 | | */ |
598 | | #define g_signal_handlers_unblock_by_func(instance, func, data) \ |
599 | | g_signal_handlers_unblock_matched ((instance), \ |
600 | | (GSignalMatchType) (G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA), \ |
601 | | 0, 0, NULL, (func), (data)) |
602 | | |
603 | | |
604 | | GLIB_AVAILABLE_IN_ALL |
605 | | gboolean g_signal_accumulator_true_handled (GSignalInvocationHint *ihint, |
606 | | GValue *return_accu, |
607 | | const GValue *handler_return, |
608 | | gpointer dummy); |
609 | | |
610 | | GLIB_AVAILABLE_IN_ALL |
611 | | gboolean g_signal_accumulator_first_wins (GSignalInvocationHint *ihint, |
612 | | GValue *return_accu, |
613 | | const GValue *handler_return, |
614 | | gpointer dummy); |
615 | | |
616 | | /*< private >*/ |
617 | | GLIB_AVAILABLE_IN_ALL |
618 | | void g_signal_handlers_destroy (gpointer instance); |
619 | | void _g_signals_destroy (GType itype); |
620 | | |
621 | | G_END_DECLS |
622 | | |
623 | | #endif /* __G_SIGNAL_H__ */ |