diff options
| author | Joakim Verona | 2011-06-28 02:30:32 +0200 |
|---|---|---|
| committer | Joakim Verona | 2011-06-28 02:30:32 +0200 |
| commit | 65b7d4f0f95b7611946962ed8a06ecf52719fdb5 (patch) | |
| tree | ea44d23a7bb4adfc4b72267fc542019bbdc4632c /README.xwidget | |
| parent | 78309a2cbf04a9fb4b82a35d3c912dc8baedd1e6 (diff) | |
| download | emacs-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.xwidget | 69 |
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 |
| 172 | something like this: | 172 | the 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 | |||
| 177 | the 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 | 191 | stuff 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 |
| 189 | There should be user docs, and xwidget contributor docs. The current README | 198 | There should be user docs, and xwidget contributor docs. The current README |
| @@ -228,5 +237,59 @@ Surprisingly, this just worked! | |||
| 228 | I used gtk signals, the implementation for sliders works well! | 237 | I used gtk signals, the implementation for sliders works well! |
| 229 | 238 | ||
| 230 | ** TODO canvas support | 239 | ** TODO canvas support |
| 231 | goocanvas is a gtk canvas implemented with cairo. investigate. | 240 | *** goocanvas |
| 241 | goocanvas is a gtk canvas implemented using cairo. investigate. | ||
| 232 | http://developer.gnome.org/goocanvas/unstable/goocanvas-model-view-canvas.html | 242 | http://developer.gnome.org/goocanvas/unstable/goocanvas-model-view-canvas.html |
| 243 | it has a MVC model aproach out of the box which is nice. | ||
| 244 | |||
| 245 | |||
| 246 | export CFLAGS="`pkg-config --cflags goocanvas` -DHAVE_GOOCANVAS" | ||
| 247 | export LDFLAGS=`pkg-config --libs goocanvas` | ||
| 248 | ./configure | ||
| 249 | make | ||
| 250 | |||
| 251 | I made a hello goo world xwidget so seems doable. | ||
| 252 | I wanted to load a SVG which wasnt straightforward. | ||
| 253 | *** clutter | ||
| 254 | maybe clutter can be used as a canvas? seems to have a lot of traction atm. | ||
| 255 | http://www.openismus.com/documents/clutter_tutorial/0.9/docs/tutorial/html/sec-stage-widget.html | ||
| 256 | |||
| 257 | there is also cool stuff like this: | ||
| 258 | http://gitorious.org/webkit-clutter/webkit-clutter which is an webkit actor for | ||
| 259 | clutter! hmmmmm. | ||
| 260 | |||
| 261 | I want to render svg. aparently: | ||
| 262 | librsvg rsvg_handle_render_cairo(h, cr); | ||
| 263 | ClutterCairoTexture | ||
| 264 | Clutter | ||
| 265 | |||
| 266 | export CFLAGS="`pkg-config --cflags clutter-gtk-1.0` -DHAVE_CLUTTER" | ||
| 267 | export LDFLAGS=`pkg-config --libs clutter-gtk-1.0` | ||
| 268 | ./configure | ||
| 269 | make | ||
| 270 | |||
| 271 | compiles but I get: | ||
| 272 | Gtk-ERROR **: GTK+ 2.x symbols detected. Using GTK+ 2.x and GTK+ 3 in | ||
| 273 | the same process is not supported | ||
| 274 | |||
| 275 | export CFLAGS="`pkg-config --cflags clutter-gtk-0.10` -DHAVE_CLUTTER" | ||
| 276 | export LDFLAGS=`pkg-config --libs clutter-gtk-0.10` | ||
| 277 | ./configure | ||
| 278 | make | ||
| 279 | |||
| 280 | |||
| 281 | ** TODO mvc code crashes after a while | ||
| 282 | seemingly only when compiling with optimizations | ||
| 283 | |||
| 284 | ** TODO delete xwidgets belonging to an emacs window | ||
| 285 | when it closes | ||
| 286 | ** TODO xwidget-resize-at | ||
| 287 | currently it rewrites the display spec. then it resizes the xwidget | ||
| 288 | views. maybe rewriting the spec should be sufficient, and changes to | ||
| 289 | it be picked up during redisplay somehow. | ||
| 290 | |||
| 291 | ** TODO display spec validation | ||
| 292 | it is an error to reuse xwidgets in several buffers or in the same | ||
| 293 | buffer. how do we catch these errors? | ||
| 294 | |||
| 295 | |||