Commit 6eb70028 authored by Raffaele Sandrini's avatar Raffaele Sandrini Committed by Raffaele Sandrini

add extended runtime type support also read property modifiers in set-only

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
parent 6525c395
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
......
......@@ -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);
}
}
;
......
......@@ -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 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment