From: Alex Gramiak <agrambot@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: Removing assumption of unsigned long pixel values for colours
Date: Mon, 06 May 2019 10:29:38 -0600 [thread overview]
Message-ID: <874l67k0lp.fsf@gmail.com> (raw)
In-Reply-To: <83ftprk2nj.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 06 May 2019 18:45:20 +0300")
Eli Zaretskii <eliz@gnu.org> writes:
>> Ideally, but if there is no way to represent a certain precision on a
>> particular platform, and if the size of structures is of concern to you,
>> then would it not make sense to only support the maximum precision
>> possible?
>>
>> I meant something along the lines of:
>>
>> #ifdef <Using a platform needing 64-bits>
>> typedef unsigned long long emacs_pixel;
>> #else
>> typedef unsigned long emacs_pixel;
>> #endif
>
> This will bite us at some point because we currently more or less
> expose the X color values to users.
What do you mean here? Where is the pixel value exposed? I see that
color-values exposes a 16 bpc RGB representation, which the unsigned
long long still supports (as long as it uses 16 bpc with an alpha
channel, which is what I want to use it for).
>> P.S. You mention "platform-independent representation of standard
>> colors", but isn't the unsigned long used differently on different
>> platforms already? NS and X seem to use it as indices to color tables
>> (AFAIU X uses the pixel value to lookup a 48-bpp RGB triplet and store
>> it in an XColor), and w32 uses it to embed a COLORREF.
>
> COLORREF is just the RGB representation of a color, see
>
> https://docs.microsoft.com/en-us/windows/desktop/gdi/colorref
Right, but my point is that AFAIU the unsigned long value is used in a
different manor (embedded rather than used to lookup a value) on the w32
side, so it could be viewed that the representation of colors is already
platform-dependent.
next prev parent reply other threads:[~2019-05-06 16:29 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-04 18:08 Removing assumption of unsigned long pixel values for colours Alex Gramiak
2019-05-04 18:39 ` Eli Zaretskii
2019-05-04 23:04 ` Alex Gramiak
2019-05-05 16:14 ` Eli Zaretskii
2019-05-05 19:35 ` Alex Gramiak
2019-05-06 2:45 ` Eli Zaretskii
2019-05-06 14:13 ` Daniel Pittman
2019-05-06 16:11 ` Alex Gramiak
2019-05-06 16:51 ` Stefan Monnier
2019-05-06 20:03 ` Alex Gramiak
2019-05-06 15:11 ` Alex Gramiak
2019-05-06 15:45 ` Eli Zaretskii
2019-05-06 16:29 ` Alex Gramiak [this message]
2019-05-06 16:54 ` Eli Zaretskii
2019-05-06 17:14 ` Alex Gramiak
2019-05-06 17:39 ` Eli Zaretskii
2019-05-06 18:00 ` Eli Zaretskii
2019-05-06 19:49 ` Alex Gramiak
2019-05-07 2:29 ` Eli Zaretskii
2019-05-06 8:12 ` Alan Third
2019-05-06 9:18 ` mituharu
2019-05-06 15:06 ` 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=874l67k0lp.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).