From dea4006fb3bbaa32c68e17e3a7385d1063d6fabc Mon Sep 17 00:00:00 2001 From: Joakim Verona Date: Wed, 27 Mar 2013 23:36:32 +0100 Subject: [PATCH] more robust xwgir button demo --- lisp/xwidget-test.el | 21 ++++++++------------- src/xwidget.c | 2 +- 2 files changed, 9 insertions(+), 14 deletions(-) diff --git a/lisp/xwidget-test.el b/lisp/xwidget-test.el index 5e3c309967f..7045b72a3ac 100644 --- a/lisp/xwidget-test.el +++ b/lisp/xwidget-test.el @@ -77,24 +77,19 @@ (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: diff --git a/src/xwidget.c b/src/xwidget.c index 5663617eb4a..b432823fbca 100644 --- a/src/xwidget.c +++ b/src/xwidget.c @@ -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) { -- 2.39.2