20 #ifndef GNC_BASIC_GOBJECT_H
21 #define GNC_BASIC_GOBJECT_H
25 #define GNC_BASIC_GOBJECT_TYPE(type_struct,klass_struct,parent,klass_init,inst_init,get_type_fcn) \
29 static GType type = 0; \
32 GTypeInfo type_info = { \
33 sizeof (klass_struct), \
36 (GClassInitFunc) klass_init, \
39 sizeof (type_struct), \
41 (GInstanceInitFunc) inst_init, \
44 type = g_type_register_static (parent, #type_struct, &type_info, 0); \
50 #define GNC_BASIC_GOBJECT_NEW(type_struct,new_fcn,get_type_fcn) \
54 return (type_struct *) g_object_new(get_type_fcn (), NULL); \
57 #define GNC_BASIC_GOBJECT(type_struct,klass_struct,parent,klass_init,inst_init,get_type_fcn,new_fcn) \
58 GNC_BASIC_GOBJECT_TYPE(type_struct,klass_struct,parent,klass_init,inst_init,get_type_fcn) \
59 GNC_BASIC_GOBJECT_NEW(type_struct,new_fcn,get_type_fcn)