/+junk/GObject_tutorial

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/%2Bjunk/GObject_tutorial
1 by Gustav Hartvigsson
First lesson.
1
#include "animal.h"
2
#include "cat.h"
3
#include "dog.h"
4
5
6
int
7
main (char ** argv, int argc){
8
  TestAnimal * a = test_animal_new ();
9
  TestCat * c = test_cat_new ();
10
  TestDog * d = test_dog_new ();
11
  
12
  test_animal_make_sound (a);
13
  test_animal_move (a, 5, 6);
14
  
15
  test_animal_make_sound (TEST_ANIMAL(c));
16
  test_animal_move (TEST_ANIMAL(c), 7, 2);
17
  
18
  test_animal_make_sound (TEST_ANIMAL(d));
19
  test_animal_move (TEST_ANIMAL(d), 4, 8);
20
  
21
  g_object_unref (a);
22
  g_object_unref (c);
23
  g_object_unref (d);
24
  
25
  return 0;
26
}
27
28