input_timestamps

package
v0.0.0-...-0ad78d1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 30, 2023 License: BSD-2-Clause Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InputTimestamps

type InputTimestamps struct {
	client.BaseProxy
	// contains filtered or unexported fields
}

InputTimestamps : 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 zwp_input_timestamps_manager_v1 request used to create this object.

func NewInputTimestamps

func NewInputTimestamps(ctx *client.Context) *InputTimestamps

NewInputTimestamps : 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 zwp_input_timestamps_manager_v1 request used to create this object.

func (*InputTimestamps) Destroy

func (i *InputTimestamps) Destroy() error

Destroy : 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.

func (*InputTimestamps) Dispatch

func (i *InputTimestamps) Dispatch(opcode uint32, fd int, data []byte)

func (*InputTimestamps) SetTimestampHandler

func (i *InputTimestamps) SetTimestampHandler(f InputTimestampsTimestampHandlerFunc)

SetTimestampHandler : sets handler for InputTimestampsTimestampEvent

type InputTimestampsManager

type InputTimestampsManager struct {
	client.BaseProxy
}

InputTimestampsManager : context object for high-resolution input timestamps

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

func NewInputTimestampsManager

func NewInputTimestampsManager(ctx *client.Context) *InputTimestampsManager

NewInputTimestampsManager : context object for high-resolution input timestamps

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

func (*InputTimestampsManager) Destroy

func (i *InputTimestampsManager) Destroy() error

Destroy : 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.

func (*InputTimestampsManager) GetKeyboardTimestamps

func (i *InputTimestampsManager) GetKeyboardTimestamps(keyboard *client.Keyboard) (*InputTimestamps, error)

GetKeyboardTimestamps : subscribe to high-resolution keyboard timestamp events

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

If the associated wl_keyboard 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 zwp_input_timestamps_v1.destroy.

keyboard: the wl_keyboard object for which to get timestamp events

func (*InputTimestampsManager) GetPointerTimestamps

func (i *InputTimestampsManager) GetPointerTimestamps(pointer *client.Pointer) (*InputTimestamps, error)

GetPointerTimestamps : subscribe to high-resolution pointer timestamp events

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

If the associated wl_pointer 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 zwp_input_timestamps_v1.destroy.

pointer: the wl_pointer object for which to get timestamp events

func (*InputTimestampsManager) GetTouchTimestamps

func (i *InputTimestampsManager) GetTouchTimestamps(touch *client.Touch) (*InputTimestamps, error)

GetTouchTimestamps : subscribe to high-resolution touch timestamp events

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

If the associated wl_touch 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 zwp_input_timestamps_v1.destroy.

touch: the wl_touch object for which to get timestamp events

type InputTimestampsTimestampEvent

type InputTimestampsTimestampEvent struct {
	TvSecHi uint32
	TvSecLo uint32
	TvNsec  uint32
}

InputTimestampsTimestampEvent : 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].

type InputTimestampsTimestampHandlerFunc

type InputTimestampsTimestampHandlerFunc func(InputTimestampsTimestampEvent)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL