mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2025-12-25 23:20:06 +01:00
pad: move a function to save on an ifdef
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1069>
This commit is contained in:
parent
0c782c4084
commit
04cff1c721
1 changed files with 13 additions and 15 deletions
|
|
@ -50,21 +50,6 @@ struct pad_mode_led {
|
|||
int mode_idx;
|
||||
};
|
||||
|
||||
#if HAVE_LIBWACOM
|
||||
static inline struct pad_mode_toggle_button *
|
||||
pad_mode_toggle_button_new(struct pad_dispatch *pad,
|
||||
struct libinput_tablet_pad_mode_group *group,
|
||||
unsigned int button_index)
|
||||
{
|
||||
struct pad_mode_toggle_button *button;
|
||||
|
||||
button = zalloc(sizeof *button);
|
||||
button->button_index = button_index;
|
||||
|
||||
return button;
|
||||
}
|
||||
#endif /* HAVE_LIBWACOM */
|
||||
|
||||
static inline void
|
||||
pad_mode_toggle_button_destroy(struct pad_mode_toggle_button* button)
|
||||
{
|
||||
|
|
@ -353,6 +338,19 @@ pad_get_mode_group(struct pad_dispatch *pad, unsigned int index)
|
|||
|
||||
#if HAVE_LIBWACOM
|
||||
|
||||
static inline struct pad_mode_toggle_button *
|
||||
pad_mode_toggle_button_new(struct pad_dispatch *pad,
|
||||
struct libinput_tablet_pad_mode_group *group,
|
||||
unsigned int button_index)
|
||||
{
|
||||
struct pad_mode_toggle_button *button;
|
||||
|
||||
button = zalloc(sizeof *button);
|
||||
button->button_index = button_index;
|
||||
|
||||
return button;
|
||||
}
|
||||
|
||||
static inline int
|
||||
pad_find_button_group(WacomDevice *wacom,
|
||||
int button_index,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue