[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
Re: Removing the usage of X structures (or their names) in independent code
Fri, 10 May 2019 23:45:51 -0600
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
AFAIU XImage is a client-side structure holding bitmap/pixmap data.
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.