/usr/lib/python3/dist-packages/sdl2/touch.py is in python3-sdl2 0.9.3+dfsg2-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | from ctypes import Structure, POINTER, c_float, c_int
from .dll import _bind
from .stdinc import Sint64
__all__ = ["SDL_TouchID", "SDL_FingerID", "SDL_Finger", "SDL_GetNumTouchDevices",
"SDL_GetTouchDevice", "SDL_GetNumTouchFingers", "SDL_GetTouchFinger"
]
SDL_TouchID = Sint64
SDL_FingerID = Sint64
class SDL_Finger(Structure):
_fields_ = [("id", SDL_FingerID),
("x", c_float),
("y", c_float),
("pressure", c_float)
]
# TODO: #define SDL_TOUCH_MOUSEID ((Uint32)-1)
SDL_GetNumTouchDevices = _bind("SDL_GetNumTouchDevices", None, c_int)
SDL_GetTouchDevice = _bind("SDL_GetTouchDevice", [c_int], SDL_TouchID)
SDL_GetNumTouchFingers = _bind("SDL_GetNumTouchFingers", [SDL_TouchID], c_int)
SDL_GetTouchFinger = _bind("SDL_GetTouchFinger", [SDL_TouchID, c_int], POINTER(SDL_Finger))
|