Re: [AD] Removing the default close button support

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


On 2002-10-31, Eric <ebotcazou@xxxxxxxxxx> wrote:
> > > so we don't need two functions anymore in order to handle it.
> >
> > Not so sure about this.
> 
> Why ? Can't we simply merge the two former functions ? 
> set_close_button_callback() will enable the close button if it is passed a 
> non-NULL argument and disable it if it is passed a NULL argument.

I was thinking that the close hook is not only for the close button,
e.g. it should be called for Alt-F4 under Windows, so whether the close
button is clickable is orthogonal to whether the close hook is set.

> > Well, it's not the first time "hook" has been used instead of "callback"
> > so I think it should just be left as is.  (And IMHO Allegro usually
> > means "hook" where it has "callback".)
> 
> I don't think we should keep the same name if we changed the behaviour of the 
> function, as I'm proposing.

Ok.

> int set_close_button_callback(void (*proc)(void), int enable_confirmation);
...
>         If enable_confirmation is set to TRUE, a dialog box will appear so as 
> to let the user confirm his action

That's interesting.  In that case, maybe the user should be allowed to
customise the message?

-- 
王浩禎



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