Lines Matching refs:scroll

204 			if (device->scroll.change_scroll_method)
205 device->scroll.change_scroll_method(device);
216 device->scroll.button_scroll_state = BUTTONSCROLL_READY;
226 switch (device->scroll.lock_state) {
231 device->scroll.lock_state = BUTTONSCROLL_LOCK_FIRSTDOWN;
232 evdev_log_debug(device, "scroll lock: first down\n");
236 device->scroll.lock_state = BUTTONSCROLL_LOCK_FIRSTUP;
237 evdev_log_debug(device, "scroll lock: first up\n");
241 device->scroll.lock_state = BUTTONSCROLL_LOCK_SECONDDOWN;
242 evdev_log_debug(device, "scroll lock: second down\n");
246 device->scroll.lock_state = BUTTONSCROLL_LOCK_IDLE;
247 evdev_log_debug(device, "scroll lock: idle\n");
252 if (device->scroll.button < BTN_MOUSE + 5) {
257 device->scroll.button_scroll_state = BUTTONSCROLL_BUTTON_DOWN;
260 * our scroll button is the left or right button, we only
267 (device->scroll.button == BTN_LEFT ||
268 device->scroll.button == BTN_RIGHT)) {
272 libinput_timer_set_flags(&device->scroll.timer,
279 device->scroll.button_scroll_state = BUTTONSCROLL_READY;
281 device->scroll.button_down_time = time;
284 libinput_timer_cancel(&device->scroll.timer);
285 switch(device->scroll.button_scroll_state) {
295 * without scroll events, emit the
298 device->scroll.button_down_time,
299 device->scroll.button,
302 device->scroll.button,
312 device->scroll.button_scroll_state = BUTTONSCROLL_IDLE;
322 if (device->scroll.method == LIBINPUT_CONFIG_SCROLL_ON_BUTTON_DOWN &&
323 button == device->scroll.button) {
416 if (device->scroll.invert_horizontal_scrolling) {
421 if (device->scroll.natural_scrolling_enabled) {
445 if (device->scroll.invert_horizontal_scrolling) {
450 if (device->scroll.natural_scrolling_enabled) {
472 if (device->scroll.natural_scrolling_enabled) {
491 if (device->scroll.natural_scrolling_enabled) {
755 evdev->scroll.want_method = method;
756 evdev->scroll.change_scroll_method(evdev);
768 return evdev->scroll.want_method;
779 /* Mice without a scroll wheel but with middle button have on-button
795 evdev->scroll.want_button = button;
796 evdev->scroll.change_scroll_method(evdev);
808 return evdev->scroll.want_button;
839 evdev->scroll.want_lock_enabled = false;
842 evdev->scroll.want_lock_enabled = true;
848 evdev->scroll.change_scroll_method(evdev);
858 if (evdev->scroll.lock_state == BUTTONSCROLL_LOCK_DISABLED)
875 device->scroll.lock_state = BUTTONSCROLL_LOCK_IDLE;
877 device->scroll.lock_state = BUTTONSCROLL_LOCK_DISABLED;
890 libinput_timer_init(&device->scroll.timer,
894 device->scroll.config.get_methods = evdev_scroll_get_methods;
895 device->scroll.config.set_method = evdev_scroll_set_method;
896 device->scroll.config.get_method = evdev_scroll_get_method;
897 device->scroll.config.get_default_method = evdev_scroll_get_default_method;
898 device->scroll.config.set_button = evdev_scroll_set_button;
899 device->scroll.config.get_button = evdev_scroll_get_button;
900 device->scroll.config.get_default_button = evdev_scroll_get_default_button;
901 device->scroll.config.set_button_lock = evdev_scroll_set_button_lock;
902 device->scroll.config.get_button_lock = evdev_scroll_get_button_lock;
903 device->scroll.config.get_default_button_lock = evdev_scroll_get_default_button_lock;
904 device->base.config.scroll_method = &device->scroll.config;
905 device->scroll.method = evdev_scroll_get_default_method((struct libinput_device *)device);
906 device->scroll.want_method = device->scroll.method;
907 device->scroll.button = evdev_scroll_get_default_button((struct libinput_device *)device);
908 device->scroll.want_button = device->scroll.button;
909 device->scroll.change_scroll_method = change_scroll_method;
949 dev->scroll.natural_scrolling_enabled = enabled ? true : false;
959 return dev->scroll.natural_scrolling_enabled ? 1 : 0;
972 device->scroll.config_natural.has = evdev_scroll_config_natural_has;
973 device->scroll.config_natural.set_enabled = evdev_scroll_config_natural_set;
974 device->scroll.config_natural.get_enabled = evdev_scroll_config_natural_get;
975 device->scroll.config_natural.get_default_enabled = evdev_scroll_config_natural_get_default;
976 device->scroll.natural_scrolling_enabled = false;
977 device->base.config.natural_scroll = &device->scroll.config_natural;
2090 /* want natural-scroll config option */
2091 device->scroll.natural_scrolling_enabled = true;
2095 device->scroll.want_button = 1;
2102 /* want natural-scroll config option */
2105 device->scroll.natural_scrolling_enabled = true;
2151 device->scroll.invert_horizontal_scrolling = true;
2449 device->scroll.threshold = 5.0; /* Default may be overridden */
2450 device->scroll.direction_lock_threshold = 5.0; /* Default may be overridden */
2451 device->scroll.direction = 0;
2452 device->scroll.wheel_click_angle =
2800 return (device->scroll.direction & bit(axis)) != 0;
2810 device->scroll.direction |= bit(axis);
2824 device->scroll.buildup.y += delta->y;
2827 device->scroll.buildup.x += delta->x;
2829 trigger = &device->scroll.buildup;
2837 if (fabs(trigger->y) >= device->scroll.threshold)
2840 if (fabs(trigger->x) >= device->scroll.threshold)
2847 if (fabs(delta->y) >= device->scroll.direction_lock_threshold)
2852 if (fabs(delta->x) >= device->scroll.direction_lock_threshold)
2860 * the actual scroll movement. Otherwise we get a jump once
2871 uint32_t axes = device->scroll.direction;
2887 "Posting invalid scroll source %d\n",
2901 /* terminate scrolling with a zero scroll event */
2902 if (device->scroll.direction != 0) {
2907 device->scroll.direction,
2913 device->scroll.direction,
2918 "Stopping invalid scroll source %d\n",
2924 device->scroll.buildup.x = 0;
2925 device->scroll.buildup.y = 0;
2926 device->scroll.direction = 0;
3069 libinput_timer_cancel(&device->scroll.timer);
3112 libinput_timer_destroy(&device->scroll.timer);