diff options
author | Christian Persch <chpe@gnome.org> | 2011-03-02 15:48:40 +0100 |
---|---|---|
committer | Ryan Lortie <desrt@desrt.ca> | 2011-03-15 01:32:22 -0400 |
commit | 61b0e1c8d49b6b42d3b6f27f0663ead75967f81a (patch) | |
tree | a0a31f8bd9feb1671de2c3e2e5462673375ada2e /gobject/gsignal.h | |
parent | c95ff4de046d583fe2e8189522214069b708d32f (diff) | |
download | glib-61b0e1c8d49b6b42d3b6f27f0663ead75967f81a.tar.gz |
Add G_SIGNAL_MUST_COLLECT
In some cases, signal arguments have to be collected, even if there are i
no signal handlers connected (e.g. for GVariant parameters, where collection
consumes a floating variant).
Based on a patch by Christian Persch.
Bug #643624.
Diffstat (limited to 'gobject/gsignal.h')
-rw-r--r-- | gobject/gsignal.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gobject/gsignal.h b/gobject/gsignal.h index 3064d1fcb..24ef842cc 100644 --- a/gobject/gsignal.h +++ b/gobject/gsignal.h @@ -108,6 +108,8 @@ typedef gboolean (*GSignalAccumulator) (GSignalInvocationHint *ihint, * of as object methods which can be called generically by * third-party code. * @G_SIGNAL_NO_HOOKS: No emissions hooks are supported for this signal. + * @G_SIGNAL_MUST_COLLECT: Varargs signal emission will always collect the + * arguments, even if there are no signal handlers connected. Since 2.30. * * The signal flags are used to specify a signal's behaviour, the overall * signal description outlines how especially the RUN flags control the @@ -121,14 +123,15 @@ typedef enum G_SIGNAL_NO_RECURSE = 1 << 3, G_SIGNAL_DETAILED = 1 << 4, G_SIGNAL_ACTION = 1 << 5, - G_SIGNAL_NO_HOOKS = 1 << 6 + G_SIGNAL_NO_HOOKS = 1 << 6, + G_SIGNAL_MUST_COLLECT = 1 << 7 } GSignalFlags; /** * G_SIGNAL_FLAGS_MASK: * * A mask for all #GSignalFlags bits. */ -#define G_SIGNAL_FLAGS_MASK 0x7f +#define G_SIGNAL_FLAGS_MASK 0xff /** * GConnectFlags: * @G_CONNECT_AFTER: whether the handler should be called before or after the |