[Top][All Lists]

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

C equivalent for: (face-attribute 'region :background (selected-frame) '

From: Keith David Bershatsky
Subject: C equivalent for: (face-attribute 'region :background (selected-frame) 'default)
Date: Mon, 25 Sep 2017 21:38:07 -0700

I am working on implementing my own feature requests to draw crosshairs 
(#17684) using multiple fake cursors (#22873), and I am trying to quickly 
convert (in C) the :background of the region face into a string -- e.g., "blue" 
or "#0000FF".  My goal is to do all of this in C, and I would like to avoid 
porting (rewriting) several Lisp functions to give me the result of:

    (face-attribute 'region :background (selected-frame) 'default)

Is there anything built-in into the Emacs C code base that already does this, 
or *almost* does this ...?

BACKGROUND:  I already have a function written in C that converts a color 
string (e.g., "blue" or "#0000FF") into an LSL color vector, which is used by 
the new multiple fake cursors (#22873) feature.  I erase glyphless (floating) 
fake cursors by drawing new ones that match the background face.  When a region 
is active, I need the LSL color vector of the region :background.



reply via email to

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