Re: [AD] set_window_close_button_callback_hook_button()

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


> First I shall quote from api.txt:
>                                                           "But this is
>    guaranteed to never happen in a series for which major and minor version
>    numbers are fixed; in other words, two versions that differ from each
>    other only by the revision (3rd) number will be strictly API compatible."

IMHO, this is a bad choice of words. It would mean that API compatibility needs
to be maintained in WIP versions (with odd second numbers) as well as stable
releases (with even second numbers). I think this is an unreasonable demand for
WIP versions.

> set_window_close_button() will enable or disable the close button, as before. 
> It will default to enabled. HOWEVER, the button isn't _actually_ enabled 
> unless a callback has been specified; until then, it'll appear greyed out, or 
> be inoperative, depending on the window manager or whatever.
> 
> set_window_close_hook() will set a callback function. The close button will 
> light up (or become operative), provided it is "enabled" as defined for the 
> last function. If NULL is specified here, the close button will appear greyed 
> out or be inoperative, even though it's "enabled" as defined for the last 
> function.

Something like this (though slightly different) was already suggested for the
next WIP release.

> <plug> This API change has affected DUMB ( http://dumb.sf.net/ ); people 
> download Allegro 4.1.5 WIP, then realise to their dismay that DUMB's example 
> players don't compile. Commenting set_window_close_hook() out in each file is 
> tedious. They get bored and go and use one of DUMB's archnemeses, JGMOD or 
> FMOD. :P </plug>

They should realize before installing a WIP version that it isn't a stable
release and that things may not work properly. That's why it's called a WIP
version - if they want to develop programs using Allegro, then they should,
in principle, use a stable release.

> The damage has already been done, but it's not too late to limit it. I 
> propose that the above change be made. For those who have gone on to the new 
> API, we can arrange for set_close_button_callback() to be a synonym for 
> set_window_close_hook().

Actually, we've discussed to provide backward compatibility to the old API.
Regardless, the API for the 4.0 series will remain the same.

Evert



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