8
G_DEFINE_TYPE (TestDog, test_dog, TEST_TYPE_ANIMAL)
10
/******************************************************************************/
12
test_dog_real_make_sound (TestDog * self);
15
test_dog_real_move (TestDog * self, gint x, gint y);
17
/******************************************************************************/
20
return g_object_new (TEST_TYPE_DOG, NULL);
24
test_dog_init (TestDog * self) {
29
test_dog_class_init (TestDogClass * klass) {
30
TestAnimalClass * animal_class = TEST_ANIMAL_CLASS (klass);
31
animal_class->make_sound = test_dog_real_make_sound;
32
animal_class->move = test_dog_real_move;
35
/******************************************************************************/
37
test_dog_real_make_sound (TestDog * self) {
38
g_print ("The dog says \"awoo!\" and \"Wa Wa Wa\"\n");
42
test_dog_real_move (TestDog * self, gint x, gint y) {
43
g_print ("The dog runs around a bit and randomly ends up at (%i, %i).\n", x, y);