Re: [AD] Renamed API second draft

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


> Yes, but al_exit_mouse is not very normal either (is the mouse
> exitting from where? are you exitting from the mouse? how did you get
> inside?), so I've chosen al_close_xxx for all the remove functions,

I should have been clearer: I'd rather keep an init() and an exit()
functions (or macros) for the initialization of the whole library, not for
the modules. I agree that al_exit_mouse() is ugly, the pair install/remove
is far better.

Moreover, I find al_init()/al_close() not very nice either.

Here's my proposition:
- general initialization: al_install_allegro()/al_remove_allegro() functions
with two macros allegro_init()/allegro_exit(). We could add a new parameter
to al_install_allegro():

int al_install_allegro(int system_id, int u_format, int *errno_ptr, int
(*atexit_ptr)());

#define allegro_init() al_install_allegro(SYSTEM_AUTODETECT, U_UTF8, &errno,
atexit)

and get rid of set_uformat().

- module initialization: al_install_$(module_name)/al_remove_$(module_name)

> My concern was about how to rename _getpixel, but it is renamed
> logically to al_get_pixel_(depth).

And how do you rename getpixel() then ?

Moreover you have forgotten the other symbols prepended with an underscore
that are part of the API: _putpixel, _ustrdup and _set_color.

--
Eric Botcazou
ebotcazou@xxxxxxxxxx



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