vala r890 - in trunk: . vapi vapi/packages/gtk+-2.0 vapigen



Author: juergbi
Date: Tue Jan 22 22:25:30 2008
New Revision: 890
URL: http://svn.gnome.org/viewvc/vala?rev=890&view=rev

Log:
2008-01-22  Juerg Billeter  <j bitron ch>

	* vapigen/valagidlparser.vala: support metadata attributes for signal
	  parameters

	* vapi/packages/gtk+-2.0/: fix GtkWidget::key_*_event bindings,
	  fixes bug 505062

	* vapi/gtk+-2.0.vapi: regenerated


Modified:
   trunk/ChangeLog
   trunk/vapi/gtk+-2.0.vapi
   trunk/vapi/packages/gtk+-2.0/gtk+-2.0.metadata
   trunk/vapigen/valagidlparser.vala

Modified: trunk/vapi/gtk+-2.0.vapi
==============================================================================
--- trunk/vapi/gtk+-2.0.vapi	(original)
+++ trunk/vapi/gtk+-2.0.vapi	Tue Jan 22 22:25:30 2008
@@ -1130,8 +1130,8 @@
 		[HasEmitter]
 		public signal void hide ();
 		public signal void hierarchy_changed (Gtk.Widget previous_toplevel);
-		public signal bool key_press_event (Gdk.Event event);
-		public signal bool key_release_event (Gdk.Event event);
+		public signal bool key_press_event (Gdk.EventKey event);
+		public signal bool key_release_event (Gdk.EventKey event);
 		[HasEmitter]
 		public signal bool keynav_failed (Gtk.DirectionType p0);
 		public signal bool leave_notify_event (Gdk.Event event);

Modified: trunk/vapi/packages/gtk+-2.0/gtk+-2.0.metadata
==============================================================================
--- trunk/vapi/packages/gtk+-2.0/gtk+-2.0.metadata	(original)
+++ trunk/vapi/packages/gtk+-2.0/gtk+-2.0.metadata	Tue Jan 22 22:25:30 2008
@@ -253,6 +253,8 @@
 GtkWidget::child_notify has_emitter="1"
 GtkWidget::grab_focus has_emitter="1"
 GtkWidget::hide has_emitter="1"
+GtkWidget::key_press_event.event type_name="EventKey"
+GtkWidget::key_release_event.event type_name="EventKey"
 GtkWidget::keynav_failed has_emitter="1"
 GtkWidget::map has_emitter="1"
 GtkWidget::mnemonic_activate has_emitter="1"

Modified: trunk/vapigen/valagidlparser.vala
==============================================================================
--- trunk/vapigen/valagidlparser.vala	(original)
+++ trunk/vapigen/valagidlparser.vala	Tue Jan 22 22:25:30 2008
@@ -1486,8 +1486,38 @@
 		
 			weak IdlNode param_node = (IdlNode) param;
 			
-			var p = new FormalParameter (param_node.name, parse_param (param));
+			var param_type = parse_param (param);
+			var p = new FormalParameter (param_node.name, param_type);
 			sig.add_parameter (p);
+
+			var attributes = get_attributes ("%s::%s.%s".printf (current_data_type.get_cname (), sig.name, param_node.name));
+			if (attributes != null) {
+				foreach (string attr in attributes) {
+					var nv = attr.split ("=", 2);
+					if (nv[0] == "is_array") {
+						if (eval (nv[1]) == "1") {
+							param_type.array_rank = 1;
+							param_type.is_out = false;
+						}
+					} else if (nv[0] == "is_out") {
+						if (eval (nv[1]) == "1") {
+							param_type.is_out = true;
+						}
+					} else if (nv[0] == "is_ref") {
+						if (eval (nv[1]) == "1") {
+							param_type.is_ref = true;
+						}
+					} else if (nv[0] == "nullable") {
+						if (eval (nv[1]) == "1") {
+							param_type.nullable = true;
+						}
+					} else if (nv[0] == "type_name") {
+						param_type.type_name = eval (nv[1]);
+					} else if (nv[0] == "namespace_name") {
+						param_type.namespace_name = eval (nv[1]);
+					}
+				}
+			}
 		}
 		
 		return sig;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]