comparison include/SDL_compat.h @ 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 a3e71b957215
children 82f357a91d43
comparison
equal deleted inserted replaced
4428:68dfd6df47da 4429:faa9fc8e7f67
89 #define SDL_APPACTIVE 0x04 89 #define SDL_APPACTIVE 0x04
90 90
91 #define SDL_LOGPAL 0x01 91 #define SDL_LOGPAL 0x01
92 #define SDL_PHYSPAL 0x02 92 #define SDL_PHYSPAL 0x02
93 93
94 #define SDL_ACTIVEEVENT SDL_EVENT_RESERVED1 94 #define SDL_ACTIVEEVENT SDL_EVENT_COMPAT1
95 #define SDL_VIDEORESIZE SDL_EVENT_RESERVED2 95 #define SDL_VIDEORESIZE SDL_EVENT_COMPAT2
96 #define SDL_VIDEOEXPOSE SDL_EVENT_RESERVED3 96 #define SDL_VIDEOEXPOSE SDL_EVENT_COMPAT3
97 #define SDL_ACTIVEEVENTMASK SDL_EVENTMASK(SDL_ACTIVEEVENT) 97 #define SDL_ACTIVEEVENTMASK SDL_ACTIVEEVENT, SDL_ACTIVEEVENT
98 #define SDL_VIDEORESIZEMASK SDL_EVENTMASK(SDL_VIDEORESIZE) 98 #define SDL_VIDEORESIZEMASK SDL_VIDEORESIZE, SDL_VIDEORESIZE
99 #define SDL_VIDEOEXPOSEMASK SDL_EVENTMASK(SDL_VIDEOEXPOSE) 99 #define SDL_VIDEOEXPOSEMASK SDL_VIDEOEXPOSE, SDL_VIDEOEXPOSE
100 #define SDL_WINDOWEVENTMASK SDL_WINDOWEVENT, SDL_WINDOWEVENT
101 #define SDL_KEYDOWNMASK SDL_KEYDOWN, SDL_KEYDOWN
102 #define SDL_KEYUPMASK SDL_KEYUP, SDL_KEYUP
103 #define SDL_KEYEVENTMASK SDL_KEYDOWN, SDL_KEYUP
104 #define SDL_TEXTEDITINGMASK SDL_TEXTEDITING, SDL_TEXTEDITING
105 #define SDL_TEXTINPUTMASK SDL_TEXTINPUT, SDL_TEXTINPUT
106 #define SDL_MOUSEMOTIONMASK SDL_MOUSEMOTION, SDL_MOUSEMOTION
107 #define SDL_MOUSEBUTTONDOWNMASK SDL_MOUSEBUTTONDOWN, SDL_MOUSEBUTTONDOWN
108 #define SDL_MOUSEBUTTONUPMASK SDL_MOUSEBUTTONUP, SDL_MOUSEBUTTONUP
109 #define SDL_MOUSEWHEELMASK SDL_MOUSEWHEEL, SDL_MOUSEWHEEL
110 #define SDL_MOUSEEVENTMASK SDL_MOUSEMOTION, SDL_MOUSEBUTTONUP
111 #define SDL_JOYAXISMOTIONMASK SDL_JOYAXISMOTION, SDL_JOYAXISMOTION
112 #define SDL_JOYBALLMOTIONMASK SDL_JOYBALLMOTION, SDL_JOYBALLMOTION
113 #define SDL_JOYHATMOTIONMASK SDL_JOYHATMOTION, SDL_JOYHATMOTION
114 #define SDL_JOYBUTTONDOWNMASK SDL_JOYBUTTONDOWN, SDL_JOYBUTTONDOWN
115 #define SDL_JOYBUTTONUPMASK SDL_JOYBUTTONUP, SDL_JOYBUTTONUP
116 #define SDL_JOYEVENTMASK SDL_JOYAXISMOTION, SDL_JOYBUTTONUP
117 #define SDL_QUITMASK SDL_QUIT, SDL_QUIT
118 #define SDL_SYSWMEVENTMASK SDL_SYSWMEVENT, SDL_SYSWMEVENT
119 #define SDL_PROXIMITYINMASK SDL_PROXIMITYIN, SDL_PROXIMITYIN
120 #define SDL_PROXIMITYOUTMASK SDL_PROXIMITYOUT, SDL_PROXIMITYOUT
121 #define SDL_ALLEVENTS SDL_FIRSTEVENT, SDL_LASTEVENT
100 122
101 #define SDL_BUTTON_WHEELUP 4 123 #define SDL_BUTTON_WHEELUP 4
102 #define SDL_BUTTON_WHEELDOWN 5 124 #define SDL_BUTTON_WHEELDOWN 5
103 125
104 #define SDL_DEFAULT_REPEAT_DELAY 500 126 #define SDL_DEFAULT_REPEAT_DELAY 500