Re: [AD] new proposal for *_is_* functions

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


On September 6, 2010, Peter Wang wrote:
> I had another think about how to name the "is" functions.
> Most of them are rarely going to be called (if ever), so consistency
> should be the deciding principle.  al_event_queue_is_empty is the only
> one of the functions which will be commonly called.
> 
> Many of the functions could/should be handled differently, sidestepping
> the issue:
> 
> * al_is_opengl_extension_supported -> al_have_opengl_extension
>     It's shorter and matches al_have_d3d_*
> 
> * al_is_sub_bitmap -> remove
>     A bitmap flag would be consistent with ALLEGRO_MEMORY_BITMAP, etc.
> 
> * al_timer_is_started -> al_get_timer_started
>     Matches the other al_get_timer_* functions

Only one suggestion from me: al_timer_is_running

> * al_fs_entry_is_directory -> remove
> * al_fs_entry_is_file -> remove
>     Conveniences for al_get_fs_entry_mode only.
> 
> * al_is_path_present -> remove
>     This contains a workaround for the trailing slash problem on
>     Windows, but that should be done in fshook_stdio.c.
>     Then al_is_path_present would be nothing more than
>     al_filename_exists(al_path_cstr(path, ALLEGRO_NATIVE_PATH_SEP));
> 
> * al_event_queue_is_empty -> al_is_event_queue_empty
> 
> * al_is_joystick_installed
>     Currently missing.
> 
> Peter
> 
> ---------------------------------------------------------------------------
> --- This SF.net Dev2Dev email is sponsored by:
> 
> Show off your parallel programming skills.
> Enter the Intel(R) Threading Challenge 2010.
> http://p.sf.net/sfu/intel-thread-sfd


-- 
Thomas Fjellstrom
tfjellstrom@xxxxxxxxxx




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