From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Evgeny Zajcev Newsgroups: gmane.emacs.devel Subject: Re: Subwindow xwidget Date: Tue, 30 Apr 2019 13:33:06 +0300 Message-ID: References: <874l6gbibp.fsf@chopper> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000ea527f0587bcedfe" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="9567"; mail-complaints-to="usenet@blaine.gmane.org" Cc: emacs-devel To: joakim@verona.se Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Apr 30 12:33:32 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 1hLQ4q-0002LR-60 for ged-emacs-devel@m.gmane.org; Tue, 30 Apr 2019 12:33:32 +0200 Original-Received: from localhost ([127.0.0.1]:42890 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hLQ4p-0004Iu-7T for ged-emacs-devel@m.gmane.org; Tue, 30 Apr 2019 06:33:31 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:38731) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hLQ4f-0004Hj-LU for emacs-devel@gnu.org; Tue, 30 Apr 2019 06:33:23 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hLQ4e-0004O1-BH for emacs-devel@gnu.org; Tue, 30 Apr 2019 06:33:21 -0400 Original-Received: from mail-lj1-x233.google.com ([2a00:1450:4864:20::233]:34675) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hLQ4e-0004NC-2h for emacs-devel@gnu.org; Tue, 30 Apr 2019 06:33:20 -0400 Original-Received: by mail-lj1-x233.google.com with SMTP id s7so9560589ljh.1 for ; Tue, 30 Apr 2019 03:33:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=jwdk+LxTWrwb/Z9PxuYkcKYf3ib1uE4JuPv83DV2yxQ=; b=GQrf92VV/TOPYy6/F2j9dcJEMakYjz2du9hD8qOjcdkOQnBaLIF3oLNgWsJfU7yXua FhWw07CfaVfSxIArmSB9gTliXtypHfTNWeuPbfV9oJR3u6UA9rsBlNJ6eFQZ6/r6L4N7 74jlFvnrpe16ETR0belbjHV+2njJbh+P1IwdPbUNhWiHGct/1Vj5XIMDetXzsczx1L9f SIpkfeAs9/AccjtMN+kJuSjq7Fi3TwNT5Nvqq87VQJsfCz4zgQvO8lCpyL2xh6QJ2Zs1 PHH01KRBNDJlG0HZmc3KgOvqhF0PkQ4wWJkZkRdkKB0NaxzcBGIcMzqdk0850wxJ4ck4 mp5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=jwdk+LxTWrwb/Z9PxuYkcKYf3ib1uE4JuPv83DV2yxQ=; b=lvN94XZKq6oSqg7267W2oz7etujLxrxDF5T56DwT3ewwJRaznZNREWMyy091neSaYP uTU7ToIv/B5L3HO3AWAtPYt/n4kvaNnnji27c/6w4+LvGPkOIXXI4rb05Swp8WR6Ux0L W3mjDQJhhh3egTu44ayZLPHMCTrGbEBUg9adL9ywez0uosdeJx137Nzlo5crAKQPspLy 9a0A5bsmZvILNqneCFaU4J6AMS3gtO/GySTwyBKsg3rt8Mtfv4Usib8FtLEu2WOmXHMr SE0d1y6auRhLth1ODJ7X6WuB3mIO2BEE9KiIx24PhOuceIOCx2UYHl8PbssX9pVw+aI9 WW2w== X-Gm-Message-State: APjAAAUmMlKHl5wa40YRZ2vKvMq8taVRHd1BhYdgP4paI/8SZgZmrCwy I1OLzF2vOcCskt8VB9eI02OOBhAiQDE51MS4XUbxR7/C X-Google-Smtp-Source: APXvYqw0UM8vMgcc+3lNPCe0VjB3YxXoTFBKngpXiqWiUOgrwSAt0hpXQJp4nh51a9eg5Xwywix1aM9YnxtYZd2e/5w= X-Received: by 2002:a2e:81d3:: with SMTP id s19mr5970628ljg.43.1556620398709; Tue, 30 Apr 2019 03:33:18 -0700 (PDT) In-Reply-To: <874l6gbibp.fsf@chopper> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::233 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:236044 Archived-At: --000000000000ea527f0587bcedfe Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable =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). Internal= ly > 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 > implement? > > > > Unfortunately xwidget functionality is limited to "webkit" type of > widget, 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, bu= t > 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. In my case this is exactly what video player do > > 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 ? > 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? 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 lg --000000000000ea527f0587bcedfe Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
=D0=B2=D1=82, 30 =D0=B0=D0=BF=D1=80. = 2019 =D0=B3. =D0=B2 00:41, <joakim@v= erona.se>:
lg.zevlg@gmail.com> writes:

> In XEmacs there is nice "subwindow" glyph type, which could = be used to display contents of foreign application (such as video player).= =C2=A0 Internally 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" t= ype of widget, and it does not provide API to get XID of the widget's w= indow.
>
> Thanks

I'm not really sure if its possible to do what you ask out of the box, = but 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 ove= rlays such as in XVIDEO, so copying just window content as bitmap won't= work.=C2=A0 In my case this is exactly what video player do
=C2= =A0

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/e= macs/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 me= rged into GNU Emacs ?
=C2=A0
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 d= o you mean?

I want something that is driven by for= eign app, but it looks like it is part of the Emacs, so buffer scrolling mo= ves the subwindow accordingly to its position and so on=C2=A0=C2=A0

--
lg
--000000000000ea527f0587bcedfe--