]> git.eshelyaron.com Git - emacs.git/commitdiff
more robust xwgir button demo
authorJoakim Verona <joakim@verona.se>
Wed, 27 Mar 2013 22:36:32 +0000 (23:36 +0100)
committerJoakim Verona <joakim@verona.se>
Wed, 27 Mar 2013 22:36:32 +0000 (23:36 +0100)
lisp/xwidget-test.el
src/xwidget.c

index 5e3c309967fc7f2e3a506b44844ecdc4c20f01be..7045b72a3ac0ca8433c96a14fcfd679f0cd5d233 100644 (file)
               (define-key (current-local-map) [xwidget-event] 'xwidget-handler-demo-basic))
 
 (xwidget-demo "a-xwgir-color-button"
-               (xwgir-require-namespace "Gtk" "3.0")
-               (put 'ColorButton :xwgir-class '("Gtk" "ColorSelection"))
+              (xwgir-require-namespace "Gtk" "3.0")
+              (put 'ColorButton :xwgir-class '("Gtk" "ColorSelection"))
               (xwidget-insert (point-min)  'ColorButton "xwgir-color-button" 1000  1000)
               (define-key (current-local-map) [xwidget-event] 'xwidget-handler-demo-basic))
 
-(xwidget-demo "a-xwgir-button" 
-              (xwidget-insert (point-min)  'Button "xwgir-button" 100  100)
-              (define-key (current-local-map) [xwidget-event] 'xwidget-handler-demo-basic))
+(xwidget-demo "a-xwgir-button"
+              (xwgir-require-namespace "Gtk" "3.0")
+              (put 'xwgirButton :xwgir-class '("Gtk" "Button"))
 
+              (xwidget-insert (point-min)  'xwgirButton "xwgir label didnt work..." 200  100)
+              (xwgir-call-method (xwidget-at 1) "set_label" '( "xwgir label worked!"))
+              (define-key (current-local-map) [xwidget-event] 'xwidget-handler-demo-basic))
 
-(defun xwgir-test ()
-  (interactive)
-  (xwgir-require-namespace "Gtk" "3.0")
-  (put 'color-selection :xwgir-class '("Gtk" "ColorSelection"))
-  
-  (xwgir-demo-a-xwgir-button)
-  (xwgir-call-method (xwidget-at 1) "set_label" '( "xwgir set label!"))
-  )
 
 
 ;; tentative testcase:
index 5663617eb4ae4180dc9973e8a302aed29f84a07e..b432823fbca9f46759d1033934de33683ab29874 100644 (file)
@@ -614,7 +614,7 @@ webkit_osr_navigation_policy_decision_requested_callback(WebKitWebView
   return FALSE;
 }
 
-//for gtk3 webkit_osr
+//for gtk3 offscreen rendered widgets
 gboolean
 xwidget_osr_draw_callback (GtkWidget *widget, cairo_t *cr, gpointer data)
 {