Skip to content

Commit 01c2b7c

Browse files
committed
fixup! input: upgrade to libinput 1.26
1 parent e73f344 commit 01c2b7c

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/event/tablet_pad.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ pub enum TabletPadEvent {
7878
Ring(TabletPadRingEvent),
7979
/// A status change on a dial on a device with the
8080
/// `DeviceCapability::TabletPad` capability.
81+
#[cfg(feature = "libinput_1_26")]
8182
Dial(TabletPadDialEvent),
8283
/// A status change on a strip on a device with the
8384
/// `DeviceCapability::TabletPad` capability.
@@ -97,6 +98,7 @@ impl EventTrait for TabletPadEvent {
9798
match self {
9899
TabletPadEvent::Button(event) => event.as_raw_event(),
99100
TabletPadEvent::Ring(event) => event.as_raw_event(),
101+
#[cfg(feature = "libinput_1_26")]
100102
TabletPadEvent::Dial(event) => event.as_raw_event(),
101103
TabletPadEvent::Strip(event) => event.as_raw_event(),
102104
#[cfg(feature = "libinput_1_15")]
@@ -138,6 +140,7 @@ impl AsRaw<ffi::libinput_event_tablet_pad> for TabletPadEvent {
138140
match self {
139141
TabletPadEvent::Button(event) => event.as_raw(),
140142
TabletPadEvent::Ring(event) => event.as_raw(),
143+
#[cfg(feature = "libinput_1_26")]
141144
TabletPadEvent::Dial(event) => event.as_raw(),
142145
TabletPadEvent::Strip(event) => event.as_raw(),
143146
#[cfg(feature = "libinput_1_15")]
@@ -151,6 +154,7 @@ impl Context for TabletPadEvent {
151154
match self {
152155
TabletPadEvent::Button(event) => event.context(),
153156
TabletPadEvent::Ring(event) => event.context(),
157+
#[cfg(feature = "libinput_1_26")]
154158
TabletPadEvent::Dial(event) => event.context(),
155159
TabletPadEvent::Strip(event) => event.context(),
156160
#[cfg(feature = "libinput_1_15")]
@@ -240,13 +244,14 @@ impl TabletPadRingEvent {
240244
}
241245
}
242246

247+
#[cfg(feature = "libinput_1_26")]
243248
ffi_event_struct!(
244249
/// A status change on a dial on a device with the `DeviceCapability::TabletPad`
245250
/// capability.
246251
struct TabletPadDialEvent, ffi::libinput_event_tablet_pad, ffi::libinput_event_tablet_pad_get_base_event);
247252

253+
#[cfg(feature = "libinput_1_26")]
248254
impl TabletPadDialEvent {
249-
#[cfg(feature = "libinput_1_26")]
250255
ffi_func!(
251256
/// Returns the delta change of the dial, in multiples or fractions of 120,
252257
/// with each multiple of 120 indicating one logical wheel event.
@@ -255,7 +260,6 @@ impl TabletPadDialEvent {
255260
/// for more details.
256261
pub fn dial_v120, ffi::libinput_event_tablet_pad_get_dial_delta_v120, f64);
257262

258-
#[cfg(feature = "libinput_1_26")]
259263
ffi_func!(
260264
/// Returns the number of the dial that has changed state, with 0 being the
261265
/// first dial.

0 commit comments

Comments
 (0)