mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-05-09 08:18:02 +02:00
evdev: change prefix on some fallback-only methods
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
ea115e3c2f
commit
4c531f7e99
1 changed files with 15 additions and 15 deletions
30
src/evdev.c
30
src/evdev.c
|
|
@ -1832,7 +1832,7 @@ evdev_left_handed_has(struct libinput_device *device)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
evdev_change_to_left_handed(struct evdev_device *device)
|
fallback_change_to_left_handed(struct evdev_device *device)
|
||||||
{
|
{
|
||||||
struct fallback_dispatch *dispatch = fallback_dispatch(device->dispatch);
|
struct fallback_dispatch *dispatch = fallback_dispatch(device->dispatch);
|
||||||
|
|
||||||
|
|
@ -1894,7 +1894,7 @@ evdev_scroll_get_methods(struct libinput_device *device)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
evdev_change_scroll_method(struct evdev_device *device)
|
fallback_change_scroll_method(struct evdev_device *device)
|
||||||
{
|
{
|
||||||
struct fallback_dispatch *dispatch = fallback_dispatch(device->dispatch);
|
struct fallback_dispatch *dispatch = fallback_dispatch(device->dispatch);
|
||||||
|
|
||||||
|
|
@ -2090,14 +2090,14 @@ evdev_init_natural_scroll(struct evdev_device *device)
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
evdev_rotation_config_is_available(struct libinput_device *device)
|
fallback_rotation_config_is_available(struct libinput_device *device)
|
||||||
{
|
{
|
||||||
/* This function only gets called when we support rotation */
|
/* This function only gets called when we support rotation */
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static enum libinput_config_status
|
static enum libinput_config_status
|
||||||
evdev_rotation_config_set_angle(struct libinput_device *libinput_device,
|
fallback_rotation_config_set_angle(struct libinput_device *libinput_device,
|
||||||
unsigned int degrees_cw)
|
unsigned int degrees_cw)
|
||||||
{
|
{
|
||||||
struct evdev_device *device = evdev_device(libinput_device);
|
struct evdev_device *device = evdev_device(libinput_device);
|
||||||
|
|
@ -2110,7 +2110,7 @@ evdev_rotation_config_set_angle(struct libinput_device *libinput_device,
|
||||||
}
|
}
|
||||||
|
|
||||||
static unsigned int
|
static unsigned int
|
||||||
evdev_rotation_config_get_angle(struct libinput_device *libinput_device)
|
fallback_rotation_config_get_angle(struct libinput_device *libinput_device)
|
||||||
{
|
{
|
||||||
struct evdev_device *device = evdev_device(libinput_device);
|
struct evdev_device *device = evdev_device(libinput_device);
|
||||||
struct fallback_dispatch *dispatch = fallback_dispatch(device->dispatch);
|
struct fallback_dispatch *dispatch = fallback_dispatch(device->dispatch);
|
||||||
|
|
@ -2119,22 +2119,22 @@ evdev_rotation_config_get_angle(struct libinput_device *libinput_device)
|
||||||
}
|
}
|
||||||
|
|
||||||
static unsigned int
|
static unsigned int
|
||||||
evdev_rotation_config_get_default_angle(struct libinput_device *device)
|
fallback_rotation_config_get_default_angle(struct libinput_device *device)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
evdev_init_rotation(struct evdev_device *device,
|
fallback_init_rotation(struct fallback_dispatch *dispatch,
|
||||||
struct fallback_dispatch *dispatch)
|
struct evdev_device *device)
|
||||||
{
|
{
|
||||||
if ((device->model_flags & EVDEV_MODEL_TRACKBALL) == 0)
|
if ((device->model_flags & EVDEV_MODEL_TRACKBALL) == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
dispatch->rotation.config.is_available = evdev_rotation_config_is_available;
|
dispatch->rotation.config.is_available = fallback_rotation_config_is_available;
|
||||||
dispatch->rotation.config.set_angle = evdev_rotation_config_set_angle;
|
dispatch->rotation.config.set_angle = fallback_rotation_config_set_angle;
|
||||||
dispatch->rotation.config.get_angle = evdev_rotation_config_get_angle;
|
dispatch->rotation.config.get_angle = fallback_rotation_config_get_angle;
|
||||||
dispatch->rotation.config.get_default_angle = evdev_rotation_config_get_default_angle;
|
dispatch->rotation.config.get_default_angle = fallback_rotation_config_get_default_angle;
|
||||||
dispatch->rotation.is_enabled = false;
|
dispatch->rotation.is_enabled = false;
|
||||||
matrix_init_identity(&dispatch->rotation.matrix);
|
matrix_init_identity(&dispatch->rotation.matrix);
|
||||||
device->base.config.rotation = &dispatch->rotation.config;
|
device->base.config.rotation = &dispatch->rotation.config;
|
||||||
|
|
@ -2313,18 +2313,18 @@ fallback_dispatch_create(struct libinput_device *libinput_device)
|
||||||
|
|
||||||
if (device->left_handed.want_enabled)
|
if (device->left_handed.want_enabled)
|
||||||
evdev_init_left_handed(device,
|
evdev_init_left_handed(device,
|
||||||
evdev_change_to_left_handed);
|
fallback_change_to_left_handed);
|
||||||
|
|
||||||
if (device->scroll.want_button)
|
if (device->scroll.want_button)
|
||||||
evdev_init_button_scroll(device,
|
evdev_init_button_scroll(device,
|
||||||
evdev_change_scroll_method);
|
fallback_change_scroll_method);
|
||||||
|
|
||||||
if (device->scroll.natural_scrolling_enabled)
|
if (device->scroll.natural_scrolling_enabled)
|
||||||
evdev_init_natural_scroll(device);
|
evdev_init_natural_scroll(device);
|
||||||
|
|
||||||
evdev_init_calibration(device, &dispatch->calibration);
|
evdev_init_calibration(device, &dispatch->calibration);
|
||||||
evdev_init_sendevents(device, &dispatch->base);
|
evdev_init_sendevents(device, &dispatch->base);
|
||||||
evdev_init_rotation(device, dispatch);
|
fallback_init_rotation(dispatch, device);
|
||||||
|
|
||||||
/* BTN_MIDDLE is set on mice even when it's not present. So
|
/* BTN_MIDDLE is set on mice even when it's not present. So
|
||||||
* we can only use the absence of BTN_MIDDLE to mean something, i.e.
|
* we can only use the absence of BTN_MIDDLE to mean something, i.e.
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue