From 7f55c0b5323214e2bed0492e179b6e5482ed4e9c Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Wed, 20 Jun 2001 20:48:50 +0000 Subject: [PATCH] Added a better shim for g_object_get_property Original commit message from CVS: Added a better shim for g_object_get_property --- gst/gobject2gtk.h | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/gst/gobject2gtk.h b/gst/gobject2gtk.h index 74f8888045..45f915d1fd 100644 --- a/gst/gobject2gtk.h +++ b/gst/gobject2gtk.h @@ -60,7 +60,12 @@ //#define set_property set_arg //#define get_property get_arg -#define g_object_get_property gtk_object_get +#define g_object_get_property(obj,argname,pspec)\ +G_STMT_START{ \ + (pspec)->name = (gchar*)argname;\ + gtk_object_getv ((obj),1,(pspec));\ +}G_STMT_END + #define g_object_set gtk_object_set @@ -71,9 +76,19 @@ #define GInstanceInitFunc GtkObjectInitFunc //#define g_type_register_static gtk_type_unique #define g_type_class_ref gtk_type_class +#define g_type_class_unref(c) +#define g_type_name(t) gtk_type_name(t) #define GEnumValue GtkEnumValue #define g_enum_register_static gtk_type_register_enum +/********************************* + * FIXME API NOT in glib2.0 + ***********************************/ + +#define g_type_enum_get_values + + + // type registration typedef struct _GTypeInfo GTypeInfo; @@ -148,13 +163,14 @@ gtk_signal_emit_by_name ((GtkObject *)object,name,data,self) // first define GValue and GParamSpec #define GValue GtkArg +#define G_VALUE_TYPE(v) ((v)->type) #define G_PARAM_READWRITE GTK_ARG_READWRITE #define G_PARAM_READABLE GTK_ARG_READABLE #define G_PARAM_WRITABLE GTK_ARG_WRITABLE #define G_OBJECT_WARN_INVALID_PROPERTY_ID(a,b,c) typedef struct _GParamSpec GParamSpec; struct _GParamSpec { - gchar *shortname; + gchar *name; gint value_type; gint flags; };