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: Introducing emacs-webkit and more thoughts on Emacs rendering (was Rethinking the design of xwidgets) Date: Thu, 03 Dec 2020 21:34:59 +0100 Message-ID: References: <864kmzupp0.fsf@akirakyle.com> <86pn46awrr.fsf@akirakyle.com> <87y2ise7j5.fsf@gnus.org> <86tutfwhr6.fsf@akirakyle.com> <87h7pfb76z.fsf@gnus.org> <86h7peqkt5.fsf@akirakyle.com> <83tutdsc8i.fsf@gnu.org> <86eeker01y.fsf@akirakyle.com> <83wny5naf5.fsf@gnu.org> <86o8jh9cij.fsf@akirakyle.com> <83czzwkmwk.fsf@gnu.org> <86lfeja49y.fsf@akirakyle.com> <83360qlupj.fsf@gnu.org> <86wny293pg.fsf@akirakyle.com> <87eeka7yxk.fsf@logand.com> <86360nwxch.fsf@akirakyle.com> <87k0tzcnyd.fsf@logand.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19979"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Akira Kyle , emacs-devel@gnu.org To: Tomas Hlavaty Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Dec 03 21:36:23 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 1kkvKx-000562-E6 for ged-emacs-devel@m.gmane-mx.org; Thu, 03 Dec 2020 21:36:23 +0100 Original-Received: from localhost ([::1]:47270 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kkvKw-0002Ra-Cq for ged-emacs-devel@m.gmane-mx.org; Thu, 03 Dec 2020 15:36:22 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41182) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kkvJi-0001sD-8y for emacs-devel@gnu.org; Thu, 03 Dec 2020 15:35:06 -0500 Original-Received: from mail-oln040092066086.outbound.protection.outlook.com ([40.92.66.86]:6782 helo=EUR01-VE1-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 1kkvJf-0001uO-M1 for emacs-devel@gnu.org; Thu, 03 Dec 2020 15:35:05 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XAola+lc4QPscfP1kZASS4QlrA+qlqYQLsqImmvXTOWd9/ZqbR/me3kEhYt1qBAUz62cwAX+RX6gblWSEM6j1Q7yvgHVr+rDMCehMFDiaJWu8aGBeSnlcAq0/qVKV1Jnmse7aZq/UmpEBJL48a3F5mg/m+BE/gtayXSB5EiO93pgLy7x5MuDoMtEoK0yxemLSIXZgbiqJXTEG49a4Y1XLR4lh8B+mPgfQWlxt/TiBRbNfmW8J/lQv6Z4BiCgqmje+dQAo2++RB7j8+uXwwf1u8DRd5hY+rr6wrsq/D2nqB+6nEiE49xeLtNZ0CCa6X1CI0ugEhJr5sMfroCOechNwg== 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=k4E51EZBem6hwiu4oTVNAPeaHDS5MyoUvD7R20i0Qx4=; b=PQqsetAW2D2eS1U1qGXWFi7d12Um+czdm4fbVaWUwmJwH8V+kE6zHoaEA76EKHVLIiyISbwgyqO2BuOlme07NMDiE6YKkvR98XtCtleDWoX9r7xi3qCWOO9hXkoRIbYPria3Vk+drJ8wnlC/s7ibcPfX3GDOnjFYg1eWF70OvXs1oN88Yz0cjs8rWW7z5g/f42eRIph9qrhaWtHcGSDzzNKI5d4981G+pNV3KKutFSFc3a/hSV8kT2AseFKiHOSYCTdI4b09XcIRLJUMaW7r/F3eeeFCJcKcXZUgTqtNo9V8yP/cpJ2J0CoDstlollIYMzbtMrxLHy8WrjXKRJVi4A== 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=k4E51EZBem6hwiu4oTVNAPeaHDS5MyoUvD7R20i0Qx4=; b=hNSrELHCOxblE/qF6v8Lo5hzEyavfe586j2ausH30RAA8hMVSAsI7doPoxHUkc0argkdUwGEFDRqx6MsnP2R2yUAPIpeHYgniFQNzVOh2XtQ7eye45okCAWglJ2MHGCXE22GjOBvarKLIVWImLlkWvlwhnIGyCB6zwPzT1oTFXiUC68QqDiTzDoBP2U+N5tSccylwYQitEi/ETodJsA4znmMpASLNbXmG2VtP07AugENFBr+x9/gs8OylqmXZQHlwnO0pgpGymmnXHvPPQtFHTH1UIeuJIDdoA1L8SpkNNFrv4bI/1tqoq788rnAHNusFocpEzamnoI+Mt7s0G2Npw== Original-Received: from VE1EUR01FT032.eop-EUR01.prod.protection.outlook.com (2a01:111:e400:7e19::4a) by VE1EUR01HT112.eop-EUR01.prod.protection.outlook.com (2a01:111:e400:7e19::307) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3632.17; Thu, 3 Dec 2020 20:35:00 +0000 Original-Received: from AM0PR06MB6577.eurprd06.prod.outlook.com (2a01:111:e400:7e19::4e) by VE1EUR01FT032.mail.protection.outlook.com (2a01:111:e400:7e19::222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3632.17 via Frontend Transport; Thu, 3 Dec 2020 20:35:00 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:DC6C02A5101E7D1E8026B2745DCF36156658C80190A09B41F39693E72235069E; UpperCasedChecksum:32CFC953126A82946B3CE4B5CF7B137EBE0298CAF624BB140951E8625A62811B; SizeAsReceived:7944; Count:46 Original-Received: from AM0PR06MB6577.eurprd06.prod.outlook.com ([fe80::9487:8c7d:da00:4993]) by AM0PR06MB6577.eurprd06.prod.outlook.com ([fe80::9487:8c7d:da00:4993%7]) with mapi id 15.20.3632.018; Thu, 3 Dec 2020 20:35:00 +0000 In-Reply-To: <87k0tzcnyd.fsf@logand.com> (Tomas Hlavaty's message of "Thu, 03 Dec 2020 09:07:22 +0100") X-TMN: [7s26U2w63d60/tu6DvwHOKQjN8NjRQSx] X-ClientProxiedBy: AM6P192CA0071.EURP192.PROD.OUTLOOK.COM (2603:10a6:209:82::48) To AM0PR06MB6577.eurprd06.prod.outlook.com (2603:10a6:208:19a::23) X-Microsoft-Original-Message-ID: <87360mhbm4.fsf@live.com> X-MS-Exchange-MessageSentRepresentingType: 1 Original-Received: from pascal.homepc (90.230.29.56) by AM6P192CA0071.EURP192.PROD.OUTLOOK.COM (2603:10a6:209:82::48) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3632.17 via Frontend Transport; Thu, 3 Dec 2020 20:34:59 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 46 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: c28df439-c2e2-4819-1934-08d897cae773 X-MS-TrafficTypeDiagnostic: VE1EUR01HT112: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: t/zPk4hP/hYYnR6NcCm0oCcA5P1NRg0NGT/7pXSM9E8gXZ3NL6pPWaKmM43ErfuKTXe53ohs93YpBiKkPxRzX243ni6nA80gWThaXixR5yTqJmjj9D7h1U9mKI+lk2yHIxzFmAN0Y9W7iu9t0sQkCWGi6YPbSyDXobhYLwZDeR5q3f5KqI0IRRbqMH5TBrzobiZtrEaID94UETPbcVMLqg== X-MS-Exchange-AntiSpam-MessageData: 2bAzSSlx5fS0zypQR2oC4TdP9lOEz8QluPccRVBR+aL0yTwLzrTwwa4KFrOS0YMmvGU+Io15i9tKcaL9bmUip8vcsmm2zrjJA37nvaEeD4ha3j4G2dFp1od3EWpi7VEm8Kho8ktJI0wtz/0i4LSqDQ== X-OriginatorOrg: live.com X-MS-Exchange-CrossTenant-Network-Message-Id: c28df439-c2e2-4819-1934-08d897cae773 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Dec 2020 20:34:59.9135 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: VE1EUR01FT032.eop-EUR01.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1EUR01HT112 Received-SPF: pass client-ip=40.92.66.86; envelope-from=arthur.miller@live.com; helo=EUR01-VE1-obe.outbound.protection.outlook.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_LOW=-0.7, 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:260241 Archived-At: Tomas Hlavaty writes: > On Wed 02 Dec 2020 at 17:24, Akira Kyle wrote: >> On Tue, Dec 01, 2020 at 12:44 AM, Tomas Hlavaty >> wrote: >> >>> On Mon 30 Nov 2020 at 10:03, Akira Kyle >>> wrote: >>>> and because I see pgtk as the future of Emacs on GNU/Linux systems >>>> as X becomes increasingly obsolete. >>> >>> I am not sure such future is bright. >>> >>> In that future, is there no way to do graphics without a widget >>> toolkit? >> >> Sure there is. Under wayland you can just dump pixels into a >> shared buffer to render them to the screen or use EGL to render >> using a GPU. The difference from X is that wayland offers no >> convince functions to actually draw pixels into such a buffer, its >> up to the client to do so. In order to not reinvent the wheel, its >> much more convenient to use a toolkit to draw the elements it's >> good at drawing. > > "just dump pixels" and "no function to actually do that" and "use > toolkit" does seem to contradict the point of being able to do it > without toolkit. > > How long will pgtk future last? > Compare that kind of future with for example ansi terminal future. > Which one do you think has longer future ahead? Why? I don't think you are askinkg for ANSI terminal; I think you are asking for Emacs on framebuffer. I don't know how hard it is to create it, but it is probably on same level as concole/terminal backend, X11 backend, Win32, Gtk, etc. I don't know, I never used framebuffer so I can't really tell; just a sense. >>>> AFAIU the pgtk version, like the ns version it was modeled after, >>>> doesn't implement everything in the main frame area of Emacs as >>>> widgets, only the tool and menu bars are implemented as proper >>>> widgets. >>> >>> Also popup menus that pop up on a mouse click are gtk iirc. >>> >> I think it would be possible to implement such menus without GTK using >> just child frames. I agree with you on that one. I played with the idea; if you search the archive you will find some poorman menu I sent in pga bug with focus with child frames. Emacs already does halv of the jobb; one can display a text buffer, enable current line highlight and set special text properties and there is a simulated menu; sort of. > Would not it be better to extend the canvas idea you mentioned above to > allow graphics in general, portable, toolkit independent way? svg renderer is; as I understand. Maybe I am wrong, but as it seems Emacs has got a built-in graphics via svg. I always thought Emacs went through external application to display svg, but I learned recently it does not. Other path is to use Vulkan or OpenGL; I think OpenGL is better choice for Emacs; you can render to a texture in memory, and handle XImage or XPixmap to Emacs (hopefully - I haven't had time yet to go through and test Eli's kind walkthrough yet). You could actually render entire emacs buffers via egl to textures and display them via framebuffer. I don't think it would be easy, but possible. Would require lots of C coding; if you have time for that :-).