ObjFW
Loading...
Searching...
No Matches
evdev_compat.h
1/*
2 * Copyright (c) 2008-2024 Jonathan Schleifer <js@nil.im>
3 *
4 * All rights reserved.
5 *
6 * This program is free software: you can redistribute it and/or modify it
7 * under the terms of the GNU Lesser General Public License version 3.0 only,
8 * as published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
13 * version 3.0 for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public License
16 * version 3.0 along with this program. If not, see
17 * <https://www.gnu.org/licenses/>.
18 */
19
20/* Provide compatibility defines for old evdev headers. */
21
22#include <linux/input.h>
23
24#ifndef BTN_NORTH
25# define BTN_NORTH BTN_X
26#endif
27#ifndef BTN_SOUTH
28# define BTN_SOUTH BTN_A
29#endif
30#ifndef BTN_WEST
31# define BTN_WEST BTN_Y
32#endif
33#ifndef BTN_EAST
34# define BTN_EAST BTN_B
35#endif
36
37#ifndef BTN_DPAD_UP
38# define BTN_DPAD_UP 0x220
39#endif
40#ifndef BTN_DPAD_DOWN
41# define BTN_DPAD_DOWN 0x221
42#endif
43#ifndef BTN_DPAD_LEFT
44# define BTN_DPAD_LEFT 0x222
45#endif
46#ifndef BTN_DPAD_RIGHT
47# define BTN_DPAD_RIGHT 0x223
48#endif