[AD] new API

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


I added a temporary example to see how the new API looks, already seems
to work quite well :)

I thought such an example is better for now than starting to adjust the
old examples, since API details might change. And also, as we have no
documentation yet, so a public example is a good thing to document what
works already.

Anyway, writing this example gave me some more thins to wonder..

- Do we really want flags parameters not at the end? I'd prefer them as
last parameter..

- Maybe we could reserve the value 0 to always mean auto-detect, e.g. if
used as graphics driver, and also when used as update method. 99% of
users could then just use al_create_display(0, 0, w, h, 0) - saves
unnecessary typing.

- Do we still need the install_* functions? I assume, they are useful to
throw out stuff when static linking, but I think it would be more in the
spirit of Allegro if input just works, without having to "install" it
all.. also see below.

- Do we want event sources to be used like in the example? I.e. always
create an explicit EVENT_QUEUE, then attach various sources to it? I'd
somehow prefer a more high level approach, maybe something like:

EVENT_QUEUE *al_get_display_event_queue(AL_DISPLAY *display)

And it would return a queue, ready to query keyboard, mouse, display,
joystick, and possibly more, events.

- i really like the event API :)

- can we back-port al_current_time to 4.2? I think it's a very useful
function..

-- 
Elias Pschernig





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