[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Emacs canvas support
From: |
Eli Zaretskii |
Subject: |
Re: Emacs canvas support |
Date: |
Sat, 02 May 2020 09:51:24 +0300 |
> From: Po Lu <address@hidden>
> Cc: address@hidden, address@hidden, address@hidden
> Date: Sat, 02 May 2020 07:27:07 +0800
>
> Eli Zaretskii <address@hidden> writes:
>
> > I think the information needs to be recorded in the glyph structure
> > that represents a canvas.
>
> I have a canvas field inside `struct glyph' that points to the canvas
> object.
It is not a good idea to have pointers in the glyph structure. (Yes,
xwidget uses that, but don't take example from that, please.) A glyph
should be self-describing from the metrics POV. If you need
additional information (beyond the basic metrics), use the example of
images and faces: we cache the objects and record their cache ID in
the glyph.
> What I'm trying to do right now is track the position of the
> canvases on-screen, so I can draw them separately from redisplay.
My suggestion is not to "draw separately from redisplay". I don't see
how this could work, unless you also modify extensively how the second
phase of redisplay, the one entered via update_frame and
update_window, works.