9 typedef struct _GooFoo GooFoo
;
13 GooMiniBase base_table
;
15 void (* foo
) (GooFoo
*table
);
19 #define GOO_MINI_TYPE_FOO (goo_foo_get_type ())
20 #define GOO_MINI_FOO_TABLE(table) ((GooFoo *) table)
22 GooMiniType
goo_foo_get_type ();
24 GOO_MINI_DEFINE_TYPE (GooFoo
, goo_foo
, GOO_MINI_TYPE_BASE
);
28 foo_handler (GooFoo
*table
)
34 goo_foo_table_init (GooFoo
*table
)
36 table
->foo
= foo_handler
;
42 typedef struct _GooBar GooBar
;
48 void (* bar
) (GooBar
*table
);
52 #define GOO_MINI_TYPE_BAR (goo_bar_get_type ())
53 #define GOO_MINI_BAR_TABLE(table) ((GooBar *) table)
55 GooMiniType
goo_bar_get_type ();
57 GOO_MINI_DEFINE_TYPE (GooBar
, goo_bar
, GOO_MINI_TYPE_FOO
);
60 bar_foo_handler (GooFoo
*table
)
63 GOO_MINI_FOO_TABLE (goo_bar_parent_table
)->foo (table
);
67 bar_handler (GooBar
*table
)
73 goo_bar_table_init (GooBar
*table
)
76 GooFoo
*foo_table
= GOO_MINI_FOO_TABLE (table
);
78 foo_table
->foo
= bar_foo_handler
;
80 table
->bar
= bar_handler
;
86 main (int argc
, char *argv
[])
88 GooFoo
*table
= (GooFoo
*) goo_mini_type_get_table (GOO_MINI_TYPE_BAR
);