[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Pygame Event System



On Tue, 2006-12-19 at 11:50 -0400, Ben Woodhead wrote:
> I have an extra library that generates SDL events and I have been looking at 
> how pygame gets events. I was wondering if anybody knew the best way to 
> incorperate the new events into pygames.

Pygame will get all the events that SDL receives. You will definitely
get the "ID" of the event. If it is in the range of "SDL user events"
you can access the "code" member of the user event structure.

Reading other data from the event will be tricky. Something might be
doable with ctypes? But pygame doesn't deliver any of the other fields
in the user event structure.