[MPlayer-dev-eng] [HACK] fix compilation for menu and gui

Uoti Urpala uoti.urpala at pp1.inet.fi
Wed Feb 21 18:46:49 CET 2007

On Wed, 2007-02-21 at 18:24 +0100, Aurelien Jacobs wrote:
> Before this gets applied, I would like to know if the rule to never
> #include a header from the inside of another header was still true ?
> Here it would greatly help to include all the needed headers in
> mp_core.h. This would avoid adding a dozen of headers in every
> libmenu file.

Requiring all the headers (even automatically included) when accessing
the internals from outside could be avoided in two ways at least:
1) Since most of the variables are pointers they could be declared as
the corresponding struct pointers instead of using the typedef names.
That wouldn't require the headers containing the full typedefs.
2) Create functions in a file which already includes the headers to get
certain fields from an MPContext.

I think I'll add 2) for now for the fields required in libmenu and GUI
as the number of internal fields used isn't too large. Maybe it'll need
to be changed in the future if more fields are moved to the struct and
nobody changes the GUI not to use the mplayer.c internals directly so

More information about the MPlayer-dev-eng mailing list