Commit 7f7c0dfa authored by Adrien Plazas's avatar Adrien Plazas
Browse files

event: Add linux/input-event-codes.h

This will allow to use the Linux input event codes in non-Linux
dependent parts of the code to standardize on the Linux input codes
instead of our custom values.

https://bugzilla.gnome.org/show_bug.cgi?id=782611
parent df3ff580
......@@ -24,6 +24,7 @@ BUILT_SOURCES = \
EXTRA_DIST = \
$(gresource_file) \
event/event.vapi \
event/event-codes.vapi \
gamepad/gamepad.vapi \
gamepad/gamepad-monitor.vapi \
gamepad/raw-gamepad.vapi \
......@@ -192,6 +193,7 @@ gnome_games_VALAFLAGS = \
--pkg linux \
--pkg posix \
--pkg event \
--pkg event-codes \
--pkg gamepad \
--pkg gamepad-monitor \
--pkg raw-gamepad \
......
// This file is part of GNOME Games. License: GPL-3.0+.
[CCode (cheader_filename = "linux/input-event-codes.h", cprefix = "", lower_case_cprefix = "")]
namespace Games.EventCode {
public const uint16 EV_KEY;
public const uint16 EV_ABS;
public const uint16 EV_MAX;
public const uint16 BTN_A;
public const uint16 BTN_B;
public const uint16 BTN_X;
public const uint16 BTN_Y;
public const uint16 BTN_TL;
public const uint16 BTN_TR;
public const uint16 BTN_TL2;
public const uint16 BTN_TR2;
public const uint16 BTN_SELECT;
public const uint16 BTN_START;
public const uint16 BTN_MODE;
public const uint16 BTN_THUMBL;
public const uint16 BTN_THUMBR;
public const uint16 BTN_DPAD_UP;
public const uint16 BTN_DPAD_DOWN;
public const uint16 BTN_DPAD_LEFT;
public const uint16 BTN_DPAD_RIGHT;
public const uint16 KEY_MAX;
public const uint16 ABS_X;
public const uint16 ABS_Y;
public const uint16 ABS_RX;
public const uint16 ABS_RY;
public const uint16 ABS_MAX;
}
This diff is collapsed.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment