Mir
mir_input_device.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2015-2016 Canonical Ltd.
3  *
4  * This program is free software: you can redistribute it and/or modify it
5  * under the terms of the GNU Lesser General Public License version 2 or 3,
6  * as published by the Free Software Foundation.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU Lesser General Public License for more details.
12  *
13  * You should have received a copy of the GNU Lesser General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  *
16  */
17 
18 #ifndef MIR_TOOLKIT_MIR_INPUT_DEVICE_H_
19 #define MIR_TOOLKIT_MIR_INPUT_DEVICE_H_
20 
23 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
40 
52  MirInputConfig const* config,
53  size_t index);
54 
68  MirInputConfig const* config,
69  MirInputDeviceId id);
70 
82  MirInputConfig* config,
83  size_t index);
84 
98  MirInputConfig* config,
99  MirInputDeviceId id);
100 
109  MirInputDevice const* device);
110 
121 
131 char const* mir_input_device_get_name(MirInputDevice const* device);
132 
144 
157  MirInputDevice const* device);
158 
167  MirKeyboardConfig const* conf);
168 
177  MirKeyboardConfig const* conf);
178 
187  MirKeyboardConfig const* conf);
188 
200  MirKeyboardConfig const* conf);
201 
214  MirInputDevice* device);
215 
223  MirKeyboardConfig* conf, char const* model);
224 
232  MirKeyboardConfig* conf, char const* layout);
233 
241  MirKeyboardConfig* conf, char const* options);
242 
250  MirKeyboardConfig* conf, char const* variant);
251 
264  MirInputDevice const* device);
265 
274  MirPointerConfig const* conf);
275 
289  MirPointerConfig const* conf);
290 
302  MirPointerConfig const* conf);
303 
315  MirPointerConfig const* conf);
316 
326  MirPointerConfig const* conf);
327 
340  MirInputDevice* device);
341 
351  MirPointerConfig* conf,
352  MirPointerAcceleration acceleration);
353 
366  MirPointerConfig* conf,
367  double acceleration_bias);
368 
380  MirPointerConfig* conf,
381  double horizontal_scroll_scale);
382 
394  MirPointerConfig* conf,
395  double vertical_scroll_scale);
396 
406  MirPointerConfig* conf,
407  MirPointerHandedness handedness);
408 
420  MirInputDevice const* device);
421 
432  MirTouchpadConfig const* conf);
433 
444  MirTouchpadConfig const* conf);
445 
456  MirTouchpadConfig const* conf);
457 
466  MirTouchpadConfig const* conf);
467 
476  MirTouchpadConfig const* conf);
477 
487  MirTouchpadConfig const* conf);
488 
497  MirTouchpadConfig const* conf);
498 
510  MirInputDevice* device);
511 
520 
529 
537  MirTouchpadConfig* conf, int button);
538 
546  MirTouchpadConfig* conf, bool tap_to_click);
547 
555  MirTouchpadConfig* conf, bool middle_emulation);
556 
564  MirTouchpadConfig* conf, bool active);
565 
573  MirTouchpadConfig* conf, bool active);
574 
587  MirInputDevice const* device);
588 
600 
609 
622  MirInputDevice* device);
623 
634 
642 
643 #ifdef __cplusplus
644 }
645 #endif
647 #endif
MirKeyboardConfig const * mir_input_device_get_keyboard_config(MirInputDevice const *device)
Retrieve a structure containing the keyboard related config options of the input device.
void mir_pointer_config_set_acceleration(MirPointerConfig *conf, MirPointerAcceleration acceleration)
Set the acceleration mode of the pointer device.
void mir_touchpad_config_set_button_down_scroll_button(MirTouchpadConfig *conf, int button)
Configure the button for button down scroll mode.
MirTouchscreenMappingMode
Mapping modes for touchscreen devices.
Definition: mir_input_device_types.h:117
void mir_touchpad_config_set_disable_while_typing(MirTouchpadConfig *conf, bool active)
Configure whether the touchpad should be turned off while typing.
MirInputDeviceId mir_input_device_get_id(MirInputDevice const *device)
Retrieve the device id of the input device.
struct MirTouchscreenConfig MirTouchscreenConfig
Definition: client_types.h:411
enum MirTouchscreenMappingMode mir_touchscreen_config_get_mapping_mode(MirTouchscreenConfig const *device)
Get the mapping mode used for the touchscreen.
MirPointerAcceleration
MirPointerAcceleration describes the way pointer movement is filtered:
Definition: mir_input_device_types.h:49
void mir_keyboard_config_set_keymap_variant(MirKeyboardConfig *conf, char const *variant)
Set the variant of the keymap as a null terminated string.
struct MirTouchpadConfig MirTouchpadConfig
Definition: client_types.h:410
MirTouchpadScrollModes mir_touchpad_config_get_scroll_modes(MirTouchpadConfig const *conf)
Retrieve the scroll modes of the touchpad.
char const * mir_keyboard_config_get_keymap_options(MirKeyboardConfig const *conf)
Retrieve the options of the keymap as a null terminated string.
MirTouchscreenConfig * mir_input_device_get_mutable_touchscreen_config(MirInputDevice *device)
Retrieve a mutable structure containing the touchscreen related options of the input device to change...
struct MirInputDevice MirInputDevice
Definition: client_types.h:407
MirInputDevice * mir_input_config_get_mutable_device_by_id(MirInputConfig *config, MirInputDeviceId id)
Retrieve the input device by id.
unsigned int MirTouchpadScrollModes
Definition: mir_input_device_types.h:90
int mir_touchpad_config_get_button_down_scroll_button(MirTouchpadConfig const *conf)
Retrieve the configured button down for button down scroll mode.
MirPointerHandedness
Definition: mir_input_device_types.h:34
char const * mir_keyboard_config_get_keymap_variant(MirKeyboardConfig const *conf)
Retrieve the layout of the keymap as a null terminated string.
double mir_pointer_config_get_horizontal_scroll_scale(MirPointerConfig const *conf)
Retrieve the horizontal scroll scale.
size_t mir_input_config_device_count(MirInputConfig const *config)
Retrieve the number of available input devices.
void mir_touchpad_config_set_tap_to_click(MirTouchpadConfig *conf, bool tap_to_click)
Configure whether tap to click should be enabled.
MirInputDeviceCapabilities mir_input_device_get_capabilities(MirInputDevice const *device)
Retrieve the capabilities of the input device at the given index.
MirTouchpadConfig const * mir_input_device_get_touchpad_config(MirInputDevice const *device)
Retrieve a structure containing the touchpad related config options of the input device.
void mir_keyboard_config_set_keymap_model(MirKeyboardConfig *conf, char const *model)
Set the keyboard model of the keymap as a null terminated string.
unsigned int MirTouchpadClickModes
Definition: mir_input_device_types.h:70
MirInputDevice * mir_input_config_get_mutable_device(MirInputConfig *config, size_t index)
Retrieve the input device at given index.
int64_t MirInputDeviceId
Definition: mir_input_device_types.h:31
void mir_touchpad_config_set_middle_mouse_button_emulation(MirTouchpadConfig *conf, bool middle_emulation)
Configure whether middle mouse button emulation should be enabled.
MirTouchpadConfig * mir_input_device_get_mutable_touchpad_config(MirInputDevice *device)
Retrieve a structure containing the touchpad related config options of the input device that can be m...
bool mir_touchpad_config_get_disable_while_typing(MirTouchpadConfig const *conf)
Retrieve whether the touchpad events should be blocked while the user types.
char const * mir_input_device_get_unique_id(MirInputDevice const *device)
Retrieve the unique id of the input device.
char const * mir_input_device_get_name(MirInputDevice const *device)
Retrieve the name of the input device.
MirPointerConfig * mir_input_device_get_mutable_pointer_config(MirInputDevice *device)
Retrieve a structure containing the pointer related config options of the input device that can be ma...
bool mir_touchpad_config_get_disable_with_mouse(MirTouchpadConfig const *conf)
Retrieve whether the touchpad should be disabled when an external pointer device like a mouse is conn...
void mir_pointer_config_set_vertical_scroll_scale(MirPointerConfig *conf, double vertical_scroll_scale)
Set the vertical scroll scale.
uint32_t mir_touchscreen_config_get_output_id(MirTouchscreenConfig const *device)
Get the output ID of the display the coordinates of this device will be mapped to.
char const * mir_keyboard_config_get_keymap_model(MirKeyboardConfig const *conf)
Retrieve the keyboard model of the keymap as a null terminated string.
void mir_pointer_config_set_horizontal_scroll_scale(MirPointerConfig *conf, double horizontal_scroll_scale)
Set the horizontal scroll scale.
void mir_pointer_config_set_acceleration_bias(MirPointerConfig *conf, double acceleration_bias)
Set the acceleration bias of the pointer device.
MirInputDevice const * mir_input_config_get_device(MirInputConfig const *config, size_t index)
Retrieve the input device at given index.
void mir_touchpad_config_set_scroll_modes(MirTouchpadConfig *conf, MirTouchpadScrollModes modes)
Configure the enabled scroll modes for the touchpad.
MirTouchpadClickModes mir_touchpad_config_get_click_modes(MirTouchpadConfig const *conf)
Retrieve the click modes of the touchpad.
MirPointerConfig const * mir_input_device_get_pointer_config(MirInputDevice const *device)
Retrieve a structure containing the pointer related config options of the input device.
bool mir_touchpad_config_get_middle_mouse_button_emulation(MirTouchpadConfig const *conf)
Retrieve whether middle mouse button should be emulated.
void mir_pointer_config_set_handedness(MirPointerConfig *conf, MirPointerHandedness handedness)
Configure left and right hand use of the pointer device.
bool mir_touchpad_config_get_tap_to_click(MirTouchpadConfig const *conf)
Retrieve whether a tap gesture generates pointer button events.
void mir_touchpad_config_set_click_modes(MirTouchpadConfig *conf, MirTouchpadClickModes modes)
Configure the enable click modes for the touchpad.
struct MirPointerConfig MirPointerConfig
Definition: client_types.h:409
MirPointerAcceleration mir_pointer_config_get_acceleration(MirPointerConfig const *conf)
Retrieve the cursor acceleration profile.
double mir_pointer_config_get_acceleration_bias(MirPointerConfig const *conf)
Retrieve the cursor acceleration bias.
void mir_touchpad_config_set_disable_with_mouse(MirTouchpadConfig *conf, bool active)
Configure whether the touchpad should be turned off while a mouse is attached.
void mir_touchscreen_config_set_mapping_mode(MirTouchscreenConfig *config, enum MirTouchscreenMappingMode mode)
Set the mapping mode used for the touchscreen.
MirTouchscreenConfig const * mir_input_device_get_touchscreen_config(MirInputDevice const *device)
Retrieve a structure containing the touchscreen related config options of the input device.
char const * mir_keyboard_config_get_keymap_layout(MirKeyboardConfig const *conf)
Retrieve the layout of the keymap as a null terminated string.
double mir_pointer_config_get_vertical_scroll_scale(MirPointerConfig const *conf)
Retrieve the vertical scroll scale.
void mir_touchscreen_config_set_output_id(MirTouchscreenConfig *config, uint32_t output)
Set the output ID of the display the coordinates of this device will be mapped to.
unsigned int MirInputDeviceCapabilities
Definition: mir_input_device_types.h:105
void mir_keyboard_config_set_keymap_layout(MirKeyboardConfig *conf, char const *layout)
Set the layout of the keymap as a null terminated string.
MirPointerHandedness mir_pointer_config_get_handedness(MirPointerConfig const *conf)
Retrieve whether the pointer device is configured for right or left handed use.
MirInputDevice const * mir_input_config_get_device_by_id(MirInputConfig const *config, MirInputDeviceId id)
Retrieve the input device by id.
void mir_keyboard_config_set_keymap_options(MirKeyboardConfig *conf, char const *options)
Set the options of the keymap as a null terminated string.
MirKeyboardConfig * mir_input_device_get_mutable_keyboard_config(MirInputDevice *device)
Retrieve a mutable structure containing the keyboard related config options of the input device.
struct MirKeyboardConfig MirKeyboardConfig
Definition: client_types.h:408
struct MirInputConfig MirInputConfig
Definition: client_types.h:406

Copyright © 2012-2022 Canonical Ltd.
Generated on Fri Nov 11 11:01:41 UTC 2022
This documentation is licensed under the GPL version 2 or 3.