Re: Asynchronous keyboard callbacks (was: [AD] Proposal for an input model)

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


> To register callbacks, you would call:
>
> al_register_keyboard_callback(void(*)(int));
> al_register_scancode_callback(void (*)(int));
>
> where the function takes parameters in the format described by
> al_read_key() and al_read_scancode(), respectively.

Do these functions detect key releases ?

> On Linux, this would be fairly difficult; the very simple polling system
> would need to be unhooked, and a different subsystem (operating in its
> own thread) would be installed and have to emulate the current system.

Why fairly difficult ?

> Hmm. It would be simpler, solving both your questions, if we provide our
> own thread API, but should we really do that?

I personally don't think so.

--
Eric Botcazou
ebotcazou@xxxxxxxxxx



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