Class TouchEmulator

Class Documentation

class TouchEmulator

Enables or disables the built-in touch emulation in the Mir server.

When enabled, a compositor can synthesize touch events from mouse input, allowing touch-enabled applications to be tested without a touch screen.

Remark

Since MirAL 6.0

Public Functions

TouchEmulator &enable()

Enables touch emulation.

Returns:

a reference to this TouchEmulator

TouchEmulator &disable()

Disables touch emulation.

Returns:

a reference to this TouchEmulator

explicit TouchEmulator(miral::live_config::Store &config_store)

Construct a TouchEmulator instance with access to a live config store.

Available options:

  • {touch-emulator, enable}: Enable or disable touch emulation.

Parameters:

config_store – the configuration store used to persist the touch emulation state

void operator()(mir::Server &server)

Applies the touch emulator configuration to the Mir server.

Public Static Functions

static TouchEmulator enabled()

Creates a TouchEmulator that is enabled by default.

Returns:

an enabled TouchEmulator

static TouchEmulator disabled()

Creates a TouchEmulator that is disabled by default.

Returns:

a disabled TouchEmulator