Re: [linux-audio-dev] ladspa GUI spec status?

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] ladspa GUI spec status?
From: Conrad Parker (conradp_AT_cse.unsw.EDU.AU)
Date: Thu Feb 22 2001 - 06:32:14 EET


On Wed, Feb 21, 2001 at 11:06:17PM +0800, Daniel Venkitachalam wrote:
>
> > Speaking of which does anyone know what the side effects would be of building a
> > plugin that used X (probably via gtk+), would it cause problems if being run
> > inside another X program?
>
> Regarding this, xmms seems to handle visualisation plugins that use all
> sorts of API's (SDL, gtk, etc.) well so it can be done with minimal
> problems. I'll have to look at the implementation details to learn how
> though.

yup -- any X program can be embedded in another, this is a feature
of X11 (reparenting, in X11-speak).

for example, to embed a GTK+ program in another X program, you set the
'window' element of the toplevel widget's parent.

GTK+:
gtk_widget_set_parent_window (GtkWidget * widget, GdkWindow * window);

  * nb. you end up fiddling with GDK_WINDOW(window)->window, which is
the actual X11 Window

X11: XReparentWindow (Display *display, Window w, Window parent, x, y);
(AFAIK, this is how window managers put borders around windows, and
swallow apps in docks and so forth). This is probably what needs to be
done here, as the swallowed app can't always be modified to reparent
itself.

(most importantly, you don't need object models or embedding
environments or any other newfangled cruft to get the job done ;)

Conrad.


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Thu Feb 22 2001 - 15:22:59 EET