diff options
author | Colin Walters <walters@verbum.org> | 2008-08-25 13:21:56 +0000 |
---|---|---|
committer | Colin Walters <walters@src.gnome.org> | 2008-08-25 13:21:56 +0000 |
commit | 91f505ee7d5e2508e0d91940640dbe83e9f30ac6 (patch) | |
tree | 6d73a6130adca8d831296d7f3349b33d135f5878 /tests/scanner/foo.c | |
parent | 951e7f9f02be67e17a06bb62473a7055942af30c (diff) | |
download | gobject-introspection-91f505ee7d5e2508e0d91940640dbe83e9f30ac6.tar.gz |
Add interfaces property to class. Write out implemented interfaces.
2008-08-25 Colin Walters <walters@verbum.org>
* giscanner/ast.py: Add interfaces property
to class.
* giscanner/girwriter.py: Write out implemented
interfaces.
* giscanner/glibtransformer.py: Introspect
implemented interfaces.
* tests/scanner/*: Make FooObject implement
FooInterface.
svn path=/trunk/; revision=491
Diffstat (limited to 'tests/scanner/foo.c')
-rw-r--r-- | tests/scanner/foo.c | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/tests/scanner/foo.c b/tests/scanner/foo.c index f6f7b9dc..8fa09212 100644 --- a/tests/scanner/foo.c +++ b/tests/scanner/foo.c @@ -2,6 +2,8 @@ #include "foo.h" +static void foo_do_foo (FooInterface *self); + typedef struct { int i; @@ -30,6 +32,10 @@ foo_interface_get_type (void) return object_type; } +void foo_interface_do_foo (FooInterface *self) +{ + FOO_INTERFACE_GET_INTERFACE(self)->do_foo (self); +} enum { PROP_0, @@ -43,7 +49,17 @@ enum { static guint foo_object_signals[LAST_SIGNAL] = { 0 }; -G_DEFINE_TYPE (FooObject, foo_object, G_TYPE_OBJECT); +static void +foo_foo_interface_init (gpointer g_iface, + gpointer iface_data) +{ + FooInterfaceIface *iface = (FooInterfaceIface *)g_iface; + iface->do_foo = foo_do_foo; +} + +G_DEFINE_TYPE_EXTENDED (FooObject, foo_object, G_TYPE_OBJECT, + 0, G_IMPLEMENT_INTERFACE (FOO_TYPE_INTERFACE, + foo_foo_interface_init)); static void foo_object_set_property (GObject *object, @@ -121,6 +137,13 @@ foo_object_external_type (FooObject *object) } +void +foo_do_foo (FooInterface *self) +{ + + +} + G_DEFINE_TYPE (FooSubobject, foo_subobject, FOO_TYPE_OBJECT); static void |