input_timestamps_unstable_v1 Module

ZwpInputTimestampsV1

class pywayland.protocol.input_timestamps_unstable_v1.ZwpInputTimestampsV1

Context object for input timestamps

Provides high-resolution timestamp events for a set of subscribed input events. The set of subscribed input events is determined by the ZwpInputTimestampsManagerV1 request used to create this object.

destroy() → 'None'

Request – opcode 0 (attached to Resource instance)

Destroy the input timestamps object

Informs the server that the client will no longer be using this protocol object. After the server processes the request, no more timestamp events will be emitted.

timestamp(tv_sec_hi: 'int', tv_sec_lo: 'int', tv_nsec: 'int') → 'None'

Event – opcode 0 (attached to Proxy instance)

High-resolution timestamp event

The timestamp event is associated with the first subsequent input event carrying a timestamp which belongs to the set of input events this object is subscribed to.

The timestamp provided by this event is a high-resolution version of the timestamp argument of the associated input event. The provided timestamp is in the same clock domain and is at least as accurate as the associated input event timestamp.

The timestamp is expressed as tv_sec_hi, tv_sec_lo, tv_nsec triples, each component being an unsigned 32-bit value. Whole seconds are in tv_sec which is a 64-bit value combined from tv_sec_hi and tv_sec_lo, and the additional fractional part in tv_nsec as nanoseconds. Hence, for valid timestamps tv_nsec must be in [0, 999999999].

Parameters:
  • tv_sec_hi (ArgumentType.Uint) – high 32 bits of the seconds part of the timestamp
  • tv_sec_lo (ArgumentType.Uint) – low 32 bits of the seconds part of the timestamp
  • tv_nsec (ArgumentType.Uint) – nanoseconds part of the timestamp

ZwpInputTimestampsManagerV1

class pywayland.protocol.input_timestamps_unstable_v1.ZwpInputTimestampsManagerV1

Context object for high-resolution input timestamps

A global interface used for requesting high-resolution timestamps for input events.

destroy() → 'None'

Request – opcode 0 (attached to Resource instance)

Destroy the input timestamps manager object

Informs the server that the client will no longer be using this protocol object. Existing objects created by this object are not affected.

get_keyboard_timestamps(keyboard: 'WlKeyboard') → 'Proxy[ZwpInputTimestampsV1]'

Request – opcode 1 (attached to Resource instance)

Subscribe to high-resolution keyboard timestamp events

Creates a new input timestamps object that represents a subscription to high-resolution timestamp events for all WlKeyboard events that carry a timestamp.

If the associated WlKeyboard object is invalidated, either through client action (e.g. release) or server-side changes, the input timestamps object becomes inert and the client should destroy it by calling ZwpInputTimestampsV1.destroy().

Parameters:keyboard (WlKeyboard) – the WlKeyboard object for which to get timestamp events
Returns:ZwpInputTimestampsV1
get_pointer_timestamps(pointer: 'WlPointer') → 'Proxy[ZwpInputTimestampsV1]'

Request – opcode 2 (attached to Resource instance)

Subscribe to high-resolution pointer timestamp events

Creates a new input timestamps object that represents a subscription to high-resolution timestamp events for all WlPointer events that carry a timestamp.

If the associated WlPointer object is invalidated, either through client action (e.g. release) or server- side changes, the input timestamps object becomes inert and the client should destroy it by calling ZwpInputTimestampsV1.destroy().

Parameters:pointer (WlPointer) – the WlPointer object for which to get timestamp events
Returns:ZwpInputTimestampsV1
get_touch_timestamps(touch: 'WlTouch') → 'Proxy[ZwpInputTimestampsV1]'

Request – opcode 3 (attached to Resource instance)

Subscribe to high-resolution touch timestamp events

Creates a new input timestamps object that represents a subscription to high-resolution timestamp events for all WlTouch events that carry a timestamp.

If the associated WlTouch object becomes invalid, either through client action (e.g. release) or server- side changes, the input timestamps object becomes inert and the client should destroy it by calling ZwpInputTimestampsV1.destroy().

Parameters:touch (WlTouch) – the WlTouch object for which to get timestamp events
Returns:ZwpInputTimestampsV1