8
G_DEFINE_TYPE (TestCat, test_cat, TEST_TYPE_ANIMAL)
10
/******************************************************************************/
12
test_cat_real_make_sound (TestCat * self);
15
test_cat_real_move (TestCat * self, gint x, gint y);
17
/******************************************************************************/
20
return g_object_new (TEST_TYPE_CAT, NULL);
24
test_cat_init (TestCat * self) {
29
test_cat_class_init (TestCatClass * klass) {
30
TestAnimalClass * animal_class = TEST_ANIMAL_CLASS (klass);
31
animal_class->make_sound = test_cat_real_make_sound;
32
animal_class->move = test_cat_real_move;
35
/******************************************************************************/
37
test_cat_real_make_sound (TestCat * self) {
38
g_print ("The cat says \"meew\" and \"rurururu\"\n");
42
test_cat_real_move (TestCat * self, gint x, gint y) {
43
g_print ("The cat silently moves to (%i, %i).\n", x, y);