aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorJoakim Verona2013-04-02 08:22:38 +0200
committerJoakim Verona2013-04-02 08:22:38 +0200
commit86dc02fe08b1a2d26d380ba67d6a165ead70bc79 (patch)
treedb3ea8c2bbc727417b1fca6cfb24bd7119f48b23 /lisp
parentdea4006fb3bbaa32c68e17e3a7385d1063d6fabc (diff)
downloademacs-86dc02fe08b1a2d26d380ba67d6a165ead70bc79.tar.gz
emacs-86dc02fe08b1a2d26d380ba67d6a165ead70bc79.zip
some improvements to the xwgir system. you can now create webkit with xwgir. OTOH, event propagation still only works for webkit, not for simpler things like buttons
Diffstat (limited to 'lisp')
-rw-r--r--lisp/xwidget-test.el23
1 files changed, 18 insertions, 5 deletions
diff --git a/lisp/xwidget-test.el b/lisp/xwidget-test.el
index 7045b72a3ac..a8c280352ad 100644
--- a/lisp/xwidget-test.el
+++ b/lisp/xwidget-test.el
@@ -86,10 +86,24 @@
86 (xwgir-require-namespace "Gtk" "3.0") 86 (xwgir-require-namespace "Gtk" "3.0")
87 (put 'xwgirButton :xwgir-class '("Gtk" "Button")) 87 (put 'xwgirButton :xwgir-class '("Gtk" "Button"))
88 88
89 (xwidget-insert (point-min) 'xwgirButton "xwgir label didnt work..." 200 100) 89 (xwidget-insert (point-min) 'xwgirButton "xwgir label didnt work..." 700 700)
90 (xwgir-call-method (xwidget-at 1) "set_label" '( "xwgir label worked!")) 90 (xwgir-call-method (xwidget-at 1) "set_label" '( "xwgir label worked!"))
91 (define-key (current-local-map) [xwidget-event] 'xwidget-handler-demo-basic)) 91 (define-key (current-local-map) [xwidget-event] 'xwidget-handler-demo-basic))
92 92
93(xwidget-demo "a-xwgir-check-button"
94 (xwgir-require-namespace "Gtk" "3.0")
95 (put 'xwgirCheckButton :xwgir-class '("Gtk" "CheckButton"))
96
97 (xwidget-insert (point-min) 'xwgirCheckButton "xwgir label didnt work..." 700 700)
98 (define-key (current-local-map) [xwidget-event] 'xwidget-handler-demo-basic))
99
100(xwidget-demo "a-xwgir-webkit"
101 (xwgir-require-namespace "WebKit" "3.0")
102 (put 'xwgirWebkit :xwgir-class '("WebKit" "WebView"))
103
104 (xwidget-insert (point-min) 'xwgirWebkit "xwgir webkit..." 700 700)
105 (define-key (current-local-map) [xwidget-event] 'xwidget-handler-demo-basic))
106
93 107
94 108
95;; tentative testcase: 109;; tentative testcase:
@@ -132,13 +146,12 @@
132;try the openvrml: 146;try the openvrml:
133;/usr/libexec/openvrml-xembed 0 ~/Desktop/HelloWorld.wrl 147;/usr/libexec/openvrml-xembed 0 ~/Desktop/HelloWorld.wrl
134 148
135
136(defun xwidget-handler-demo-basic () 149(defun xwidget-handler-demo-basic ()
137 (interactive) 150 (interactive)
138 (message "stuff happened to xwidget %S" last-input-event) 151 (message "stuff happened to xwidget %S" last-input-event)
139 (let* 152 (let*
140 ((xwidget-event-type (nth 2 last-input-event)) 153 ((xwidget-event-type (nth 1 last-input-event))
141 (xwidget (nth 1 last-input-event))) 154 (xwidget (nth 2 last-input-event)))
142 (cond ( (eq xwidget-event-type 'xembed-ready) 155 (cond ( (eq xwidget-event-type 'xembed-ready)
143 (let* 156 (let*
144 ((xembed-id (nth 3 last-input-event))) 157 ((xembed-id (nth 3 last-input-event)))
@@ -146,7 +159,7 @@
146 ;;will start emacs/uzbl in a xembed socket when its ready 159 ;;will start emacs/uzbl in a xembed socket when its ready
147 (cond 160 (cond
148 (t;;(eq 3 xwidget) 161 (t;;(eq 3 xwidget)
149 (start-process "xembed" "*xembed*" (format "%s/src/emacs" default-directory) "-q" "--parent-id" (number-to-string xembed-id) ) ) 162 (start-process "xembed" "*xembed*" "/var/lib/jenkins/jobs/emacs-xwidgets-automerge/workspace/src/emacs" "-q" "--parent-id" (number-to-string xembed-id) ) )
150;; ((eq 5 xwidget-id) 163;; ((eq 5 xwidget-id)
151;; (start-process "xembed2" "*xembed2*" "uzbl-core" "-s" (number-to-string xembed-id) "http://www.fsf.org" ) 164;; (start-process "xembed2" "*xembed2*" "uzbl-core" "-s" (number-to-string xembed-id) "http://www.fsf.org" )
152 ) 165 )