Matthieu Weber wrote:
> On Wed 28.07.2004 at 09:23:01PM +0200, Dirk Meyer wrote:
>> Matthieu Weber wrote:
>> > Besides, if we have two apps running at the same time (e.g. mplayer for
>> > the music and the image viewer, or mplayer for video and the menu
>> > displaing inside mplayer), both app must have an eventhandler, but
>> > only one (the image viewer) has the focus.
>> 
>> We already have this. There is an event that the audio player
>> stops. When you use the image viewer with background music, the viewer
>> doesn't care about that event, the background player does.
>
> Wouldn't it be useful to control the image viewer with the remote
> control, rather than the music player?

Yes

> I've never used the detach_audio feature (my freevo is probably too
> old), but my guess would be that once it has been detached, you should
> not control it anymore, unless you re-attach it again. I mean, it's
> probably not user friendly to have the RC control an app, while the user
> sees the interface of another app.

No, when I said event, it is not remote event. But when one songs
stopps, the background player must start a new one. That is the evnt I
was talking about.

>> > This architecture also removes the "sleep" from the main loop, which was
>> > much discussed about some time ago.
>> 
>> ... pygame doesn't give us anything to select. You can't get a
>> filehandler for the keyboard or when a redraw needs to be done. The
>> latest gui tests and checking about a main loop gives me one solution:
>> pygame sucks, replace it.
>
> Well, the main idea of select is to put the current execution thread to
> sleep mode until some event (here: data available on a file handler)
> wakes it up. But there are other ways to put a thread to sleep mode
> (the sleep function does it, and another thread can probably put it to
> sleep (suspend it) too).

I know the main idea of select. The problem is, I need the socket of
the keyboard in sdl to put it into the select. pygame gives me no
socket, so I can only poll. Pygame sucks.


But thanks to you and Hans I guess I have a good design now. It's not
in cvs but it's working very good:

There are three types of things drawing on the screen: applications,
popups and plugins. A plugin can't get a focus, it only draws some
stuff (idlebar, tiny_osd). A popup is above an application. You still
see the application, but the focus is on the popup. When you switch
applications (e.g. view an image, mplayer music/video), the
application below hides itself (you only see one application at a
time). The popup is still above the new application and the idlebar
still can draw itself. When removing an application, the application
below is shown again. On application change, an event is send to all
parts who wants to know about that (e.g. idlebar). An application also
has a variable 'fullscreen', saying "I want to whole screen". The
image viewer and the video player sets this variable to true, audio
player to false. A plugin like the idlebar respects that and hides
itself when a fullscreen application comes up. The tiny_osd doesn't
care, it draws on every screen.

Speaking of screens: an application also can define a backend for
drawing. Most use 'default', but video player sets this to bmovl. On
application change to mplayer, all visible objects move to the bmovl
screen. So wants working now with bmovl: when tiny_osd shows something
and you start mplayer, you also see the message on mplayer. When you
press MANUAL_SEEK you see a popup box _inside_ mplayer (right now only
a dummy box because the input box isn't ported to the new gui code). 


Dischi

-- 
In the beginning, there was nothing, which exploded.
-Terry Pratchett


-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
_______________________________________________
Freevo-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-devel

Reply via email to