BrowserWindow.bjs
authorAlan Knowles <alan@roojs.com>
Tue, 16 Aug 2016 05:50:08 +0000 (13:50 +0800)
committerAlan Knowles <alan@roojs.com>
Tue, 16 Aug 2016 05:50:08 +0000 (13:50 +0800)
BrowserWindow.vala

BrowserWindow.bjs
BrowserWindow.vala

index 2192470..e37ea0a 100644 (file)
@@ -12,6 +12,7 @@
     "destroy" : "() => {\n    Gtk.main_quit();\n}",
     "show" : "() => {\n\t\n\tprint(\"resizing window\\n\");\n\tthis.el.resize(1200,500);\n\tprint(\"loading url\\n\");\n\tthis.view.el.load_uri(webkitpdf.opt_url);\n\t\n\t// if we have not finished in 25 seconds\n\t// call printit...\n\t  GLib.Timeout.add_seconds(25, () => { \n\t\t\t_this.view.printit();\n\t\t\treturn true;\n\t});\n\t\n\n}"
    },
+   "id" : "window",
    "xtype" : "Window",
    "$ xns" : "Gtk",
    "Gtk.WindowType type" : "Gtk.WindowType.TOPLEVEL",
index a25e3a1..0709a44 100644 (file)
@@ -1,16 +1,16 @@
-static BrowserWindow  _BrowserWindow;
+static Xcls_window  _window;
 
-public class BrowserWindow : Object
+public class Xcls_window : Object
 {
     public Gtk.Window el;
-    private BrowserWindow  _this;
+    private Xcls_window  _this;
 
-    public static BrowserWindow singleton()
+    public static Xcls_window singleton()
     {
-        if (_BrowserWindow == null) {
-            _BrowserWindow= new BrowserWindow();
+        if (_window == null) {
+            _window= new Xcls_window();
         }
-        return _BrowserWindow;
+        return _window;
     }
     public Xcls_scrolled_window scrolled_window;
     public Xcls_view view;
@@ -18,7 +18,7 @@ public class BrowserWindow : Object
         // my vars (def)
 
     // ctor
-    public BrowserWindow()
+    public Xcls_window()
     {
         _this = this;
         this.el = new Gtk.Window( Gtk.WindowType.TOPLEVEL );
@@ -56,13 +56,13 @@ public class BrowserWindow : Object
     public class Xcls_scrolled_window : Object
     {
         public Gtk.ScrolledWindow el;
-        private BrowserWindow  _this;
+        private Xcls_window  _this;
 
 
             // my vars (def)
 
         // ctor
-        public Xcls_scrolled_window(BrowserWindow _owner )
+        public Xcls_scrolled_window(Xcls_window _owner )
         {
             _this = _owner;
             _this.scrolled_window = this;
@@ -87,14 +87,14 @@ public class BrowserWindow : Object
     public class Xcls_view : Object
     {
         public WebKit.WebView el;
-        private BrowserWindow  _this;
+        private Xcls_window  _this;
 
 
             // my vars (def)
         public bool print_started;
 
         // ctor
-        public Xcls_view(BrowserWindow _owner )
+        public Xcls_view(Xcls_window _owner )
         {
             _this = _owner;
             _this.view = this;