From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: joakim@verona.se Newsgroups: gmane.emacs.devel Subject: Re: Subwindow xwidget Date: Tue, 30 Apr 2019 14:47:53 +0200 Message-ID: <87r29jaccm.fsf@chopper> References: <874l6gbibp.fsf@chopper> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="204542"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: emacs-devel To: Evgeny Zajcev Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Apr 30 14:49:08 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hLSC1-000qtG-Bs for ged-emacs-devel@m.gmane.org; Tue, 30 Apr 2019 14:49:05 +0200 Original-Received: from localhost ([127.0.0.1]:46751 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hLSC0-0008QS-A9 for ged-emacs-devel@m.gmane.org; Tue, 30 Apr 2019 08:49:04 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:39781) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hLSAx-0008P0-UH for emacs-devel@gnu.org; Tue, 30 Apr 2019 08:48:01 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hLSAw-0002ep-Od for emacs-devel@gnu.org; Tue, 30 Apr 2019 08:47:59 -0400 Original-Received: from smtp.outgoing.loopia.se ([194.9.95.112]:53787) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hLSAw-0002d7-D7 for emacs-devel@gnu.org; Tue, 30 Apr 2019 08:47:58 -0400 Original-Received: from s554.loopia.se (localhost [127.0.0.1]) by s554.loopia.se (Postfix) with ESMTP id 159B61F18016 for ; Tue, 30 Apr 2019 14:47:55 +0200 (CEST) Original-Received: from s499.loopia.se (unknown [172.21.200.97]) by s554.loopia.se (Postfix) with ESMTP id D23AE7948AF; Tue, 30 Apr 2019 14:47:54 +0200 (CEST) Original-Received: from s473.loopia.se (unknown [172.21.200.35]) by s499.loopia.se (Postfix) with ESMTP id CB4DF1349AB0; Tue, 30 Apr 2019 14:47:54 +0200 (CEST) X-Virus-Scanned: amavisd-new at amavis.loopia.se Original-Received: from s630.loopia.se ([172.22.191.6]) by s473.loopia.se (s473.loopia.se [172.22.190.13]) (amavisd-new, port 10024) with LMTP id nXSIvt47YpLZ; Tue, 30 Apr 2019 14:47:54 +0200 (CEST) X-Loopia-Auth: user X-Loopia-User: joakim.verona@chimeslab.se X-Loopia-Originating-IP: 81.170.223.63 Original-Received: from ubermaschine (h-223-63.A149.priv.bahnhof.se [81.170.223.63]) (Authenticated sender: joakim.verona@chimeslab.se) by s630.loopia.se (Postfix) with ESMTPSA id D9D17C663F5; Tue, 30 Apr 2019 14:47:53 +0200 (CEST) In-Reply-To: (Evgeny Zajcev's message of "Tue, 30 Apr 2019 13:33:06 +0300") X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x [fuzzy] X-Received-From: 194.9.95.112 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:236047 Archived-At: Evgeny Zajcev writes: > =D0=B2=D1=82, 30 =D0=B0=D0=BF=D1=80. 2019 =D0=B3. =D0=B2 00:41, : > > Evgeny Zajcev writes: > > > In XEmacs there is nice "subwindow" glyph type, which could be used to= display contents of foreign application (such as video player). Internall= y it is just > ordinary > > subwindow of fixed geometry with API to get its XID, which you specify= to foreign application to render to. > > > > Is it possible to do the same in GNU Emacs or would it be hard to impl= ement? > > > > Unfortunately xwidget functionality is limited to "webkit" type of wid= get, and it does not provide API to get XID of the widget's window. > > > > Thanks > > I'm not really sure if its possible to do what you ask out of the box, b= ut I can > explain a little bit about the xwidget implementation. > > xwidgets are supposed to follow the emacs windowing paradigm so you can > split an emacs window with a xwidget, and then you get for instance two > copies of the same xwidget on screen. This is done by off-screen copying > of window bitmaps from the off screen widget. > > This could be very hard to implement since foreign app might use overlays= such as in XVIDEO, so copying just window content as bitmap won't work. I= n my case this is > exactly what video player do Well I did implement videoplayer with mplayer using this technique in emacs. In practice it worked okay-ish. Performance wasn't the problem. In fact you can watch youtube in emacs using the existing webkit widget(at least it was possible). It is of limited use though. You can watch video in a terminal based emacs using aalib based variants, doesnt mean its really useful though. >=20=20 >=20=20 > The original branch of xwidget also allowed for different types of > widgets apart from the webkit one. One of those widgets was a generic > container widget, such that you could embed emacs inside emacs for > instance. Some screenshots: https://www.emacswiki.org/emacs/EmacsXWidgets > > That branch is bitrotted, but resides both on savannah and github > https://github.com/jave/xwidget-emacs > > This looks SO nice! why this is not merged into GNU Emacs ? Emacs has quality standards :) >=20=20 > But you only need the xwidget complexity if you actually need the > of-screen copying which you only need if you care about your widget to > follow the emacs paradigm of window splitting and so on. > > If you just want your video window to appear at a fixed position inside > emacs, that is doable by other means, and I think there are a couple of > projects that do that. > > Which projects do you mean? Like the ones that implement window managers with emacs, I don't recall the names. > > I want something that is driven by foreign app, but it looks like it > is part of the Emacs, so buffer scrolling moves the subwindow > accordingly to its position and so on --=20 Joakim Verona joakim@verona.se