emacs-devel
[Top][All Lists]
Advanced

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

Re: Emacs and Gnome Canvas


From: Jan Djärv
Subject: Re: Emacs and Gnome Canvas
Date: Thu, 15 Jul 2010 11:29:29 +0200
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; sv-SE; rv:1.9.2.4) Gecko/20100608 Thunderbird/3.1



Eli Zaretskii skrev 2010-07-15 10.59:
Date: Thu, 15 Jul 2010 10:48:12 +0200
From: Jan Djärv<address@hidden>
CC: address@hidden, address@hidden

The changes that require redisplay would have to notify the Canvas that things
changed.  I think this style is more efficient.

What do you mean by "changes that require redisplay"?  Suppose a
character was inserted or deleted -- would that need to notify the
Canvas?

Yes.

But the inserted character could be in the portion that is not
displayed at all, in which case it does not "require redisplay".  Who
should decide whether redisplay is necessary?  If that's Emacs, then
it should know a lot about the display layout.  If its the Canvas,
then it should know a lot about what portions of the buffer text are
on the screen.

You probably have your text in an CanvasItem that has a GtkTextBuffer. When a character is inserted, you insert in to the GtkTextBuffer. The redisplay part is then handeled internally between GtkTextBuffer, GnomeCanvas(Rich)TextItem and GnomeCanvas.

As I said, it probably relies on having all text in the GtkTextBuffer.


Besides, this mean a thorough redesign of Emacs objects.  Currently,
they are totally unaware of the display engine, and don't request any
redisplays.  They just modify themselves and that's it.

  How about an arbitrary mouse move?

If it resulted in a different highlightning of a link, yes.

Again, how to know that?  Note that some mouse movements perform
complex operations on Emacs objects, like popping up windows and
frames.

Each CanvasItem can have callbacks for mouse move, click, key press and so on. The idea is to have separate CanvasItems for the items that should react to mouse events and then register callbacks for those events. The callback then pops up windows or whatever.

It is a more event driven approach, and that in itself is a big modification for Emacs which is more sequential in nature.

        Jan D.




reply via email to

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