From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Alex Gramiak Newsgroups: gmane.emacs.devel Subject: Re: Removing assumption of unsigned long pixel values for colours Date: Mon, 06 May 2019 11:14:41 -0600 Message-ID: <87zhnzijy6.fsf@gmail.com> References: <87v9yqjdnh.fsf@gmail.com> <83a7g2kqsi.fsf@gnu.org> <87lfzlkeic.fsf@gmail.com> <83zho0khdu.fsf@gnu.org> <87h8a8k84a.fsf@gmail.com> <83pnowjo63.fsf@gnu.org> <87d0kvk489.fsf@gmail.com> <83ftprk2nj.fsf@gnu.org> <874l67k0lp.fsf@gmail.com> <83d0kvjzfg.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="203911"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon May 06 19:16:09 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hNhDk-000quY-Oq for ged-emacs-devel@m.gmane.org; Mon, 06 May 2019 19:16:08 +0200 Original-Received: from localhost ([127.0.0.1]:59583 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hNhDj-0003PT-NU for ged-emacs-devel@m.gmane.org; Mon, 06 May 2019 13:16:07 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:32925) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hNhCe-0003Nw-QR for emacs-devel@gnu.org; Mon, 06 May 2019 13:15:01 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hNhCd-0001zd-TL for emacs-devel@gnu.org; Mon, 06 May 2019 13:15:00 -0400 Original-Received: from mail-pf1-x42a.google.com ([2607:f8b0:4864:20::42a]:38909) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hNhCd-0001xS-Lr; Mon, 06 May 2019 13:14:59 -0400 Original-Received: by mail-pf1-x42a.google.com with SMTP id 10so7111841pfo.5; Mon, 06 May 2019 10:14:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=szmjOxr4ZsvT6M4kBp6R/BrjhlD5yv1wN8q6UX5EoxQ=; b=B4s2Hc9zQnbc90jzPOLFV6Nhp7NfFRj7Iuiq4TN/XTDeouumU2IuDixUE4sUA9CnU+ e1L+KdM4VBNqmLKLoIrOeAyze2zVFLZadayb/l1k9+bKToJy39HAolLc6TLll8tkCFwp G4lqeTI75gmIizX+hC2a6AbIlfiyn71ds+oUbeYAI3wcftdPkEiquosBQ/kaAMoFIiI7 ZdFU+p3Rf1ZmKYJX4WyI+EXARWpRDjc4ak0hXtTYt9mKfaoTHHnZt1bJMzgAL8hdgfGZ WCPYxX8wNU4FcQsfUyvJ8GQnDgiQHHwup7yIjQ549nNQbyLtSD27+rxJngpzckFsbVcN xfEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=szmjOxr4ZsvT6M4kBp6R/BrjhlD5yv1wN8q6UX5EoxQ=; b=uCkvgO+/bhFSR/evIE6o+p77N0g1f/WqwlK4Q2r3itl++m/0WBVeITPJEBqbyJVT6+ vKB/cqYfMrIxtMBqWqQlUejSQe+kC1pahgHrmETu2dgmHbFTZ8DcUGnPJ8cDvaVnJjY9 k2L12URpmpI4fVRlTFcfheeePJH48xEgZVuXoe35ZojXlBaHSL2QhpmVDD/9xnl1nS3N miC0iDPUrb5CcFyz38sLAmxFaJUsq536x2RVSG26CKE/GAu+aM10c9TQa7B1vegekFNW WOE8yd3iUnmICM9R+f+Xm8gCKzvx+yiEoLp42R8Jw/RHbHnPLmwTGF8i/s7yl77TFEuh yKcg== X-Gm-Message-State: APjAAAV5mLDA1v9JeFqu+/QWnv4IhBN8klzMlRytMbxsHoERI+YBfyho 13pQvun4jCgbTADRFgzKRHXfkC1p X-Google-Smtp-Source: APXvYqxE5LEs6aAbNJi+a19r/h/ssttwWMOikqMcaB2HopnEwwTqeKcd9U/Tl5tlZH+yk638tx9gKA== X-Received: by 2002:a65:64d9:: with SMTP id t25mr24019657pgv.130.1557162898070; Mon, 06 May 2019 10:14:58 -0700 (PDT) Original-Received: from lylat ([2604:3d09:e37f:1500:1a72:4878:e793:7302]) by smtp.gmail.com with ESMTPSA id 19sm28158044pfs.104.2019.05.06.10.14.56 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 06 May 2019 10:14:57 -0700 (PDT) In-Reply-To: <83d0kvjzfg.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 06 May 2019 19:54:59 +0300") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::42a X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:236202 Archived-At: Eli Zaretskii writes: >> From: Alex Gramiak >> Cc: emacs-devel@gnu.org >> Date: Mon, 06 May 2019 10:29:38 -0600 >> >> > 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. > > OK, but that just says that each platform already performs the mapping > you wanted to avoid. What makes your back-end special that it needs > to avoid this? My initial reasoning was the time argument, which turned out to be wrong. Now I want to avoid the lookup table approach and try to just embed the GdkRGBA into a pixel value, but unsigned long is not necessarily wide enough to support this. Should I take the lack of response to the other point as an OK for using the emacs_pixel typedef approach? An unsigned long long would be enough to fit the 16bpc ARGB value in.