2021-08-29 14:22:49 -04:00
|
|
|
#ifndef __LABWC_MOUSEBIND_H
|
|
|
|
|
#define __LABWC_MOUSEBIND_H
|
|
|
|
|
|
2021-08-30 18:42:38 -04:00
|
|
|
#include "ssd.h"
|
2021-08-29 14:22:49 -04:00
|
|
|
#include <wayland-util.h>
|
|
|
|
|
|
2021-08-31 17:43:49 -04:00
|
|
|
enum action_mouse_did
|
|
|
|
|
{
|
2021-08-29 14:22:49 -04:00
|
|
|
MOUSE_ACTION_DOUBLECLICK,
|
|
|
|
|
MOUSE_ACTION_NONE
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct mousebind {
|
2021-08-30 18:42:38 -04:00
|
|
|
enum ssd_part_type context; /* ex: titlebar */
|
2021-08-31 17:43:49 -04:00
|
|
|
|
|
|
|
|
/* ex: BTN_LEFT, BTN_RIGHT from linux/input_event_codes.h */
|
|
|
|
|
uint32_t button;
|
|
|
|
|
|
|
|
|
|
/* ex: doubleclick, press, drag, etc */
|
|
|
|
|
enum action_mouse_did mouse_action;
|
|
|
|
|
|
|
|
|
|
/* what to do because mouse did previous action */
|
|
|
|
|
const char *action;
|
|
|
|
|
|
|
|
|
|
const char *command;
|
2021-08-29 14:22:49 -04:00
|
|
|
struct wl_list link;
|
|
|
|
|
};
|
|
|
|
|
|
2021-08-31 17:43:49 -04:00
|
|
|
struct mousebind *
|
|
|
|
|
mousebind_create(const char *context_str, const char *mouse_button_str,
|
|
|
|
|
const char *action_mouse_did_str, const char *action, const char *command);
|
2021-08-29 14:22:49 -04:00
|
|
|
|
|
|
|
|
#endif /* __LABWC_MOUSEBIND_H */
|