Test.GtkWriter.vala.c
[app.Builder.js] / Palete / Gtk.js
index 60a8795..98faa2e 100644 (file)
@@ -286,26 +286,29 @@ Gtk = XObject.define(
                 var prop = GIRepository[meth[5]](bi,i);  
                 var n_original =  prop.get_name();
                 print(ename +": ADD method: " + n_original );
-                var flags = GIRepository.property_info_get_flags(prop);
+                //var flags = GIRepository.property_info_get_flags(prop);
                 
-                if (flags & GIRepository.FunctionInfoFlags.IS_CONSTRUCTOR) {
+                if (n_original.match(/^new/)) {
                     var add = {
                         name :  n_original.replace(/\-/g, '_'),
                         type : 'ctor', //???
-                        desc : this.doc(ename + '.signal.' + n_original)
+                        desc : '',
+                        //desc : this.doc(ename + "."+ n_original)
                     };
                     this.genParams(prop,add);
                     mlist.push(add);
                     continue;
                 }
-                if (!(flags & GIRepository.FunctionInfoFlags.IS_METHOD)) {
-                    continue;
-                }
+                continue;
+                // not sure why we need all the other ones...
+                //if (!(flags & GIRepository.FunctionInfoFlags.IS_METHOD)) {
+                //    continue;
+                //}
                 // print ('signal: ' + n_original); 
                 var add = {
                     name :  n_original.replace(/\-/g, '_'),
                     type : 'function', //???
-                    desc : this.doc(ename + '.signal.' + n_original)
+                    desc : '', //this.doc(ename + '.' + n_original)
                 };
                 this.genParams(prop,add);
                 mlist.push(add);
@@ -379,7 +382,8 @@ Gtk = XObject.define(
             meth.params = [];
             for(var a_i  =0; a_i   < GIRepository.callable_info_get_n_args(sig); a_i++) {
                 var arg = GIRepository.callable_info_get_arg(sig, a_i);
-                 
+                print(arg.get_name());
+                print(arg.get_type());
                 meth.params.push({
                     name  : arg.get_name(),
                     type : this.typeToName(arg.get_type(), true)
@@ -411,7 +415,15 @@ Gtk = XObject.define(
         },
         typeToName  : function (type_info, allow_iface) // find type for properties or arguments.
         {
-           var ty = GIRepository.type_tag_to_string( GIRepository.type_info_get_tag(type_info));
+            print(type_info);
+            if (type_info == 17) {
+                return 'integer';
+            }
+             
+            var x = GIRepository.type_info_get_tag(type_info);
+            print(x);
+            var ty = GIRepository.type_tag_to_string( GIRepository.type_info_get_tag(type_info));
+            print(ty);
            
             if ((ty == 'void') && GIRepository.type_info_is_pointer(type_info)) {
                 return false;