git clone http://git.roojs.org/gnome.introspection-doc-generator
http://git.roojs.org/?p=gnome.introspection-doc-generator;a=tree
//<Script type="text/javascript"> /** * Test of web kit inspector. * create a window + 2 webviews. inside scrolled window. * load google in first, then hook in the inspector.. * * needs the transfer ownship fixing on return value in WebKit-1.0.gir * * <method name="get_inspector" * c:identifier="webkit_web_view_get_inspector"> * <return-value transfer-ownership="none"> * <type name="WebInspector" c:type="WebKitWebInspector*"/> * </return-value> * </method> * * then compile it.. * g-ir-compiler /usr/share/gir-1.0/WebKit-1.0.gir -o /usr/lib/girepository-1.0/WebKit-1.0.typelib * */ Gtk = imports.gi.Gtk; WebKit = imports.gi.WebKit; Gtk.init(null,null); // build the UI.. w = new Gtk.Window.c_new( Gtk.WindowType.TOPLEVEL); v = new Gtk.VBox(); s1 = new Gtk.ScrolledWindow(); s2 = new Gtk.ScrolledWindow(); w1 = new WebKit.WebView(); w2 = new WebKit.WebView(); s1.add(w1); s2.add(w2); v.add(s1); v.add(s2); w.add(v); // enable inspector.. w1.get_settings().enable_developer_extras = true; // load google on show.. w1.signal.show.connect(function() { w1.load_uri("http://www.google.com"); }); // load the inspector when loading has finished! w1.signal.load_finished.connect(function(wv) { w1.get_inspector().show(); }); // return the bottom window as the inspector.. w1.get_inspector().signal.inspect_web_view.connect(function() { return w2; }) // show and go.. w.show_all(); Gtk.main();
While paid work is still horribly quiet, my little application builder is getting closer to usable.
I posted a video a while back showing the web version of the Application builder, this is the next generation, a desktop version all done in Javascript using Seed. Not only can it build Roo applications, but also Gtk ones.. (and in theory maybe JQuery/Prototype etc..)
The main reason to switch to a desktop version was the addition of GtkSourceView, which will enable autocompletion and proper code editing.
It's really a proof of concept, but I can easily move it out to github from it's current home - http://git.akbkhome.com/?p=app.Builder.js if anyone want's to help out.
download:
git clone http://git.akbkhome.com/app.Builder.js
run update.sh once download to get the roo library
Inotify and Git auto commit then push using Gnome Seed
Gio = imports.gi.Gio; Gtk = imports.gi.Gtk; var f = Gio.file_new_for_path('/home/'); f.enumerate_children_async ( "*", Gio.FileQueryInfoFlags.NONE, GLib.PRIORITY_DEFAULT, null, function(o,ar) { // listing completed.. var fe = f.enumerate_children_finish(ar);
var ch = false;
while (ch = fe.next_file(null)) { Seed.print(ch.get_name()); } Seed.quit(); }, null); Gtk.main();