static const char * tap_default(struct libinput_device *device) { if (!libinput_device_config_tap_get_finger_count(device)) return "n/a"; if (libinput_device_config_tap_get_default_enabled(device)) return "enabled"; else return "disabled"; }
ClutterInputDeviceType _clutter_input_device_evdev_determine_type (struct libinput_device *ldev) { /* This setting is specific to touchpads and alike, only in these * devices there is this additional layer of touch event interpretation. */ if (libinput_device_config_tap_get_finger_count (ldev) > 0) return CLUTTER_TOUCHPAD_DEVICE; else if (libinput_device_has_capability (ldev, LIBINPUT_DEVICE_CAP_POINTER)) return CLUTTER_POINTER_DEVICE; else if (libinput_device_has_capability (ldev, LIBINPUT_DEVICE_CAP_TOUCH)) return CLUTTER_TOUCHSCREEN_DEVICE; else if (libinput_device_has_capability (ldev, LIBINPUT_DEVICE_CAP_KEYBOARD)) return CLUTTER_KEYBOARD_DEVICE; else return CLUTTER_EXTENSION_DEVICE; }