Mercurial > sdl-ios-xcode
comparison include/SDL_events.h @ 2710:44e49d3fa6cf
Final merge of Google Summer of Code 2008 work...
Many-mouse and tablet support
by Szymon Wilczek, mentored by Ryan C. Gordon
Everything concerning the project is noted on the wiki:
http://wilku.ravenlord.ws/doku.php?id=start
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Mon, 25 Aug 2008 06:33:00 +0000 |
parents | c97ad1abe05b |
children | 99210400e8b9 |
comparison
equal
deleted
inserted
replaced
2709:fd3f0f1147e7 | 2710:44e49d3fa6cf |
---|---|
70 SDL_JOYHATMOTION, /**< Joystick hat position change */ | 70 SDL_JOYHATMOTION, /**< Joystick hat position change */ |
71 SDL_JOYBUTTONDOWN, /**< Joystick button pressed */ | 71 SDL_JOYBUTTONDOWN, /**< Joystick button pressed */ |
72 SDL_JOYBUTTONUP, /**< Joystick button released */ | 72 SDL_JOYBUTTONUP, /**< Joystick button released */ |
73 SDL_QUIT, /**< User-requested quit */ | 73 SDL_QUIT, /**< User-requested quit */ |
74 SDL_SYSWMEVENT, /**< System specific event */ | 74 SDL_SYSWMEVENT, /**< System specific event */ |
75 SDL_PROXIMITYIN, /**< Proximity In event */ | |
76 SDL_PROXIMITYOUT, /**< Proximity Out event */ | |
75 SDL_EVENT_RESERVED1, /**< Reserved for future use... */ | 77 SDL_EVENT_RESERVED1, /**< Reserved for future use... */ |
76 SDL_EVENT_RESERVED2, /**< Reserved for future use... */ | 78 SDL_EVENT_RESERVED2, |
77 SDL_EVENT_RESERVED3, /**< Reserved for future use... */ | 79 SDL_EVENT_RESERVED3, |
78 /* Events SDL_USEREVENT through SDL_MAXEVENTS-1 are for your use */ | 80 /* Events SDL_USEREVENT through SDL_MAXEVENTS-1 are for your use */ |
79 SDL_USEREVENT = 24, | 81 SDL_USEREVENT = 24, |
80 /* This last event is only for bounding internal arrays | 82 /* This last event is only for bounding internal arrays |
81 It is the number of bits in the event mask datatype -- Uint32 | 83 It is the number of bits in the event mask datatype -- Uint32 |
82 */ | 84 */ |
110 SDL_JOYEVENTMASK = SDL_EVENTMASK(SDL_JOYAXISMOTION) | | 112 SDL_JOYEVENTMASK = SDL_EVENTMASK(SDL_JOYAXISMOTION) | |
111 SDL_EVENTMASK(SDL_JOYBALLMOTION) | | 113 SDL_EVENTMASK(SDL_JOYBALLMOTION) | |
112 SDL_EVENTMASK(SDL_JOYHATMOTION) | | 114 SDL_EVENTMASK(SDL_JOYHATMOTION) | |
113 SDL_EVENTMASK(SDL_JOYBUTTONDOWN) | SDL_EVENTMASK(SDL_JOYBUTTONUP), | 115 SDL_EVENTMASK(SDL_JOYBUTTONDOWN) | SDL_EVENTMASK(SDL_JOYBUTTONUP), |
114 SDL_QUITMASK = SDL_EVENTMASK(SDL_QUIT), | 116 SDL_QUITMASK = SDL_EVENTMASK(SDL_QUIT), |
115 SDL_SYSWMEVENTMASK = SDL_EVENTMASK(SDL_SYSWMEVENT) | 117 SDL_SYSWMEVENTMASK = SDL_EVENTMASK(SDL_SYSWMEVENT), |
118 SDL_PROXIMITYINMASK = SDL_EVENTMASK(SDL_PROXIMITYIN), | |
119 SDL_PROXIMITYOUTMASK = SDL_EVENTMASK(SDL_PROXIMITYOUT) | |
116 } SDL_EventMask; | 120 } SDL_EventMask; |
117 #define SDL_ALLEVENTS 0xFFFFFFFF | 121 #define SDL_ALLEVENTS 0xFFFFFFFF |
118 | 122 |
119 /** | 123 /** |
120 * \struct SDL_WindowEvent | 124 * \struct SDL_WindowEvent |
168 Uint8 type; /**< SDL_MOUSEMOTION */ | 172 Uint8 type; /**< SDL_MOUSEMOTION */ |
169 Uint8 which; /**< The mouse device index */ | 173 Uint8 which; /**< The mouse device index */ |
170 Uint8 state; /**< The current button state */ | 174 Uint8 state; /**< The current button state */ |
171 int x; /**< X coordinate, relative to window */ | 175 int x; /**< X coordinate, relative to window */ |
172 int y; /**< Y coordinate, relative to window */ | 176 int y; /**< Y coordinate, relative to window */ |
177 int z; /**< Z coordinate, for future use */ | |
178 int pressure; /**< Pressure reported by tablets */ | |
179 int pressure_max; /**< Maximum value of the pressure reported by the device */ | |
180 int pressure_min; /**< Minimum value of the pressure reported by the device */ | |
181 int rotation; /**< For future use */ | |
182 int tilt; /**< For future use */ | |
183 int cursor; /**< The cursor being used in the event */ | |
173 int xrel; /**< The relative motion in the X direction */ | 184 int xrel; /**< The relative motion in the X direction */ |
174 int yrel; /**< The relative motion in the Y direction */ | 185 int yrel; /**< The relative motion in the Y direction */ |
175 SDL_WindowID windowID; /**< The window with mouse focus, if any */ | 186 SDL_WindowID windowID; /**< The window with mouse focus, if any */ |
176 } SDL_MouseMotionEvent; | 187 } SDL_MouseMotionEvent; |
177 | 188 |
313 { | 324 { |
314 Uint8 type; | 325 Uint8 type; |
315 int w; | 326 int w; |
316 int h; | 327 int h; |
317 } SDL_ResizeEvent; | 328 } SDL_ResizeEvent; |
329 | |
330 typedef struct SDL_ProximityEvent | |
331 { | |
332 Uint8 type; | |
333 Uint8 which; | |
334 int cursor; | |
335 int x; | |
336 int y; | |
337 } SDL_ProximityEvent; | |
318 | 338 |
319 /** | 339 /** |
320 * \union SDL_Event | 340 * \union SDL_Event |
321 * | 341 * |
322 * \brief General event structure | 342 * \brief General event structure |
335 SDL_JoyHatEvent jhat; /**< Joystick hat event data */ | 355 SDL_JoyHatEvent jhat; /**< Joystick hat event data */ |
336 SDL_JoyButtonEvent jbutton; /**< Joystick button event data */ | 356 SDL_JoyButtonEvent jbutton; /**< Joystick button event data */ |
337 SDL_QuitEvent quit; /**< Quit request event data */ | 357 SDL_QuitEvent quit; /**< Quit request event data */ |
338 SDL_UserEvent user; /**< Custom event data */ | 358 SDL_UserEvent user; /**< Custom event data */ |
339 SDL_SysWMEvent syswm; /**< System dependent window event data */ | 359 SDL_SysWMEvent syswm; /**< System dependent window event data */ |
360 SDL_ProximityEvent proximity; /**< Proximity In or Out event */ | |
340 | 361 |
341 /* Temporarily here for backwards compatibility */ | 362 /* Temporarily here for backwards compatibility */ |
342 SDL_ActiveEvent active; | 363 SDL_ActiveEvent active; |
343 SDL_ResizeEvent resize; | 364 SDL_ResizeEvent resize; |
344 } SDL_Event; | 365 } SDL_Event; |