Re: [AD] variadic al_create_queue

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


On Wed, August 27, 2008 8:56 am, Elias Pschernig said:
> On Wed, 2008-08-27 at 20:21 +1000, Peter Wang wrote:
>> What you do you think about a variant of al_create_queue() which
>> takes a
>> list of event sources to register?
>>
>>     queue = al_create_queue_register(display, al_get_keyboard(),
>> 	al_get_mouse(), timer, NULL);
>>
>> Might reduce boilerplate a bit.
>>
>
> Sounds good to me.
>
> I'd also like a way to reduce all the *init calls, maybe something
> like:
>
> al_init(ALLEGRO_KEYBOARD |
> 	ALLEGRO_MOUSE |
> 	ALLEGRO_JOYSTICK |
> 	ALLEGRO_IIO |
> 	ALLEGRO_FONT |
> 	ALLEGRO_KCM_AUDIO)
>
> or maybe
>
> al_init("keyboard", "mouse", "joystick", "iio", "font", "kcm_audio",
> NULL)
>
> The latter once would allow finding addons at runtime. There also
> would
> be a shortcut forum:
>
> al_init(ALLEGRO_ALL) or al_init("all", NULL)
>
> Personally, I would then always use the all variant :) But nobody
> would
> be forced, al_init(0/NULL) would keep working.
>
> For addons, I think we might want to adopt the old modules mechanism
> (all of which are gone now I think). So al_init("iio") could
> actually
> try to locate <allegro-modules-path>/liba5_iio.so and try to
> initialize
> it, just like it worked with modules in A4 - I think that would make
> linking much easier.

Do we really gain anything other than a few keystrokes from all of
this?

Trent :{)>




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