mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-01 23:13:40 +02:00
Bug 541208 – Functions to easily install and use signals without class
2008-07-04 Michael Natterer <mitch@imendio.com> Bug 541208 – Functions to easily install and use signals without class struct slot * gobject.symbols * gsignal.[ch] (g_signal_new_class_handler): the same as _gtk_binding_signal_new(), to install signals with a callback instead of a class struct slot as class closure. The next two functions are C convenience and much easier to use than the generic overriding and chaining APIs which are intended primarily for language bindings: (g_signal_override_class_handler): to override a signal with a callback instead of a class struct slot. (g_signal_chain_from_overridden_handler): to chain up from a signal without class struct slot. The API is similar to g_signal_emit(). svn path=/trunk/; revision=7157
This commit is contained in:
committed by
Michael Natterer
parent
548b2bd02b
commit
20d4f6da73
@@ -277,6 +277,17 @@ guint g_signal_new (const gchar *signal_name,
|
||||
GType return_type,
|
||||
guint n_params,
|
||||
...);
|
||||
guint g_signal_new_class_handler (const gchar *signal_name,
|
||||
GType itype,
|
||||
GSignalFlags signal_flags,
|
||||
GCallback class_handler,
|
||||
GSignalAccumulator accumulator,
|
||||
gpointer accu_data,
|
||||
GSignalCMarshaller c_marshaller,
|
||||
GType return_type,
|
||||
guint n_params,
|
||||
...);
|
||||
|
||||
void g_signal_emitv (const GValue *instance_and_params,
|
||||
guint signal_id,
|
||||
GQuark detail,
|
||||
@@ -380,12 +391,17 @@ guint g_signal_handlers_disconnect_matched (gpointer instance,
|
||||
gpointer data);
|
||||
|
||||
|
||||
/* --- chaining for language bindings --- */
|
||||
void g_signal_override_class_closure (guint signal_id,
|
||||
GType instance_type,
|
||||
GClosure *class_closure);
|
||||
void g_signal_chain_from_overridden (const GValue *instance_and_params,
|
||||
GValue *return_value);
|
||||
/* --- overriding and chaining --- */
|
||||
void g_signal_override_class_closure (guint signal_id,
|
||||
GType instance_type,
|
||||
GClosure *class_closure);
|
||||
void g_signal_override_class_handler (const gchar *signal_name,
|
||||
GType instance_type,
|
||||
GCallback class_handler);
|
||||
void g_signal_chain_from_overridden (const GValue *instance_and_params,
|
||||
GValue *return_value);
|
||||
void g_signal_chain_from_overridden_handler (gpointer instance,
|
||||
...);
|
||||
|
||||
|
||||
/* --- convenience --- */
|
||||
|
Reference in New Issue
Block a user