spmenu/libs/mouse.h

58 lines
1.1 KiB
C
Raw Normal View History

// clicks
enum {
clickwindow,
clickprompt,
clickinput,
clicklarrow,
2023-04-04 02:28:05 +02:00
clickitem,
clickselitem,
clickrarrow,
clicknumber,
clickcaps,
clickmode,
};
typedef struct {
unsigned int click;
unsigned int mask;
unsigned int button;
void (*func)(Arg *arg);
Arg arg;
} Mouse;
2023-04-25 17:58:50 +02:00
#if USECONFIG
typedef struct {
char *click;
unsigned int button;
} ButtonType;
typedef struct {
char *tclick;
unsigned int click;
} ClickType;
static ButtonType btp[] = {
{ "Left Click", Button1 },
{ "Middle Click", Button2 },
{ "Right Click", Button3 },
{ "Scroll Up", Button4 },
{ "Scroll Down", Button5 },
};
static ClickType ctp[] = {
{ "clickwindow", clickwindow },
{ "clickprompt", clickprompt },
{ "clickinput", clickinput },
{ "clicklarrow", clicklarrow },
{ "clickitem", clickitem },
{ "clickselitem", clickselitem },
{ "clickrarrow", clickrarrow },
{ "clicknumber", clicknumber },
{ "clickcaps", clickcaps },
{ "clickmode", clickmode },
};
2023-04-25 17:58:50 +02:00
#endif
static Mouse cbuttons[256];
2023-03-08 17:20:32 +01:00
static void buttonpress(XEvent *e);