-
public void query (uint signal_id, out SignalQuery query)
Queries the signal system for in-depth information about a specific signal. This function will fill in a
user-provided structure to hold signal-specific information. If an invalid signal id is passed in, the signal_id member
of the SignalQuery is 0. All members filled into the
SignalQuery structure should be considered constant and have to be left untouched.
-
public uint lookup (string name, Type itype)
Given the name of the signal and the type of object it connects to, gets the signal's identifying
integer. Emitting the signal by number is somewhat faster than using the name each time.
-
public unowned string name (uint signal_id)
Given the signal's identifier, finds its name.
-
public uint[] list_ids (Type itype)
Lists the signals by id that a certain instance or interface type created. Further information about the
signals can be acquired through query.
-
public void emit (void* instance, uint signal_id, Quark detail, ...)
Emits a signal.
-
public void emit_by_name (void* instance, string detailed_signal, ...)
Emits a signal.
-
public ulong connect (void* instance, string detailed_signal, Callback handler, void* data)
-
public ulong connect_after (void* instance, string detailed_signal, Callback handler, void* data)
-
public ulong connect_swapped (void* instance, string detailed_signal, Callback handler, void* data)
-
public ulong connect_object (void* instance, string detailed_signal, Callback handler, Object gobject, ConnectFlags flags)
This is similar to connect_data, but uses a
closure which ensures that the gobject stays alive during the call to c_handler by temporarily adding a
reference count to gobject.
-
public ulong connect_data (void* instance, string detailed_signal, Callback handler, void* data, ClosureNotify destroy_data, ConnectFlags flags)
Connects a Callback function to a signal for a
particular object. Similar to connect, but allows to provide a
ClosureNotify for the data which will be called when the signal handler is
disconnected and no longer used. Specify connect_flags if you need ..._after() or ..._swapped() variants of
this function.
-
public ulong connect_closure (void* instance, string detailed_signal, Closure closure, bool after)
Connects a closure to a signal for a particular object.
-
public ulong connect_closure_by_id (void* instance, uint signal_id, Quark detail, Closure closure, bool after)
Connects a closure to a signal for a particular object.
-
public bool has_handler_pending (void* instance, uint signal_id, Quark detail, bool may_be_blocked)
Returns whether there are any handlers connected to instance for the given signal id and
detail.
-
public void stop_emission (void* instance, uint signal_id, Quark detail)
Stops a signal's current emission.
-
public void stop_emission_by_name (void* instance, string detailed_signal)
Stops a signal's current emission.
-
public void override_class_closure (uint signal_id, Type instance_type, Closure class_closure)
Overrides the class closure (i.e. the default handler) for the given signal for emissions on instances
of instance_type. instance_type must be derived from the type to which the signal belongs.
-
public void chain_from_overridden (Value[] instance_and_params, out Value return_value)
Calls the original class closure of a signal. This function should only be called from an overridden
class closure; see override_class_closure and
g_signal_override_class_handler.
-
public ulong add_emission_hook (uint signal_id, Quark detail, SignalEmissionHook hook_func, DestroyNotify? data_destroy)
Adds an emission hook for a signal, which will get called for any emission of that signal, independent
of the instance. This is possible only for signals which don't have
NO_HOOKS flag set.
-
public void remove_emission_hook (uint signal_id, ulong hook_id)
Deletes an emission hook.
-
public bool parse_name (string detailed_signal, Type itype, out uint signal_id, out Quark detail, bool force_detail_quark)
Internal function to parse a signal name into its signal_id and detail quark.
-
public unowned SignalInvocationHint? get_invocation_hint (void* instance)
Returns the invocation hint of the innermost signal emission of instance.