add extended runtime type support also read property modifiers in set-only
authorRaffaele Sandrini <rasa@gmx.ch>
Tue, 20 Mar 2007 21:08:30 +0000 (21:08 +0000)
committerRaffaele Sandrini <rasa@src.gnome.org>
Tue, 20 Mar 2007 21:08:30 +0000 (21:08 +0000)
2007-03-20  Raffaele Sandrini  <rasa@gmx.ch>

* vapi/glib-2.0.vala: add extended runtime type support
* vala/parser.y: also read property modifiers in set-only properties

svn path=/trunk/; revision=249

vala/ChangeLog
vala/vala/parser.y
vala/vapi/glib-2.0.vala

index 7060a98..dc7cd7d 100644 (file)
@@ -1,3 +1,8 @@
+2007-03-20  Raffaele Sandrini  <rasa@gmx.ch>
+
+       * vapi/glib-2.0.vala: add extended runtime type support
+       * vala/parser.y: also read property modifiers in set-only properties
+
 2007-03-20  Jürg Billeter  <j@bitron.ch>
 
        * vala/valasymbolresolver.vala: add GObject to the list of base types
index 99be10c..ffb33a3 100644 (file)
@@ -2737,6 +2737,16 @@ property_declaration
                g_object_unref ($5);
                g_free ($6);
                g_object_unref ($8);
+               
+               if (($4 & VALA_MODIFIER_ABSTRACT) == VALA_MODIFIER_ABSTRACT) {
+                       vala_property_set_is_abstract ($$, TRUE);
+               }
+               if (($4 & VALA_MODIFIER_VIRTUAL) == VALA_MODIFIER_VIRTUAL) {
+                       vala_property_set_is_virtual ($$, TRUE);
+               }
+               if (($4 & VALA_MODIFIER_OVERRIDE) == VALA_MODIFIER_OVERRIDE) {
+                       vala_property_set_overrides ($$, TRUE);
+               }
          }
        ;
 
index 3a62dca..93df57a 100644 (file)
@@ -242,8 +242,35 @@ namespace GLib {
        public struct Type {
                [CCode (cname = "G_TYPE_IS_OBJECT")]
                public bool is_object ();
+               [CCode (cname = "G_TYPE_IS_ABSTRACT")]
+               public bool is_abstract ();
+               [CCode (cname = "G_TYPE_IS_CLASSED")]
+               public bool is_classed ();
+               [CCode (cname = "G_TYPE_IS_DERIVABLE")]
+               public bool is_derivable ();
+               [CCode (cname = "G_TYPE_IS_DEEP_DERIVABLE")]
+               public bool is_deep_derivable ();
+               [CCode (cname = "G_TYPE_IS_DERIVED")]
+               public bool is_derived ();
+               [CCode (cname = "G_TYPE_IS_FUNDAMENTAL")]
+               public bool is_fundamental ();
+               [CCode (cname = "G_TYPE_IS_INSTANTIATABLE")]
+               public bool is_instantiatable ();
+               [CCode (cname = "G_TYPE_IS_INTERFACE")]
+               public bool is_interface ();
+               [CCode (cname = "G_TYPE_IS_VALUE_TYPE")]
+               public bool is_value_type ();
                
+               //public ref Type[] children (ref uint n_children = null);
+               public uint depth ();
+               public static Type from_name (string! name);
+               //public ref Type[] interfaces (ref uint n_interfaces = null);
+               public bool is_a (Type is_a_type);
+               public string! name ();
+               public Type parent ();
+                               
                public ref TypeClass class_ref ();
+               
        }
        
        [ReferenceType ()]
@@ -274,11 +301,11 @@ namespace GLib {
 
        [CCode (cheader_filename = "glib-object.h")]
        public abstract class Object {
+               [CCode (cname = "G_TYPE_FROM_INSTANCE")]
+               public Type get_type ();
                public Object @ref ();
                public void unref ();
                public Object ref_sink ();
-               [NoArrayLength ()]
-               public virtual Object constructor (Type type, uint n_construct_properties, ObjectConstructParam[] construct_properties);
        }
        
        public abstract class InitiallyUnowned : Object {