From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: YAMAMOTO Mitsuharu Newsgroups: gmane.emacs.devel Subject: Re: C equivalent for: (face-attribute 'region :background (selected-frame) 'default) Date: Thu, 05 Oct 2017 16:11:44 +0900 Organization: Faculty of Science, Chiba University Message-ID: References: <83mv56xf9o.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Trace: blaine.gmane.org 1507187567 9865 195.159.176.226 (5 Oct 2017 07:12:47 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 5 Oct 2017 07:12:47 +0000 (UTC) User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.6 Emacs/22.3 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI) Cc: Keith David Bershatsky , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Oct 05 09:12:42 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 1e00Kn-0001ut-Rp for ged-emacs-devel@m.gmane.org; Thu, 05 Oct 2017 09:12:41 +0200 Original-Received: from localhost ([::1]:38088 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e00Kv-0001QO-8i for ged-emacs-devel@m.gmane.org; Thu, 05 Oct 2017 03:12:49 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52132) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e00K7-0001Q7-O4 for emacs-devel@gnu.org; Thu, 05 Oct 2017 03:12:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e00K1-0006fB-QL for emacs-devel@gnu.org; Thu, 05 Oct 2017 03:11:59 -0400 Original-Received: from mathmail.math.s.chiba-u.ac.jp ([133.82.132.2]:51010) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e00Jx-0006Yi-0e; Thu, 05 Oct 2017 03:11:49 -0400 Original-Received: from fermat1.math.s.chiba-u.ac.jp (fermat [192.168.32.10]) by mathmail.math.s.chiba-u.ac.jp (Postfix) with ESMTP id 0F896F08F8; Thu, 5 Oct 2017 16:11:44 +0900 (JST) (envelope-from mituharu@math.s.chiba-u.ac.jp) In-Reply-To: <83mv56xf9o.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 133.82.132.2 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:219109 Archived-At: >>>>> On Thu, 05 Oct 2017 09:47:15 +0300, Eli Zaretskii said: >> Date: Wed, 04 Oct 2017 17:24:50 -0700 From: Keith David Bershatsky >> Cc: emacs-devel@gnu.org >> >> My preference is that multiple fake cursors and crosshairs be >> implemented entirely in C, with just a little bit of Lisp to access >> those tools. I also felt that relying on Lisp might somehow slow >> things down a bit, and speed is really important. > I don't think you will gain speed by moving these functions to C, > because their slow part is already implemented in C. And as I already commented, creating LSL vector or something from a face in a platform-independent code is not a good design in the sense that it is inconsistent with the current code. Each drawing backend can get color information (as GC, in all the platforms other than NS) from a given face as I showed in the code `mac_gc_for_face_id'. Also, erasing crosshairs or cursors could be done by imitating the code in `expose_area'. I think you don't need to know which face is used in the erased area. YAMAMOTO Mitsuharu mituharu@math.s.chiba-u.ac.jp