[AD] al_toggle_display_flag

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


I'd like to introduce a new function al_toggle_display_flag() which
would replace the current al_toggle_window_frame().

The change would look like this. Instead of:

al_toggle_window_frame(display, true)

you would use:

al_toggle_display_flag(display, ALLEGRO_NOFRAME, true)

Except instead of just ALLEGRO_NOFRAME, each of the display flags could
be used. It also would have a boolean return value telling if the change
succeeded.

In addition to toggling the window frame, also the resize flag and
expose events flag could be toggled then. Once we have support for it,
also an ALLEGRO_MAXIMIZED flag. And of course fullscreen mode but I'll
write another message about that.

We could just as well have a separate function for each and I'm not
really sure which is better, right now I feel re-using the flags is the
nicer API. Also except fullscreen none of these flags are very important
to toggle - usually the only time you would care is the initial state.

Anyway, it should be a simple change - the "toggle_frame" display vtable
entry would be renamed to "toggle_display_flag". A driver could then
just provide an empty function returning false if it doesn't like
changing window properties after it was created (e.g. the iphone port).

-- 
Elias Pschernig <elias.pschernig@xxxxxxxxxx>





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