mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-14 05:12:09 +00:00
Added a better shim for g_object_get_property
Original commit message from CVS: Added a better shim for g_object_get_property
This commit is contained in:
parent
5e2aec5855
commit
7f55c0b532
1 changed files with 18 additions and 2 deletions
|
@ -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;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue