/+junk/GObject_tutorial

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/%2Bjunk/GObject_tutorial
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include "animal.h"
#include "cat.h"
#include "dog.h"



int
main (char ** argv, int argc){
  TestAnimal * a = test_animal_new ();
  TestCat * c = test_cat_new ();
  TestDog * d = test_dog_new ();
  
  test_animal_make_sound (a);
  test_animal_move (a, 5, 6);
  
  test_animal_make_sound (TEST_ANIMAL(c));
  test_animal_move (TEST_ANIMAL(c), 7, 2);
  
  test_animal_make_sound (TEST_ANIMAL(d));
  test_animal_move (TEST_ANIMAL(d), 4, 8);
  
  g_object_unref (c);
  g_object_unref (d);
  g_object_unref (a);
  
  return 0;
}