Intone-video problems!! Help !
Thomas Seiler
thseiler at gmail.com
Tue Apr 14 18:50:52 CEST 2009
Hi c_c,
thanks for bringing another superb app to the neo!
I'm not an X11 expert, just trying to answer some of your questions
here... If I babble nonsense, please correct me.
> 1. I finally found out that I can create 2 windows using elementary,
> 1 for mplayer to play the video in (using -wid) and one for the controls.
> I've sized the windows to 640x400 for the window where the video
> shows up and 640x80 for the controls. But I can't seem to get to
> see the main window (the one that has the controls) at all. It
> works fine on my desktop - but I'm not using illume there.
The problem is that your windows will end up stacked ontop of each other, and
here is why:
In X11, you do normally not position your windows on the screen. You have a
separate process, the "window manager" or WM, that takes care of this task.
That way, the user can finetune the behaviour of this desktop in one place,
instead of having to tune each and every app separately.
When you create a new window, the window manager will be consulted and will
come up with the best position/size for that new window. It will also draw some
decorations around it (border, titlebar, icons), so you have a consistent look.
On your desktop, where you have plenty of space, the best policy for the WM
is to arrange windows such that they don't overlap too much. On the neo
however, where screen space is a premium, the default strategy is to maximize
and center each window and forget about the borders, titlebars and stuff...
Both of your windows will simply be maximized and the one you create later will
end up on top of the stack. That way, you loose your controls.
> 2. The video playing window is centered on the screen. Is there a way I can
> set the positions of these window's? Or do I need to look for a different solution.
There is a way to have absolute control over the window by overriding the
window manager:
EAPI void ecore_evas_override_set(Ecore_Evas* ee, Evas_Bool
override);
or in elementary:
EAPI void elm_win_override_set(Evas_Object *obj, Evas_Bool override);
If you do this, the WM won't touch your window, and you will have to position
and size it yourself. Be aware though, that you also will have to take into
account any bars (taskbar / titlebar etc...) as you now work with raw
screen coords.
Usually, you have a normal window that is placed in the usual way by the wm.
You learn it's size and raw coordinates on screen and place the
overridden window
such that it fits inside.
> 3. Is there a way to embed a window in the main window of an elementary app?
There is the elementary inwin. But this is not a X11 window with it's own wid.
As far as I know, there is currently no elementary widget for this.
> 4. As far as I can see, mplayer uses the entire window (whose handle is
> passed to it with wid) to play the video. Or is it possible to have it use only
> part of the window?
Not that I know. But what you can do, is to create a second X11 window, with
the override bit set. Position it manually, based on the co-ordinates of your
main window, and hand its wid to mplayer. the WM won't add any decoration
to it, thanks to the override bit, and mplayer will fill it with the
movie, so the
second window should not be recognizable as a window.
You should be able to get the position and sitze of your main elm_win using
something like this:
EAPI void evas_object_geometry_get (const
Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w,
Evas_Coord *h);
Then you can simply create a second elm_win with the right coordinates, and
set the override bit _before_ you make the window visible.
Hope this helps...
Cheers,
Thomas
--
Excercise 17:
If the human brain was simple enough for us to understand we'd be so
simple we couldn't understand.
Prove this by induction.
More information about the community
mailing list