195
216
char const* mir_input_device_get_unique_id(MirInputDevice const* device);
219
* Retrieve a structure containing the pointer related configuration options
220
* of the input device.
222
* If the input device does not control the mouse cursor, there will be no
223
* configuration options, and the function will return a null pointer.
225
* \param [in] device The input device
227
* \return The pointer configuration
229
MirPointerConfiguration const* mir_input_device_get_pointer_configuration(
230
MirInputDevice const* device);
233
* Retrieve the cursor acceleration profile.
235
* \param [in] conf The pointer configuration
237
* \return The acceleration profile
239
MirPointerAcceleration mir_pointer_configuration_get_acceleration(
240
MirPointerConfiguration const* conf);
243
* Retrieve the cursor acceleration bias.
245
* The value will be in the range of [-1, 1]:
246
* - 0: default acceleration
247
* - [-1, 0): reduced acceleration
248
* - (0, 1]: increased acceleration
250
* \param [in] conf The pointer configuration
252
* \return The acceleration bias
254
double mir_pointer_configuration_get_acceleration_bias(
255
MirPointerConfiguration const* conf);
258
* Retrieve the horizontal scroll scale.
260
* The value is a signed linear scale of the horizontal scroll axis. A Negative
261
* value indicates 'natural scrolling'.
263
* \param [in] conf The pointer configuration
265
* \return The horizontal scroll scale
267
double mir_pointer_configuration_get_horizontal_scroll_scale(
268
MirPointerConfiguration const* conf);
271
* Retrieve the vertical scroll scale.
273
* The value is a signed linear scale of the vertical scroll axis. A Negative
274
* value indicates 'natural scrolling'.
276
* \param [in] conf The pointer configuration
278
* \return The vertical scroll scale
280
double mir_pointer_configuration_get_vertical_scroll_scale(
281
MirPointerConfiguration const* conf);
284
* Retrieve whether the pointer device is configured for right or left handed
287
* \param [in] conf The pointer configuration
289
* \return Right or left handed
291
MirPointerHandedness mir_pointer_configuration_get_handedness(
292
MirPointerConfiguration const* conf);
295
* Retrieve a structure containing the pointer related configuration options
296
* of the input device that can be manipulated.
298
* If the input device does not control the mouse cursor, there will be no
299
* configuration options, and the function will return a null pointer.
301
* \param [in] device The input device
303
* \return The pointer configuration
305
MirPointerConfiguration* mir_input_device_get_mutable_pointer_configuration(
306
MirInputDevice* device);
309
* Set the acceleration mode of the pointer device.
311
* See \ref MirPointerAcceleration for reference.
313
* \param [in] conf The pointer configuration
314
* \param [in] acceleration The acceleration mode
316
void mir_pointer_configuration_set_acceleration(
317
MirPointerConfiguration* conf,
318
MirPointerAcceleration acceleration);
321
* Set the acceleration bias of the pointer device.
323
* The acceleration bias must be in the range of [-1, 1]:
324
* - 0: default acceleration
325
* - [-1, 0): reduced acceleration
326
* - (0, 1]: increased acceleration
328
* \param [in] conf The pointer configuration
329
* \param [in] acceleration_bias The acceleration bias
331
void mir_pointer_configuration_set_acceleration_bias(
332
MirPointerConfiguration* conf,
333
double acceleration_bias);
336
* Set the horizontal scroll scale.
338
* The horizontal scroll scale is a signed linear scale of scroll motion along
339
* the horizontal axis. Negative scales can be used to configure 'natural
342
* \param [in] conf The pointer configuration
343
* \param [in] horizontal_scroll_scale The horizontal scroll scale
345
void mir_pointer_configuration_set_horizontal_scroll_scale(
346
MirPointerConfiguration* conf,
347
double horizontal_scroll_scale);
350
* Set the vertical scroll scale.
352
* The vertical scroll scale is a signed linear scale of scroll motion along
353
* the vertical axis. Negative scales can be used to configure 'natural
356
* \param [in] conf The pointer configuration
357
* \param [in] vertical_scroll_scale The vertical scroll scale
359
void mir_pointer_configuration_set_vertical_scroll_scale(
360
MirPointerConfiguration* conf,
361
double vertical_scroll_scale);
364
* Configure left and right hand use of the pointer device.
366
* This configures which buttons will be used as primary and secondary buttons.
368
* \param [in] conf The pointer configuration
369
* \param [in] handedness left or right handed use
371
void mir_pointer_configuration_set_handedness(
372
MirPointerConfiguration* conf,
373
MirPointerHandedness handedness);
376
* Retrieve a structure containing the touchpad related configuration options
377
* of the input device.
379
* If the input device is not a touchpad this function will return null pointer.
381
* \param [in] device The input device
383
* \return The touchpad configuration
385
MirTouchpadConfiguration const* mir_input_device_get_touchpad_configuration(
386
MirInputDevice const* device);
389
* Retrieve the click modes of the touchpad.
391
* See \ref MirTouchpadClickMode for reference.
393
* \param [in] conf The touchpad configuration
395
* \return The touchpad click modes
397
MirTouchpadClickModes mir_touchpad_configuration_get_click_modes(
398
MirTouchpadConfiguration const* conf);
401
* Retrieve the scroll modes of the touchpad.
403
* See \ref MirTouchpadScrollMode for reference.
405
* \param [in] conf The touchpad configuration
407
* \return The touchpad click modes
409
MirTouchpadScrollModes mir_touchpad_configuration_get_scroll_modes(
410
MirTouchpadConfiguration const* conf);
413
* Retrieve the configured button down for button down scroll mode.
415
* See \ref MirTouchpadScrollMode for reference.
417
* \param [in] conf The touchpad configuration
419
* \return The touchpad click modes
421
int mir_touchpad_configuration_get_button_down_scroll_button(
422
MirTouchpadConfiguration const* conf);
425
* Retrieve whether a tap gesture generates pointer button events.
427
* \param [in] conf The touchpad configuration
429
* \return whether tap to click is enabled
431
bool mir_touchpad_configuration_get_tap_to_click(
432
MirTouchpadConfiguration const* conf);
435
* Retrieve whether middle mouse button should be emulated.
437
* \param [in] conf The touchpad configuration
439
* \return whether middle mouse button emulation is enabled
441
bool mir_touchpad_configuration_get_middle_mouse_button_emulation(
442
MirTouchpadConfiguration const* conf);
445
* Retrieve whether the touchpad should be disabled when an external pointer
446
* device like a mouse is connected.
448
* \param [in] conf The touchpad configuration
450
* \return whether touchpad is disabled with an external mouse
452
bool mir_touchpad_configuration_get_disable_with_mouse(
453
MirTouchpadConfiguration const* conf);
456
* Retrieve whether the touchpad events should be blocked while the user types.
458
* \param [in] conf The touchpad configuration
460
* \return whether touchpad is disabled during typing
462
bool mir_touchpad_configuration_get_disable_while_typing(
463
MirTouchpadConfiguration const* conf);
466
* Retrieve a structure containing the touchpad related configuration options
467
* of the input device that can be manipulated.
469
* If the input device is not a touchpad this function will return null pointer.
471
* \param [in] device The input device
473
* \return A mutable touchpad configuration
475
MirTouchpadConfiguration* mir_input_device_get_mutable_touchpad_configuration(
476
MirInputDevice* device);
479
* Configure the enable click modes for the touchpad.
481
* \param [in] conf The touchpad configuration
482
* \param [in] modes the enabled click modes
484
void mir_touchpad_configuration_set_click_modes(
485
MirTouchpadConfiguration* conf, MirTouchpadClickModes modes);
488
* Configure the enabled scroll modes for the touchpad.
490
* \param [in] conf The touchpad configuration
491
* \param [in] modes the enabled scroll modes
493
void mir_touchpad_configuration_set_scroll_modes(
494
MirTouchpadConfiguration* conf, MirTouchpadScrollModes modes);
497
* Configure the button for button down scroll mode
499
* \param [in] conf The touchpad configuration
500
* \param [in] button the button
502
void mir_touchpad_configuration_set_button_down_scroll_button(
503
MirTouchpadConfiguration* conf, int button);
506
* Configure whether tap to click should be enabled
508
* \param [in] conf The touchpad configuration
509
* \param [in] tap_to_click
511
void mir_touchpad_configuration_set_tap_to_click(
512
MirTouchpadConfiguration* conf, bool tap_to_click);
515
* Configure whether middle mouse button emulation should be enabled
517
* \param [in] conf The touchpad configuration
518
* \param [in] middle_mouse_button_emulation
520
void mir_touchpad_configuration_set_middle_mouse_button_emulation(
521
MirTouchpadConfiguration* conf, bool middle_emulation);
524
* Configure whether the touchpad should be turned off while a mouse is attached.
526
* \param [in] conf The touchpad configuration
527
* \param [in] active disable touchpad with mouse
529
void mir_touchpad_configuration_set_disable_with_mouse(
530
MirTouchpadConfiguration* conf, bool active);
533
* Configure whether the touchpad should be turned off while typing
535
* \param [in] conf The touchpad configuration
536
* \param [in] active disable touchpad while typing
538
void mir_touchpad_configuration_set_disable_while_typing(
539
MirTouchpadConfiguration* conf, bool active);
197
540
#ifdef __cplusplus