unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: joakim@verona.se
To: "Jan Djärv" <jan.h.d@swipnet.se>
Cc: Emacs development discussions <emacs-devel@gnu.org>
Subject: Re: xwidget branch
Date: Wed, 30 Jun 2010 15:09:35 +0200	[thread overview]
Message-ID: <m339w4is4w.fsf@verona.se> (raw)
In-Reply-To: <4C2B309B.8000402@swipnet.se> ("Jan Djärv"'s message of "Wed, 30 Jun 2010 13:55:07 +0200")

Jan Djärv <jan.h.d@swipnet.se> 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.
>
>
> joakim@verona.se 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	other threads:[~2010-06-30 13:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-23 11:35 xwidget branch joakim
2010-06-30 11:55 ` Jan Djärv
2010-06-30 13:09   ` joakim [this message]
2010-07-01 15:52     ` Jan Djärv
2010-07-01 19:28       ` joakim
2010-07-02  8:40         ` Jan Djärv

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m339w4is4w.fsf@verona.se \
    --to=joakim@verona.se \
    --cc=emacs-devel@gnu.org \
    --cc=jan.h.d@swipnet.se \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).