summaryrefslogtreecommitdiff
path: root/gtk/gtkobject.h
diff options
context:
space:
mode:
authorTim Janik <timj@gtk.org>1998-09-17 05:00:30 +0000
committerTim Janik <timj@src.gnome.org>1998-09-17 05:00:30 +0000
commitee1b96185ff884190a0e44564fb5b36d249ff271 (patch)
tree2a90164f8529c981e3eb808a29fbc8ebebbcef33 /gtk/gtkobject.h
parent0b54ffa9d6bc9beb8b13eda2365e00e2de8ff5ca (diff)
downloadgtk+-ee1b96185ff884190a0e44564fb5b36d249ff271.tar.gz
added gtk_object_set_data_destroy and gtk_object_set_data_destroy_by_id
Thu Sep 17 05:12:48 1998 Tim Janik <timj@gtk.org> * gtk/gtkobject.h: added gtk_object_set_data_destroy and gtk_object_set_data_destroy_by_id functions to set the destroy function pointer for an existing data portion. * gtk/gtkobject.c: removed the GtkObjectData implementation and made all gtk_object_*data* functions use the GLib equivalents.
Diffstat (limited to 'gtk/gtkobject.h')
-rw-r--r--gtk/gtkobject.h46
1 files changed, 26 insertions, 20 deletions
diff --git a/gtk/gtkobject.h b/gtk/gtkobject.h
index e472b820dd..5f541a8015 100644
--- a/gtk/gtkobject.h
+++ b/gtk/gtkobject.h
@@ -118,8 +118,8 @@ struct _GtkObject
{
/* GtkTypeObject related fields: */
GtkObjectClass *klass;
-
-
+
+
/* 32 bits of flags. GtkObject only uses 4 of these bits and
* GtkWidget uses the rest. This is done because structs are
* aligned on 4 or 8 byte boundaries. If a new bitfield were
@@ -150,7 +150,7 @@ struct _GtkObjectClass
/* GtkTypeClass fields: */
GtkType type;
-
+
/* The signals this object class handles. "signals" is an
* array of signal ID's.
*/
@@ -239,7 +239,7 @@ void gtk_object_getv (GtkObject *object,
* more than one c-function argument.
*/
void gtk_object_set (GtkObject *object,
- const gchar *first_arg_name,
+ const gchar *first_arg_name,
...);
void gtk_object_setv (GtkObject *object,
guint n_args,
@@ -280,6 +280,9 @@ void gtk_object_remove_data (GtkObject *object,
const gchar *key);
gpointer gtk_object_get_data (GtkObject *object,
const gchar *key);
+void gtk_object_set_data_destroy(GtkObject *object,
+ const gchar *key,
+ GDestroyNotify destroy_func);
/* Set/get the "user_data" object data field of "object". It should
* be noted that these functions are no different than calling
@@ -298,23 +301,26 @@ void gtk_object_class_add_signals (GtkObjectClass *klass,
guint *signals,
guint nsignals);
/* the `arg_name' argument needs to be a const static string */
-void gtk_object_add_arg_type (const gchar *arg_name,
- GtkType arg_type,
- guint arg_flags,
- guint arg_id);
+void gtk_object_add_arg_type (const gchar *arg_name,
+ GtkType arg_type,
+ guint arg_flags,
+ guint arg_id);
/* Object data method variants that operate on key ids. */
-void gtk_object_set_data_by_id (GtkObject *object,
- GQuark data_id,
- gpointer data);
-void gtk_object_set_data_by_id_full (GtkObject *object,
- GQuark data_id,
- gpointer data,
- GtkDestroyNotify destroy);
-gpointer gtk_object_get_data_by_id (GtkObject *object,
- GQuark data_id);
-void gtk_object_remove_data_by_id (GtkObject *object,
- GQuark data_id);
+void gtk_object_set_data_by_id (GtkObject *object,
+ GQuark data_id,
+ gpointer data);
+void gtk_object_set_data_by_id_full (GtkObject *object,
+ GQuark data_id,
+ gpointer data,
+ GtkDestroyNotify destroy);
+gpointer gtk_object_get_data_by_id (GtkObject *object,
+ GQuark data_id);
+void gtk_object_remove_data_by_id (GtkObject *object,
+ GQuark data_id);
+void gtk_object_set_data_destroy_by_id (GtkObject *object,
+ GQuark key_id,
+ GDestroyNotify destroy_func);
#define gtk_object_data_try_key g_quark_try_string
#define gtk_object_data_force_id g_quark_from_string
@@ -332,7 +338,7 @@ gchar* gtk_object_args_collect (GtkType object_type,
GSList **info_list_p,
const gchar *first_arg_name,
va_list var_args);
-gchar* gtk_object_arg_get_info (GtkType object_type,
+gchar* gtk_object_arg_get_info (GtkType object_type,
const gchar *arg_name,
GtkArgInfo **info_p);
void gtk_trace_referencing (GtkObject *object,