/* objects_classes.c generated by valac, the Vala compiler * generated from objects_classes.vala, do not modify */ #include #include #include #include #if !defined(VALA_EXTERN) #if defined(_WIN32) || defined(__CYGWIN__) #define VALA_EXTERN __declspec(dllexport) extern #elif __GNUC__ >= 4 #define VALA_EXTERN __attribute__((visibility("default"))) extern #else #define VALA_EXTERN extern #endif #endif typedef struct _CompactClass CompactClass; typedef struct _CompactClassWithDestructor CompactClassWithDestructor; typedef CompactClass DerivedClass; typedef struct _PublicClass PublicClass; typedef struct _AbstractClass AbstractClass; typedef struct _ClassWithCreationMethod ClassWithCreationMethod; typedef struct _ClassWithNamedCreationMethod ClassWithNamedCreationMethod; #define TYPE_SIMPLE_GTYPE_INSTANCECLASS (simple_gtype_instanceclass_get_type ()) #define SIMPLE_GTYPE_INSTANCECLASS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SIMPLE_GTYPE_INSTANCECLASS, SimpleGTypeInstanceClass)) #define SIMPLE_GTYPE_INSTANCECLASS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SIMPLE_GTYPE_INSTANCECLASS, SimpleGTypeInstanceClassClass)) #define IS_SIMPLE_GTYPE_INSTANCECLASS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SIMPLE_GTYPE_INSTANCECLASS)) #define IS_SIMPLE_GTYPE_INSTANCECLASS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SIMPLE_GTYPE_INSTANCECLASS)) #define SIMPLE_GTYPE_INSTANCECLASS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SIMPLE_GTYPE_INSTANCECLASS, SimpleGTypeInstanceClassClass)) typedef struct _SimpleGTypeInstanceClass SimpleGTypeInstanceClass; typedef struct _SimpleGTypeInstanceClassClass SimpleGTypeInstanceClassClass; typedef struct _SimpleGTypeInstanceClassPrivate SimpleGTypeInstanceClassPrivate; typedef struct _ParamSpecSimpleGTypeInstanceClass ParamSpecSimpleGTypeInstanceClass; #define TYPE_DERIVED_GTYPE_INSTANCECLASS (derived_gtype_instanceclass_get_type ()) #define DERIVED_GTYPE_INSTANCECLASS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DERIVED_GTYPE_INSTANCECLASS, DerivedGTypeInstanceClass)) #define DERIVED_GTYPE_INSTANCECLASS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DERIVED_GTYPE_INSTANCECLASS, DerivedGTypeInstanceClassClass)) #define IS_DERIVED_GTYPE_INSTANCECLASS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DERIVED_GTYPE_INSTANCECLASS)) #define IS_DERIVED_GTYPE_INSTANCECLASS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DERIVED_GTYPE_INSTANCECLASS)) #define DERIVED_GTYPE_INSTANCECLASS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DERIVED_GTYPE_INSTANCECLASS, DerivedGTypeInstanceClassClass)) typedef struct _DerivedGTypeInstanceClass DerivedGTypeInstanceClass; typedef struct _DerivedGTypeInstanceClassClass DerivedGTypeInstanceClassClass; typedef struct _DerivedGTypeInstanceClassPrivate DerivedGTypeInstanceClassPrivate; #define TYPE_PUBLIC_GTYPE_INSTANCECLASS (public_gtype_instanceclass_get_type ()) #define PUBLIC_GTYPE_INSTANCECLASS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PUBLIC_GTYPE_INSTANCECLASS, PublicGTypeInstanceClass)) #define PUBLIC_GTYPE_INSTANCECLASS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PUBLIC_GTYPE_INSTANCECLASS, PublicGTypeInstanceClassClass)) #define IS_PUBLIC_GTYPE_INSTANCECLASS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PUBLIC_GTYPE_INSTANCECLASS)) #define IS_PUBLIC_GTYPE_INSTANCECLASS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PUBLIC_GTYPE_INSTANCECLASS)) #define PUBLIC_GTYPE_INSTANCECLASS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PUBLIC_GTYPE_INSTANCECLASS, PublicGTypeInstanceClassClass)) typedef struct _PublicGTypeInstanceClass PublicGTypeInstanceClass; typedef struct _PublicGTypeInstanceClassClass PublicGTypeInstanceClassClass; typedef struct _PublicGTypeInstanceClassPrivate PublicGTypeInstanceClassPrivate; typedef struct _ParamSpecPublicGTypeInstanceClass ParamSpecPublicGTypeInstanceClass; #define TYPE_GTYPE_INSTANCE_CLASS_WITH_CREATION_METHOD (gtype_instance_class_with_creation_method_get_type ()) #define GTYPE_INSTANCE_CLASS_WITH_CREATION_METHOD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_GTYPE_INSTANCE_CLASS_WITH_CREATION_METHOD, GTypeInstanceClassWithCreationMethod)) #define GTYPE_INSTANCE_CLASS_WITH_CREATION_METHOD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_GTYPE_INSTANCE_CLASS_WITH_CREATION_METHOD, GTypeInstanceClassWithCreationMethodClass)) #define IS_GTYPE_INSTANCE_CLASS_WITH_CREATION_METHOD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_GTYPE_INSTANCE_CLASS_WITH_CREATION_METHOD)) #define IS_GTYPE_INSTANCE_CLASS_WITH_CREATION_METHOD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_GTYPE_INSTANCE_CLASS_WITH_CREATION_METHOD)) #define GTYPE_INSTANCE_CLASS_WITH_CREATION_METHOD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_GTYPE_INSTANCE_CLASS_WITH_CREATION_METHOD, GTypeInstanceClassWithCreationMethodClass)) typedef struct _GTypeInstanceClassWithCreationMethod GTypeInstanceClassWithCreationMethod; typedef struct _GTypeInstanceClassWithCreationMethodClass GTypeInstanceClassWithCreationMethodClass; typedef struct _GTypeInstanceClassWithCreationMethodPrivate GTypeInstanceClassWithCreationMethodPrivate; typedef struct _ParamSpecGTypeInstanceClassWithCreationMethod ParamSpecGTypeInstanceClassWithCreationMethod; #define TYPE_GTYPE_INSTANCE_CLASS_WITH_NAMED_CREATION_METHOD (gtype_instance_class_with_named_creation_method_get_type ()) #define GTYPE_INSTANCE_CLASS_WITH_NAMED_CREATION_METHOD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_GTYPE_INSTANCE_CLASS_WITH_NAMED_CREATION_METHOD, GTypeInstanceClassWithNamedCreationMethod)) #define GTYPE_INSTANCE_CLASS_WITH_NAMED_CREATION_METHOD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_GTYPE_INSTANCE_CLASS_WITH_NAMED_CREATION_METHOD, GTypeInstanceClassWithNamedCreationMethodClass)) #define IS_GTYPE_INSTANCE_CLASS_WITH_NAMED_CREATION_METHOD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_GTYPE_INSTANCE_CLASS_WITH_NAMED_CREATION_METHOD)) #define IS_GTYPE_INSTANCE_CLASS_WITH_NAMED_CREATION_METHOD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_GTYPE_INSTANCE_CLASS_WITH_NAMED_CREATION_METHOD)) #define GTYPE_INSTANCE_CLASS_WITH_NAMED_CREATION_METHOD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_GTYPE_INSTANCE_CLASS_WITH_NAMED_CREATION_METHOD, GTypeInstanceClassWithNamedCreationMethodClass)) typedef struct _GTypeInstanceClassWithNamedCreationMethod GTypeInstanceClassWithNamedCreationMethod; typedef struct _GTypeInstanceClassWithNamedCreationMethodClass GTypeInstanceClassWithNamedCreationMethodClass; typedef struct _GTypeInstanceClassWithNamedCreationMethodPrivate GTypeInstanceClassWithNamedCreationMethodPrivate; typedef struct _ParamSpecGTypeInstanceClassWithNamedCreationMethod ParamSpecGTypeInstanceClassWithNamedCreationMethod; #define TYPE_SIMPLE_GOBJECTCLASS (simple_gobjectclass_get_type ()) #define SIMPLE_GOBJECTCLASS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SIMPLE_GOBJECTCLASS, SimpleGObjectClass)) #define SIMPLE_GOBJECTCLASS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SIMPLE_GOBJECTCLASS, SimpleGObjectClassClass)) #define IS_SIMPLE_GOBJECTCLASS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SIMPLE_GOBJECTCLASS)) #define IS_SIMPLE_GOBJECTCLASS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SIMPLE_GOBJECTCLASS)) #define SIMPLE_GOBJECTCLASS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SIMPLE_GOBJECTCLASS, SimpleGObjectClassClass)) typedef struct _SimpleGObjectClass SimpleGObjectClass; typedef struct _SimpleGObjectClassClass SimpleGObjectClassClass; typedef struct _SimpleGObjectClassPrivate SimpleGObjectClassPrivate; enum { SIMPLE_GOBJECTCLASS_0_PROPERTY, SIMPLE_GOBJECTCLASS_NUM_PROPERTIES }; static GParamSpec* simple_gobjectclass_properties[SIMPLE_GOBJECTCLASS_NUM_PROPERTIES]; #define TYPE_DERIVED_GOBJECTCLASS (derived_gobjectclass_get_type ()) #define DERIVED_GOBJECTCLASS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DERIVED_GOBJECTCLASS, DerivedGObjectClass)) #define DERIVED_GOBJECTCLASS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DERIVED_GOBJECTCLASS, DerivedGObjectClassClass)) #define IS_DERIVED_GOBJECTCLASS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DERIVED_GOBJECTCLASS)) #define IS_DERIVED_GOBJECTCLASS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DERIVED_GOBJECTCLASS)) #define DERIVED_GOBJECTCLASS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DERIVED_GOBJECTCLASS, DerivedGObjectClassClass)) typedef struct _DerivedGObjectClass DerivedGObjectClass; typedef struct _DerivedGObjectClassClass DerivedGObjectClassClass; typedef struct _DerivedGObjectClassPrivate DerivedGObjectClassPrivate; enum { DERIVED_GOBJECTCLASS_0_PROPERTY, DERIVED_GOBJECTCLASS_NUM_PROPERTIES }; static GParamSpec* derived_gobjectclass_properties[DERIVED_GOBJECTCLASS_NUM_PROPERTIES]; #define TYPE_PUBLIC_GOBJECTCLASS (public_gobjectclass_get_type ()) #define PUBLIC_GOBJECTCLASS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PUBLIC_GOBJECTCLASS, PublicGObjectClass)) #define PUBLIC_GOBJECTCLASS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PUBLIC_GOBJECTCLASS, PublicGObjectClassClass)) #define IS_PUBLIC_GOBJECTCLASS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PUBLIC_GOBJECTCLASS)) #define IS_PUBLIC_GOBJECTCLASS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PUBLIC_GOBJECTCLASS)) #define PUBLIC_GOBJECTCLASS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PUBLIC_GOBJECTCLASS, PublicGObjectClassClass)) typedef struct _PublicGObjectClass PublicGObjectClass; typedef struct _PublicGObjectClassClass PublicGObjectClassClass; typedef struct _PublicGObjectClassPrivate PublicGObjectClassPrivate; enum { PUBLIC_GOBJECTCLASS_0_PROPERTY, PUBLIC_GOBJECTCLASS_NUM_PROPERTIES }; static GParamSpec* public_gobjectclass_properties[PUBLIC_GOBJECTCLASS_NUM_PROPERTIES]; #define TYPE_ABSTRACT_GOBJECTCLASS (abstract_gobjectclass_get_type ()) #define ABSTRACT_GOBJECTCLASS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ABSTRACT_GOBJECTCLASS, AbstractGObjectClass)) #define ABSTRACT_GOBJECTCLASS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ABSTRACT_GOBJECTCLASS, AbstractGObjectClassClass)) #define IS_ABSTRACT_GOBJECTCLASS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ABSTRACT_GOBJECTCLASS)) #define IS_ABSTRACT_GOBJECTCLASS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ABSTRACT_GOBJECTCLASS)) #define ABSTRACT_GOBJECTCLASS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ABSTRACT_GOBJECTCLASS, AbstractGObjectClassClass)) typedef struct _AbstractGObjectClass AbstractGObjectClass; typedef struct _AbstractGObjectClassClass AbstractGObjectClassClass; typedef struct _AbstractGObjectClassPrivate AbstractGObjectClassPrivate; enum { ABSTRACT_GOBJECTCLASS_0_PROPERTY, ABSTRACT_GOBJECTCLASS_NUM_PROPERTIES }; static GParamSpec* abstract_gobjectclass_properties[ABSTRACT_GOBJECTCLASS_NUM_PROPERTIES]; #define TYPE_GOBJECT_CLASS_WITH_CREATION_METHOD (gobject_class_with_creation_method_get_type ()) #define GOBJECT_CLASS_WITH_CREATION_METHOD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_GOBJECT_CLASS_WITH_CREATION_METHOD, GObjectClassWithCreationMethod)) #define GOBJECT_CLASS_WITH_CREATION_METHOD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_GOBJECT_CLASS_WITH_CREATION_METHOD, GObjectClassWithCreationMethodClass)) #define IS_GOBJECT_CLASS_WITH_CREATION_METHOD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_GOBJECT_CLASS_WITH_CREATION_METHOD)) #define IS_GOBJECT_CLASS_WITH_CREATION_METHOD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_GOBJECT_CLASS_WITH_CREATION_METHOD)) #define GOBJECT_CLASS_WITH_CREATION_METHOD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_GOBJECT_CLASS_WITH_CREATION_METHOD, GObjectClassWithCreationMethodClass)) typedef struct _GObjectClassWithCreationMethod GObjectClassWithCreationMethod; typedef struct _GObjectClassWithCreationMethodClass GObjectClassWithCreationMethodClass; typedef struct _GObjectClassWithCreationMethodPrivate GObjectClassWithCreationMethodPrivate; enum { GOBJECT_CLASS_WITH_CREATION_METHOD_0_PROPERTY, GOBJECT_CLASS_WITH_CREATION_METHOD_NUM_PROPERTIES }; static GParamSpec* gobject_class_with_creation_method_properties[GOBJECT_CLASS_WITH_CREATION_METHOD_NUM_PROPERTIES]; #define TYPE_GOBJECT_CLASS_WITH_NAMED_CREATION_METHOD (gobject_class_with_named_creation_method_get_type ()) #define GOBJECT_CLASS_WITH_NAMED_CREATION_METHOD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_GOBJECT_CLASS_WITH_NAMED_CREATION_METHOD, GObjectClassWithNamedCreationMethod)) #define GOBJECT_CLASS_WITH_NAMED_CREATION_METHOD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_GOBJECT_CLASS_WITH_NAMED_CREATION_METHOD, GObjectClassWithNamedCreationMethodClass)) #define IS_GOBJECT_CLASS_WITH_NAMED_CREATION_METHOD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_GOBJECT_CLASS_WITH_NAMED_CREATION_METHOD)) #define IS_GOBJECT_CLASS_WITH_NAMED_CREATION_METHOD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_GOBJECT_CLASS_WITH_NAMED_CREATION_METHOD)) #define GOBJECT_CLASS_WITH_NAMED_CREATION_METHOD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_GOBJECT_CLASS_WITH_NAMED_CREATION_METHOD, GObjectClassWithNamedCreationMethodClass)) typedef struct _GObjectClassWithNamedCreationMethod GObjectClassWithNamedCreationMethod; typedef struct _GObjectClassWithNamedCreationMethodClass GObjectClassWithNamedCreationMethodClass; typedef struct _GObjectClassWithNamedCreationMethodPrivate GObjectClassWithNamedCreationMethodPrivate; enum { GOBJECT_CLASS_WITH_NAMED_CREATION_METHOD_0_PROPERTY, GOBJECT_CLASS_WITH_NAMED_CREATION_METHOD_NUM_PROPERTIES }; static GParamSpec* gobject_class_with_named_creation_method_properties[GOBJECT_CLASS_WITH_NAMED_CREATION_METHOD_NUM_PROPERTIES]; #define _compact_class_with_destructor_free0(var) ((var == NULL) ? NULL : (var = (compact_class_with_destructor_free (var), NULL))) #define _compactclass_free0(var) ((var == NULL) ? NULL : (var = (compactclass_free (var), NULL))) #define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) #define _gtype_instance_class_with_named_creation_method_unref0(var) ((var == NULL) ? NULL : (var = (gtype_instance_class_with_named_creation_method_unref (var), NULL))) #define _gtype_instance_class_with_creation_method_unref0(var) ((var == NULL) ? NULL : (var = (gtype_instance_class_with_creation_method_unref (var), NULL))) #define _public_gtype_instanceclass_unref0(var) ((var == NULL) ? NULL : (var = (public_gtype_instanceclass_unref (var), NULL))) #define _simple_gtype_instanceclass_unref0(var) ((var == NULL) ? NULL : (var = (simple_gtype_instanceclass_unref (var), NULL))) #define _class_with_named_creation_method_free0(var) ((var == NULL) ? NULL : (var = (class_with_named_creation_method_free (var), NULL))) #define _class_with_creation_method_free0(var) ((var == NULL) ? NULL : (var = (class_with_creation_method_free (var), NULL))) #define _publicclass_free0(var) ((var == NULL) ? NULL : (var = (publicclass_free (var), NULL))) struct _CompactClass { gint field; }; struct _CompactClassWithDestructor { int dummy; }; struct _PublicClass { gint field; }; struct _AbstractClass { gint field; }; struct _ClassWithCreationMethod { gint field; }; struct _ClassWithNamedCreationMethod { gint field; }; struct _SimpleGTypeInstanceClass { GTypeInstance parent_instance; volatile int ref_count; SimpleGTypeInstanceClassPrivate * priv; }; struct _SimpleGTypeInstanceClassClass { GTypeClass parent_class; void (*finalize) (SimpleGTypeInstanceClass *self); }; struct _ParamSpecSimpleGTypeInstanceClass { GParamSpec parent_instance; }; struct _DerivedGTypeInstanceClass { SimpleGTypeInstanceClass parent_instance; DerivedGTypeInstanceClassPrivate * priv; }; struct _DerivedGTypeInstanceClassClass { SimpleGTypeInstanceClassClass parent_class; }; struct _PublicGTypeInstanceClass { GTypeInstance parent_instance; volatile int ref_count; PublicGTypeInstanceClassPrivate * priv; }; struct _PublicGTypeInstanceClassClass { GTypeClass parent_class; void (*finalize) (PublicGTypeInstanceClass *self); }; struct _ParamSpecPublicGTypeInstanceClass { GParamSpec parent_instance; }; struct _GTypeInstanceClassWithCreationMethod { GTypeInstance parent_instance; volatile int ref_count; GTypeInstanceClassWithCreationMethodPrivate * priv; }; struct _GTypeInstanceClassWithCreationMethodClass { GTypeClass parent_class; void (*finalize) (GTypeInstanceClassWithCreationMethod *self); }; struct _ParamSpecGTypeInstanceClassWithCreationMethod { GParamSpec parent_instance; }; struct _GTypeInstanceClassWithNamedCreationMethod { GTypeInstance parent_instance; volatile int ref_count; GTypeInstanceClassWithNamedCreationMethodPrivate * priv; }; struct _GTypeInstanceClassWithNamedCreationMethodClass { GTypeClass parent_class; void (*finalize) (GTypeInstanceClassWithNamedCreationMethod *self); }; struct _ParamSpecGTypeInstanceClassWithNamedCreationMethod { GParamSpec parent_instance; }; struct _SimpleGObjectClass { GObject parent_instance; SimpleGObjectClassPrivate * priv; }; struct _SimpleGObjectClassClass { GObjectClass parent_class; }; struct _DerivedGObjectClass { SimpleGObjectClass parent_instance; DerivedGObjectClassPrivate * priv; }; struct _DerivedGObjectClassClass { SimpleGObjectClassClass parent_class; }; struct _PublicGObjectClass { GObject parent_instance; PublicGObjectClassPrivate * priv; }; struct _PublicGObjectClassClass { GObjectClass parent_class; }; struct _AbstractGObjectClass { GObject parent_instance; AbstractGObjectClassPrivate * priv; }; struct _AbstractGObjectClassClass { GObjectClass parent_class; }; struct _GObjectClassWithCreationMethod { GObject parent_instance; GObjectClassWithCreationMethodPrivate * priv; }; struct _GObjectClassWithCreationMethodClass { GObjectClass parent_class; }; struct _GObjectClassWithNamedCreationMethod { GObject parent_instance; GObjectClassWithNamedCreationMethodPrivate * priv; }; struct _GObjectClassWithNamedCreationMethodClass { GObjectClass parent_class; }; static gpointer simple_gtype_instanceclass_parent_class = NULL; static gpointer derived_gtype_instanceclass_parent_class = NULL; static gpointer public_gtype_instanceclass_parent_class = NULL; static gpointer gtype_instance_class_with_creation_method_parent_class = NULL; static gpointer gtype_instance_class_with_named_creation_method_parent_class = NULL; static gpointer simple_gobjectclass_parent_class = NULL; static gpointer derived_gobjectclass_parent_class = NULL; static gpointer public_gobjectclass_parent_class = NULL; static gpointer abstract_gobjectclass_parent_class = NULL; static gpointer gobject_class_with_creation_method_parent_class = NULL; static gpointer gobject_class_with_named_creation_method_parent_class = NULL; VALA_EXTERN void compactclass_free (CompactClass * self); G_DEFINE_AUTOPTR_CLEANUP_FUNC (CompactClass, compactclass_free) static void compactclass_instance_init (CompactClass * self); VALA_EXTERN CompactClass* compactclass_new (void); VALA_EXTERN void compact_class_with_destructor_free (CompactClassWithDestructor * self); G_DEFINE_AUTOPTR_CLEANUP_FUNC (CompactClassWithDestructor, compact_class_with_destructor_free) static void compact_class_with_destructor_instance_init (CompactClassWithDestructor * self); VALA_EXTERN CompactClassWithDestructor* compact_class_with_destructor_new (void); G_DEFINE_AUTOPTR_CLEANUP_FUNC (DerivedClass, compactclass_free) static void derivedclass_instance_init (DerivedClass * self); VALA_EXTERN DerivedClass* derivedclass_new (void); VALA_EXTERN void publicclass_free (PublicClass * self); G_DEFINE_AUTOPTR_CLEANUP_FUNC (PublicClass, publicclass_free) static void publicclass_instance_init (PublicClass * self); VALA_EXTERN PublicClass* publicclass_new (void); VALA_EXTERN void abstractclass_free (AbstractClass * self); G_DEFINE_AUTOPTR_CLEANUP_FUNC (AbstractClass, abstractclass_free) static void abstractclass_instance_init (AbstractClass * self); VALA_EXTERN AbstractClass* abstractclass_new (void); VALA_EXTERN void class_with_creation_method_free (ClassWithCreationMethod * self); G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClassWithCreationMethod, class_with_creation_method_free) static void class_with_creation_method_instance_init (ClassWithCreationMethod * self); VALA_EXTERN ClassWithCreationMethod* class_with_creation_method_new (void); VALA_EXTERN void class_with_named_creation_method_free (ClassWithNamedCreationMethod * self); G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClassWithNamedCreationMethod, class_with_named_creation_method_free) static void class_with_named_creation_method_instance_init (ClassWithNamedCreationMethod * self); VALA_EXTERN ClassWithNamedCreationMethod* class_with_named_creation_method_new_named (void); VALA_EXTERN ClassWithNamedCreationMethod* class_with_named_creation_method_new (void); VALA_EXTERN gpointer simple_gtype_instanceclass_ref (gpointer instance); VALA_EXTERN void simple_gtype_instanceclass_unref (gpointer instance); VALA_EXTERN GParamSpec* param_spec_simple_gtype_instanceclass (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); VALA_EXTERN void value_set_simple_gtype_instanceclass (GValue* value, gpointer v_object); VALA_EXTERN void value_take_simple_gtype_instanceclass (GValue* value, gpointer v_object); VALA_EXTERN gpointer value_get_simple_gtype_instanceclass (const GValue* value); VALA_EXTERN GType simple_gtype_instanceclass_get_type (void) G_GNUC_CONST ; G_DEFINE_AUTOPTR_CLEANUP_FUNC (SimpleGTypeInstanceClass, simple_gtype_instanceclass_unref) VALA_EXTERN SimpleGTypeInstanceClass* simple_gtype_instanceclass_new (void); VALA_EXTERN SimpleGTypeInstanceClass* simple_gtype_instanceclass_construct (GType object_type); static void simple_gtype_instanceclass_finalize (SimpleGTypeInstanceClass * obj); static GType simple_gtype_instanceclass_get_type_once (void); VALA_EXTERN GType derived_gtype_instanceclass_get_type (void) G_GNUC_CONST ; G_DEFINE_AUTOPTR_CLEANUP_FUNC (DerivedGTypeInstanceClass, simple_gtype_instanceclass_unref) VALA_EXTERN DerivedGTypeInstanceClass* derived_gtype_instanceclass_new (void); VALA_EXTERN DerivedGTypeInstanceClass* derived_gtype_instanceclass_construct (GType object_type); static GType derived_gtype_instanceclass_get_type_once (void); VALA_EXTERN gpointer public_gtype_instanceclass_ref (gpointer instance); VALA_EXTERN void public_gtype_instanceclass_unref (gpointer instance); VALA_EXTERN GParamSpec* param_spec_public_gtype_instanceclass (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); VALA_EXTERN void value_set_public_gtype_instanceclass (GValue* value, gpointer v_object); VALA_EXTERN void value_take_public_gtype_instanceclass (GValue* value, gpointer v_object); VALA_EXTERN gpointer value_get_public_gtype_instanceclass (const GValue* value); VALA_EXTERN GType public_gtype_instanceclass_get_type (void) G_GNUC_CONST ; G_DEFINE_AUTOPTR_CLEANUP_FUNC (PublicGTypeInstanceClass, public_gtype_instanceclass_unref) VALA_EXTERN PublicGTypeInstanceClass* public_gtype_instanceclass_new (void); VALA_EXTERN PublicGTypeInstanceClass* public_gtype_instanceclass_construct (GType object_type); static void public_gtype_instanceclass_finalize (PublicGTypeInstanceClass * obj); static GType public_gtype_instanceclass_get_type_once (void); VALA_EXTERN gpointer gtype_instance_class_with_creation_method_ref (gpointer instance); VALA_EXTERN void gtype_instance_class_with_creation_method_unref (gpointer instance); VALA_EXTERN GParamSpec* param_spec_gtype_instance_class_with_creation_method (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); VALA_EXTERN void value_set_gtype_instance_class_with_creation_method (GValue* value, gpointer v_object); VALA_EXTERN void value_take_gtype_instance_class_with_creation_method (GValue* value, gpointer v_object); VALA_EXTERN gpointer value_get_gtype_instance_class_with_creation_method (const GValue* value); VALA_EXTERN GType gtype_instance_class_with_creation_method_get_type (void) G_GNUC_CONST ; G_DEFINE_AUTOPTR_CLEANUP_FUNC (GTypeInstanceClassWithCreationMethod, gtype_instance_class_with_creation_method_unref) VALA_EXTERN GTypeInstanceClassWithCreationMethod* gtype_instance_class_with_creation_method_new (void); VALA_EXTERN GTypeInstanceClassWithCreationMethod* gtype_instance_class_with_creation_method_construct (GType object_type); static void gtype_instance_class_with_creation_method_finalize (GTypeInstanceClassWithCreationMethod * obj); static GType gtype_instance_class_with_creation_method_get_type_once (void); VALA_EXTERN gpointer gtype_instance_class_with_named_creation_method_ref (gpointer instance); VALA_EXTERN void gtype_instance_class_with_named_creation_method_unref (gpointer instance); VALA_EXTERN GParamSpec* param_spec_gtype_instance_class_with_named_creation_method (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); VALA_EXTERN void value_set_gtype_instance_class_with_named_creation_method (GValue* value, gpointer v_object); VALA_EXTERN void value_take_gtype_instance_class_with_named_creation_method (GValue* value, gpointer v_object); VALA_EXTERN gpointer value_get_gtype_instance_class_with_named_creation_method (const GValue* value); VALA_EXTERN GType gtype_instance_class_with_named_creation_method_get_type (void) G_GNUC_CONST ; G_DEFINE_AUTOPTR_CLEANUP_FUNC (GTypeInstanceClassWithNamedCreationMethod, gtype_instance_class_with_named_creation_method_unref) VALA_EXTERN GTypeInstanceClassWithNamedCreationMethod* gtype_instance_class_with_named_creation_method_new_named (void); VALA_EXTERN GTypeInstanceClassWithNamedCreationMethod* gtype_instance_class_with_named_creation_method_construct_named (GType object_type); VALA_EXTERN GTypeInstanceClassWithNamedCreationMethod* gtype_instance_class_with_named_creation_method_new (void); VALA_EXTERN GTypeInstanceClassWithNamedCreationMethod* gtype_instance_class_with_named_creation_method_construct (GType object_type); static void gtype_instance_class_with_named_creation_method_finalize (GTypeInstanceClassWithNamedCreationMethod * obj); static GType gtype_instance_class_with_named_creation_method_get_type_once (void); VALA_EXTERN GType simple_gobjectclass_get_type (void) G_GNUC_CONST ; G_DEFINE_AUTOPTR_CLEANUP_FUNC (SimpleGObjectClass, g_object_unref) VALA_EXTERN SimpleGObjectClass* simple_gobjectclass_new (void); VALA_EXTERN SimpleGObjectClass* simple_gobjectclass_construct (GType object_type); static GType simple_gobjectclass_get_type_once (void); VALA_EXTERN GType derived_gobjectclass_get_type (void) G_GNUC_CONST ; G_DEFINE_AUTOPTR_CLEANUP_FUNC (DerivedGObjectClass, g_object_unref) VALA_EXTERN DerivedGObjectClass* derived_gobjectclass_new (void); VALA_EXTERN DerivedGObjectClass* derived_gobjectclass_construct (GType object_type); static GType derived_gobjectclass_get_type_once (void); VALA_EXTERN GType public_gobjectclass_get_type (void) G_GNUC_CONST ; G_DEFINE_AUTOPTR_CLEANUP_FUNC (PublicGObjectClass, g_object_unref) VALA_EXTERN PublicGObjectClass* public_gobjectclass_new (void); VALA_EXTERN PublicGObjectClass* public_gobjectclass_construct (GType object_type); static GType public_gobjectclass_get_type_once (void); VALA_EXTERN GType abstract_gobjectclass_get_type (void) G_GNUC_CONST ; G_DEFINE_AUTOPTR_CLEANUP_FUNC (AbstractGObjectClass, g_object_unref) VALA_EXTERN AbstractGObjectClass* abstract_gobjectclass_construct (GType object_type); static GType abstract_gobjectclass_get_type_once (void); VALA_EXTERN GType gobject_class_with_creation_method_get_type (void) G_GNUC_CONST ; G_DEFINE_AUTOPTR_CLEANUP_FUNC (GObjectClassWithCreationMethod, g_object_unref) VALA_EXTERN GObjectClassWithCreationMethod* gobject_class_with_creation_method_new (void); VALA_EXTERN GObjectClassWithCreationMethod* gobject_class_with_creation_method_construct (GType object_type); static GType gobject_class_with_creation_method_get_type_once (void); VALA_EXTERN GType gobject_class_with_named_creation_method_get_type (void) G_GNUC_CONST ; G_DEFINE_AUTOPTR_CLEANUP_FUNC (GObjectClassWithNamedCreationMethod, g_object_unref) VALA_EXTERN GObjectClassWithNamedCreationMethod* gobject_class_with_named_creation_method_new_named (void); VALA_EXTERN GObjectClassWithNamedCreationMethod* gobject_class_with_named_creation_method_construct_named (GType object_type); VALA_EXTERN GObjectClassWithNamedCreationMethod* gobject_class_with_named_creation_method_new (void); VALA_EXTERN GObjectClassWithNamedCreationMethod* gobject_class_with_named_creation_method_construct (GType object_type); static GType gobject_class_with_named_creation_method_get_type_once (void); static void _vala_main (void); CompactClass* compactclass_new (void) { CompactClass* self; self = g_slice_new0 (CompactClass); compactclass_instance_init (self); return self; } static void compactclass_instance_init (CompactClass * self) { } void compactclass_free (CompactClass * self) { g_slice_free (CompactClass, self); } CompactClassWithDestructor* compact_class_with_destructor_new (void) { CompactClassWithDestructor* self; self = g_slice_new0 (CompactClassWithDestructor); compact_class_with_destructor_instance_init (self); return self; } static void compact_class_with_destructor_instance_init (CompactClassWithDestructor * self) { } void compact_class_with_destructor_free (CompactClassWithDestructor * self) { FILE* _tmp0_; _tmp0_ = stdout; fprintf (_tmp0_, "~CompactClassWithDestructor\n"); g_slice_free (CompactClassWithDestructor, self); } DerivedClass* derivedclass_new (void) { DerivedClass* self; self = (DerivedClass*) compactclass_new (); derivedclass_instance_init (self); return self; } static void derivedclass_instance_init (DerivedClass * self) { } PublicClass* publicclass_new (void) { PublicClass* self; self = g_slice_new0 (PublicClass); publicclass_instance_init (self); return self; } static void publicclass_instance_init (PublicClass * self) { } void publicclass_free (PublicClass * self) { g_slice_free (PublicClass, self); } AbstractClass* abstractclass_new (void) { AbstractClass* self; self = g_slice_new0 (AbstractClass); abstractclass_instance_init (self); return self; } static void abstractclass_instance_init (AbstractClass * self) { } void abstractclass_free (AbstractClass * self) { g_slice_free (AbstractClass, self); } ClassWithCreationMethod* class_with_creation_method_new (void) { ClassWithCreationMethod* self; FILE* _tmp0_; self = g_slice_new0 (ClassWithCreationMethod); class_with_creation_method_instance_init (self); _tmp0_ = stdout; fprintf (_tmp0_, "ClassWithCreationMethod\n"); return self; } static void class_with_creation_method_instance_init (ClassWithCreationMethod * self) { } void class_with_creation_method_free (ClassWithCreationMethod * self) { g_slice_free (ClassWithCreationMethod, self); } ClassWithNamedCreationMethod* class_with_named_creation_method_new_named (void) { ClassWithNamedCreationMethod* self; FILE* _tmp0_; self = g_slice_new0 (ClassWithNamedCreationMethod); class_with_named_creation_method_instance_init (self); _tmp0_ = stdout; fprintf (_tmp0_, "ClassWithNamedCreationMethod\n"); return self; } ClassWithNamedCreationMethod* class_with_named_creation_method_new (void) { ClassWithNamedCreationMethod* self; self = g_slice_new0 (ClassWithNamedCreationMethod); class_with_named_creation_method_instance_init (self); return self; } static void class_with_named_creation_method_instance_init (ClassWithNamedCreationMethod * self) { } void class_with_named_creation_method_free (ClassWithNamedCreationMethod * self) { g_slice_free (ClassWithNamedCreationMethod, self); } SimpleGTypeInstanceClass* simple_gtype_instanceclass_construct (GType object_type) { SimpleGTypeInstanceClass* self = NULL; self = (SimpleGTypeInstanceClass*) g_type_create_instance (object_type); return self; } SimpleGTypeInstanceClass* simple_gtype_instanceclass_new (void) { return simple_gtype_instanceclass_construct (TYPE_SIMPLE_GTYPE_INSTANCECLASS); } static void value_simple_gtype_instanceclass_init (GValue* value) { value->data[0].v_pointer = NULL; } static void value_simple_gtype_instanceclass_free_value (GValue* value) { if (value->data[0].v_pointer) { simple_gtype_instanceclass_unref (value->data[0].v_pointer); } } static void value_simple_gtype_instanceclass_copy_value (const GValue* src_value, GValue* dest_value) { if (src_value->data[0].v_pointer) { dest_value->data[0].v_pointer = simple_gtype_instanceclass_ref (src_value->data[0].v_pointer); } else { dest_value->data[0].v_pointer = NULL; } } static gpointer value_simple_gtype_instanceclass_peek_pointer (const GValue* value) { return value->data[0].v_pointer; } static gchar* value_simple_gtype_instanceclass_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { if (collect_values[0].v_pointer) { SimpleGTypeInstanceClass * object; object = collect_values[0].v_pointer; if (object->parent_instance.g_class == NULL) { return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) { return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); } value->data[0].v_pointer = simple_gtype_instanceclass_ref (object); } else { value->data[0].v_pointer = NULL; } return NULL; } static gchar* value_simple_gtype_instanceclass_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { SimpleGTypeInstanceClass ** object_p; object_p = collect_values[0].v_pointer; if (!object_p) { return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value)); } if (!value->data[0].v_pointer) { *object_p = NULL; } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { *object_p = value->data[0].v_pointer; } else { *object_p = simple_gtype_instanceclass_ref (value->data[0].v_pointer); } return NULL; } GParamSpec* param_spec_simple_gtype_instanceclass (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) { ParamSpecSimpleGTypeInstanceClass* spec; g_return_val_if_fail (g_type_is_a (object_type, TYPE_SIMPLE_GTYPE_INSTANCECLASS), NULL); spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags); G_PARAM_SPEC (spec)->value_type = object_type; return G_PARAM_SPEC (spec); } gpointer value_get_simple_gtype_instanceclass (const GValue* value) { g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_SIMPLE_GTYPE_INSTANCECLASS), NULL); return value->data[0].v_pointer; } void value_set_simple_gtype_instanceclass (GValue* value, gpointer v_object) { SimpleGTypeInstanceClass * old; g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_SIMPLE_GTYPE_INSTANCECLASS)); old = value->data[0].v_pointer; if (v_object) { g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_SIMPLE_GTYPE_INSTANCECLASS)); g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); value->data[0].v_pointer = v_object; simple_gtype_instanceclass_ref (value->data[0].v_pointer); } else { value->data[0].v_pointer = NULL; } if (old) { simple_gtype_instanceclass_unref (old); } } void value_take_simple_gtype_instanceclass (GValue* value, gpointer v_object) { SimpleGTypeInstanceClass * old; g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_SIMPLE_GTYPE_INSTANCECLASS)); old = value->data[0].v_pointer; if (v_object) { g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_SIMPLE_GTYPE_INSTANCECLASS)); g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); value->data[0].v_pointer = v_object; } else { value->data[0].v_pointer = NULL; } if (old) { simple_gtype_instanceclass_unref (old); } } static void simple_gtype_instanceclass_class_init (SimpleGTypeInstanceClassClass * klass, gpointer klass_data) { simple_gtype_instanceclass_parent_class = g_type_class_peek_parent (klass); ((SimpleGTypeInstanceClassClass *) klass)->finalize = simple_gtype_instanceclass_finalize; } static void simple_gtype_instanceclass_instance_init (SimpleGTypeInstanceClass * self, gpointer klass) { self->ref_count = 1; } static void simple_gtype_instanceclass_finalize (SimpleGTypeInstanceClass * obj) { SimpleGTypeInstanceClass * self; self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_SIMPLE_GTYPE_INSTANCECLASS, SimpleGTypeInstanceClass); g_signal_handlers_destroy (self); } static GType simple_gtype_instanceclass_get_type_once (void) { static const GTypeValueTable g_define_type_value_table = { value_simple_gtype_instanceclass_init, value_simple_gtype_instanceclass_free_value, value_simple_gtype_instanceclass_copy_value, value_simple_gtype_instanceclass_peek_pointer, "p", value_simple_gtype_instanceclass_collect_value, "p", value_simple_gtype_instanceclass_lcopy_value }; static const GTypeInfo g_define_type_info = { sizeof (SimpleGTypeInstanceClassClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) simple_gtype_instanceclass_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SimpleGTypeInstanceClass), 0, (GInstanceInitFunc) simple_gtype_instanceclass_instance_init, &g_define_type_value_table }; static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) }; GType simple_gtype_instanceclass_type_id; simple_gtype_instanceclass_type_id = g_type_register_fundamental (g_type_fundamental_next (), "SimpleGTypeInstanceClass", &g_define_type_info, &g_define_type_fundamental_info, 0); return simple_gtype_instanceclass_type_id; } GType simple_gtype_instanceclass_get_type (void) { static volatile gsize simple_gtype_instanceclass_type_id__once = 0; if (g_once_init_enter (&simple_gtype_instanceclass_type_id__once)) { GType simple_gtype_instanceclass_type_id; simple_gtype_instanceclass_type_id = simple_gtype_instanceclass_get_type_once (); g_once_init_leave (&simple_gtype_instanceclass_type_id__once, simple_gtype_instanceclass_type_id); } return simple_gtype_instanceclass_type_id__once; } gpointer simple_gtype_instanceclass_ref (gpointer instance) { SimpleGTypeInstanceClass * self; self = instance; g_atomic_int_inc (&self->ref_count); return instance; } void simple_gtype_instanceclass_unref (gpointer instance) { SimpleGTypeInstanceClass * self; self = instance; if (g_atomic_int_dec_and_test (&self->ref_count)) { SIMPLE_GTYPE_INSTANCECLASS_GET_CLASS (self)->finalize (self); g_type_free_instance ((GTypeInstance *) self); } } DerivedGTypeInstanceClass* derived_gtype_instanceclass_construct (GType object_type) { DerivedGTypeInstanceClass* self = NULL; self = (DerivedGTypeInstanceClass*) simple_gtype_instanceclass_construct (object_type); return self; } DerivedGTypeInstanceClass* derived_gtype_instanceclass_new (void) { return derived_gtype_instanceclass_construct (TYPE_DERIVED_GTYPE_INSTANCECLASS); } static void derived_gtype_instanceclass_class_init (DerivedGTypeInstanceClassClass * klass, gpointer klass_data) { derived_gtype_instanceclass_parent_class = g_type_class_peek_parent (klass); } static void derived_gtype_instanceclass_instance_init (DerivedGTypeInstanceClass * self, gpointer klass) { } static GType derived_gtype_instanceclass_get_type_once (void) { static const GTypeInfo g_define_type_info = { sizeof (DerivedGTypeInstanceClassClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) derived_gtype_instanceclass_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DerivedGTypeInstanceClass), 0, (GInstanceInitFunc) derived_gtype_instanceclass_instance_init, NULL }; GType derived_gtype_instanceclass_type_id; derived_gtype_instanceclass_type_id = g_type_register_static (TYPE_SIMPLE_GTYPE_INSTANCECLASS, "DerivedGTypeInstanceClass", &g_define_type_info, 0); return derived_gtype_instanceclass_type_id; } GType derived_gtype_instanceclass_get_type (void) { static volatile gsize derived_gtype_instanceclass_type_id__once = 0; if (g_once_init_enter (&derived_gtype_instanceclass_type_id__once)) { GType derived_gtype_instanceclass_type_id; derived_gtype_instanceclass_type_id = derived_gtype_instanceclass_get_type_once (); g_once_init_leave (&derived_gtype_instanceclass_type_id__once, derived_gtype_instanceclass_type_id); } return derived_gtype_instanceclass_type_id__once; } PublicGTypeInstanceClass* public_gtype_instanceclass_construct (GType object_type) { PublicGTypeInstanceClass* self = NULL; self = (PublicGTypeInstanceClass*) g_type_create_instance (object_type); return self; } PublicGTypeInstanceClass* public_gtype_instanceclass_new (void) { return public_gtype_instanceclass_construct (TYPE_PUBLIC_GTYPE_INSTANCECLASS); } static void value_public_gtype_instanceclass_init (GValue* value) { value->data[0].v_pointer = NULL; } static void value_public_gtype_instanceclass_free_value (GValue* value) { if (value->data[0].v_pointer) { public_gtype_instanceclass_unref (value->data[0].v_pointer); } } static void value_public_gtype_instanceclass_copy_value (const GValue* src_value, GValue* dest_value) { if (src_value->data[0].v_pointer) { dest_value->data[0].v_pointer = public_gtype_instanceclass_ref (src_value->data[0].v_pointer); } else { dest_value->data[0].v_pointer = NULL; } } static gpointer value_public_gtype_instanceclass_peek_pointer (const GValue* value) { return value->data[0].v_pointer; } static gchar* value_public_gtype_instanceclass_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { if (collect_values[0].v_pointer) { PublicGTypeInstanceClass * object; object = collect_values[0].v_pointer; if (object->parent_instance.g_class == NULL) { return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) { return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); } value->data[0].v_pointer = public_gtype_instanceclass_ref (object); } else { value->data[0].v_pointer = NULL; } return NULL; } static gchar* value_public_gtype_instanceclass_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { PublicGTypeInstanceClass ** object_p; object_p = collect_values[0].v_pointer; if (!object_p) { return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value)); } if (!value->data[0].v_pointer) { *object_p = NULL; } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { *object_p = value->data[0].v_pointer; } else { *object_p = public_gtype_instanceclass_ref (value->data[0].v_pointer); } return NULL; } GParamSpec* param_spec_public_gtype_instanceclass (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) { ParamSpecPublicGTypeInstanceClass* spec; g_return_val_if_fail (g_type_is_a (object_type, TYPE_PUBLIC_GTYPE_INSTANCECLASS), NULL); spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags); G_PARAM_SPEC (spec)->value_type = object_type; return G_PARAM_SPEC (spec); } gpointer value_get_public_gtype_instanceclass (const GValue* value) { g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_PUBLIC_GTYPE_INSTANCECLASS), NULL); return value->data[0].v_pointer; } void value_set_public_gtype_instanceclass (GValue* value, gpointer v_object) { PublicGTypeInstanceClass * old; g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_PUBLIC_GTYPE_INSTANCECLASS)); old = value->data[0].v_pointer; if (v_object) { g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_PUBLIC_GTYPE_INSTANCECLASS)); g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); value->data[0].v_pointer = v_object; public_gtype_instanceclass_ref (value->data[0].v_pointer); } else { value->data[0].v_pointer = NULL; } if (old) { public_gtype_instanceclass_unref (old); } } void value_take_public_gtype_instanceclass (GValue* value, gpointer v_object) { PublicGTypeInstanceClass * old; g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_PUBLIC_GTYPE_INSTANCECLASS)); old = value->data[0].v_pointer; if (v_object) { g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_PUBLIC_GTYPE_INSTANCECLASS)); g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); value->data[0].v_pointer = v_object; } else { value->data[0].v_pointer = NULL; } if (old) { public_gtype_instanceclass_unref (old); } } static void public_gtype_instanceclass_class_init (PublicGTypeInstanceClassClass * klass, gpointer klass_data) { public_gtype_instanceclass_parent_class = g_type_class_peek_parent (klass); ((PublicGTypeInstanceClassClass *) klass)->finalize = public_gtype_instanceclass_finalize; } static void public_gtype_instanceclass_instance_init (PublicGTypeInstanceClass * self, gpointer klass) { self->ref_count = 1; } static void public_gtype_instanceclass_finalize (PublicGTypeInstanceClass * obj) { PublicGTypeInstanceClass * self; self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_PUBLIC_GTYPE_INSTANCECLASS, PublicGTypeInstanceClass); g_signal_handlers_destroy (self); } static GType public_gtype_instanceclass_get_type_once (void) { static const GTypeValueTable g_define_type_value_table = { value_public_gtype_instanceclass_init, value_public_gtype_instanceclass_free_value, value_public_gtype_instanceclass_copy_value, value_public_gtype_instanceclass_peek_pointer, "p", value_public_gtype_instanceclass_collect_value, "p", value_public_gtype_instanceclass_lcopy_value }; static const GTypeInfo g_define_type_info = { sizeof (PublicGTypeInstanceClassClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) public_gtype_instanceclass_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublicGTypeInstanceClass), 0, (GInstanceInitFunc) public_gtype_instanceclass_instance_init, &g_define_type_value_table }; static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) }; GType public_gtype_instanceclass_type_id; public_gtype_instanceclass_type_id = g_type_register_fundamental (g_type_fundamental_next (), "PublicGTypeInstanceClass", &g_define_type_info, &g_define_type_fundamental_info, 0); return public_gtype_instanceclass_type_id; } GType public_gtype_instanceclass_get_type (void) { static volatile gsize public_gtype_instanceclass_type_id__once = 0; if (g_once_init_enter (&public_gtype_instanceclass_type_id__once)) { GType public_gtype_instanceclass_type_id; public_gtype_instanceclass_type_id = public_gtype_instanceclass_get_type_once (); g_once_init_leave (&public_gtype_instanceclass_type_id__once, public_gtype_instanceclass_type_id); } return public_gtype_instanceclass_type_id__once; } gpointer public_gtype_instanceclass_ref (gpointer instance) { PublicGTypeInstanceClass * self; self = instance; g_atomic_int_inc (&self->ref_count); return instance; } void public_gtype_instanceclass_unref (gpointer instance) { PublicGTypeInstanceClass * self; self = instance; if (g_atomic_int_dec_and_test (&self->ref_count)) { PUBLIC_GTYPE_INSTANCECLASS_GET_CLASS (self)->finalize (self); g_type_free_instance ((GTypeInstance *) self); } } GTypeInstanceClassWithCreationMethod* gtype_instance_class_with_creation_method_construct (GType object_type) { GTypeInstanceClassWithCreationMethod* self = NULL; FILE* _tmp0_; self = (GTypeInstanceClassWithCreationMethod*) g_type_create_instance (object_type); _tmp0_ = stdout; fprintf (_tmp0_, "GTypeInstanceClassWithCreationMethod\n"); return self; } GTypeInstanceClassWithCreationMethod* gtype_instance_class_with_creation_method_new (void) { return gtype_instance_class_with_creation_method_construct (TYPE_GTYPE_INSTANCE_CLASS_WITH_CREATION_METHOD); } static void value_gtype_instance_class_with_creation_method_init (GValue* value) { value->data[0].v_pointer = NULL; } static void value_gtype_instance_class_with_creation_method_free_value (GValue* value) { if (value->data[0].v_pointer) { gtype_instance_class_with_creation_method_unref (value->data[0].v_pointer); } } static void value_gtype_instance_class_with_creation_method_copy_value (const GValue* src_value, GValue* dest_value) { if (src_value->data[0].v_pointer) { dest_value->data[0].v_pointer = gtype_instance_class_with_creation_method_ref (src_value->data[0].v_pointer); } else { dest_value->data[0].v_pointer = NULL; } } static gpointer value_gtype_instance_class_with_creation_method_peek_pointer (const GValue* value) { return value->data[0].v_pointer; } static gchar* value_gtype_instance_class_with_creation_method_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { if (collect_values[0].v_pointer) { GTypeInstanceClassWithCreationMethod * object; object = collect_values[0].v_pointer; if (object->parent_instance.g_class == NULL) { return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) { return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); } value->data[0].v_pointer = gtype_instance_class_with_creation_method_ref (object); } else { value->data[0].v_pointer = NULL; } return NULL; } static gchar* value_gtype_instance_class_with_creation_method_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { GTypeInstanceClassWithCreationMethod ** object_p; object_p = collect_values[0].v_pointer; if (!object_p) { return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value)); } if (!value->data[0].v_pointer) { *object_p = NULL; } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { *object_p = value->data[0].v_pointer; } else { *object_p = gtype_instance_class_with_creation_method_ref (value->data[0].v_pointer); } return NULL; } GParamSpec* param_spec_gtype_instance_class_with_creation_method (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) { ParamSpecGTypeInstanceClassWithCreationMethod* spec; g_return_val_if_fail (g_type_is_a (object_type, TYPE_GTYPE_INSTANCE_CLASS_WITH_CREATION_METHOD), NULL); spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags); G_PARAM_SPEC (spec)->value_type = object_type; return G_PARAM_SPEC (spec); } gpointer value_get_gtype_instance_class_with_creation_method (const GValue* value) { g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_GTYPE_INSTANCE_CLASS_WITH_CREATION_METHOD), NULL); return value->data[0].v_pointer; } void value_set_gtype_instance_class_with_creation_method (GValue* value, gpointer v_object) { GTypeInstanceClassWithCreationMethod * old; g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_GTYPE_INSTANCE_CLASS_WITH_CREATION_METHOD)); old = value->data[0].v_pointer; if (v_object) { g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_GTYPE_INSTANCE_CLASS_WITH_CREATION_METHOD)); g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); value->data[0].v_pointer = v_object; gtype_instance_class_with_creation_method_ref (value->data[0].v_pointer); } else { value->data[0].v_pointer = NULL; } if (old) { gtype_instance_class_with_creation_method_unref (old); } } void value_take_gtype_instance_class_with_creation_method (GValue* value, gpointer v_object) { GTypeInstanceClassWithCreationMethod * old; g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_GTYPE_INSTANCE_CLASS_WITH_CREATION_METHOD)); old = value->data[0].v_pointer; if (v_object) { g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_GTYPE_INSTANCE_CLASS_WITH_CREATION_METHOD)); g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); value->data[0].v_pointer = v_object; } else { value->data[0].v_pointer = NULL; } if (old) { gtype_instance_class_with_creation_method_unref (old); } } static void gtype_instance_class_with_creation_method_class_init (GTypeInstanceClassWithCreationMethodClass * klass, gpointer klass_data) { gtype_instance_class_with_creation_method_parent_class = g_type_class_peek_parent (klass); ((GTypeInstanceClassWithCreationMethodClass *) klass)->finalize = gtype_instance_class_with_creation_method_finalize; } static void gtype_instance_class_with_creation_method_instance_init (GTypeInstanceClassWithCreationMethod * self, gpointer klass) { self->ref_count = 1; } static void gtype_instance_class_with_creation_method_finalize (GTypeInstanceClassWithCreationMethod * obj) { GTypeInstanceClassWithCreationMethod * self; self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_GTYPE_INSTANCE_CLASS_WITH_CREATION_METHOD, GTypeInstanceClassWithCreationMethod); g_signal_handlers_destroy (self); } static GType gtype_instance_class_with_creation_method_get_type_once (void) { static const GTypeValueTable g_define_type_value_table = { value_gtype_instance_class_with_creation_method_init, value_gtype_instance_class_with_creation_method_free_value, value_gtype_instance_class_with_creation_method_copy_value, value_gtype_instance_class_with_creation_method_peek_pointer, "p", value_gtype_instance_class_with_creation_method_collect_value, "p", value_gtype_instance_class_with_creation_method_lcopy_value }; static const GTypeInfo g_define_type_info = { sizeof (GTypeInstanceClassWithCreationMethodClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gtype_instance_class_with_creation_method_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GTypeInstanceClassWithCreationMethod), 0, (GInstanceInitFunc) gtype_instance_class_with_creation_method_instance_init, &g_define_type_value_table }; static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) }; GType gtype_instance_class_with_creation_method_type_id; gtype_instance_class_with_creation_method_type_id = g_type_register_fundamental (g_type_fundamental_next (), "GTypeInstanceClassWithCreationMethod", &g_define_type_info, &g_define_type_fundamental_info, 0); return gtype_instance_class_with_creation_method_type_id; } GType gtype_instance_class_with_creation_method_get_type (void) { static volatile gsize gtype_instance_class_with_creation_method_type_id__once = 0; if (g_once_init_enter (>ype_instance_class_with_creation_method_type_id__once)) { GType gtype_instance_class_with_creation_method_type_id; gtype_instance_class_with_creation_method_type_id = gtype_instance_class_with_creation_method_get_type_once (); g_once_init_leave (>ype_instance_class_with_creation_method_type_id__once, gtype_instance_class_with_creation_method_type_id); } return gtype_instance_class_with_creation_method_type_id__once; } gpointer gtype_instance_class_with_creation_method_ref (gpointer instance) { GTypeInstanceClassWithCreationMethod * self; self = instance; g_atomic_int_inc (&self->ref_count); return instance; } void gtype_instance_class_with_creation_method_unref (gpointer instance) { GTypeInstanceClassWithCreationMethod * self; self = instance; if (g_atomic_int_dec_and_test (&self->ref_count)) { GTYPE_INSTANCE_CLASS_WITH_CREATION_METHOD_GET_CLASS (self)->finalize (self); g_type_free_instance ((GTypeInstance *) self); } } GTypeInstanceClassWithNamedCreationMethod* gtype_instance_class_with_named_creation_method_construct_named (GType object_type) { GTypeInstanceClassWithNamedCreationMethod* self = NULL; FILE* _tmp0_; self = (GTypeInstanceClassWithNamedCreationMethod*) g_type_create_instance (object_type); _tmp0_ = stdout; fprintf (_tmp0_, "GTypeInstanceClassWithNamedCreationMethod\n"); return self; } GTypeInstanceClassWithNamedCreationMethod* gtype_instance_class_with_named_creation_method_new_named (void) { return gtype_instance_class_with_named_creation_method_construct_named (TYPE_GTYPE_INSTANCE_CLASS_WITH_NAMED_CREATION_METHOD); } GTypeInstanceClassWithNamedCreationMethod* gtype_instance_class_with_named_creation_method_construct (GType object_type) { GTypeInstanceClassWithNamedCreationMethod* self = NULL; self = (GTypeInstanceClassWithNamedCreationMethod*) g_type_create_instance (object_type); return self; } GTypeInstanceClassWithNamedCreationMethod* gtype_instance_class_with_named_creation_method_new (void) { return gtype_instance_class_with_named_creation_method_construct (TYPE_GTYPE_INSTANCE_CLASS_WITH_NAMED_CREATION_METHOD); } static void value_gtype_instance_class_with_named_creation_method_init (GValue* value) { value->data[0].v_pointer = NULL; } static void value_gtype_instance_class_with_named_creation_method_free_value (GValue* value) { if (value->data[0].v_pointer) { gtype_instance_class_with_named_creation_method_unref (value->data[0].v_pointer); } } static void value_gtype_instance_class_with_named_creation_method_copy_value (const GValue* src_value, GValue* dest_value) { if (src_value->data[0].v_pointer) { dest_value->data[0].v_pointer = gtype_instance_class_with_named_creation_method_ref (src_value->data[0].v_pointer); } else { dest_value->data[0].v_pointer = NULL; } } static gpointer value_gtype_instance_class_with_named_creation_method_peek_pointer (const GValue* value) { return value->data[0].v_pointer; } static gchar* value_gtype_instance_class_with_named_creation_method_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { if (collect_values[0].v_pointer) { GTypeInstanceClassWithNamedCreationMethod * object; object = collect_values[0].v_pointer; if (object->parent_instance.g_class == NULL) { return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) { return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); } value->data[0].v_pointer = gtype_instance_class_with_named_creation_method_ref (object); } else { value->data[0].v_pointer = NULL; } return NULL; } static gchar* value_gtype_instance_class_with_named_creation_method_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { GTypeInstanceClassWithNamedCreationMethod ** object_p; object_p = collect_values[0].v_pointer; if (!object_p) { return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value)); } if (!value->data[0].v_pointer) { *object_p = NULL; } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { *object_p = value->data[0].v_pointer; } else { *object_p = gtype_instance_class_with_named_creation_method_ref (value->data[0].v_pointer); } return NULL; } GParamSpec* param_spec_gtype_instance_class_with_named_creation_method (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) { ParamSpecGTypeInstanceClassWithNamedCreationMethod* spec; g_return_val_if_fail (g_type_is_a (object_type, TYPE_GTYPE_INSTANCE_CLASS_WITH_NAMED_CREATION_METHOD), NULL); spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags); G_PARAM_SPEC (spec)->value_type = object_type; return G_PARAM_SPEC (spec); } gpointer value_get_gtype_instance_class_with_named_creation_method (const GValue* value) { g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_GTYPE_INSTANCE_CLASS_WITH_NAMED_CREATION_METHOD), NULL); return value->data[0].v_pointer; } void value_set_gtype_instance_class_with_named_creation_method (GValue* value, gpointer v_object) { GTypeInstanceClassWithNamedCreationMethod * old; g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_GTYPE_INSTANCE_CLASS_WITH_NAMED_CREATION_METHOD)); old = value->data[0].v_pointer; if (v_object) { g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_GTYPE_INSTANCE_CLASS_WITH_NAMED_CREATION_METHOD)); g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); value->data[0].v_pointer = v_object; gtype_instance_class_with_named_creation_method_ref (value->data[0].v_pointer); } else { value->data[0].v_pointer = NULL; } if (old) { gtype_instance_class_with_named_creation_method_unref (old); } } void value_take_gtype_instance_class_with_named_creation_method (GValue* value, gpointer v_object) { GTypeInstanceClassWithNamedCreationMethod * old; g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_GTYPE_INSTANCE_CLASS_WITH_NAMED_CREATION_METHOD)); old = value->data[0].v_pointer; if (v_object) { g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_GTYPE_INSTANCE_CLASS_WITH_NAMED_CREATION_METHOD)); g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); value->data[0].v_pointer = v_object; } else { value->data[0].v_pointer = NULL; } if (old) { gtype_instance_class_with_named_creation_method_unref (old); } } static void gtype_instance_class_with_named_creation_method_class_init (GTypeInstanceClassWithNamedCreationMethodClass * klass, gpointer klass_data) { gtype_instance_class_with_named_creation_method_parent_class = g_type_class_peek_parent (klass); ((GTypeInstanceClassWithNamedCreationMethodClass *) klass)->finalize = gtype_instance_class_with_named_creation_method_finalize; } static void gtype_instance_class_with_named_creation_method_instance_init (GTypeInstanceClassWithNamedCreationMethod * self, gpointer klass) { self->ref_count = 1; } static void gtype_instance_class_with_named_creation_method_finalize (GTypeInstanceClassWithNamedCreationMethod * obj) { GTypeInstanceClassWithNamedCreationMethod * self; self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_GTYPE_INSTANCE_CLASS_WITH_NAMED_CREATION_METHOD, GTypeInstanceClassWithNamedCreationMethod); g_signal_handlers_destroy (self); } static GType gtype_instance_class_with_named_creation_method_get_type_once (void) { static const GTypeValueTable g_define_type_value_table = { value_gtype_instance_class_with_named_creation_method_init, value_gtype_instance_class_with_named_creation_method_free_value, value_gtype_instance_class_with_named_creation_method_copy_value, value_gtype_instance_class_with_named_creation_method_peek_pointer, "p", value_gtype_instance_class_with_named_creation_method_collect_value, "p", value_gtype_instance_class_with_named_creation_method_lcopy_value }; static const GTypeInfo g_define_type_info = { sizeof (GTypeInstanceClassWithNamedCreationMethodClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gtype_instance_class_with_named_creation_method_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GTypeInstanceClassWithNamedCreationMethod), 0, (GInstanceInitFunc) gtype_instance_class_with_named_creation_method_instance_init, &g_define_type_value_table }; static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) }; GType gtype_instance_class_with_named_creation_method_type_id; gtype_instance_class_with_named_creation_method_type_id = g_type_register_fundamental (g_type_fundamental_next (), "GTypeInstanceClassWithNamedCreationMethod", &g_define_type_info, &g_define_type_fundamental_info, 0); return gtype_instance_class_with_named_creation_method_type_id; } GType gtype_instance_class_with_named_creation_method_get_type (void) { static volatile gsize gtype_instance_class_with_named_creation_method_type_id__once = 0; if (g_once_init_enter (>ype_instance_class_with_named_creation_method_type_id__once)) { GType gtype_instance_class_with_named_creation_method_type_id; gtype_instance_class_with_named_creation_method_type_id = gtype_instance_class_with_named_creation_method_get_type_once (); g_once_init_leave (>ype_instance_class_with_named_creation_method_type_id__once, gtype_instance_class_with_named_creation_method_type_id); } return gtype_instance_class_with_named_creation_method_type_id__once; } gpointer gtype_instance_class_with_named_creation_method_ref (gpointer instance) { GTypeInstanceClassWithNamedCreationMethod * self; self = instance; g_atomic_int_inc (&self->ref_count); return instance; } void gtype_instance_class_with_named_creation_method_unref (gpointer instance) { GTypeInstanceClassWithNamedCreationMethod * self; self = instance; if (g_atomic_int_dec_and_test (&self->ref_count)) { GTYPE_INSTANCE_CLASS_WITH_NAMED_CREATION_METHOD_GET_CLASS (self)->finalize (self); g_type_free_instance ((GTypeInstance *) self); } } SimpleGObjectClass* simple_gobjectclass_construct (GType object_type) { SimpleGObjectClass * self = NULL; self = (SimpleGObjectClass*) g_object_new (object_type, NULL); return self; } SimpleGObjectClass* simple_gobjectclass_new (void) { return simple_gobjectclass_construct (TYPE_SIMPLE_GOBJECTCLASS); } static void simple_gobjectclass_class_init (SimpleGObjectClassClass * klass, gpointer klass_data) { simple_gobjectclass_parent_class = g_type_class_peek_parent (klass); } static void simple_gobjectclass_instance_init (SimpleGObjectClass * self, gpointer klass) { } static GType simple_gobjectclass_get_type_once (void) { static const GTypeInfo g_define_type_info = { sizeof (SimpleGObjectClassClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) simple_gobjectclass_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SimpleGObjectClass), 0, (GInstanceInitFunc) simple_gobjectclass_instance_init, NULL }; GType simple_gobjectclass_type_id; simple_gobjectclass_type_id = g_type_register_static (G_TYPE_OBJECT, "SimpleGObjectClass", &g_define_type_info, 0); return simple_gobjectclass_type_id; } GType simple_gobjectclass_get_type (void) { static volatile gsize simple_gobjectclass_type_id__once = 0; if (g_once_init_enter (&simple_gobjectclass_type_id__once)) { GType simple_gobjectclass_type_id; simple_gobjectclass_type_id = simple_gobjectclass_get_type_once (); g_once_init_leave (&simple_gobjectclass_type_id__once, simple_gobjectclass_type_id); } return simple_gobjectclass_type_id__once; } DerivedGObjectClass* derived_gobjectclass_construct (GType object_type) { DerivedGObjectClass * self = NULL; self = (DerivedGObjectClass*) simple_gobjectclass_construct (object_type); return self; } DerivedGObjectClass* derived_gobjectclass_new (void) { return derived_gobjectclass_construct (TYPE_DERIVED_GOBJECTCLASS); } static void derived_gobjectclass_class_init (DerivedGObjectClassClass * klass, gpointer klass_data) { derived_gobjectclass_parent_class = g_type_class_peek_parent (klass); } static void derived_gobjectclass_instance_init (DerivedGObjectClass * self, gpointer klass) { } static GType derived_gobjectclass_get_type_once (void) { static const GTypeInfo g_define_type_info = { sizeof (DerivedGObjectClassClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) derived_gobjectclass_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DerivedGObjectClass), 0, (GInstanceInitFunc) derived_gobjectclass_instance_init, NULL }; GType derived_gobjectclass_type_id; derived_gobjectclass_type_id = g_type_register_static (TYPE_SIMPLE_GOBJECTCLASS, "DerivedGObjectClass", &g_define_type_info, 0); return derived_gobjectclass_type_id; } GType derived_gobjectclass_get_type (void) { static volatile gsize derived_gobjectclass_type_id__once = 0; if (g_once_init_enter (&derived_gobjectclass_type_id__once)) { GType derived_gobjectclass_type_id; derived_gobjectclass_type_id = derived_gobjectclass_get_type_once (); g_once_init_leave (&derived_gobjectclass_type_id__once, derived_gobjectclass_type_id); } return derived_gobjectclass_type_id__once; } PublicGObjectClass* public_gobjectclass_construct (GType object_type) { PublicGObjectClass * self = NULL; self = (PublicGObjectClass*) g_object_new (object_type, NULL); return self; } PublicGObjectClass* public_gobjectclass_new (void) { return public_gobjectclass_construct (TYPE_PUBLIC_GOBJECTCLASS); } static void public_gobjectclass_class_init (PublicGObjectClassClass * klass, gpointer klass_data) { public_gobjectclass_parent_class = g_type_class_peek_parent (klass); } static void public_gobjectclass_instance_init (PublicGObjectClass * self, gpointer klass) { } static GType public_gobjectclass_get_type_once (void) { static const GTypeInfo g_define_type_info = { sizeof (PublicGObjectClassClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) public_gobjectclass_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublicGObjectClass), 0, (GInstanceInitFunc) public_gobjectclass_instance_init, NULL }; GType public_gobjectclass_type_id; public_gobjectclass_type_id = g_type_register_static (G_TYPE_OBJECT, "PublicGObjectClass", &g_define_type_info, 0); return public_gobjectclass_type_id; } GType public_gobjectclass_get_type (void) { static volatile gsize public_gobjectclass_type_id__once = 0; if (g_once_init_enter (&public_gobjectclass_type_id__once)) { GType public_gobjectclass_type_id; public_gobjectclass_type_id = public_gobjectclass_get_type_once (); g_once_init_leave (&public_gobjectclass_type_id__once, public_gobjectclass_type_id); } return public_gobjectclass_type_id__once; } AbstractGObjectClass* abstract_gobjectclass_construct (GType object_type) { AbstractGObjectClass * self = NULL; self = (AbstractGObjectClass*) g_object_new (object_type, NULL); return self; } static void abstract_gobjectclass_class_init (AbstractGObjectClassClass * klass, gpointer klass_data) { abstract_gobjectclass_parent_class = g_type_class_peek_parent (klass); } static void abstract_gobjectclass_instance_init (AbstractGObjectClass * self, gpointer klass) { } static GType abstract_gobjectclass_get_type_once (void) { static const GTypeInfo g_define_type_info = { sizeof (AbstractGObjectClassClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) abstract_gobjectclass_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (AbstractGObjectClass), 0, (GInstanceInitFunc) abstract_gobjectclass_instance_init, NULL }; GType abstract_gobjectclass_type_id; abstract_gobjectclass_type_id = g_type_register_static (G_TYPE_OBJECT, "AbstractGObjectClass", &g_define_type_info, G_TYPE_FLAG_ABSTRACT); return abstract_gobjectclass_type_id; } GType abstract_gobjectclass_get_type (void) { static volatile gsize abstract_gobjectclass_type_id__once = 0; if (g_once_init_enter (&abstract_gobjectclass_type_id__once)) { GType abstract_gobjectclass_type_id; abstract_gobjectclass_type_id = abstract_gobjectclass_get_type_once (); g_once_init_leave (&abstract_gobjectclass_type_id__once, abstract_gobjectclass_type_id); } return abstract_gobjectclass_type_id__once; } GObjectClassWithCreationMethod* gobject_class_with_creation_method_construct (GType object_type) { GObjectClassWithCreationMethod * self = NULL; self = (GObjectClassWithCreationMethod*) g_object_new (object_type, NULL); return self; } GObjectClassWithCreationMethod* gobject_class_with_creation_method_new (void) { return gobject_class_with_creation_method_construct (TYPE_GOBJECT_CLASS_WITH_CREATION_METHOD); } static void gobject_class_with_creation_method_class_init (GObjectClassWithCreationMethodClass * klass, gpointer klass_data) { gobject_class_with_creation_method_parent_class = g_type_class_peek_parent (klass); } static void gobject_class_with_creation_method_instance_init (GObjectClassWithCreationMethod * self, gpointer klass) { } static GType gobject_class_with_creation_method_get_type_once (void) { static const GTypeInfo g_define_type_info = { sizeof (GObjectClassWithCreationMethodClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gobject_class_with_creation_method_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GObjectClassWithCreationMethod), 0, (GInstanceInitFunc) gobject_class_with_creation_method_instance_init, NULL }; GType gobject_class_with_creation_method_type_id; gobject_class_with_creation_method_type_id = g_type_register_static (G_TYPE_OBJECT, "GObjectClassWithCreationMethod", &g_define_type_info, 0); return gobject_class_with_creation_method_type_id; } GType gobject_class_with_creation_method_get_type (void) { static volatile gsize gobject_class_with_creation_method_type_id__once = 0; if (g_once_init_enter (&gobject_class_with_creation_method_type_id__once)) { GType gobject_class_with_creation_method_type_id; gobject_class_with_creation_method_type_id = gobject_class_with_creation_method_get_type_once (); g_once_init_leave (&gobject_class_with_creation_method_type_id__once, gobject_class_with_creation_method_type_id); } return gobject_class_with_creation_method_type_id__once; } GObjectClassWithNamedCreationMethod* gobject_class_with_named_creation_method_construct_named (GType object_type) { GObjectClassWithNamedCreationMethod * self = NULL; self = (GObjectClassWithNamedCreationMethod*) g_object_new (object_type, NULL); return self; } GObjectClassWithNamedCreationMethod* gobject_class_with_named_creation_method_new_named (void) { return gobject_class_with_named_creation_method_construct_named (TYPE_GOBJECT_CLASS_WITH_NAMED_CREATION_METHOD); } GObjectClassWithNamedCreationMethod* gobject_class_with_named_creation_method_construct (GType object_type) { GObjectClassWithNamedCreationMethod * self = NULL; self = (GObjectClassWithNamedCreationMethod*) g_object_new (object_type, NULL); return self; } GObjectClassWithNamedCreationMethod* gobject_class_with_named_creation_method_new (void) { return gobject_class_with_named_creation_method_construct (TYPE_GOBJECT_CLASS_WITH_NAMED_CREATION_METHOD); } static void gobject_class_with_named_creation_method_class_init (GObjectClassWithNamedCreationMethodClass * klass, gpointer klass_data) { gobject_class_with_named_creation_method_parent_class = g_type_class_peek_parent (klass); } static void gobject_class_with_named_creation_method_instance_init (GObjectClassWithNamedCreationMethod * self, gpointer klass) { } static GType gobject_class_with_named_creation_method_get_type_once (void) { static const GTypeInfo g_define_type_info = { sizeof (GObjectClassWithNamedCreationMethodClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gobject_class_with_named_creation_method_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GObjectClassWithNamedCreationMethod), 0, (GInstanceInitFunc) gobject_class_with_named_creation_method_instance_init, NULL }; GType gobject_class_with_named_creation_method_type_id; gobject_class_with_named_creation_method_type_id = g_type_register_static (G_TYPE_OBJECT, "GObjectClassWithNamedCreationMethod", &g_define_type_info, 0); return gobject_class_with_named_creation_method_type_id; } GType gobject_class_with_named_creation_method_get_type (void) { static volatile gsize gobject_class_with_named_creation_method_type_id__once = 0; if (g_once_init_enter (&gobject_class_with_named_creation_method_type_id__once)) { GType gobject_class_with_named_creation_method_type_id; gobject_class_with_named_creation_method_type_id = gobject_class_with_named_creation_method_get_type_once (); g_once_init_leave (&gobject_class_with_named_creation_method_type_id__once, gobject_class_with_named_creation_method_type_id); } return gobject_class_with_named_creation_method_type_id__once; } static void _vala_main (void) { FILE* _tmp0_; FILE* _tmp1_; CompactClass* compact_class = NULL; CompactClass* _tmp2_; FILE* _tmp3_; DerivedClass* derived_class = NULL; DerivedClass* _tmp4_; FILE* _tmp5_; PublicClass* public_class = NULL; PublicClass* _tmp6_; FILE* _tmp7_; ClassWithCreationMethod* class_with_creation_method = NULL; ClassWithCreationMethod* _tmp8_; FILE* _tmp9_; ClassWithNamedCreationMethod* class_with_named_creation_method = NULL; ClassWithNamedCreationMethod* _tmp10_; FILE* _tmp11_; CompactClassWithDestructor* compact_class_with_destructor = NULL; CompactClassWithDestructor* _tmp12_; FILE* _tmp13_; SimpleGTypeInstanceClass* simple_gtypeinstance_class = NULL; SimpleGTypeInstanceClass* _tmp14_; FILE* _tmp15_; DerivedGTypeInstanceClass* derived_gtypeinstance_class = NULL; DerivedGTypeInstanceClass* _tmp16_; FILE* _tmp17_; PublicGTypeInstanceClass* public_gtypeinstance_class = NULL; PublicGTypeInstanceClass* _tmp18_; FILE* _tmp19_; GTypeInstanceClassWithCreationMethod* gtypeinstance_class_with_creation_method = NULL; GTypeInstanceClassWithCreationMethod* _tmp20_; FILE* _tmp21_; GTypeInstanceClassWithNamedCreationMethod* gtypeinstance_class_with_named_creation_method = NULL; GTypeInstanceClassWithNamedCreationMethod* _tmp22_; FILE* _tmp23_; SimpleGObjectClass* simple_gobject_class = NULL; SimpleGObjectClass* _tmp24_; FILE* _tmp25_; DerivedGObjectClass* derived_gobject_class = NULL; DerivedGObjectClass* _tmp26_; FILE* _tmp27_; PublicGObjectClass* public_gobject_class = NULL; PublicGObjectClass* _tmp28_; FILE* _tmp29_; GObjectClassWithCreationMethod* gobject_class_with_creation_method = NULL; GObjectClassWithCreationMethod* _tmp30_; FILE* _tmp31_; GObjectClassWithNamedCreationMethod* gobject_class_with_named_creation_method = NULL; GObjectClassWithNamedCreationMethod* _tmp32_; FILE* _tmp33_; CompactClass* _tmp34_ = NULL; FILE* _tmp35_; CompactClass* _tmp36_; FILE* _tmp37_; _tmp0_ = stdout; fprintf (_tmp0_, "Classes Test:\n"); _tmp1_ = stdout; fprintf (_tmp1_, "new CompactClass ()\n"); _tmp2_ = compactclass_new (); compact_class = _tmp2_; _tmp3_ = stdout; fprintf (_tmp3_, "new DerivedClass ()\n"); _tmp4_ = derivedclass_new (); derived_class = _tmp4_; _tmp5_ = stdout; fprintf (_tmp5_, "new PublicClass ()\n"); _tmp6_ = publicclass_new (); public_class = _tmp6_; _tmp7_ = stdout; fprintf (_tmp7_, "new ClassWithCreationMethod ()\n"); _tmp8_ = class_with_creation_method_new (); class_with_creation_method = _tmp8_; _tmp9_ = stdout; fprintf (_tmp9_, "new ClassWithNamedCreationMethod ()\n"); _tmp10_ = class_with_named_creation_method_new_named (); class_with_named_creation_method = _tmp10_; _tmp11_ = stdout; fprintf (_tmp11_, "new CompactClassWithDestructor ()\n"); _tmp12_ = compact_class_with_destructor_new (); compact_class_with_destructor = _tmp12_; _compact_class_with_destructor_free0 (compact_class_with_destructor); compact_class_with_destructor = NULL; _tmp13_ = stdout; fprintf (_tmp13_, "new SimpleGTypeInstanceClass ()\n"); _tmp14_ = simple_gtype_instanceclass_new (); simple_gtypeinstance_class = _tmp14_; _tmp15_ = stdout; fprintf (_tmp15_, "new DerivedGTypeInstanceClass ()\n"); _tmp16_ = derived_gtype_instanceclass_new (); derived_gtypeinstance_class = _tmp16_; _tmp17_ = stdout; fprintf (_tmp17_, "new PublicGTypeInstanceClass ()\n"); _tmp18_ = public_gtype_instanceclass_new (); public_gtypeinstance_class = _tmp18_; _tmp19_ = stdout; fprintf (_tmp19_, "new GTypeInstanceClassWithCreationMethod ()\n"); _tmp20_ = gtype_instance_class_with_creation_method_new (); gtypeinstance_class_with_creation_method = _tmp20_; _tmp21_ = stdout; fprintf (_tmp21_, "new GTypeInstanceClassWithNamedCreationMethod ()\n"); _tmp22_ = gtype_instance_class_with_named_creation_method_new_named (); gtypeinstance_class_with_named_creation_method = _tmp22_; _tmp23_ = stdout; fprintf (_tmp23_, "new SimpleGObjectClass ()\n"); _tmp24_ = simple_gobjectclass_new (); simple_gobject_class = _tmp24_; _tmp25_ = stdout; fprintf (_tmp25_, "new DerivedGObjectClass ()\n"); _tmp26_ = derived_gobjectclass_new (); derived_gobject_class = _tmp26_; _tmp27_ = stdout; fprintf (_tmp27_, "new PublicGObjectClass ()\n"); _tmp28_ = public_gobjectclass_new (); public_gobject_class = _tmp28_; _tmp29_ = stdout; fprintf (_tmp29_, "new GObjectClassWithCreationMethod ()\n"); _tmp30_ = gobject_class_with_creation_method_new (); gobject_class_with_creation_method = _tmp30_; _tmp31_ = stdout; fprintf (_tmp31_, "new GObjectClassWithNamedCreationMethod ()\n"); _tmp32_ = gobject_class_with_named_creation_method_new_named (); gobject_class_with_named_creation_method = _tmp32_; _tmp33_ = stdout; fprintf (_tmp33_, "new CompactClass () { field = 1 }\n"); _tmp34_ = compactclass_new (); _tmp34_->field = 1; _compactclass_free0 (compact_class); compact_class = _tmp34_; _tmp35_ = stdout; _tmp36_ = compact_class; fprintf (_tmp35_, "compact_class.field = %d\n", _tmp36_->field); _tmp37_ = stdout; fprintf (_tmp37_, ".\n"); _g_object_unref0 (gobject_class_with_named_creation_method); _g_object_unref0 (gobject_class_with_creation_method); _g_object_unref0 (public_gobject_class); _g_object_unref0 (derived_gobject_class); _g_object_unref0 (simple_gobject_class); _gtype_instance_class_with_named_creation_method_unref0 (gtypeinstance_class_with_named_creation_method); _gtype_instance_class_with_creation_method_unref0 (gtypeinstance_class_with_creation_method); _public_gtype_instanceclass_unref0 (public_gtypeinstance_class); _simple_gtype_instanceclass_unref0 (derived_gtypeinstance_class); _simple_gtype_instanceclass_unref0 (simple_gtypeinstance_class); _compact_class_with_destructor_free0 (compact_class_with_destructor); _class_with_named_creation_method_free0 (class_with_named_creation_method); _class_with_creation_method_free0 (class_with_creation_method); _publicclass_free0 (public_class); _compactclass_free0 (derived_class); _compactclass_free0 (compact_class); } int main (int argc, char ** argv) { _vala_main (); return 0; }