2024-07-05 06:17:29 +02:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-only
|
|
|
|
|
#define _POSIX_C_SOURCE 200809L
|
2025-07-28 01:02:01 -04:00
|
|
|
#include "config/tablet-tool.h"
|
2024-07-05 06:17:29 +02:00
|
|
|
#include <strings.h>
|
|
|
|
|
#include <wlr/util/log.h>
|
|
|
|
|
|
2025-08-17 16:01:50 -04:00
|
|
|
enum lab_motion
|
2024-07-05 06:17:29 +02:00
|
|
|
tablet_parse_motion(const char *name)
|
|
|
|
|
{
|
|
|
|
|
if (!strcasecmp(name, "Absolute")) {
|
2025-08-17 16:01:50 -04:00
|
|
|
return LAB_MOTION_ABSOLUTE;
|
2024-07-05 06:17:29 +02:00
|
|
|
} else if (!strcasecmp(name, "Relative")) {
|
2025-08-17 16:01:50 -04:00
|
|
|
return LAB_MOTION_RELATIVE;
|
2024-07-05 06:17:29 +02:00
|
|
|
}
|
|
|
|
|
wlr_log(WLR_ERROR, "Invalid value for tablet motion: %s", name);
|
2025-08-17 16:01:50 -04:00
|
|
|
return LAB_MOTION_ABSOLUTE;
|
2024-07-05 06:17:29 +02:00
|
|
|
}
|