Mercurial > sdl-ios-xcode
comparison src/events/SDL_windowevents.c @ 4429:faa9fc8e7f67
General improvements for user custom event registration
* Switched event type to enum (int32)
* Switched polling by mask to polling by type range
* Added SDL_RegisterEvents() to allow dynamic user event registration
* Spread events out to allow inserting new related events without breaking binary compatibility
* Added padding to event structures so they're the same size regardless of 32-bit compiler structure packing settings
* Split SDL_HasEvent() to SDL_HasEvent() for a single event and SDL_HasEvents() for a range of events
* Added SDL_GetEventState() as a shortcut for SDL_EventState(X, SDL_QUERY)
* Added SDL_FlushEvent() and SDL_FlushEvents() to clear events from the event queue
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Thu, 25 Mar 2010 01:08:26 -0700 |
parents | f7b03b6838cb |
children | 8c39b82dc7b0 |
comparison
equal
deleted
inserted
replaced
4428:68dfd6df47da | 4429:faa9fc8e7f67 |
---|---|
142 break; | 142 break; |
143 } | 143 } |
144 | 144 |
145 /* Post the event, if desired */ | 145 /* Post the event, if desired */ |
146 posted = 0; | 146 posted = 0; |
147 if (SDL_ProcessEvents[SDL_WINDOWEVENT] == SDL_ENABLE) { | 147 if (SDL_GetEventState(SDL_WINDOWEVENT) == SDL_ENABLE) { |
148 SDL_Event event; | 148 SDL_Event event; |
149 event.type = SDL_WINDOWEVENT; | 149 event.type = SDL_WINDOWEVENT; |
150 event.window.event = windowevent; | 150 event.window.event = windowevent; |
151 event.window.data1 = data1; | 151 event.window.data1 = data1; |
152 event.window.data2 = data2; | 152 event.window.data2 = data2; |