diff options
author | Colin Walters <walters@src.gnome.org> | 2009-02-05 22:43:39 +0000 |
---|---|---|
committer | Colin Walters <walters@src.gnome.org> | 2009-02-05 22:43:39 +0000 |
commit | 3ae9127e53032065df14be8539aba0cf50835386 (patch) | |
tree | 70f667953d1c6e93bf62287cc702ac87e8d11e78 /tests/scanner/foo.c | |
parent | 0d6e0ad5fffed6e5660b7d9c84fd1dde7df0f8bc (diff) | |
download | gobject-introspection-3ae9127e53032065df14be8539aba0cf50835386.tar.gz |
Bug 561360 - If we can't resolve parent class, use GObject
This enables us to support "hidden" parent classes.
svn path=/trunk/; revision=1087
Diffstat (limited to 'tests/scanner/foo.c')
-rw-r--r-- | tests/scanner/foo.c | 66 |
1 files changed, 64 insertions, 2 deletions
diff --git a/tests/scanner/foo.c b/tests/scanner/foo.c index ff493736..fa1a66de 100644 --- a/tests/scanner/foo.c +++ b/tests/scanner/foo.c @@ -420,7 +420,6 @@ foo_hidden_free (FooHidden *boxed) g_slice_free (FooHidden, boxed); } - GType foo_hidden_get_type (void) { @@ -458,5 +457,68 @@ foo_error_quark (void) void foo_some_variant (guint x, va_list args) { - +} + +/* This setup of a totally hidden parent class matches + * http://bugzilla.gnome.org/show_bug.cgi?id=561360 + */ +#define FOO_TYPE_TILE_HANDLER (foo_tile_handler_get_type ()) +#define FOO_TILE_HANDLER(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), FOO_TYPE_TILE_HANDLER, FooTileHandler)) +#define FOO_IS_TILE_HANDLER(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), FOO_TYPE_TILE_HANDLER)) + +struct _FooTileHandler +{ + FooObject parent_instance; +}; + + +struct _FooTileHandlerClass +{ + FooObjectClass parent_class; +}; + +typedef struct _FooTileHandler FooTileHandler; +typedef struct _FooTileHandlerClass FooTileHandlerClass; + +G_DEFINE_TYPE(FooTileHandler, foo_tile_handler, FOO_TYPE_OBJECT); + +static void +foo_tile_handler_class_init (FooTileHandlerClass *klass) +{ + +} + +static void +foo_tile_handler_init (FooTileHandler *object) +{ + +} + +struct _FooBuffer +{ + FooTileHandler parent_instance; +}; + +struct _FooBufferClass +{ + FooTileHandlerClass parent_class; +}; + +G_DEFINE_TYPE(FooBuffer, foo_buffer, FOO_TYPE_TILE_HANDLER); + +static void +foo_buffer_class_init (FooBufferClass *klass) +{ + +} + +static void +foo_buffer_init (FooBuffer *object) +{ + +} + +void +foo_buffer_some_method (FooBuffer *buffer) +{ }
\ No newline at end of file |