vala r865 - in trunk: . vapi vapi/packages/gdk-2.0 vapigen



Author: juergbi
Date: Sat Jan 19 10:25:47 2008
New Revision: 865
URL: http://svn.gnome.org/viewvc/vala?rev=865&view=rev

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

	* vapigen/valagidlparser.vala: add support for common_prefix
	  attribute to override prefix of enum values

	* vapi/packages/gdk-2.0/: fix GdkWindowClass binding,
	  fixes bug 509967

	* vapi/gdk-2.0.vapi: regenerated


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

Modified: trunk/vapi/gdk-2.0.vapi
==============================================================================
--- trunk/vapi/gdk-2.0.vapi	(original)
+++ trunk/vapi/gdk-2.0.vapi	Sat Jan 19 10:25:47 2008
@@ -396,10 +396,10 @@
 		TRUE_COLOR,
 		DIRECT_COLOR,
 	}
-	[CCode (cprefix = "GDK_INPUT_", cheader_filename = "gdk/gdk.h")]
+	[CCode (cprefix = "GDK_", cheader_filename = "gdk/gdk.h")]
 	public enum WindowClass {
-		OUTPUT,
-		ONLY,
+		INPUT_OUTPUT,
+		INPUT_ONLY,
 	}
 	[CCode (cprefix = "GDK_WINDOW_EDGE_", cheader_filename = "gdk/gdk.h")]
 	public enum WindowEdge {

Modified: trunk/vapi/packages/gdk-2.0/gdk-2.0.metadata
==============================================================================
--- trunk/vapi/packages/gdk-2.0/gdk-2.0.metadata	(original)
+++ trunk/vapi/packages/gdk-2.0/gdk-2.0.metadata	Sat Jan 19 10:25:47 2008
@@ -23,6 +23,7 @@
 gdk_screen_get_monitor_geometry.dest is_out="1"
 gdk_window_get_frame_extents.rect is_out="1"
 GdkWindowAttr is_value_type="1"
+GdkWindowClass common_prefix="GDK_"
 GdkWindowObject hidden="1"
 GdkWindowObjectClass hidden="1"
 

Modified: trunk/vapigen/valagidlparser.vala
==============================================================================
--- trunk/vapigen/valagidlparser.vala	(original)
+++ trunk/vapigen/valagidlparser.vala	Sat Jan 19 10:25:47 2008
@@ -712,7 +712,17 @@
 				common_prefix = common_prefix.ndup (common_prefix.size () - 1);
 			}
 		}
-		
+
+		var en_attributes = get_attributes (node.name);
+		if (en_attributes != null) {
+			foreach (string attr in en_attributes) {
+				var nv = attr.split ("=", 2);
+				if (nv[0] == "common_prefix") {
+					common_prefix = eval (nv[1]);
+				}
+			}
+		}
+
 		en.set_cprefix (common_prefix);
 		
 		foreach (weak IdlNode value2 in en_node.values) {



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