emacs-devel
[Top][All Lists]
Advanced

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

Re: Removing the usage of X structures (or their names) in independent c


From: Alex Gramiak
Subject: Re: Removing the usage of X structures (or their names) in independent code
Date: Fri, 10 May 2019 23:45:51 -0600
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux)

Eli Zaretskii <address@hidden> writes:

> But that's not needed if you use typedef as above for X.  And for
> non-X platforms we already have a definition of XColor, which just
> needs to be renamed to EColor.

I meant if one were to use a non-XColor-like struct even in the X case, but
there's no reason for that now.

>> > For more complex situations, see what we do with 'struct font' and
>> > 'struct FOOfont' for font backend FOO.
>> 
>> Could you point me to somewhere specific for this? I'm unsure to what
>> you're referring.
>
> For example, in ftfont.h:
> [..]

Thanks, that's good to know for the future.


I posted a patch series to the scratch/X_Typedefs branch. WDYT?

The first few patches are straightforward, but the XChar2b patch is a
bit more involved.

Regarding the last patch, I don't like the names Emacs_Pix_Container
(XImagePtr) and Emacs_Pix_Context (XImagePtr_or_DC), but I'm lost as to
better names.

AFAIU XImage is a client-side structure holding bitmap/pixmap data[1].
My first thought was "Emacs_Pixmap_Container", but that would be easily
confused for a container for Emacs_Pixmap. At least the abbreviation
dissociates the two structures a bit.

[1] https://tronche.com/gui/x/xlib/graphics/images.html



reply via email to

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