mirror of
https://github.com/labwc/labwc.git
synced 2025-11-02 09:01:47 -05:00
change mousebind code to use already existing enums
Also added an #include statement to ssd.h so it would compile without depending on other headers to be #included before it
This commit is contained in:
parent
36f5b49f2a
commit
92891b4dfa
4 changed files with 22 additions and 34 deletions
|
|
@ -1,32 +1,17 @@
|
|||
#ifndef __LABWC_MOUSEBIND_H
|
||||
#define __LABWC_MOUSEBIND_H
|
||||
|
||||
#include "ssd.h"
|
||||
#include <wayland-util.h>
|
||||
|
||||
enum mouse_context {
|
||||
MOUSE_CONTEXT_TITLEBAR,
|
||||
MOUSE_CONTEXT_NONE
|
||||
};
|
||||
|
||||
enum mouse_button {
|
||||
/*
|
||||
* These values match the values returned by button event->button and were
|
||||
* obtained experimentally
|
||||
*/
|
||||
MOUSE_BUTTON_LEFT = 272,
|
||||
MOUSE_BUTTON_RIGHT = 273,
|
||||
MOUSE_BUTTON_MIDDLE = 274,
|
||||
MOUSE_BUTTON_NONE = -1
|
||||
};
|
||||
|
||||
enum action_mouse_did {
|
||||
MOUSE_ACTION_DOUBLECLICK,
|
||||
MOUSE_ACTION_NONE
|
||||
};
|
||||
|
||||
struct mousebind {
|
||||
enum mouse_context context; /* ex: titlebar */
|
||||
enum mouse_button button; /* ex: left, right, middle */
|
||||
enum ssd_part_type context; /* ex: titlebar */
|
||||
uint32_t button; /* ex: BTN_LEFT, BTN_RIGHT from linux/input_event_codes.h */
|
||||
enum action_mouse_did mouse_action; /* ex: doubleclick, press, drag, etc */
|
||||
const char* action; /* what to do because mouse did previous action */
|
||||
const char* command;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue