[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: C equivalent for: (face-attribute 'region :background (selected-fram
From: |
YAMAMOTO Mitsuharu |
Subject: |
Re: C equivalent for: (face-attribute 'region :background (selected-frame) 'default) |
Date: |
Wed, 27 Sep 2017 14:58:53 +0900 |
User-agent: |
Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (Shijō) APEL/10.6 Emacs/22.3 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI) |
>>>>> On Tue, 26 Sep 2017 17:24:44 -0700, Keith David Bershatsky
>>>>> <address@hidden> said:
> To erase the floating glyphless fake cursors (with no text), I draw the shape
> of the cursor using the current background color. The current design is to
> get everything into the LSL color vector, and then treat it differently once
> I get over to nsterm.m, w32term.c, or xterm.c depending upon the Emacs build.
> In terms of the active region face, I needed to get the LSL equivalent for
> the region background. Today, I ported from Lisp to C the functions
> `face-attribute` and `face-attribute-merged-with` which gets me the color
> string:
That doesn't sound like a good design. I think you should always use
faces to specify/retrieve colors so we can consistently utilize
existing infrastructure such as frame-wise themes.
Erasing cursors would be possible by calling `draw_glyphs' just as
`expose_area' does (it might be the case that you have to fill with
the frame background color beforehand).
Also, be sure to draw cursors/crosshairs on expose_frame while they
are active. Otherwise they become invisible when we hide and then
show a frame, for example.
YAMAMOTO Mitsuharu
address@hidden