Mercurial > cpython-lru_cache-weakref
annotate Lib/lib-stdwin/stdwinevents.py @ 5817:48b94de85bf3 legacy-trunk
Extensive changes by AMK.
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Thu, 17 Jul 1997 16:29:42 +0000 |
| parents | ac0828ef68f2 |
| children |
| rev | line source |
|---|---|
| 5 | 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 | |
|
445
c0683d6676c6
Added improved comments.
Guido van Rossum <guido@python.org>
parents:
57
diff
changeset
|
13 WE_ACTIVATE = 1 # detail is None |
| 5 | 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) | |
|
445
c0683d6676c6
Added improved comments.
Guido van Rossum <guido@python.org>
parents:
57
diff
changeset
|
20 WE_SIZE = 8 # detail is (width, height) |
| 5 | 21 WE_MOVE = 9 # not reported -- reserved for future use |
| 22 WE_DRAW = 10 # detail is ((left, top), (right, bottom)) | |
|
445
c0683d6676c6
Added improved comments.
Guido van Rossum <guido@python.org>
parents:
57
diff
changeset
|
23 WE_TIMER = 11 # detail is None |
|
c0683d6676c6
Added improved comments.
Guido van Rossum <guido@python.org>
parents:
57
diff
changeset
|
24 WE_DEACTIVATE = 12 # detail is None |
|
c0683d6676c6
Added improved comments.
Guido van Rossum <guido@python.org>
parents:
57
diff
changeset
|
25 WE_EXTERN = 13 # detail is None |
|
57
a1c2b4fad136
Added new event types and selection types.
Guido van Rossum <guido@python.org>
parents:
5
diff
changeset
|
26 WE_KEY = 14 # detail is ??? |
|
a1c2b4fad136
Added new event types and selection types.
Guido van Rossum <guido@python.org>
parents:
5
diff
changeset
|
27 WE_LOST_SEL = 15 # detail is selection number |
|
445
c0683d6676c6
Added improved comments.
Guido van Rossum <guido@python.org>
parents:
57
diff
changeset
|
28 WE_CLOSE = 16 # detail is None |
| 5 | 29 |
| 30 # Values for detail when type is WE_COMMAND: | |
| 31 | |
|
445
c0683d6676c6
Added improved comments.
Guido van Rossum <guido@python.org>
parents:
57
diff
changeset
|
32 WC_CLOSE = 1 # obsolete; now reported as WE_CLOSE |
| 5 | 33 WC_LEFT = 2 # left arrow key |
| 34 WC_RIGHT = 3 # right arrow key | |
| 35 WC_UP = 4 # up arrow key | |
| 36 WC_DOWN = 5 # down arrow key | |
| 37 WC_CANCEL = 6 # not reported -- turned into KeyboardInterrupt | |
| 38 WC_BACKSPACE = 7 # backspace key | |
| 39 WC_TAB = 8 # tab key | |
| 40 WC_RETURN = 9 # return or enter key | |
|
57
a1c2b4fad136
Added new event types and selection types.
Guido van Rossum <guido@python.org>
parents:
5
diff
changeset
|
41 |
|
a1c2b4fad136
Added new event types and selection types.
Guido van Rossum <guido@python.org>
parents:
5
diff
changeset
|
42 # Selection numbers |
|
a1c2b4fad136
Added new event types and selection types.
Guido van Rossum <guido@python.org>
parents:
5
diff
changeset
|
43 |
|
a1c2b4fad136
Added new event types and selection types.
Guido van Rossum <guido@python.org>
parents:
5
diff
changeset
|
44 WS_CLIPBOARD = 0 |
|
a1c2b4fad136
Added new event types and selection types.
Guido van Rossum <guido@python.org>
parents:
5
diff
changeset
|
45 WS_PRIMARY = 1 |
|
a1c2b4fad136
Added new event types and selection types.
Guido van Rossum <guido@python.org>
parents:
5
diff
changeset
|
46 WS_SECONDARY = 2 |
|
1095
ac0828ef68f2
* mainloop.py: added facility for calling select(). Also added
Guido van Rossum <guido@python.org>
parents:
445
diff
changeset
|
47 |
|
ac0828ef68f2
* mainloop.py: added facility for calling select(). Also added
Guido van Rossum <guido@python.org>
parents:
445
diff
changeset
|
48 # Modifier masks in key and mouse events |
|
ac0828ef68f2
* mainloop.py: added facility for calling select(). Also added
Guido van Rossum <guido@python.org>
parents:
445
diff
changeset
|
49 |
|
ac0828ef68f2
* mainloop.py: added facility for calling select(). Also added
Guido van Rossum <guido@python.org>
parents:
445
diff
changeset
|
50 WM_SHIFT = (1 << 0) |
|
ac0828ef68f2
* mainloop.py: added facility for calling select(). Also added
Guido van Rossum <guido@python.org>
parents:
445
diff
changeset
|
51 WM_LOCK = (1 << 1) |
|
ac0828ef68f2
* mainloop.py: added facility for calling select(). Also added
Guido van Rossum <guido@python.org>
parents:
445
diff
changeset
|
52 WM_CONTROL = (1 << 2) |
|
ac0828ef68f2
* mainloop.py: added facility for calling select(). Also added
Guido van Rossum <guido@python.org>
parents:
445
diff
changeset
|
53 WM_META = (1 << 3) |
|
ac0828ef68f2
* mainloop.py: added facility for calling select(). Also added
Guido van Rossum <guido@python.org>
parents:
445
diff
changeset
|
54 WM_OPTION = (1 << 4) |
|
ac0828ef68f2
* mainloop.py: added facility for calling select(). Also added
Guido van Rossum <guido@python.org>
parents:
445
diff
changeset
|
55 WM_NUM = (1 << 5) |
|
ac0828ef68f2
* mainloop.py: added facility for calling select(). Also added
Guido van Rossum <guido@python.org>
parents:
445
diff
changeset
|
56 |
|
ac0828ef68f2
* mainloop.py: added facility for calling select(). Also added
Guido van Rossum <guido@python.org>
parents:
445
diff
changeset
|
57 WM_BUTTON1 = (1 << 8) |
|
ac0828ef68f2
* mainloop.py: added facility for calling select(). Also added
Guido van Rossum <guido@python.org>
parents:
445
diff
changeset
|
58 WM_BUTTON2 = (1 << 9) |
|
ac0828ef68f2
* mainloop.py: added facility for calling select(). Also added
Guido van Rossum <guido@python.org>
parents:
445
diff
changeset
|
59 WM_BUTTON3 = (1 << 10) |
|
ac0828ef68f2
* mainloop.py: added facility for calling select(). Also added
Guido van Rossum <guido@python.org>
parents:
445
diff
changeset
|
60 WM_BUTTON4 = (1 << 11) |
|
ac0828ef68f2
* mainloop.py: added facility for calling select(). Also added
Guido van Rossum <guido@python.org>
parents:
445
diff
changeset
|
61 WM_BUTTON5 = (1 << 12) |
