emacs-devel
[Top][All Lists]
Advanced

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

Re: Rethinking the design of xwidgets


From: Stefan Monnier
Subject: Re: Rethinking the design of xwidgets
Date: Wed, 14 Oct 2020 13:01:14 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

>> Wouldn't it be fun to be able to free form draw inside emacs? :)
> It's a long-time feature request.  It is non-trivial to implement,
> because this must be somehow coordinated with the display engine, so
> it doesn't overwrite some of the drawing.  Work in this area would be
> very welcome.

Indeed, it would be highly welcome.
I can see 2 ways to integrate it into Emacs:

- do something like the SVG images.  To the extent we already have SVG
  images, the potential gains here are gains in performance, mostly, but
  there could also be potential gains in being able to easily find the
  "object" closest to a click.

- offer a "transparent" canvas that is drawn *over* the normal text.
  I.e. have the normal redisplay draw a window's content into a pixmap
  rather than onto the glass, then draw the canvas into another pixmap,
  then combine the two pixmaps onto the glass.

To be most useful, the second option would probably want to have some
kind of access to information about the text that was drawn by the
normal redisplay (e.g. maybe something similar to `posn-at-x-y` and
`posn-at-point`), so you can move objects in the canvas according to the
position of particular text elements in the buffer.


        Stefan




reply via email to

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