From 8092855354823fd88035ebf914cd21d19ba838f1 Mon Sep 17 00:00:00 2001 From: James Turk Date: Wed, 16 Mar 2011 14:41:54 -0400 Subject: [PATCH] Event/Init enums --- csdl/__init__.py | 62 ++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 55 insertions(+), 7 deletions(-) diff --git a/csdl/__init__.py b/csdl/__init__.py index 8c51258..8a48eb4 100644 --- a/csdl/__init__.py +++ b/csdl/__init__.py @@ -9,13 +9,61 @@ def get_power_info(): return seconds.value, percent.value # Constants -SDL_INIT_TIMER = 0x00000001 -SDL_INIT_AUDIO = 0x00000010 -SDL_INIT_VIDEO = 0x00000020 -SDL_INIT_JOYSTICK = 0x00000200 -SDL_INIT_HAPTIC = 0x00001000 -SDL_INIT_NOPARACHUTE = 0x00100000 -SDL_INIT_EVERYTHING = 0x0000FFFF +class INIT(object): + TIMER = 0x00000001 + AUDIO = 0x00000010 + VIDEO = 0x00000020 + JOYSTICK = 0x00000200 + HAPTIC = 0x00001000 + NOPARACHUTE = 0x00100000 + EVERYTHING = 0x0000FFFF + +class Event(object): + FIRSTEVENT = 0 + + QUIT = 0x100 + + WINDOWEVENT = 0x200 + SYSWMEVENT = 0x201 + + KEYDOWN = 0x300 + KEYUP = 0x301 + TEXTEDITING = 0x302 + TEXTINPUT = 0x303 + + MOUSEMOTION = 0x400 + MOUSEBUTTONDOWN = 0x401 + MOUSEBUTTONUP = 0x402 + MOUSEWHEEL = 0x403 + + INPUTMOTION = 0x500 + INPUTBUTTONDOWN = 0x501 + INPUTBUTTONUP = 0x502 + INPUTWHEEL = 0x503 + INPUTPROXIMITYIN = 0x504 + INPUTPROXIMITYOUT = 0x505 + + JOYAXISMOTION = 0x600 + JOYBALLMOTION = 0x601 + JOYHATMOTION = 0x602 + JOYBUTTONDOWN = 0x603 + JOYBUTTONUP = 0x604 + + FINGERDOWN = 0x700 + FINGERUP = 0x701 + FINGERMOTION = 0x702 + TOUCHBUTTONDOWN = 0x703 + TOUCHBUTTONUP = 0x704 + + DOLLARGESTURE = 0x800 + DOLLARRECORD = 0x801 + MULTIGESTURE = 0x802 + + CLIPBOARDUPDATE = 0x900 + + USEREVENT = 0x8000 + LASTEVENT = 0xFFFF + ##### Error Handling