summaryrefslogtreecommitdiff
path: root/gobject/gsignal.h
diff options
context:
space:
mode:
authorTim Janik <timj@gtk.org>2000-11-01 03:03:04 +0000
committerTim Janik <timj@src.gnome.org>2000-11-01 03:03:04 +0000
commitcfe0780d3ea8a5a9bdd3497926437cde42298086 (patch)
treea5e5072226dddd1bec89ca17b775f2e4f987ac2c /gobject/gsignal.h
parentb6eb9a2e7d80808095af6c735c63f216d778ba1e (diff)
destroy all signals that the finalized obejct type introduced.
Wed Nov 1 03:36:54 2000 Tim Janik <timj@gtk.org> * gobject.c (g_object_base_class_finalize): destroy all signals that the finalized obejct type introduced. * gsignal.c (g_signals_destroy): don't require itype to have signals. * gobject.c (g_object_do_finalize): make sure all signal handlers are destroyed. * gsignal.[hc]: (g_signal_handler_find): only match on non-0 masks. (g_signal_handlers_block_matched): (g_signal_handlers_unblock_matched): (g_signal_handlers_disconnect_matched): new functions to block/unblock or disconnect handlers in groups.
Diffstat (limited to 'gobject/gsignal.h')
-rw-r--r--gobject/gsignal.h140
1 files changed, 81 insertions, 59 deletions
diff --git a/gobject/gsignal.h b/gobject/gsignal.h
index f6db74563..92e5a4814 100644
--- a/gobject/gsignal.h
+++ b/gobject/gsignal.h
@@ -8,7 +8,7 @@
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General
@@ -31,9 +31,9 @@ extern "C" {
/* --- typedefs --- */
-typedef struct _GSignalQuery GSignalQuery;
-typedef struct _GSignalInvocationHint GSignalInvocationHint;
-typedef GClosureMarshal GSignalCMarshaller;
+typedef struct _GSignalQuery GSignalQuery;
+typedef struct _GSignalInvocationHint GSignalInvocationHint;
+typedef GClosureMarshal GSignalCMarshaller;
typedef gboolean (*GSignalEmissionHook) (GSignalInvocationHint *ihint,
guint n_param_values,
const GValue *param_values);
@@ -52,7 +52,7 @@ typedef enum
G_SIGNAL_DETAILED = 1 << 4,
G_SIGNAL_ACTION = 1 << 5,
G_SIGNAL_NO_HOOKS = 1 << 6
-#define G_SIGNAL_FLAGS_MASK 0x7f
+#define G_SIGNAL_FLAGS_MASK 0x7f
} GSignalFlags;
typedef enum
{
@@ -62,7 +62,7 @@ typedef enum
G_SIGNAL_MATCH_FUNC = 1 << 3,
G_SIGNAL_MATCH_DATA = 1 << 4,
G_SIGNAL_MATCH_UNBLOCKED = 1 << 5
-#define G_SIGNAL_MATCH_MASK 0x3f
+#define G_SIGNAL_MATCH_MASK 0x3f
} GSignalMatchType;
@@ -86,64 +86,86 @@ struct _GSignalQuery
/* --- signals --- */
-guint g_signal_newv (const gchar *signal_name,
- GType itype,
- GSignalFlags signal_flags,
- GClosure *class_closure,
- GSignalAccumulator accumulator,
- GSignalCMarshaller c_marshaller,
- GType return_type,
- guint n_params,
- GType *param_types);
-void g_signal_emitv (const GValue *instance_and_params,
- guint signal_id,
- GQuark detail,
- GValue *return_value);
-guint g_signal_lookup (const gchar *name,
- GType itype);
-gchar* g_signal_name (guint signal_id);
-void g_signal_query (guint signal_id,
- GSignalQuery *query);
-guint* g_signal_list_ids (GType itype,
- guint *n_ids);
+guint g_signal_newv (const gchar *signal_name,
+ GType itype,
+ GSignalFlags signal_flags,
+ GClosure *class_closure,
+ GSignalAccumulator accumulator,
+ GSignalCMarshaller c_marshaller,
+ GType return_type,
+ guint n_params,
+ GType *param_types);
+void g_signal_emitv (const GValue *instance_and_params,
+ guint signal_id,
+ GQuark detail,
+ GValue *return_value);
+guint g_signal_lookup (const gchar *name,
+ GType itype);
+gchar* g_signal_name (guint signal_id);
+void g_signal_query (guint signal_id,
+ GSignalQuery *query);
+guint* g_signal_list_ids (GType itype,
+ guint *n_ids);
-/* --- signal handlers --- */
-guint g_signal_connect_closure (gpointer instance,
- guint signal_id,
- GQuark detail,
- GClosure *closure,
- gboolean after);
-void g_signal_handler_disconnect (gpointer instance,
- guint handler_id);
-void g_signal_handler_block (gpointer instance,
- guint handler_id);
-void g_signal_handler_unblock (gpointer instance,
- guint handler_id);
-guint g_signal_handler_find (gpointer instance,
- GSignalMatchType mask,
- guint signal_id,
- GQuark detail,
- GClosure *closure,
- gpointer func,
- gpointer data);
-gboolean g_signal_has_handler_pending (gpointer instance,
- guint signal_id,
- GQuark detail,
- gboolean may_be_blocked);
+/* --- signal emissions --- */
+void g_signal_stop_emission (gpointer instance,
+ guint signal_id,
+ GQuark detail);
+guint g_signal_add_emission_hook_full (guint signal_id,
+ GClosure *closure);
+void g_signal_remove_emission_hook (guint signal_id,
+ guint hook_id);
-/* --- signal emissions --- */
-void g_signal_stop_emission (gpointer instance,
- guint signal_id,
- GQuark detail);
-guint g_signal_add_emission_hook_full (guint signal_id,
- GClosure *closure);
-void g_signal_remove_emission_hook (guint signal_id,
- guint hook_id);
+/* --- signal handlers --- */
+gboolean g_signal_has_handler_pending (gpointer instance,
+ guint signal_id,
+ GQuark detail,
+ gboolean may_be_blocked);
+guint g_signal_connect_closure (gpointer instance,
+ guint signal_id,
+ GQuark detail,
+ GClosure *closure,
+ gboolean after);
+void g_signal_handler_block (gpointer instance,
+ guint handler_id);
+void g_signal_handler_unblock (gpointer instance,
+ guint handler_id);
+void g_signal_handler_disconnect (gpointer instance,
+ guint handler_id);
+guint g_signal_handler_find (gpointer instance,
+ GSignalMatchType mask,
+ guint signal_id,
+ GQuark detail,
+ GClosure *closure,
+ gpointer func,
+ gpointer data);
+guint g_signal_handlers_block_matched (gpointer instance,
+ GSignalMatchType mask,
+ guint signal_id,
+ GQuark detail,
+ GClosure *closure,
+ gpointer func,
+ gpointer data);
+guint g_signal_handlers_unblock_matched (gpointer instance,
+ GSignalMatchType mask,
+ guint signal_id,
+ GQuark detail,
+ GClosure *closure,
+ gpointer func,
+ gpointer data);
+guint g_signal_handlers_disconnect_matched (gpointer instance,
+ GSignalMatchType mask,
+ guint signal_id,
+ GQuark detail,
+ GClosure *closure,
+ gpointer func,
+ gpointer data);
+
/*< private >*/
-void g_signal_handlers_destroy (gpointer instance);
-void g_signals_destroy (GType itype);
+void g_signal_handlers_destroy (gpointer instance);
+void g_signals_destroy (GType itype);
#ifdef __cplusplus