blob: ab801484228012955ab075e44927be628d345f5e [file] [log] [blame]
Guido van Rossumc6360141990-10-13 19:23:40 +00001# 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
12WE_NULL = 0 # not reported -- means 'no event' internally
13WE_ACTIVATE = 1 # detail is <no object>
14WE_CHAR = 2 # detail is the character
15WE_COMMAND = 3 # detail is one of the WC_* constants below
16WE_MOUSE_DOWN = 4 # detail is ((h, v), clicks, button, mask)
17WE_MOUSE_MOVE = 5 # ditto
18WE_MOUSE_UP = 6 # ditto
19WE_MENU = 7 # detail is (menu, item)
20WE_SIZE = 8 # detail is (width, height) [???]
21WE_MOVE = 9 # not reported -- reserved for future use
22WE_DRAW = 10 # detail is ((left, top), (right, bottom))
23WE_TIMER = 11 # detail is <no object>
24WE_DEACTIVATE = 12 # detail is <no object>
Guido van Rossumbe5ea231990-10-31 11:26:01 +000025WE_EXTERN = 13 # detail is <no object>
26WE_KEY = 14 # detail is ???
27WE_LOST_SEL = 15 # detail is selection number
28WE_CLOSE = 16 # detail is <no object>
Guido van Rossumc6360141990-10-13 19:23:40 +000029
30# Values for detail when type is WE_COMMAND:
31
32WC_CLOSE = 1 # user hit close box
33WC_LEFT = 2 # left arrow key
34WC_RIGHT = 3 # right arrow key
35WC_UP = 4 # up arrow key
36WC_DOWN = 5 # down arrow key
37WC_CANCEL = 6 # not reported -- turned into KeyboardInterrupt
38WC_BACKSPACE = 7 # backspace key
39WC_TAB = 8 # tab key
40WC_RETURN = 9 # return or enter key
Guido van Rossumbe5ea231990-10-31 11:26:01 +000041
42# Selection numbers
43
44WS_CLIPBOARD = 0
45WS_PRIMARY = 1
46WS_SECONDARY = 2