2004-12-12 Alp Toker <alp@atoker.com>
[mono.git] / mcs / tools / cilc / demo.c
1 #include <glib.h>
2 #include <glib/gprintf.h>
3 #include "demo.h"
4
5 int main () {
6   DemoTest *my_test;
7         //gchar *tmp;
8         int num;
9         DemoDrink drink;
10         //GEnumClass *enum_class;
11   
12   //run a static method
13   demo_test_static_method ();
14
15   //create an object instance
16   my_test = demo_test_new ();
17   
18   //run an instance method
19   demo_test_increment (my_test);
20
21   //run an instance method with arguments
22   demo_test_add_number (my_test, 2);
23
24   //run an instance method with arguments
25   demo_test_echo (my_test, "hello from c");
26
27   //run a property set accessor
28   demo_test_set_title (my_test, "set property from c");
29   
30         //run a property set accessor
31   //tmp = demo_test_get_title (my_test);
32         //g_print (tmp);
33   num = demo_test_get_value (my_test);
34         g_printf ("The counter's value is %d\n", num);
35   
36         drink = demo_test_pick_drink ();
37         //enum_class = g_type_class_peek (demo_drink_get_type ());
38         //g_enum_get_value (enum_class, drink);
39         //g_printf ("%d\n", drink);
40   
41   //TODO: return value
42   //g_printf ("returned string: %s\n", demo_test_get_title (my_test));
43
44   return 0;
45 }