From: Alex Gramiak <agrambot@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: Removing the usage of X structures (or their names) in independent code
Date: Fri, 10 May 2019 23:45:51 -0600 [thread overview]
Message-ID: <87d0kpilww.fsf@gmail.com> (raw)
In-Reply-To: <8336lnh7rw.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 09 May 2019 20:12:03 +0300")
Eli Zaretskii <eliz@gnu.org> 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
next prev parent reply other threads:[~2019-05-11 5:45 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-09 4:28 Removing the usage of X structures (or their names) in independent code Alex Gramiak
2019-05-09 6:06 ` Eli Zaretskii
2019-05-09 16:26 ` Alex Gramiak
2019-05-09 17:12 ` Eli Zaretskii
2019-05-11 5:45 ` Alex Gramiak [this message]
2019-05-13 16:15 ` Alex Gramiak
2019-05-13 17:40 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87d0kpilww.fsf@gmail.com \
--to=agrambot@gmail.com \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).