uint32_t tablet_button_from_str(const char *button);
void tablet_button_mapping_add(uint32_t from, uint32_t to);
void tablet_load_default_button_mappings(void);
+uint32_t tablet_get_mapped_button(uint32_t src_button);
#endif /* LABWC_TABLET_CONFIG_H */
} handlers;
};
-uint32_t tablet_get_mapped_button(uint32_t src_button);
void tablet_init(struct seat *seat, struct wlr_input_device *wlr_input_device);
#endif /* LABWC_TABLET_H */
tablet_button_mapping_add(BTN_STYLUS, BTN_RIGHT);
tablet_button_mapping_add(BTN_STYLUS2, BTN_MIDDLE);
}
+
+uint32_t
+tablet_get_mapped_button(uint32_t src_button)
+{
+ struct button_map_entry *map_entry;
+ for (size_t i = 0; i < rc.tablet.button_map_count; i++) {
+ map_entry = &rc.tablet.button_map[i];
+ if (map_entry->from == src_button) {
+ return map_entry->to;
+ }
+ }
+ wlr_log(WLR_DEBUG, "no button map target for 0x%x", src_button);
+ return 0;
+}
// Ignore other events
}
-uint32_t
-tablet_get_mapped_button(uint32_t src_button)
-{
- struct button_map_entry *map_entry;
- for (size_t i = 0; i < rc.tablet.button_map_count; i++) {
- map_entry = &rc.tablet.button_map[i];
- if (map_entry->from == src_button) {
- return map_entry->to;
- }
- }
- wlr_log(WLR_DEBUG, "no button map target for 0x%x", src_button);
- return 0;
-}
-
static void
handle_tip(struct wl_listener *listener, void *data)
{
#include "common/mem.h"
#include "config/rcxml.h"
#include "input/cursor.h"
-#include "input/tablet.h"
#include "input/tablet_pad.h"
static void