From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: arthur miller Newsgroups: gmane.emacs.devel Subject: RE: Rethinking the design of xwidgets Date: Thu, 15 Oct 2020 19:55:16 +0000 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: multipart/alternative; boundary="_000_VI1PR06MB45264DD2F6B97D4337306CB596020VI1PR06MB4526eurp_" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24224"; mail-complaints-to="usenet@ciao.gmane.io" Cc: "qhong@mit.edu" , Akira Kyle , "emacs-devel@gnu.org" To: Stefan Monnier , Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Oct 15 21:56:09 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 1kT9M9-0006Bj-0f for ged-emacs-devel@m.gmane-mx.org; Thu, 15 Oct 2020 21:56:09 +0200 Original-Received: from localhost ([::1]:58056 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kT9M7-00084I-UV for ged-emacs-devel@m.gmane-mx.org; Thu, 15 Oct 2020 15:56:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58560) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kT9LP-0007Y7-0z for emacs-devel@gnu.org; Thu, 15 Oct 2020 15:55:23 -0400 Original-Received: from mail-am6eur05olkn2105.outbound.protection.outlook.com ([40.92.91.105]:45952 helo=EUR05-AM6-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kT9LL-0007vy-Gm; Thu, 15 Oct 2020 15:55:22 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=M8X7SY8D5/mHSFDwn0NnStwLS0YtrLFklsk4W1xAUsvFzyHVJ43nXcOQ+Prv764RPJR32J4DpmyZMoGwizaREk6DAxJibJzNH2HpzaYJH9gGdqHUfmipEwMNBmlS+LIPZ5yOwNcKZMtK4NAI0pwOkMlvwaF2vfEqv7yqYSuwcjERKLLnS+lSy35b8/13coFo4Vu+JOuyzHIKeCcCk+hg0Fr+1pfZtavXMqkBpGYFLhr3sJPKCkHrzicskAlxeNS0V9v28DNJ2npe5JdznBT/du1HPB7HeBCzrbl5EnsJYjrl7qYYDMnHYZoc+JiUFnxGlvKSZz4vtlnQHvyOFCd+Aw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=nrEsn/lCmVFJlMbUzDorKwNTnq8NA24rADYtFhwvIPg=; b=fAtgFHuqIMTDo14q146ybQBUFN73raeLzq3uCl02ic2otK71oIYc60p55BTYxux4g9quFSIoLgg6OGf9I+11fPyVwCX9TyBl4ue9BXcPSP1J/OPR/wgW3sjKE9BPISn05f3yWfq1Qk/PpPTLPkCBwILR9uJakL+QRd2YnFMsch5G1EdkZT8PvrUi3pyhhd+isfHt8Wk3PdVm3grWVQ2pz2+DSZ5hnk8JxVkuCTacRu60B7tCl85jOH/AOkYbV+5putIzqCg2gVPfNZkeRPNLry58NI18Dm8lFJy69npAH3j/Hju6/GwnoLda8svT8wY8QsulezuNRZqNIcTO53XhCw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=live.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=nrEsn/lCmVFJlMbUzDorKwNTnq8NA24rADYtFhwvIPg=; b=eAudCfvR2kMFuwSLRWtW3L04NzMj4amaAicN85ldNiEQptaVrUcp9X0p3fXRa3KON88ErsCpWH/DV21bZgh5BO2SJnMK7uzSooKtXhnLQxM9LWsJ+qvMIOMK8rCaNa4HH31sy+LDm/CjHbmxdz1IpKDWWRl4IziFevNSVbHbkc1t0/IZ4JmOCq/KlxHug225nguOIFY11rrFTPq++Eu8BhjyUlVdIA5u+J2BtZ3peLOHvlZMEibJumsP7yTgBJZupZ3URgIpXchh7ZRJ0DcJUyQstZHxndX0qYmZ8kd3uuDzDChu4411SwPvdn3pxEARwS848gEAcqXWPDi7N764zg== Original-Received: from DB8EUR05FT025.eop-eur05.prod.protection.outlook.com (2a01:111:e400:fc0f::52) by DB8EUR05HT179.eop-eur05.prod.protection.outlook.com (2a01:111:e400:fc0f::441) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3477.21; Thu, 15 Oct 2020 19:55:16 +0000 Original-Received: from VI1PR06MB4526.eurprd06.prod.outlook.com (2a01:111:e400:fc0f::42) by DB8EUR05FT025.mail.protection.outlook.com (2a01:111:e400:fc0f::391) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3477.21 via Frontend Transport; Thu, 15 Oct 2020 19:55:16 +0000 Original-Received: from VI1PR06MB4526.eurprd06.prod.outlook.com ([fe80::187b:196a:cb2d:adf1]) by VI1PR06MB4526.eurprd06.prod.outlook.com ([fe80::187b:196a:cb2d:adf1%5]) with mapi id 15.20.3477.023; Thu, 15 Oct 2020 19:55:16 +0000 Thread-Topic: Rethinking the design of xwidgets Thread-Index: AQHWoNxBjHFuzK9jRUu5pxMFska+hKmVlVMSgAAvKYCAAAUqAIAAEj4AgAAEHACAACPGAIABL5F2gAAieDyAAcKs0w== In-Reply-To: Accept-Language: sv-SE, en-US Content-Language: sv-SE x-incomingtopheadermarker: OriginalChecksum:259987D51C2CB1F4FBAB685E4409F2855E9890EE9B05E1B13B9D71249B85D9EA; UpperCasedChecksum:93799657389BF342477D329BC35F14CC22C232153E4050EA231FEFB0CCE62847; SizeAsReceived:7266; Count:45 x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [ToXWdV63QxPofE69lUIZBtLqQBMm8xFg] x-ms-publictraffictype: Email x-incomingheadercount: 45 x-eopattributedmessage: 0 x-ms-office365-filtering-correlation-id: 22a77c17-6959-4f8c-affa-08d871443cf8 x-ms-traffictypediagnostic: DB8EUR05HT179: x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 8qvhMHAvjVqGMR/y/eKMQ8Dd2XpSP2+6j8TX9XGXDFK6pwJKaq5T/oQo+s2wPmxQDG+Pg1/uuu9ICbkhF85ekSAfH2wif1NhJBYFcemdwBO2oNKuARMETBYLUZ3KEWCPL1GUxp2rFiFb+tRIVKIEzCzuvmErNvmg5XFXeWzWWGsKqNMOhO4/GGVO1mRJAzlNl7tf5JYTp8VJgp/EcWnjUQ== x-ms-exchange-antispam-messagedata: Fo3LwZH1CbERSnRHMKKVRM4MPDQZtOrWjcdyId7cytlIV1mo0iV56qFEdotNfc8+c52imqYZ1La4f+HE0vwkIgYJQjtoTB/UFf3cC+/ZK5sBamWsfJI7Jfv/UgN56UASEVB1Q6yrtecyAP9kwglT0g== x-ms-exchange-transport-forked: True X-OriginatorOrg: live.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-AuthSource: DB8EUR05FT025.eop-eur05.prod.protection.outlook.com X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: 22a77c17-6959-4f8c-affa-08d871443cf8 X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Oct 2020 19:55:16.6761 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8EUR05HT179 Received-SPF: pass client-ip=40.92.91.105; envelope-from=arthur.miller@live.com; helo=EUR05-AM6-obe.outbound.protection.outlook.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/15 15:55:17 X-ACL-Warn: Detected OS = Windows NT kernel [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-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:257762 Archived-At: --_000_VI1PR06MB45264DD2F6B97D4337306CB596020VI1PR06MB4526eurp_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I completely missed this one :-(. Sorry. My image approach is what you mean= with svg-like one. I think both approaches would be useful for different purposes. -------- Originalmeddelande -------- Fr=E5n: Stefan Monnier Datum: 2020-10-14 19:02 (GMT+01:00) Till: Eli Zaretskii Kopia: qhong@mit.edu, Akira Kyle , emacs-devel@gnu.org =C4mne: Re: Rethinking the design of xwidgets >> 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 --_000_VI1PR06MB45264DD2F6B97D4337306CB596020VI1PR06MB4526eurp_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
I completely missed this one :-(. Sorry. My image approac= h is what you mean with svg-like one.

I think both approaches would be useful for different pur= poses.



-------- Originalmeddelande --------
Fr=E5n: Stefan Monnier <monnier@iro.umontreal.ca>
Datum: 2020-10-14 19:02 (GMT+01:00)
Till: Eli Zaretskii <eliz@gnu.org>
Kopia: qhong@mit.edu, Akira Kyle <ak@akirakyle.com>, emacs-devel= @gnu.org
=C4mne: Re: Rethinking the design of xwidgets

>> Wouldn't it be fun to be able to free for= m 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 woul= d 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, b= ut
  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 te= xt.
  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


--_000_VI1PR06MB45264DD2F6B97D4337306CB596020VI1PR06MB4526eurp_--