src/Builder4/Editor.bjs
[app.Builder.js] / src / Palete / VapiParser.vala
index ac8b846..0812d60 100644 (file)
@@ -185,6 +185,7 @@ namespace Palete {
                        c.gparent = parent;
                        c.ns = parent.ns;
                        c.propertyof = parent.name;
+                       
                        c.type  = prop.property_type.data_type == null ? "" : prop.property_type.data_type.get_full_name();
                        parent.props.set(prop.name,c);
                        
@@ -268,7 +269,7 @@ namespace Palete {
                                }
                                var pp = this.add_param(cc, p);
                                c.sig += (c.sig == "(" ? "" : ",");
-                               c.sig +=  " " + pp.type + " " + pp.name;
+                               c.sig += " " + (pp.direction == "in" ? "" : pp.direction) + " " + pp.type + " " + pp.name;
                        }
                        c.sig += (c.sig == "(" ? ")" : " )");
                        
@@ -284,6 +285,19 @@ namespace Palete {
                        var c = new GirObject("Param",n);
                        c.gparent = parent;
                        c.ns = parent.ns;
+                       c.direction = "??";
+                       switch (pam.direction) {
+                               case Vala.ParameterDirection.IN:
+                                       c.direction = "in";
+                                       break;
+                               case Vala.ParameterDirection.OUT:
+                                       c.direction = "out";
+                                       break;
+                               case Vala.ParameterDirection.REF:
+                                       c.direction = "ref";
+                                       break;
+                       }
+                       
                        parent.params.add(c);
                        
                        if (!pam.ellipsis) {
@@ -302,8 +316,11 @@ namespace Palete {
                
                        context.experimental = false;
                        context.experimental_non_null = false;
-                       
-#if VALA_0_28
+#if VALA_0_32
+                       var ver=32;                     
+#elif VALA_0_30
+                       var ver=30;                     
+#elif VALA_0_28
                        var ver=28;
 #elif VALA_0_26        
                        var ver=26;
@@ -363,7 +380,13 @@ namespace Palete {
                        if (!context.add_external_package ("webkit2gtk-4.0")) {
                                context.add_external_package ("webkit2gtk-3.0");
                        }
+                       // these are supposed to be in the 'deps' file, but it's not getting read..
+                       context.add_external_package ("cogl-1.0");
+                       context.add_external_package ("json-glib-1.0");
                        context.add_external_package ("clutter-gtk-1.0");
+
+
+                   
                        context.add_external_package ("gdl-3.0");
                        context.add_external_package ("gtksourceview-3.0");
                        context.add_external_package ("vte-2.90"); //??? -- hopefullly that works..