From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Arthur Miller Newsgroups: gmane.emacs.devel Subject: Re: Emacs canvas support Date: Thu, 30 Apr 2020 15:11:10 +0200 Message-ID: References: <875zdikdge.fsf.ref@yahoo.com> <875zdikdge.fsf@yahoo.com> <834kt21yyo.fsf@gnu.org> <87zhau1uog.fsf@yahoo.com> <83sggmzjp8.fsf@gnu.org> <87mu6u1tii.fsf@yahoo.com> <83o8raziis.fsf@gnu.org> <877dxy1smz.fsf@yahoo.com> <87o8rae0ao.fsf@randomsample> <83lfmexmfp.fsf@gnu.org> <20200429171619.GB20842@tuxteam.de> <83imhixkva.fsf@gnu.org> <83h7x2xke8.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="26953"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: tomas@tuxteam.de, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Apr 30 15:19:24 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 1jU963-0006or-Mt for ged-emacs-devel@m.gmane-mx.org; Thu, 30 Apr 2020 15:19:23 +0200 Original-Received: from localhost ([::1]:48638 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jU962-0005oV-Nb for ged-emacs-devel@m.gmane-mx.org; Thu, 30 Apr 2020 09:19:22 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44286) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jU916-0003aq-Ds for emacs-devel@gnu.org; Thu, 30 Apr 2020 09:18:37 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jU8yC-0008EA-Ew for emacs-devel@gnu.org; Thu, 30 Apr 2020 09:14:15 -0400 Original-Received: from mail-oln040092074057.outbound.protection.outlook.com ([40.92.74.57]:47239 helo=EUR04-DB3-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 1jU8yB-00089o-Oa; Thu, 30 Apr 2020 09:11:16 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ch1ylu7h7KoDRuPaD8Vqoqjzmywbw18fP9ASfP20Td5Psr4nAhcJk2RIHq5zlv1fPE7f4Ha4eP8gqJ6+b3cIXxMaLNqXm2jCJ+A/DjQZiNSLhvbsbeA+R21KD79oJelurRsdljga4pB54Jw25H9eVD94VJRbgVomX69eT5O6x0tfAlEsS4+3I3CFzqIm+MfV/+DMmIsNBQnNYVhkHkWMp9wFWmbrJ9X5AX3IgRneXCgb68PoSqSwtK2OBYTgDM5GZHJw8/LCZrffAPTZmtUNP3zPtW61aHjgElHfymaeD47WaroJcg2ZcLXbR7OuHskbKmNLPhW48srOy3i3gv6bRg== 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=0MoqATzNyzXvmdh9WXOhz5vjb/mfT/3PMVErwjlNQYo=; b=ml4newZHPQQh2qoUX0nkb9v5zrlnxmitYqYe8Nt6Q91YgIio7D9MpIbG4HLB0BIS6XnUeWaSrkFzDukkX22VUhVr8bCAWsAzTd4OC6LtBKR4gGWdNAeIagf1OE+27DaQYoQgQsgywwlWdi3h9vq+ZT7aPBrqfGHN61eUIu/bCitXwI5y4hqaKGz0xSAFD8nGkAVV14vKeVNwK32bWNoxDJqF7//D1DIe6QNYy6I0829FQwZcSU3F3zOvFjr9HrxdVdNSWyhG4jnD+ogLMOLC5b4VNhENmqepVRnQNLrIuWCh0qG48OEL0QklYcXmKqANhp0r46eplDECeQwjjBhQow== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=live.com; dmarc=pass action=none header.from=live.com; dkim=pass header.d=live.com; 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=0MoqATzNyzXvmdh9WXOhz5vjb/mfT/3PMVErwjlNQYo=; b=oW1dgW3m1jESjGtVAf3JSL2o7yKoUJwDpZkNqEFUx4NlBo/jd5zTgTcef5kRY00iuMFfkH9ouQh0K4zDcLAyD0SSZ502MJGDvlYzs9MNcj7PI+bxgaNE0BBvnzMygrb2z3ibAeoZ41JYpROyrXGYYQ5ATTe/Jhfned4sBtMCFn+RN/iRPKfGKgQLmCnZZQUXmOla8gJxwO7M+kOBVz4FYl1IIpHNGnrtQAsmBNpdWPbt67Wz0w1SIpcXqvtCZa5XcfXslbz6t4dg1zug21xLR+LRtAUDAT+zZj340S59XsgUzAquCbxd2zwNBjEIqhEsvEfwtme0afulQC0KD1CzfA== Original-Received: from HE1EUR04FT053.eop-eur04.prod.protection.outlook.com (2a01:111:e400:7e0d::53) by HE1EUR04HT062.eop-eur04.prod.protection.outlook.com (2a01:111:e400:7e0d::330) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2958.19; Thu, 30 Apr 2020 13:11:12 +0000 Original-Received: from AM0PR06MB6420.eurprd06.prod.outlook.com (2a01:111:e400:7e0d::44) by HE1EUR04FT053.mail.protection.outlook.com (2a01:111:e400:7e0d::298) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2958.19 via Frontend Transport; Thu, 30 Apr 2020 13:11:12 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:2DFBEBDADBF943F836FC1E05898D5567DE68B5D244B7A9665FE58BAD1BA13124; UpperCasedChecksum:C22B3FC496509041CC5053529C295354CAB57ACE798AC0C6DF19B24F8685A38A; SizeAsReceived:7825; Count:48 Original-Received: from AM0PR06MB6420.eurprd06.prod.outlook.com ([fe80::849f:536a:6aab:16]) by AM0PR06MB6420.eurprd06.prod.outlook.com ([fe80::849f:536a:6aab:16%5]) with mapi id 15.20.2937.020; Thu, 30 Apr 2020 13:11:11 +0000 In-Reply-To: <83h7x2xke8.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 29 Apr 2020 20:38:07 +0300") X-ClientProxiedBy: AM5PR0701CA0022.eurprd07.prod.outlook.com (2603:10a6:203:51::32) To AM0PR06MB6420.eurprd06.prod.outlook.com (2603:10a6:208:1a2::19) X-Microsoft-Original-Message-ID: <87wo5xqftd.fsf@live.com> X-MS-Exchange-MessageSentRepresentingType: 1 Original-Received: from pascal.homepc (90.230.29.56) by AM5PR0701CA0022.eurprd07.prod.outlook.com (2603:10a6:203:51::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.14 via Frontend Transport; Thu, 30 Apr 2020 13:11:11 +0000 X-Microsoft-Original-Message-ID: <87wo5xqftd.fsf@live.com> X-TMN: [7rs5X8EUc1shBguLpEsYNa+qpk31wBGr] X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 48 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: defa4c59-0b3b-4498-434f-08d7ed07f43e X-MS-TrafficTypeDiagnostic: HE1EUR04HT062: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 7QK49KrqkO/c5Ngcti0OeP/Ai92ufLXkw/vtjlvAkKfbojIDwIZThxsb323LiU/lN4VxEq9VnnljgiP4TzVb6sc3ihisqLuBxLqU86+T3b2gOH53XcLJ9dQns9WBqBdm7XaR2HPpJS1ZUpvGJYjBueb4l2jk3nmDnZ4Jxdci06LGHnoVaXajXk0c2lJL320wfM7kpqSIEcyf3OxehcPH3A== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:0; SRV:; IPV:NLI; SFV:NSPM; H:AM0PR06MB6420.eurprd06.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:; DIR:OUT; SFP:1901; X-MS-Exchange-AntiSpam-MessageData: 8xN2F177CSarIKkwRg8X4gllUeFwwcXM8TtL+MThNtHDjJzmG5ednGhc138owmR5GAmlC0kVU+Qr6SZowCCI1G2c8vasg+87aeJwtKB9JiX8pvTIqPHTibY/MVxUGOzRiBWfs3X8LlrJIeRe6mGkKw== X-OriginatorOrg: live.com X-MS-Exchange-CrossTenant-Network-Message-Id: defa4c59-0b3b-4498-434f-08d7ed07f43e X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Apr 2020 13:11:11.8014 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1EUR04HT062 Received-SPF: pass client-ip=40.92.74.57; envelope-from=arthur.miller@live.com; helo=EUR04-DB3-obe.outbound.protection.outlook.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/04/30 09:11:13 X-ACL-Warn: Detected OS = Windows NT kernel [generic] [fuzzy] X-Received-From: 40.92.74.57 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:248229 Archived-At: Eli Zaretskii writes: >> Date: Wed, 29 Apr 2020 20:27:53 +0300 >> From: Eli Zaretskii >> Cc: emacs-devel@gnu.org >> >> That's not how Emacs controls what's on display. It basically >> represents each window as a 2D array of glyphs, each one of which has >> a certain graphical representation. The representation itself is of >> no concern to the display engine (well, almost); the only thing it >> cares about is the metrics of each glyph, because that's what it needs >> to do layout calculations. > > Oh, and one more important aspect: everything that winds up on display > must come from some buffer or some Lisp string. It could be a special > text property or somesuch, but it must be found by walking some buffer > or some known-in-advance Lisp string, because that's what top-level > display functions do: they iterate over these objects, and produce the > glyphs based on what they find there. I have a question here about display: when lisp engine decides to draw the display, how difficult would it be to add a callback for pre- and post render? Prerender callback could be any user lisp function called that do anything it wants, say draw something on the screen as it owned window itself. Than render engine would it's ordinary rendering drawing just as it does now, pretending that there was nothing already drawn, so it would mean no change at all to current c code for rendering. Similarly one call a post-render callback and draw over the already rendered text so user could draw whatever on top of already draw onverlas and what not. It is just how z-buffer works and it would mean z order from pre-render, normal render (as it is now) and post render as implicit z-depths. Finally one could expose ordinary X11, GDI, Cairo drawing funcions so thet draw to an image (or why not directly to the gui window?) that could be displayed say in prerender hook, which would get drawn as background below the buffer text, and woulnd't collide with overlays and other stuff.