[MPlayer-dev-eng] GUI and vo_x11 functions

Reimar Döffinger Reimar.Doeffinger at gmx.de
Fri Aug 26 19:11:23 CEST 2011


On Fri, Aug 26, 2011 at 12:38:28PM +0200, Ingo Brückl wrote:
> The question is whether vo_x11_ewmh_fullscreen() and all the other vo_x11
> functions should only operate on the global vo variables (like vo_window in
> that case) or whether they should be reusable functions, offering services
> for whoever wants to call them (the GUI in my case).

Since Alexander already answered I will keep it short:
In principle and in general it is a good idea to avoid globals
and pass things properly as arguments.
On the other hand making a mess of the code is not so good.
Usually I'd consider a function taking 5 and more arguments quite
close to a mess, particularly when they are pointer/output arguments.

Ok, I didn't really say much here, but I think you get the idea.
It's as always, if it makes the code better: great!
Otherwise: It may or may not be a good idea.

Reimar


More information about the MPlayer-dev-eng mailing list