Re: [AD] do_menu work better?

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Sat, Feb 17, 2001 at 10:25:39AM +1100, Peter Wang wrote:
> Would you _really_ call that function from your own program?  I
> think `_do_menu' being external was just a mistake (perhaps it was
> meant to be shared between functions in `gui.c' and `guiproc.c'),
> and should be made `static'.  Anyone who knows more about the GUI
> want to comment?

I'm not sure I know more about the GUI, but I think `guiproc.c'
is effectively a bunch of high-level `sample' gui routines.  So
if it needs to share a variable, I think that variable should be
visible to user code too.  Along the same lines, I think it
shouldn't include aintern.h, but I haven't checked what exactly
it needs from there.

I'm also not sure about having d_menu_proc declared in `gui.c';
it seems more like a guiproc function.  In terms of
customisation, maybe it would be good to indirect the GUI
functions too, i.e.  make d_*_proc be pointers to functions
which the user can reassign.  Heh, this would make AllegroGL's
GUI support much easier to write, if we ever get around to it.

George



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/