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.Client(cobj)
Bases:
CObjectWrapper
- connect()
- disconnect()
- new_seat(*, name: str = 'default seat', capabilities: tuple[snegg.eis.DeviceCapability, ...] = (<DeviceCapability.POINTER: 1>, <DeviceCapability.POINTER_ABSOLUTE: 2>, <DeviceCapability.KEYBOARD: 4>, <DeviceCapability.TOUCH: 8>, <DeviceCapability.SCROLL: 16>, <DeviceCapability.BUTTON: 32>))
- class snegg.eis.ConfigureKeymap(keymap_type: snegg.eis.KeymapType, fd: <class 'IO'>, size: int)
Bases:
object
- keymap_type: KeymapType
- class snegg.eis.ConfigureRegion(dimension: snegg.eis.Dimension, position: snegg.eis.Position = <factory>, physical_scale: float = 1.0, mapping_id: Optional[str] = None)
Bases:
object
- class snegg.eis.Device(cobject)
Bases:
CObjectWrapper
- add()
- property capabilities: tuple[snegg.eis.DeviceCapability]
- 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(cobject)
Bases:
CObjectWrapper
- class snegg.eis.Seat(cobj)
Bases:
CObjectWrapper
- add()
- property capabilities: tuple[snegg.eis.DeviceCapability, ...]
- new_device(*, name: Optional[str] = None, device_type: DeviceType = DeviceType.VIRTUAL, size: Optional[Dimension] = None, capabilities: Optional[list[snegg.eis.DeviceCapability]] = None, regions: list[snegg.eis.ConfigureRegion] = [], keymap: Optional[ConfigureKeymap] = None) Device
- remove()
- class snegg.eis.SeatEvent(capabilities: list[snegg.eis.DeviceCapability])
Bases:
object
- capabilities: list[snegg.eis.DeviceCapability]
- class snegg.eis.Touch(cobj)
Bases:
CObjectWrapper