Lines Matching defs:device

144 	struct libevdev *evdev = tablet->device->evdev;
178 const struct evdev_device *device,
189 fuzz = libevdev_get_abs_fuzz(device->evdev, e->code);
208 struct evdev_device *device,
225 evdev_log_bug_libinput(device,
232 if (tablet_filter_axis_fuzz(tablet, device, e, axis))
244 /* Intuos 3 strip data. Should only happen on the Pad device, not on
245 the Pen device. */
251 The 24HD sends ABS_THROTTLE on the Pad device for the second
256 evdev_log_info(device,
264 tablet_apply_rotation(struct evdev_device *device)
266 struct tablet_dispatch *tablet = tablet_dispatch(device->dispatch);
276 evdev_log_debug(device,
282 tablet_change_rotation(struct evdev_device *device, enum notify notify)
284 struct tablet_dispatch *tablet = tablet_dispatch(device->dispatch);
289 tablet_is_left = tablet->device->left_handed.enabled;
293 tablet_apply_rotation(device);
296 bool enable = device->left_handed.want_enabled;
307 tablet_change_to_left_handed(struct evdev_device *device)
309 if (device->left_handed.enabled == device->left_handed.want_enabled)
312 device->left_handed.enabled = device->left_handed.want_enabled;
314 tablet_change_rotation(device, DO_NOTIFY);
319 struct evdev_device *device,
414 values. The device has a 175 degree CCW hardware offset but since we use
443 struct evdev_device *device = tablet->device;
445 return value * device->scroll.wheel_click_angle.x;
450 struct evdev_device *device)
455 if (!libevdev_has_event_code(device->evdev, EV_ABS, ABS_X) ||
456 !libevdev_has_event_code(device->evdev, EV_ABS, ABS_Y))
461 absinfo = libevdev_get_abs_info(device->evdev, ABS_X);
470 absinfo = libevdev_get_abs_info(device->evdev, ABS_Y);
479 evdev_transform_absolute(device, &tablet->axes.point);
486 const struct evdev_device *device,
519 return filter_dispatch(device->pointer.filter,
527 struct evdev_device *device,
532 if (!libevdev_has_event_code(device->evdev, EV_ABS, ABS_PRESSURE))
537 absinfo = libevdev_get_abs_info(device->evdev, ABS_PRESSURE);
544 struct evdev_device *device)
548 if (!libevdev_has_event_code(device->evdev, EV_ABS, ABS_DISTANCE))
553 absinfo = libevdev_get_abs_info(device->evdev, ABS_DISTANCE);
560 struct evdev_device *device)
564 if (!libevdev_has_event_code(device->evdev, EV_ABS, ABS_WHEEL))
569 absinfo = libevdev_get_abs_info(device->evdev, ABS_WHEEL);
576 struct evdev_device *device)
580 if (!libevdev_has_event_code(device->evdev, EV_ABS, ABS_TILT_X) ||
581 !libevdev_has_event_code(device->evdev, EV_ABS, ABS_TILT_Y))
591 absinfo = libevdev_get_abs_info(device->evdev, ABS_TILT_X);
594 absinfo = libevdev_get_abs_info(device->evdev, ABS_TILT_Y);
597 if (device->left_handed.enabled) {
606 struct evdev_device *device)
610 if (!libevdev_has_event_code(device->evdev, EV_ABS, ABS_Z))
615 absinfo = libevdev_get_abs_info(device->evdev,
624 struct evdev_device *device)
636 struct evdev_device *device)
642 tablet_update_mouse_rotation(tablet, device);
652 tablet_update_artpen_rotation(tablet, device);
654 if (device->left_handed.enabled) {
663 struct evdev_device *device)
705 struct evdev_device *device,
719 tablet_update_xy(tablet, device);
720 tablet_update_pressure(tablet, device, tool);
721 tablet_update_distance(tablet, device);
722 tablet_update_slider(tablet, device);
723 tablet_update_tilt(tablet, device);
724 tablet_update_wheel(tablet, device);
727 tablet_update_rotation(tablet, device);
753 axes.delta = tablet_tool_process_delta(tablet, tool, device, &axes, time);
778 evdev_log_info(tablet->device,
816 struct evdev_device *device,
828 evdev_log_bug_libinput(device,
864 struct evdev_device *device,
874 evdev_log_bug_libinput(device,
884 evdev_log_info(device,
894 struct evdev_device *device,
907 evdev_log_info(device,
929 struct libevdev *evdev = tablet->device->evdev;
1037 if (libevdev_has_event_code(tablet->device->evdev, EV_ABS,
1084 struct evdev_device *device = tablet->device;
1094 pressure = libevdev_get_abs_info(device->evdev, ABS_PRESSURE);
1098 quirks = evdev_libinput_context(device)->quirks;
1099 q = quirks_fetch_for_device(quirks, device->udev_device);
1101 distance = libevdev_get_abs_info(device->evdev, ABS_DISTANCE);
1116 evdev_log_info(device,
1200 struct evdev_device *device,
1206 struct libinput_device *base = &device->base;
1232 struct evdev_device *device,
1245 device,
1260 distance = libevdev_get_abs_info(tablet->device->evdev, ABS_DISTANCE);
1261 pressure = libevdev_get_abs_info(tablet->device->evdev, ABS_PRESSURE);
1327 * device coordinates) between upper and lower as before which isn't
1337 struct evdev_device *device,
1341 libevdev_get_abs_info(device->evdev, ABS_PRESSURE);
1366 struct evdev_device *device,
1376 pressure = libevdev_get_abs_info(device->evdev, ABS_PRESSURE);
1377 distance = libevdev_get_abs_info(device->evdev, ABS_DISTANCE);
1392 /* A device without distance will always have some pressure on
1419 evdev_log_error(device,
1428 evdev_log_info(device,
1440 struct evdev_device *device,
1451 evdev_log_bug_libinput(device,
1455 evdev_log_bug_libinput(device,
1458 p = libevdev_get_abs_info(tablet->device->evdev, ABS_PRESSURE);
1460 evdev_log_bug_libinput(device,
1490 struct evdev_device *device,
1497 distance = libevdev_get_abs_info(tablet->device->evdev, ABS_DISTANCE);
1548 struct evdev_device *device = tablet->device;
1552 mm = evdev_device_units_to_mm(device, &tablet->axes.point);
1611 struct evdev_device *device,
1618 tablet_notify_proximity(&device->base,
1637 struct evdev_device *device,
1644 tablet_notify_proximity(&device->base,
1664 struct evdev_device *device,
1669 tablet_notify_tip(&device->base,
1687 tablet_notify_tip(&device->base,
1710 struct evdev_device *device,
1725 tablet_notify_axis(&device->base,
1740 struct evdev_device *device,
1745 device,
1754 device,
1765 struct evdev_device *device,
1781 if (tablet_check_notify_axes(tablet, device, tool, &axes, time))
1788 tablet_send_proximity_in(tablet, tool, device, &axes, time);
1789 if (!tablet_send_tip(tablet, tool, device, &axes, time))
1790 tablet_send_axes(tablet, tool, device, &axes, time);
1795 tablet_send_buttons(tablet, tool, device, time);
1797 if (tablet_send_proximity_out(tablet, tool, device, &axes, time)) {
1798 tablet_change_to_left_handed(device);
1799 tablet_apply_rotation(device);
1834 struct evdev_device *device,
1844 * device.
1856 * BTN_TOOL_PEN and the state for the tool was 0, this device will
1916 tablet_update_tool(tablet, device, type, state);
1959 struct evdev_device *device,
1966 process_tool_twice = tablet_update_tool_state(tablet, device, time);
1974 tablet_update_proximity_state(tablet, device, tool);
1990 update_pressure_offset(tablet, device, tool);
1991 detect_pressure_offset(tablet, device, tool);
1992 detect_tool_contact(tablet, device, tool);
1995 update_pressure_offset(tablet, device, tool);
1996 detect_tool_contact(tablet, device, tool);
2000 tablet_send_events(tablet, tool, device, time);
2111 evdev_log_debug(tablet->device, "tablet: forcing proximity after timeout\n");
2116 tablet->device,
2127 struct evdev_device *device,
2135 tablet_process_absolute(tablet, device, e, time);
2138 tablet_process_relative(tablet, device, e, time);
2141 tablet_process_key(tablet, device, e, time);
2144 tablet_process_misc(tablet, device, e, time);
2147 tablet_flush(tablet, device, time);
2148 tablet_toggle_touch_device(tablet, device, time);
2153 evdev_log_error(device,
2163 struct evdev_device *device)
2176 tablet_flush(tablet, device, libinput_now(li));
2200 tablet_setup_touch_arbitration(struct evdev_device *device,
2203 struct tablet_dispatch *tablet = tablet_dispatch(device->dispatch);
2207 * heuristics in case we find a "better" device.
2210 struct libinput_device_group *group1 = libinput_device_get_device_group(&device->base);
2213 /* same phsical device? -> better, otherwise keep the one we have */
2217 /* We found a better device, let's swap it out */
2223 evdev_log_debug(device,
2225 device->devname,
2229 evdev_log_debug(device,
2231 device->devname,
2237 tablet_setup_rotation(struct evdev_device *device,
2240 struct tablet_dispatch *tablet = tablet_dispatch(device->dispatch);
2241 struct libinput_device_group *group1 = libinput_device_get_device_group(&device->base);
2245 evdev_log_debug(device,
2247 device->devname,
2253 tablet_change_rotation(device, DO_NOTIFY);
2259 tablet_device_added(struct evdev_device *device,
2271 tablet_setup_touch_arbitration(device, added_device);
2274 tablet_setup_rotation(device, added_device);
2278 tablet_device_removed(struct evdev_device *device,
2281 struct tablet_dispatch *tablet = tablet_dispatch(device->dispatch);
2289 tablet_change_rotation(device, DO_NOTIFY);
2294 tablet_check_initial_proximity(struct evdev_device *device,
2308 if (libevdev_fetch_event_value(device->evdev,
2321 tablet_update_tool(tablet, device, tool, state);
2326 libevdev_get_event_value(device->evdev,
2331 * to 0 for now. On the first real event from the device we get the
2340 struct evdev_device *device,
2348 evdev_log_debug(device,
2353 * locked. So we rotate when either device is left-handed. But it
2354 * can only be actually changed when the device is in a neutral
2358 tablet_change_rotation(device, DONT_NOTIFY);
2379 struct evdev_device *device)
2381 if (libevdev_has_property(device->evdev, INPUT_PROP_DIRECT))
2382 evdev_init_calibration(device, &tablet->calibration);
2387 struct evdev_device *device)
2392 if (!libevdev_has_event_code(device->evdev, EV_KEY, BTN_TOOL_MOUSE) &&
2393 !libevdev_has_event_code(device->evdev, EV_KEY, BTN_TOOL_LENS))
2404 * Value is in device coordinates.
2435 tablet_init_accel(struct tablet_dispatch *tablet, struct evdev_device *device)
2440 x = device->abs.absinfo_x;
2441 y = device->abs.absinfo_y;
2448 evdev_device_init_pointer_acceleration(device, filter);
2452 device->pointer.config.get_profiles = tablet_accel_config_get_profiles;
2453 device->pointer.config.set_profile = tablet_accel_config_set_profile;
2454 device->pointer.config.get_profile = tablet_accel_config_get_profile;
2455 device->pointer.config.get_default_profile = tablet_accel_config_get_default_profile;
2461 tablet_init_left_handed(struct evdev_device *device)
2463 if (evdev_tablet_has_left_handed(device))
2464 evdev_init_left_handed(device,
2469 tablet_is_aes(struct evdev_device *device,
2479 int vid = evdev_device_get_id_vendor(device);
2482 * libwacom keeps all the AES pens in a single group, so any device
2494 devnode = udev_device_get_devnode(device->udev_device);
2515 tablet_init_smoothing(struct evdev_device *device,
2523 quirks = evdev_libinput_context(device)->quirks;
2524 q = quirks_fetch_for_device(quirks, device->udev_device);
2530 use_smoothing = !tablet_is_aes(device, tablet);
2541 tablet_reject_device(struct evdev_device *device)
2543 struct libevdev *evdev = device->evdev;
2551 has_size = evdev_device_get_size(device, &w, &h) == 0;
2556 evdev_log_bug_libinput(device,
2558 "Ignoring this device.\n",
2568 struct evdev_device *device)
2570 struct libevdev *evdev = device->evdev;
2576 tablet->device = device;
2581 if (tablet_reject_device(device))
2591 if (evdev_device_get_id_vendor(device) != VENDOR_ID_WACOM) {
2596 tablet_init_calibration(tablet, device);
2597 tablet_init_proximity_threshold(tablet, device);
2598 rc = tablet_init_accel(tablet, device);
2602 evdev_init_sendevents(device, &tablet->base);
2603 tablet_init_left_handed(device);
2604 tablet_init_smoothing(device, tablet);
2616 device gives us the right event sequence */
2629 evdev_tablet_create(struct evdev_device *device)
2632 struct libinput *li = evdev_libinput_context(device);
2642 if (tablet_init(tablet, device) != 0) {