emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: xwidget branch


From: joakim
Subject: Re: xwidget branch
Date: Wed, 30 Jun 2010 15:09:35 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Jan Djärv <address@hidden> writes:

> This sounds like fun.  How do you handle multiple windows, that is the
> same buffer with widgets displayed in different frames/windows?

There are some notes in the readme. I paste it below so we can discuss it
and improve it. This is as you might imagine the really tricky part.


> Does the widgets always flow with the text or can you anchor them at
> fixed positions?  I was thinking of per window toolbars.

They work like images. It ought to be possible to bind them to a margin
or something like images, but I havent tested this. Also like images
they are not tied to a window but to a buffer. OTOH xwidgets have,
unlike images, their own identity, and I have been thinking of letting
an xwidget be able to replace an entire window, etc.


The readme follows:

* Xwidgets

This 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 protocoll.

There is a demo file called xwidget-test.el which shows some of the
possibilities. There are some screnshots at the emacswiki.

Currently its possible to insert buttons, sliders, and xembed widgets
in the buffer. It works similar to the support for images in Emacs.

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. Also, xwidgets exists in only one copy,
where a plain image can be shown in several windows. The xwidget code
tries to handle this by essentialy making a screen capture of the
widget and displaying those in the non-active windows, and the real
widget in the active window. This doesnt currently work for xembed
widgets.

The current state is that one window, one frame, showing many xwidgets
is a nice demo.


TODO

- Examine using XComposite rather than GTK off-screen rendering. This
  would make xembed widgets work much better.

- make the keyboard event code propagation code work.

- remove the special-case for when the minibuffer is
  active. Special-casing will never work properly.

- disable cursor drawing on top of an active xwidget

- figure out what to do with the multiple frames case

- improve the xwidgets programming interface so its less of
  hand-waving affair

- more documentation



>       Jan D.
>
>
> address@hidden skrev 2010-06-23 13.35:
>> I created a new "xwidget" branch. It is a very experimental branch that
>> allows gtk widgets to be embedded in an emacs buffer, much like images.
>>
>> It is, for instance, possible to embedd a browser in an Emacs window.
>>
>> See some screenshots here:
>>
>> http://www.emacswiki.org/emacs/EmacsXembed>
>> Soem screenshots of Daivd Hackneys work to embed the usbl browser:
>>
>> http://www.haxney.org/2009/08/its-alive.html>
>> There is also a README in the root of the branch.
>>
>> Please note that the code really is experimental and that there are a
>> number of hard problems still unsolved. That said, I still find it very
>> cool to see gtk buttons moving in an Emacs window, and even Emacs
>> embedded in Emacs :)
>>
-- 
Joakim Verona



reply via email to

[Prev in Thread] Current Thread [Next in Thread]