[MPlayer-dev-eng] [patch] fix compilation error in gui/win32/interface.c

Ingo Brückl ib at wupperonline.de
Sat Nov 24 16:30:03 CET 2012


Alexander Strasser wrote on Sat, 24 Nov 2012 02:02:34 +0100:

> 1) So if your goal is to have both GUIs evolve into a similar application
> where the detail implementations differ to accommodate for the underlying
> platform, I do think this solution is a good fit

Yes, I'm actually aiming in this direction.

There are already lots of things the Win32 GUI does similarly to the X11/GTK
GUI with only slightly different or almost identical code (which could/should
be shared), but the problem with the Win32 GUI is that its concept and
program flow are different (maybe necessary for a Windows application - I
don't know). As a result, their capabilities also differ.

> Though of course dropping the static does not hurt this time.

No, but strictly speaking (and after thinking about it) this function that
happened to be in interface.c is no interface function, but an (playlist)
utility. So leaving it there and declaring it in the interface header now is
the basic problem.

> But you might want to start thinking about developing things differently in
> the future. Say for example stop sharing most of ui related headers (IOW
> share only platform independent stuff that does not touch the UI and does
> not try to integrate with the desktop environment). Or even changing
> directory layout to reflect the separation:

>  -+- x11 ---+- <x11 specific subdirectories>
>   |         |
>   |         +- <x11 GUI implementation files>
>   |
>   +- win32 -+- <win32 specific subdirectories>
>   |         |
>   |         +- <x11 GUI implementation files>
>   |
>   +- util ...
>   |
>   +- <probably others> ...

I'd actually like to share as much code as possible. Only (a small amount of)
window manager and OS specific stuff should be different for the GUIs, i.e.
something like:

gui -+- common --+- interface
     |           |
     |           +- skin
     |           |
     |           +- ui
     |           |
     |           +- util
     |
     +- x11.gtk -+- dialog (GTK)
     |           |
     |           +- wm (X Window)
     |
     +- win32 ---+- dialog (MS Windows)
                 |
                 +- wm (MS Windows)

MPlayer and all GUIs would only talk using interface code defined in common,
i.e. the (common and only) GUI is something that only needs a kind of
"driver" for the window and drawing stuff.

> Sorry for the long answer without really having a clue about the mplayer
> gui code...

Well, for a good concept it often helps to have a look from outside.

Thanks for your input.

Ingo


More information about the MPlayer-dev-eng mailing list