snegg.eis module
Wrapper module around the libeis
C library. This is a thin API wrapper with
most of the semantics of the underlying C library preserved.
See the libeis documentation
for details on each API.
Warning
Most objects in this module are refcounted and automatically destroy the underlying C object when the Python reference is dropped. This may cause all sub-objects in the underlying C object to be destroyed as well. Care must be taken to preserve the Python object across multiple invocations.
- class snegg.eis.ConfigureKeymap(keymap_type: snegg.eis.KeymapType, fd: <class 'IO'>, size: int)
Bases:
object
- keymap_type: KeymapType
- class snegg.eis.ConfigureRegion(offset: tuple[int, int], size: tuple[int, int], physical_scale: float)
Bases:
object
- class snegg.eis.Device(cobj)
Bases:
CObjectWrapper
- add()
- property capabilities: tuple[snegg.eis.DeviceCapability]
- configure(name: Optional[str] = None, device_type: DeviceType = DeviceType.VIRTUAL, size: Optional[tuple[int, int]] = None, capabilities: list[snegg.eis.DeviceCapability] = [], regions: list[snegg.eis.ConfigureRegion] = [], keymap: Optional[ConfigureKeymap] = None)
- property device_type: DeviceType
- keyboard_xkb_modifiers(mods: XkbModifiersEvent)
- pause()
- property regions: tuple[snegg.eis.Region]
- remove()
- resume()
- class snegg.eis.DeviceCapability(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
IntFlag
- BUTTON = 32
- KEYBOARD = 4
- POINTER = 1
- POINTER_ABSOLUTE = 2
- SCROLL = 16
- TOUCH = 8
- class snegg.eis.DeviceType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
IntEnum
- PHYSICAL = 2
- VIRTUAL = 1
- class snegg.eis.Eis
Bases:
CObjectWrapper
- class snegg.eis.Event(cobj)
Bases:
CObjectWrapper
- property button_event: ButtonEvent
- property pointer_absolute_event: PointerAbsoluteEvent
- property pointer_event: PointerEvent
- property scroll_discrete_event: ScrollDiscreteEvent
- property scroll_event: ScrollEvent
- property scroll_stop_event: ScrollStopEvent
- property touch_event: TouchEvent
- class snegg.eis.EventType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
IntEnum
- BUTTON_BUTTON = 500
- CLIENT_CONNECT = 1
- CLIENT_DISCONNECT = 2
- DEVICE_CLOSED = 4
- DEVICE_START_EMULATING = 200
- DEVICE_STOP_EMULATING = 201
- FRAME = 100
- KEYBOARD_KEY = 700
- POINTER_MOTION = 300
- POINTER_MOTION_ABSOLUTE = 400
- SCROLL_CANCEL = 602
- SCROLL_DELTA = 600
- SCROLL_DISCRETE = 603
- SCROLL_STOP = 601
- SEAT_BIND = 3
- TOUCH_DOWN = 800
- TOUCH_MOTION = 802
- TOUCH_UP = 801
- class snegg.eis.Keymap(cobj)
Bases:
CObjectWrapper
- property keymap_type: KeymapType
- class snegg.eis.KeymapType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
IntEnum
- XKB = 1
- class snegg.eis.Region(cobj)
Bases:
CObjectWrapper
- class snegg.eis.Seat(cobj)
Bases:
CObjectWrapper
- add()
- property capabilities: tuple[snegg.eis.DeviceCapability, ...]
- configure_capabilities(capabilities: list[snegg.eis.DeviceCapability])
- remove()
- class snegg.eis.SeatEvent(capabilities: list[snegg.eis.DeviceCapability])
Bases:
object
- capabilities: list[snegg.eis.DeviceCapability]
- class snegg.eis.Touch(cobj)
Bases:
CObjectWrapper