unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: joakim@verona.se
To: Evgeny Zajcev <lg.zevlg@gmail.com>
Cc: emacs-devel <emacs-devel@gnu.org>
Subject: Re: Subwindow xwidget
Date: Tue, 30 Apr 2019 14:47:53 +0200	[thread overview]
Message-ID: <87r29jaccm.fsf@chopper> (raw)
In-Reply-To: <CAO=W_ZpHv9Bcxtz1BXoE3=34uV1R__+g8eMZaKwq0L1+UnzhAA@mail.gmail.com> (Evgeny Zajcev's message of "Tue, 30 Apr 2019 13:33:06 +0300")

Evgeny Zajcev <lg.zevlg@gmail.com> writes:

> вт, 30 апр. 2019 г. в 00:41, <joakim@verona.se>:
>
>  Evgeny Zajcev <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).  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 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, 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 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

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.

>  
>  
>  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 :)


>  
>  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


-- 
Joakim Verona
joakim@verona.se



      reply	other threads:[~2019-04-30 12:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-29 20:10 Subwindow xwidget Evgeny Zajcev
2019-04-29 21:41 ` joakim
2019-04-30 10:33   ` Evgeny Zajcev
2019-04-30 12:47     ` joakim [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r29jaccm.fsf@chopper \
    --to=joakim@verona.se \
    --cc=emacs-devel@gnu.org \
    --cc=lg.zevlg@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).