summaryrefslogtreecommitdiffstats
path: root/Lib/stdwin/stdwinevents.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1990-10-13 19:23:40 (GMT)
committerGuido van Rossum <guido@python.org>1990-10-13 19:23:40 (GMT)
commitc636014c430620325f8d213e9ba10d925991b8d7 (patch)
tree058a21f7da3d8c6e7da0756ef7b1402fe7169a1a /Lib/stdwin/stdwinevents.py
parentdf79a1ee192231a75a381798bb35cefaf6c31a2a (diff)
downloadcpython-c636014c430620325f8d213e9ba10d925991b8d7.zip
cpython-c636014c430620325f8d213e9ba10d925991b8d7.tar.gz
cpython-c636014c430620325f8d213e9ba10d925991b8d7.tar.bz2
Initial revision
Diffstat (limited to 'Lib/stdwin/stdwinevents.py')
-rwxr-xr-xLib/stdwin/stdwinevents.py36
1 files changed, 36 insertions, 0 deletions
diff --git a/Lib/stdwin/stdwinevents.py b/Lib/stdwin/stdwinevents.py
new file mode 100755
index 0000000..889dd95
--- /dev/null
+++ b/Lib/stdwin/stdwinevents.py
@@ -0,0 +1,36 @@
+# Module 'stdwinevents' -- Constants for stdwin event types
+#
+# Suggested usage:
+# from stdwinevents import *
+
+# The function stdwin.getevent() returns a tuple containing:
+# (type, window, detail)
+# where detail may be <no value> or a value depending on type, see below:
+
+# Values for type:
+
+WE_NULL = 0 # not reported -- means 'no event' internally
+WE_ACTIVATE = 1 # detail is <no object>
+WE_CHAR = 2 # detail is the character
+WE_COMMAND = 3 # detail is one of the WC_* constants below
+WE_MOUSE_DOWN = 4 # detail is ((h, v), clicks, button, mask)
+WE_MOUSE_MOVE = 5 # ditto
+WE_MOUSE_UP = 6 # ditto
+WE_MENU = 7 # detail is (menu, item)
+WE_SIZE = 8 # detail is (width, height) [???]
+WE_MOVE = 9 # not reported -- reserved for future use
+WE_DRAW = 10 # detail is ((left, top), (right, bottom))
+WE_TIMER = 11 # detail is <no object>
+WE_DEACTIVATE = 12 # detail is <no object>
+
+# Values for detail when type is WE_COMMAND:
+
+WC_CLOSE = 1 # user hit close box
+WC_LEFT = 2 # left arrow key
+WC_RIGHT = 3 # right arrow key
+WC_UP = 4 # up arrow key
+WC_DOWN = 5 # down arrow key
+WC_CANCEL = 6 # not reported -- turned into KeyboardInterrupt
+WC_BACKSPACE = 7 # backspace key
+WC_TAB = 8 # tab key
+WC_RETURN = 9 # return or enter key