libretro.api.input.pointer

Pointer (touch/pen) input types and multi-touch state.

Corresponds to the RETRO_DEVICE_ID_POINTER_* constants in libretro.h.

Classes

DeviceIdPointer

Input IDs for the pointer device.

Pointer

A single pointer contact point.

PointerState

Snapshot of pointer (multi-touch) state.

class DeviceIdPointer[source]

Bases: IntEnum

Input IDs for the pointer device.

Corresponds to the RETRO_DEVICE_ID_POINTER_* constants in libretro.h.

>>> from libretro.api.input import DeviceIdPointer
>>> DeviceIdPointer.PRESSED
<DeviceIdPointer.PRESSED: 2>
X = 0
Y = 1
PRESSED = 2
COUNT = 3
IS_OFFSCREEN = 15
__new__(value)
classmethod value in self

Return True if value is in cls.

value is in cls if: 1) value is a member of cls, or 2) value is the value of one of the cls’s members. 3) value is a pseudo-member (flags)

classmethod self[name]

Return the member matching name.

__init__()
classmethod iter(self)

Return members in definition order.

classmethod len(self)

Return the number of members (no aliases)

class Pointer[source]

Bases: object

A single pointer contact point.

>>> from libretro.api.input import Pointer
>>> p = Pointer()
>>> p.pressed
False
x
y
pressed
is_offscreen
__init__(x=0, y=0, pressed=False, is_offscreen=False)
classmethod __new__(*args, **kwargs)
class PointerState[source]

Bases: InputDeviceState

Snapshot of pointer (multi-touch) state.

>>> from libretro.api.input import PointerState
>>> state = PointerState()
>>> state.pointers
()
pointers
__init__(pointers=())
classmethod __new__(*args, **kwargs)