aboutsummaryrefslogtreecommitdiffstats
path: root/README.xwidget
diff options
context:
space:
mode:
authorJoakim Verona2011-06-28 02:30:32 +0200
committerJoakim Verona2011-06-28 02:30:32 +0200
commit65b7d4f0f95b7611946962ed8a06ecf52719fdb5 (patch)
treeea44d23a7bb4adfc4b72267fc542019bbdc4632c /README.xwidget
parent78309a2cbf04a9fb4b82a35d3c912dc8baedd1e6 (diff)
downloademacs-65b7d4f0f95b7611946962ed8a06ecf52719fdb5.tar.gz
emacs-65b7d4f0f95b7611946962ed8a06ecf52719fdb5.zip
demo of a clutter based canvas xwidget that renders a svg file
Diffstat (limited to 'README.xwidget')
-rw-r--r--README.xwidget69
1 files changed, 66 insertions, 3 deletions
diff --git a/README.xwidget b/README.xwidget
index 77b98d5fd83..65e5598f7f2 100644
--- a/README.xwidget
+++ b/README.xwidget
@@ -169,7 +169,12 @@ it is, except symbols is used instead of integers.
169 169
170 170
171*** TODO better lisp based structure for xwidgets 171*** TODO better lisp based structure for xwidgets
172something like this: 172the lisp interface woud be like this:
173- xwidget-create returns an xwidget object, similar to a process
174 object. this id is used when creating the display spec(instead of
175 the user defined id now used)
176
177the data structure would be something like this:
173- a "process" like aproach to create the xwidgets. xwidgets are 178- a "process" like aproach to create the xwidgets. xwidgets are
174 coupled to buffers, somewhat like processes, except a buffer can 179 coupled to buffers, somewhat like processes, except a buffer can
175 hold several xwidgets 180 hold several xwidgets
@@ -183,7 +188,11 @@ there are some things that arent clear:
183 be better to store them window locally rather than in an assoc 188 be better to store them window locally rather than in an assoc
184 coupled to the xwidget model 189 coupled to the xwidget model
185 190
186 191stuff that needs to work:
192- do something for all views of a xwidget(resize, value change)
193- do something for all xw-views in an emacs window(deletion etc)
194- lookup xw-view for xwidget in emacs window(during redisplay)
195(- do something for all siblings of a xw-view. not atm)
187 196
188** TODO more documentation 197** TODO more documentation
189There should be user docs, and xwidget contributor docs. The current README 198There should be user docs, and xwidget contributor docs. The current README
@@ -228,5 +237,59 @@ Surprisingly, this just worked!
228I used gtk signals, the implementation for sliders works well! 237I used gtk signals, the implementation for sliders works well!
229 238
230** TODO canvas support 239** TODO canvas support
231goocanvas is a gtk canvas implemented with cairo. investigate. 240*** goocanvas
241goocanvas is a gtk canvas implemented using cairo. investigate.
232http://developer.gnome.org/goocanvas/unstable/goocanvas-model-view-canvas.html 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
245
246export CFLAGS="`pkg-config --cflags goocanvas` -DHAVE_GOOCANVAS"
247export LDFLAGS=`pkg-config --libs goocanvas`
248./configure
249make
250
251I made a hello goo world xwidget so seems doable.
252I wanted to load a SVG which wasnt straightforward.
253*** clutter
254maybe clutter can be used as a canvas? seems to have a lot of traction atm.
255http://www.openismus.com/documents/clutter_tutorial/0.9/docs/tutorial/html/sec-stage-widget.html
256
257there is also cool stuff like this:
258http://gitorious.org/webkit-clutter/webkit-clutter which is an webkit actor for
259clutter! hmmmmm.
260
261I want to render svg. aparently:
262 librsvg rsvg_handle_render_cairo(h, cr);
263 ClutterCairoTexture
264 Clutter
265
266export CFLAGS="`pkg-config --cflags clutter-gtk-1.0` -DHAVE_CLUTTER"
267export LDFLAGS=`pkg-config --libs clutter-gtk-1.0`
268./configure
269make
270
271compiles but I get:
272Gtk-ERROR **: GTK+ 2.x symbols detected. Using GTK+ 2.x and GTK+ 3 in
273the same process is not supported
274
275export CFLAGS="`pkg-config --cflags clutter-gtk-0.10` -DHAVE_CLUTTER"
276export LDFLAGS=`pkg-config --libs clutter-gtk-0.10`
277./configure
278make
279
280
281** TODO mvc code crashes after a while
282seemingly only when compiling with optimizations
283
284** TODO delete xwidgets belonging to an emacs window
285when it closes
286** TODO xwidget-resize-at
287currently it rewrites the display spec. then it resizes the xwidget
288views. maybe rewriting the spec should be sufficient, and changes to
289it be picked up during redisplay somehow.
290
291** TODO display spec validation
292it is an error to reuse xwidgets in several buffers or in the same
293buffer. how do we catch these errors?
294
295