CEnum-ize event enums
This commit is contained in:
parent
5317df0635
commit
4388b17f78
@ -1,7 +1,8 @@
|
|||||||
import ctypes
|
import ctypes
|
||||||
from .internal import _SDL, Version
|
from .internal import _SDL, Version
|
||||||
|
from .enum import CEnum
|
||||||
|
|
||||||
class EventType(int):
|
class EventType(CEnum):
|
||||||
FIRSTEVENT = 0
|
FIRSTEVENT = 0
|
||||||
|
|
||||||
QUIT = 0x100
|
QUIT = 0x100
|
||||||
@ -54,7 +55,7 @@ GestureID = ctypes.c_int64
|
|||||||
TouchID = ctypes.c_int64
|
TouchID = ctypes.c_int64
|
||||||
FingerID = ctypes.c_int64
|
FingerID = ctypes.c_int64
|
||||||
|
|
||||||
class SysWMType(int):
|
class SysWMType(CEnum):
|
||||||
UNKNOWN = 0
|
UNKNOWN = 0
|
||||||
WINDOWS = 1
|
WINDOWS = 1
|
||||||
X11 = 2
|
X11 = 2
|
||||||
|
@ -14,7 +14,7 @@ def main():
|
|||||||
if not event:
|
if not event:
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
print event.type
|
print repr(EventType.from_int(event.type))
|
||||||
|
|
||||||
window.renderer.set_draw_color(0,0,0,255)
|
window.renderer.set_draw_color(0,0,0,255)
|
||||||
window.renderer.clear()
|
window.renderer.clear()
|
||||||
|
Loading…
Reference in New Issue
Block a user