2 #include <glib/gprintf.h>
10 //GEnumClass *enum_class;
13 demo_test_static_method ();
15 //create an object instance
16 my_test = demo_test_new ();
18 //run an instance method
19 demo_test_increment (my_test);
21 //run an instance method with arguments
22 demo_test_add_number (my_test, 2);
24 //run an instance method with arguments
25 demo_test_echo (my_test, "hello from c");
27 //run a property set accessor
28 demo_test_set_title (my_test, "set property from c");
30 //run a property set accessor
31 //tmp = demo_test_get_title (my_test);
33 num = demo_test_get_value (my_test);
34 g_printf ("The counter's value is %d\n", num);
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);
42 //g_printf ("returned string: %s\n", demo_test_get_title (my_test));