SDL_Event structure questions

Please excuse my ignorance, but this has got me a
little confused.

SDL_Event seems to be a union of many different
structures needed to represent all of the different
types of events that are possible. The “type” member
is an 8-bit type, and there are 32 different event
type enumerations.

What, then, is SDL_EVENTMASK? It seems to be for
bitmasking different event types, but obviously to
bitmask 32 different events, you’d need 32 bits, not 8
bits.

This means that obviously the type member variable of
SDL_Event is not a bitmask.

So my question is, what is SDL_EVENTMASK used for?__________________________________
Do you Yahoo!?
Friends. Fun. Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/

Please excuse my ignorance, but this has got me a
little confused.

SDL_Event seems to be a union of many different
structures needed to represent all of the different
types of events that are possible. The “type” member
is an 8-bit type, and there are 32 different event
type enumerations.

What, then, is SDL_EVENTMASK? It seems to be for
bitmasking different event types, but obviously to
bitmask 32 different events, you’d need 32 bits, not 8
bits.

This means that obviously the type member variable of
SDL_Event is not a bitmask.

So my question is, what is SDL_EVENTMASK used for?

It is defined in SDL_events.h along with a bit mask for every SDL event
type. It is used by SDL_PeepEvents()
(http://sdldoc.csn.ul.ie/sdlpeepevents.php) to select which type of
events you want to retrieve. I suppose it is there because it is much
easier to send a bit mask into a C function than to send a vector of
enumerations.

		Bob PendletonOn Wed, 2004-05-26 at 23:13, Donny Viszneki wrote:

Do you Yahoo!?
Friends. Fun. Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

±-------------------------------------+