mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-16 00:37:10 +08:00
Add tkinter Event class (#4200)
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import sys
|
||||
from enum import Enum
|
||||
from types import TracebackType
|
||||
from typing import Any, Optional, Dict, Callable, Tuple, Type, Union
|
||||
from tkinter.constants import * # noqa: F403
|
||||
@@ -11,7 +12,69 @@ READABLE: Any
|
||||
WRITABLE: Any
|
||||
EXCEPTION: Any
|
||||
|
||||
class Event: ...
|
||||
if sys.version_info >= (3, 6):
|
||||
class EventType(str, Enum):
|
||||
Activate: str = ...
|
||||
ButtonPress: str = ...
|
||||
ButtonRelease: str = ...
|
||||
Circulate: str = ...
|
||||
CirculateRequest: str = ...
|
||||
ClientMessage: str = ...
|
||||
Colormap: str = ...
|
||||
Configure: str = ...
|
||||
ConfigureRequest: str = ...
|
||||
Create: str = ...
|
||||
Deactivate: str = ...
|
||||
Destroy: str = ...
|
||||
Enter: str = ...
|
||||
Expose: str = ...
|
||||
FocusIn: str = ...
|
||||
FocusOut: str = ...
|
||||
GraphicsExpose: str = ...
|
||||
Gravity: str = ...
|
||||
KeyPress: str = ...
|
||||
KeyRelease: str = ...
|
||||
Keymap: str = ...
|
||||
Leave: str = ...
|
||||
Map: str = ...
|
||||
MapRequest: str = ...
|
||||
Mapping: str = ...
|
||||
Motion: str = ...
|
||||
MouseWheel: str = ...
|
||||
NoExpose: str = ...
|
||||
Property: str = ...
|
||||
Reparent: str = ...
|
||||
ResizeRequest: str = ...
|
||||
Selection: str = ...
|
||||
SelectionClear: str = ...
|
||||
SelectionRequest: str = ...
|
||||
Unmap: str = ...
|
||||
VirtualEvent: str = ...
|
||||
Visibility: str = ...
|
||||
|
||||
class Event:
|
||||
serial: int
|
||||
num: int
|
||||
focus: bool
|
||||
height: int
|
||||
width: int
|
||||
keycode: int
|
||||
state: Union[int, str]
|
||||
time: int
|
||||
x: int
|
||||
y: int
|
||||
x_root: int
|
||||
y_root: int
|
||||
char: str
|
||||
send_event: bool
|
||||
keysym: str
|
||||
keysym_num: int
|
||||
if sys.version_info >= (3, 6):
|
||||
type: EventType
|
||||
else:
|
||||
type: str
|
||||
widget: Misc
|
||||
delta: int
|
||||
|
||||
def NoDefaultRoot(): ...
|
||||
|
||||
|
||||
Reference in New Issue
Block a user