tech note

プログラミング関係のことを載せていくよ。

問題等ありましたらこちらにメール下さい
tyru.exe (at) gmail.com

別館
別館2

Aug 23

Emacs XWidget Branch (Joakim Verona)

Emacs Xwidgets is an experimental branch to enable embedding of GTK+ widgets inside an Emacs window. The Emacs abstraction is called an Xwidget, for eXternal widget, and also in reference to the XEmbed protocol.

Currently its possible to insert buttons, sliders, WebKit browsers, and XEmbed sockets in the buffer. It works similar to the support for images in Emacs. Adding more types of widgets should be fairly straightforward, but will require adapter code for each type.

A difference from images is that xwidgets live their own life. You create them with an API, get a reference, and tie them to a particular buffer with a display spec.

Each xwidget can have several views. In MVC terms, an xwidget is the model, and an xwidget-view is a view of the xwidget in a particular Emacs window.

The xwidget code attempts to keep the visual appearance of the views in sync with through an Observer pattern implementation.

GNU Hackers Meeting in Paris, 2011 (via naota344)

(via naota344)