wlr/types: use bitshifts for tablet axes enum

This commit is contained in:
Tudor Brindus 2020-05-04 15:46:24 -04:00 committed by Simon Ser
parent 46c83cbf3d
commit 16af1972d6
1 changed files with 9 additions and 9 deletions

View File

@ -77,15 +77,15 @@ struct wlr_tablet {
}; };
enum wlr_tablet_tool_axes { enum wlr_tablet_tool_axes {
WLR_TABLET_TOOL_AXIS_X = 1, WLR_TABLET_TOOL_AXIS_X = 1 << 0,
WLR_TABLET_TOOL_AXIS_Y = 2, WLR_TABLET_TOOL_AXIS_Y = 1 << 1,
WLR_TABLET_TOOL_AXIS_DISTANCE = 4, WLR_TABLET_TOOL_AXIS_DISTANCE = 1 << 2,
WLR_TABLET_TOOL_AXIS_PRESSURE = 8, WLR_TABLET_TOOL_AXIS_PRESSURE = 1 << 3,
WLR_TABLET_TOOL_AXIS_TILT_X = 16, WLR_TABLET_TOOL_AXIS_TILT_X = 1 << 4,
WLR_TABLET_TOOL_AXIS_TILT_Y = 32, WLR_TABLET_TOOL_AXIS_TILT_Y = 1 << 5,
WLR_TABLET_TOOL_AXIS_ROTATION = 64, WLR_TABLET_TOOL_AXIS_ROTATION = 1 << 6,
WLR_TABLET_TOOL_AXIS_SLIDER = 128, WLR_TABLET_TOOL_AXIS_SLIDER = 1 << 7,
WLR_TABLET_TOOL_AXIS_WHEEL = 256, WLR_TABLET_TOOL_AXIS_WHEEL = 1 << 8,
}; };
struct wlr_event_tablet_tool_axis { struct wlr_event_tablet_tool_axis {