#define G_DEFINE_OBJECT_WITH_CODE(object, type, code) \
typedef struct object object; \
\
struct object \
{ \
  type parent_instance; \
\
  code \
};

#define G_DEFINE_OBJECT(object, type) \
G_DEFINE_OBJECT_WITH_CODE(object, type, ;)

#define G_DEFINE_OBJECT_WITH_PRIVATE_POINTER(object, private, pointer, type) \
typedef struct private private; \
\
G_DEFINE_OBJECT_WITH_CODE(object, type, \
  private *pointer; \
)

#define G_DEFINE_OBJECT_WITH_PRIVATE(object, private, type) \
G_DEFINE_OBJECT_WITH_PRIVATE_POINTER(object, private, priv, type)


#define G_DEFINE_OBJECT_CLASS_WITH_CODE(class, type, code) \
typedef struct class class; \
\
struct class \
{ \
  type parent_class; \
\
  code \
};

#define G_DEFINE_OBJECT_CLASS(class, type) \
G_DEFINE_OBJECT_CLASS_WITH_CODE(class, type, ;)

G_DEFINE_OBJECT_WITH_PRIVATE(GtkBox, GtkBoxPrivate, GtkBin)
G_DEFINE_OBJECT_CLASS(GtkBoxClass, GtkBinClass)
