tests/enum.vala
authorAlan Knowles <alan@roojs.com>
Wed, 20 May 2015 11:48:29 +0000 (19:48 +0800)
committerAlan Knowles <alan@roojs.com>
Wed, 20 May 2015 11:48:29 +0000 (19:48 +0800)
tests/enum.vala.c

tests/enum.vala

index 7d5a3e0..724f05f 100644 (file)
@@ -5,9 +5,12 @@
 
 int main (string[] args) {
        Gtk.init(ref args);
-       var x = Type.from_name ("GTK_ORIENTATION_HORIZONTAL");
-       print("%s\n", x.name ());
-       
+       var type = typeof(Gtk.Box);
+       var  ocl = (ObjectClass) type.class_ref ();
+       foreach (ParamSpec spec in ocl.list_properties ()) {
+               stdout.printf ("%s\n", spec.get_name ());
+       }
+        
        return 0;
 }