Guido van Rossum | c636014 | 1990-10-13 19:23:40 +0000 | [diff] [blame^] | 1 | # Module 'stdwinevents' -- Constants for stdwin event types |
| 2 | # |
| 3 | # Suggested usage: |
| 4 | # from stdwinevents import * |
| 5 | |
| 6 | # The function stdwin.getevent() returns a tuple containing: |
| 7 | # (type, window, detail) |
| 8 | # where detail may be <no value> or a value depending on type, see below: |
| 9 | |
| 10 | # Values for type: |
| 11 | |
| 12 | WE_NULL = 0 # not reported -- means 'no event' internally |
| 13 | WE_ACTIVATE = 1 # detail is <no object> |
| 14 | WE_CHAR = 2 # detail is the character |
| 15 | WE_COMMAND = 3 # detail is one of the WC_* constants below |
| 16 | WE_MOUSE_DOWN = 4 # detail is ((h, v), clicks, button, mask) |
| 17 | WE_MOUSE_MOVE = 5 # ditto |
| 18 | WE_MOUSE_UP = 6 # ditto |
| 19 | WE_MENU = 7 # detail is (menu, item) |
| 20 | WE_SIZE = 8 # detail is (width, height) [???] |
| 21 | WE_MOVE = 9 # not reported -- reserved for future use |
| 22 | WE_DRAW = 10 # detail is ((left, top), (right, bottom)) |
| 23 | WE_TIMER = 11 # detail is <no object> |
| 24 | WE_DEACTIVATE = 12 # detail is <no object> |
| 25 | |
| 26 | # Values for detail when type is WE_COMMAND: |
| 27 | |
| 28 | WC_CLOSE = 1 # user hit close box |
| 29 | WC_LEFT = 2 # left arrow key |
| 30 | WC_RIGHT = 3 # right arrow key |
| 31 | WC_UP = 4 # up arrow key |
| 32 | WC_DOWN = 5 # down arrow key |
| 33 | WC_CANCEL = 6 # not reported -- turned into KeyboardInterrupt |
| 34 | WC_BACKSPACE = 7 # backspace key |
| 35 | WC_TAB = 8 # tab key |
| 36 | WC_RETURN = 9 # return or enter key |