[MPlayer-dev-eng] [PATCH] more implicit declarations of functions 1/3
ib at wupperonline.de
Fri Jul 8 09:46:57 CEST 2011
Stephen Sheldon wrote on Fri, 8 Jul 2011 02:26:56 +0000 (UTC):
> Today I realized that when you configure with --enable-debug all the
> gcc WARNFLAGS are not set, and in particular you do not get
> "-Werror-implicit-function-declaration" errors, like this:
> gui/win32/dialogs.c: In function 'display_openfilewindow':
> gui/win32/dialogs.c:143:21: error: implicit declaration of function
> Several of these have crept into gui/win32.
Thank you very much for your interest in the Win32 GUI. Although I'm able to
compile it meanwhile with winegcc to check for the biggest mistakes, I
haven't made further efforts, because I'm not using Windows. So I very much
appreciate an active user.
I'm interested in improving the Win32 GUI, but I don't think that a new
gui/win32/interface.h is the right way. I'd rather take a completely
different (aiming at a more drastic) approach I'd like to explain.
The last days I've made efforts to clean up the interface between a GUI and
MPlayer, so that it only contains stuff really needed between the both of
them, and have moved all other, only GUI related stuff away. The long-term
plan is to separate the GUI from MPlayer and to establish an extended
master/slave mode between them, so the interface between them should be as
small as possible and clearly defined (a goal which we are still far away
The interface between MPlayer and a GUI is described in interface.h and there
should be only one such file (realization takes place in interface.c).
Just as there is a relationship between MPlayer and a GUI there is one
between the GUIs (currently X11/GTK and Win32) as well. Both GUIs could and
should use far more common code, but currently there is GUI related and
window manager related code mixed, and the Win32 GUI even contains code
identical to the X11/GTK GUI. (Most of the code you are moving in your third
patch is identical to code already existing in the X11/GTK GUI.) As a result,
X11/GTK code parts get fixed and improved, but Win32 parts often stay like
A cleaner approach than the current one would be:
MPlayer <-> interface <-> GUI = common stuff + window manager related stuff
where "window manger related stuff" is X11+GTK or Windows or something else.
The only difference between the two GUIs then should be (a "small" amount of)
window manger related stuff, and a GUI for a different platform could be
created by only providing such new stuff.
At some point I might start rebuilding the Win32 GUI that way.
For now, please see svn r33849, which should fix the problems in this sense.
More information about the MPlayer-dev-eng