diff options
author | Simon van der Linden <svdlinden@src.gnome.org> | 2009-06-28 16:05:46 +0200 |
---|---|---|
committer | Simon van der Linden <svdlinden@src.gnome.org> | 2009-07-05 15:00:22 +0200 |
commit | 11af62358ce600cecceb7af858074281901d5067 (patch) | |
tree | ae61175b19508e1bf51e515b6e379336b4b61c32 /gir/everything.h | |
parent | 5f811f2d0d192c3d546b91e12fcf74b341434ca9 (diff) | |
download | gobject-introspection-11af62358ce600cecceb7af858074281901d5067.tar.gz |
Add a TestObj subclass in Everything
Add an instance method to TestObj.
Add a TestObj subclass in Everything, with another constructor, an
additional instance method and an overridden instance method.
Diffstat (limited to 'gir/everything.h')
-rw-r--r-- | gir/everything.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/gir/everything.h b/gir/everything.h index 8ce29c5a..d566f5f8 100644 --- a/gir/everything.h +++ b/gir/everything.h @@ -249,11 +249,36 @@ struct _TestObjClass GType test_obj_get_type (void); TestObj* test_obj_new_from_file (const char *x, GError **error); void test_obj_set_bare (TestObj *obj, GObject *bare); +int test_obj_instance_method (TestObj *obj); double test_obj_static_method (int x); /* virtual */ int test_obj_do_matrix (TestObj *obj, const char *somestr); +/* inheritance */ +#define TEST_TYPE_SUB_OBJ (test_sub_obj_get_type ()) +#define TEST_SUB_OBJECT(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), TEST_TYPE_SUB_OBJ, TestSubObj)) +#define TEST_IS_SUB_OBJECT(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), TEST_TYPE_SUB_OBJ)) +#define TEST_SUB_OBJ_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TEST_TYPE_SUB_OBJ, TestSubObjClass)) + +typedef struct _TestSubObj TestSubObj; +typedef struct _TestSubObjClass TestSubObjClass; + +struct _TestSubObj +{ + TestObj parent_instance; +}; + +struct _TestSubObjClass +{ + TestObjClass parent_class; +}; + +GType test_sub_obj_get_type (void); +TestSubObj* test_sub_obj_new (void); +void test_sub_obj_unset_bare (TestSubObj *obj); +int test_sub_obj_instance_method (TestSubObj *obj); + /* callback */ typedef int (*TestCallback) (); typedef int (*TestCallbackUserData) (gpointer user_data); |