Re: [AD] user-defined events

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


Is it possible to have an event source that polls? What I mean is that
it only generates an event when the user tries to get an event from
its queue (or it blocks if there is no event).

I was thinking of things like mouse moves or joystick moves - if the
computer's a bit too slow it could flood the queue with useless events
(e.g. I think a USB HID device can generate a new report every
millisecond)

Pete


On Sun, Oct 5, 2008 at 1:45 AM, Peter Wang <novalazy@xxxxxxxxxx> wrote:
> On 2008-09-27, Peter Wang <novalazy@xxxxxxxxxx> wrote:
>> Here is a proposal for allowing user-defined events.
>
> Committed with some modifications.
>
> As discussed, it's the user's own problem to manage dynamically allocate
> memory which events may point to.
>
> I made the data1..data4 fields all have type `intptr_t' so they can be
> used to hold integers and pointers alike.
>
> al_emit_user_event() returns true if the event actually was delivered.
>
> Peter
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> --
> https://lists.sourceforge.net/lists/listinfo/alleg-developers
>




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