aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.xwidget42
-rw-r--r--lisp/xwidget-test.el4
-rw-r--r--src/xwidget.c12
3 files changed, 52 insertions, 6 deletions
diff --git a/README.xwidget b/README.xwidget
index 65e5598f7f2..6a6633b4b20 100644
--- a/README.xwidget
+++ b/README.xwidget
@@ -237,11 +237,15 @@ Surprisingly, this just worked!
237I used gtk signals, the implementation for sliders works well! 237I used gtk signals, the implementation for sliders works well!
238 238
239** TODO canvas support 239** TODO canvas support
240heresy an interesting comparision of gtk canvases
241http://live.gnome.org/ProjectRidley/CanvasOverview
240*** goocanvas 242*** goocanvas
241goocanvas is a gtk canvas implemented using cairo. investigate. 243goocanvas is a gtk canvas implemented using cairo. investigate.
242http://developer.gnome.org/goocanvas/unstable/goocanvas-model-view-canvas.html
243it has a MVC model aproach out of the box which is nice.
244 244
245pros:
246- it has a MVC model aproach out of the box which is nice.
247
248http://developer.gnome.org/goocanvas/unstable/goocanvas-model-view-canvas.html
245 249
246export CFLAGS="`pkg-config --cflags goocanvas` -DHAVE_GOOCANVAS" 250export CFLAGS="`pkg-config --cflags goocanvas` -DHAVE_GOOCANVAS"
247export LDFLAGS=`pkg-config --libs goocanvas` 251export LDFLAGS=`pkg-config --libs goocanvas`
@@ -249,9 +253,20 @@ export LDFLAGS=`pkg-config --libs goocanvas`
249make 253make
250 254
251I made a hello goo world xwidget so seems doable. 255I made a hello goo world xwidget so seems doable.
252I wanted to load a SVG which wasnt straightforward. 256I wanted to load a SVG which wasnt immediately straightforward, so I
257tried clutter. but it turns out the exact same strategy could be used
258with goocanvas.
259
253*** clutter 260*** clutter
254maybe clutter can be used as a canvas? seems to have a lot of traction atm. 261maybe clutter can be used as a canvas?
262pros:
263- seems to have a lot of traction atm. many examples
264- potentialy fast and cool vector graphics
265cons:
266- no out of the box MVC support, but seems doable. no worse than the
267 other home brew mvc support I have in xwidgets
268(media-explorer in an application that employes the MVC pattern)
269
255http://www.openismus.com/documents/clutter_tutorial/0.9/docs/tutorial/html/sec-stage-widget.html 270http://www.openismus.com/documents/clutter_tutorial/0.9/docs/tutorial/html/sec-stage-widget.html
256 271
257there is also cool stuff like this: 272there is also cool stuff like this:
@@ -293,3 +308,22 @@ it is an error to reuse xwidgets in several buffers or in the same
293buffer. how do we catch these errors? 308buffer. how do we catch these errors?
294 309
295 310
311** TODO browser xwidget
312although embedding a browser is not my primary concern many are
313interested in this. some suitable browser component needs to be found
314supporting gtk.
315
316*** webkit
317there is a webkit gtk port. there is no obvious mvc support.
318http://live.gnome.org/WebKitGtk
319http://webkitgtk.org/
320
321
322export CFLAGS="`pkg-config --cflags webkit-1.0` -DHAVE_WEBKIT -g"
323export LDFLAGS=`pkg-config --libs webkit-1.0`
324./configure
325make
326
327*** firefox
328http://www-archive.mozilla.org/unix/gtk-embedding.html
329seems to be severly bitrotted
diff --git a/lisp/xwidget-test.el b/lisp/xwidget-test.el
index 2c73f4fd3ce..2e1cb033d8d 100644
--- a/lisp/xwidget-test.el
+++ b/lisp/xwidget-test.el
@@ -56,6 +56,10 @@
56 (xwidget-insert (point-min) 'cairo "canvas" 1000 1000 5) 56 (xwidget-insert (point-min) 'cairo "canvas" 1000 1000 5)
57 (define-key (current-local-map) [xwidget-event] 'xwidget-handler-demo-basic)) 57 (define-key (current-local-map) [xwidget-event] 'xwidget-handler-demo-basic))
58 58
59(xwidget-demo "a-webkit"
60 (xwidget-insert (point-min) 'webkit "webkit" 1000 1000 5)
61 (define-key (current-local-map) [xwidget-event] 'xwidget-handler-demo-basic))
62
59 63
60 64
61(xwidget-demo "basic" 65(xwidget-demo "basic"
diff --git a/src/xwidget.c b/src/xwidget.c
index 870054469c0..14110af7fce 100644
--- a/src/xwidget.c
+++ b/src/xwidget.c
@@ -105,7 +105,7 @@ Lisp_Object Qxwidget_info;
105Lisp_Object Qxwidget_resize_internal; 105Lisp_Object Qxwidget_resize_internal;
106Lisp_Object Qxwidget_send_keyboard_event; 106Lisp_Object Qxwidget_send_keyboard_event;
107 107
108Lisp_Object Qbutton, Qtoggle, Qslider, Qsocket, Qcairo, QCplist; 108Lisp_Object Qbutton, Qtoggle, Qslider, Qsocket, Qcairo, Qwebkit, QCplist;
109 109
110 110
111extern Lisp_Object QCtype; 111extern Lisp_Object QCtype;
@@ -339,6 +339,13 @@ xwidget_init_view (
339 clutter_actor_show (stage); 339 clutter_actor_show (stage);
340#endif 340#endif
341 341
342 } else if (EQ(xww->type, Qwebkit)) {
343#ifdef HAVE_WEBKIT
344 xv->widget = webkit_web_view_new();
345 webkit_web_view_load_uri(xv->widget, "http://www.fsf.org");
346#endif
347
348
342 } else return NULL; 349 } else return NULL;
343 350
344 //widget realization 351 //widget realization
@@ -722,7 +729,8 @@ syms_of_xwidget (void)
722 DEFSYM (Qslider, "slider"); 729 DEFSYM (Qslider, "slider");
723 DEFSYM (Qsocket, "socket"); 730 DEFSYM (Qsocket, "socket");
724 DEFSYM (Qcairo, "cairo"); 731 DEFSYM (Qcairo, "cairo");
725 732 DEFSYM (Qwebkit ,"webkit");
733
726 DEFSYM (QCplist, ":plist"); 734 DEFSYM (QCplist, ":plist");
727 735
728 Fprovide (intern ("xwidget-internal"), Qnil); 736 Fprovide (intern ("xwidget-internal"), Qnil);