From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Rethinking the design of xwidgets Date: Wed, 14 Oct 2020 13:01:14 -0400 Message-ID: References: <864kmzupp0.fsf@akirakyle.com> <835z7e2ouj.fsf@gnu.org> <86v9fet5sg.fsf@akirakyle.com> <86sgait1wt.fsf@akirakyle.com> <852A8AE5-D7DE-43E4-9C48-192FCDAB92BE@mit.edu> <86mu0pu9vd.fsf@akirakyle.com> <83zh4ozxfk.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25322"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: qhong@mit.edu, Akira Kyle , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Oct 14 19:02:35 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kSkAb-0006SE-P6 for ged-emacs-devel@m.gmane-mx.org; Wed, 14 Oct 2020 19:02:33 +0200 Original-Received: from localhost ([::1]:37638 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kSkAa-0002r2-Ma for ged-emacs-devel@m.gmane-mx.org; Wed, 14 Oct 2020 13:02:32 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42484) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kSk9V-0002HU-NQ for emacs-devel@gnu.org; Wed, 14 Oct 2020 13:01:25 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:44980) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kSk9S-0000iY-Rg; Wed, 14 Oct 2020 13:01:24 -0400 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 0BAA88095B; Wed, 14 Oct 2020 13:01:20 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 7D71B809C6; Wed, 14 Oct 2020 13:01:15 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1602694875; bh=X2uGu6Os2ogxKkIT6lvq9GxhCyxnnLQCz4f/PHy146g=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=IojcEwLFquUOI2rikbej2Dh+IamVQLyWJZeTZYfsxwVLoZUpSTljYvhlcEpSfeslK AL2elEbTg53X52Muz97PsPoBaw83Jo3cBF2hQBQTUuuRbHvNBYGW12Hxm3mDE1PaUv 7u6wLPrIMZ2c0mnAaM/vpKE918BcAM/FI/AGZFlb6XfNTgHE6nFqj1ORefr1CBTUAl IZJKDJc+llveh34jxHWRp9SIDJQOCTxdNSO0wc5X7nXDsIg1ZeC4CrMngDS+h/VYWB X2Xq4nY09NLWfP8aWxHqzgj4MJFr2S/uWrBu7JFaLa1mgixpN8POnW1OKDr5kE0FHo B/GwXgTU4ipfw== Original-Received: from alfajor (unknown [157.52.9.240]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 4D202120124; Wed, 14 Oct 2020 13:01:15 -0400 (EDT) In-Reply-To: <83zh4ozxfk.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 14 Oct 2020 17:36:47 +0300") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/14 12:53:19 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:257661 Archived-At: >> Wouldn't it be fun to be able to free form draw inside emacs? :) > It's a long-time feature request. It is non-trivial to implement, > because this must be somehow coordinated with the display engine, so > it doesn't overwrite some of the drawing. Work in this area would be > very welcome. Indeed, it would be highly welcome. I can see 2 ways to integrate it into Emacs: - do something like the SVG images. To the extent we already have SVG images, the potential gains here are gains in performance, mostly, but there could also be potential gains in being able to easily find the "object" closest to a click. - offer a "transparent" canvas that is drawn *over* the normal text. I.e. have the normal redisplay draw a window's content into a pixmap rather than onto the glass, then draw the canvas into another pixmap, then combine the two pixmaps onto the glass. To be most useful, the second option would probably want to have some kind of access to information about the text that was drawn by the normal redisplay (e.g. maybe something similar to `posn-at-x-y` and `posn-at-point`), so you can move objects in the canvas according to the position of particular text elements in the buffer. Stefan