[Top][All Lists]

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

Re: Can we use FRAME_RIF to return a Lisp_Object result?

From: Keith David Bershatsky
Subject: Re: Can we use FRAME_RIF to return a Lisp_Object result?
Date: Tue, 31 Oct 2017 12:59:02 -0700

Thank you, Eli.

Prior to just a few minutes ago when I read your comments, I had been unaware 
that it was possible to obtain the RGB for the default foreground/background 
(which might be remapped on a buffer local basis) from within xdisp.c absent 
using platform-dependent functions.  That misunderstanding was based (in large 
part) upon a layman's reading of the code looking for keywords such as "red", 
"green", "blue", and "RGB".  Because I found keywords of that nature in the 
platform-dependent areas of the code (nsterm.m, w32term.c, and xterm.c), I made 
the erroneous assumption mentioned above.

I look forward to using your examples and eliminating the erroneous 
platform-dependent implementations.

As always, your help is greatly appreciated!



DATE:  [10-31-2017 12:38:01] <31 Oct 2017 21:38:01 +0200>
FROM:  Eli Zaretskii <address@hidden>
> * * *
> I don't understand why you need a platform-dependent implementation
> for this.  Given the face (obtained using FACE_FROM_ID as above), you
> have its Lisp attributes in face->lface, and the foreground and
> background pixels are then at lface[LFACE_FOREGROUND_INDEX] and
> lface[LFACE_BACKGROUND_INDEX] respectively.  These are XColor values,
> so getting the RGB components from them is trivial.
> For frame's default face, you can do this even simpler: by using
> Am I missing something?

reply via email to

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