From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Emacs canvas support Date: Thu, 30 Apr 2020 17:18:55 +0300 Message-ID: <83v9lhvyy8.fsf@gnu.org> 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> Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="5584"; mail-complaints-to="usenet@ciao.gmane.io" Cc: tomas@tuxteam.de, emacs-devel@gnu.org To: Arthur Miller Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Apr 30 16:23: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 1jUA5l-0001MG-Mk for ged-emacs-devel@m.gmane-mx.org; Thu, 30 Apr 2020 16:23:09 +0200 Original-Received: from localhost ([::1]:40266 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jUA5k-0006lQ-MO for ged-emacs-devel@m.gmane-mx.org; Thu, 30 Apr 2020 10:23:08 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:59110) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jUA1x-0001Kh-SP for emacs-devel@gnu.org; Thu, 30 Apr 2020 10:20:11 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:49857) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jUA1w-0001gY-OG; Thu, 30 Apr 2020 10:19:12 -0400 Original-Received: from [176.228.60.248] (port=3249 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jUA1t-0006eW-HN; Thu, 30 Apr 2020 10:19:10 -0400 In-Reply-To: (message from Arthur Miller on Thu, 30 Apr 2020 15:11:10 +0200) 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:248238 Archived-At: > From: Arthur Miller > Date: Thu, 30 Apr 2020 15:11:10 +0200 > Cc: tomas@tuxteam.de, emacs-devel@gnu.org > > 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? I don't think I understand the question. It is trivial to add a call to a Lisp function anywhere in Emacs, the question is what that function will be able to do to be useful. If the called Lisp can do anything it wants, then how can it be useful without knowing a whole lot about the window layout, and what was just now, or will be in a moment, drawn on it, and in which parts? > 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. So how do we prevent the display engine from blissfully drawing over what the pre-render draws? > 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. How will the post-render know where it can and where it cannot draw? Or even where to draw, for that matter (assuming you want to do something more useful than just put the same pixels in the same pixel coordinates)? For example, if the window scrolls, wouldn't you want the graphics drawn by these pre/post-renderers to move on display as well, at least sometimes? If you do, how can you do that without knowing some details about the scroll? > 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. AFIU, z-buffer doesn't care to obscure what's displayed below. is this what you have in mind: obscuring the "normal" display with some graphics?