[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Subwindow xwidget
Re: Subwindow xwidget
Tue, 30 Apr 2019 14:47:53 +0200
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)
Evgeny Zajcev <address@hidden> writes:
> вт, 30 апр. 2019 г. в 00:41, <address@hidden>:
> Evgeny Zajcev <address@hidden> 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
> > 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
> > 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
> 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
> 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
> 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