From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Keith David Bershatsky Newsgroups: gmane.emacs.devel Subject: C equivalent for: (face-attribute 'region :background (selected-frame) 'default) Date: Mon, 25 Sep 2017 21:38:07 -0700 Message-ID: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Trace: blaine.gmane.org 1506400748 971 195.159.176.226 (26 Sep 2017 04:39:08 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 26 Sep 2017 04:39:08 +0000 (UTC) To: Emacs Devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Sep 26 06:39:01 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dwhe8-0007wQ-NW for ged-emacs-devel@m.gmane.org; Tue, 26 Sep 2017 06:39:01 +0200 Original-Received: from localhost ([::1]:45592 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dwheC-0000H8-UI for ged-emacs-devel@m.gmane.org; Tue, 26 Sep 2017 00:39:04 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47997) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dwhdb-0000H0-OB for emacs-devel@gnu.org; Tue, 26 Sep 2017 00:38:28 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dwhdW-0002lU-SF for emacs-devel@gnu.org; Tue, 26 Sep 2017 00:38:27 -0400 Original-Received: from gateway23.websitewelcome.com ([192.185.49.177]:31618) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dwhdW-0002gG-K6 for emacs-devel@gnu.org; Tue, 26 Sep 2017 00:38:22 -0400 Original-Received: from cm16.websitewelcome.com (cm16.websitewelcome.com [100.42.49.19]) by gateway23.websitewelcome.com (Postfix) with ESMTP id 6E1E778F8 for ; Mon, 25 Sep 2017 23:38:09 -0500 (CDT) Original-Received: from gator3053.hostgator.com ([50.87.144.69]) by cmsmtp with SMTP id whd5dQbmSRtUXwhd5djAZQ; Mon, 25 Sep 2017 23:37:56 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lawlist.com ; s=default; h=Content-Type:MIME-Version:Subject:To:From:Message-ID:Date: Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=Vo8UJ1m5FO85m5EKx6adV4qkWUwA49VSRNkQtAMGhtI=; b=T/k1/x9TLDvCEqf+5lKMXCAkhL TUz4F5mLEDjaGIc2vHOpKKDMJ0gA3ofS1cLD4cCuM0Uf8p9/VngCe9U9inKiCWiFtDaaa5iVG3Czg LfO5QmCaO7QH+6kHw0IwTJbD2xxuoSMWsFiK/NpqTgoUKkU2XccQcPsROJ3FUtw6zujOGwKpxZ1yk SHR1i6rnX2rEqKF2DslTkwHVe9vzagMDtNxPHyBeyOy3S76q0qBCCG5coWNr6cw4qoXPdoNiMUtjJ LrjNi7Y5wfmqEZe9Ic6GnaNy/kQHBqLzZ7FBo4jAAA6B4c4Sq4jHRESYR0p5F4vTjxELYwUbfdIBc V2C9OOwA==; Original-Received: from cpe-45-48-239-195.socal.res.rr.com ([45.48.239.195]:55479 helo=server.private) by gator3053.hostgator.com with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.87) (envelope-from ) id 1dwhdI-000jkf-8F for emacs-devel@gnu.org; Mon, 25 Sep 2017 23:38:08 -0500 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator3053.hostgator.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lawlist.com X-BWhitelist: no X-Source-IP: 45.48.239.195 X-Exim-ID: 1dwhdI-000jkf-8F X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: cpe-45-48-239-195.socal.res.rr.com (server.private) [45.48.239.195]:55479 X-Source-Auth: lawlist X-Email-Count: 1 X-Source-Cap: bGF3bGlzdDtsYXdsaXN0O2dhdG9yMzA1My5ob3N0Z2F0b3IuY29t X-Local-Domain: yes X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 192.185.49.177 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:218799 Archived-At: 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. Thanks, Keith