Changeset View
Changeset View
Standalone View
Standalone View
autotests/libinput/mock_libinput.cpp
Show First 20 Lines • Show All 270 Lines • ▼ Show 20 Line(s) | 263 | { | |||
---|---|---|---|---|---|
271 | return LIBINPUT_CONFIG_STATUS_INVALID; | 271 | return LIBINPUT_CONFIG_STATUS_INVALID; | ||
272 | } | 272 | } | ||
273 | 273 | | |||
274 | enum libinput_config_accel_profile libinput_device_config_accel_get_profile(struct libinput_device *device) | 274 | enum libinput_config_accel_profile libinput_device_config_accel_get_profile(struct libinput_device *device) | ||
275 | { | 275 | { | ||
276 | return device->pointerAccelerationProfile; | 276 | return device->pointerAccelerationProfile; | ||
277 | } | 277 | } | ||
278 | 278 | | |||
279 | uint32_t libinput_device_config_click_get_methods(struct libinput_device *device) | ||||
280 | { | ||||
281 | return device->supportedClickMethods; | ||||
282 | } | ||||
283 | | ||||
284 | enum libinput_config_click_method libinput_device_config_click_get_default_method(struct libinput_device *device) | ||||
285 | { | ||||
286 | return device->defaultClickMethod; | ||||
287 | } | ||||
288 | | ||||
289 | enum libinput_config_click_method libinput_device_config_click_get_method(struct libinput_device *device) | ||||
290 | { | ||||
291 | return device->clickMethod; | ||||
292 | } | ||||
293 | | ||||
294 | enum libinput_config_status libinput_device_config_click_set_method(struct libinput_device *device, enum libinput_config_click_method method) | ||||
295 | { | ||||
296 | if (device->setClickMethodReturnValue == 0) { | ||||
297 | if (!(device->supportedClickMethods & method) && method != LIBINPUT_CONFIG_CLICK_METHOD_NONE) { | ||||
zzag: missing whitespace before "!=" | |||||
298 | return LIBINPUT_CONFIG_STATUS_INVALID; | ||||
299 | } | ||||
300 | device->clickMethod = method; | ||||
301 | return LIBINPUT_CONFIG_STATUS_SUCCESS; | ||||
302 | } | ||||
303 | return LIBINPUT_CONFIG_STATUS_INVALID; | ||||
304 | } | ||||
305 | | ||||
279 | uint32_t libinput_device_config_send_events_get_mode(struct libinput_device *device) | 306 | uint32_t libinput_device_config_send_events_get_mode(struct libinput_device *device) | ||
280 | { | 307 | { | ||
281 | if (device->enabled) { | 308 | if (device->enabled) { | ||
282 | return LIBINPUT_CONFIG_SEND_EVENTS_ENABLED; | 309 | return LIBINPUT_CONFIG_SEND_EVENTS_ENABLED; | ||
283 | } else { | 310 | } else { | ||
284 | // TODO: disabled on eternal mouse | 311 | // TODO: disabled on eternal mouse | ||
285 | return LIBINPUT_CONFIG_SEND_EVENTS_DISABLED; | 312 | return LIBINPUT_CONFIG_SEND_EVENTS_DISABLED; | ||
286 | } | 313 | } | ||
▲ Show 20 Lines • Show All 572 Lines • Show Last 20 Lines |
missing whitespace before "!="