-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcommand.h
55 lines (47 loc) · 1.29 KB
/
command.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
// Bindable function declarations ("commands").
enum Direction {
UP = (1<<0),
DOWN = (1<<1),
LEFT = (1<<2),
RIGHT = (1<<3),
};
enum Mouse {
BTNLEFT = Button1,
BTNMIDDLE = Button2,
BTNRIGHT = Button3,
SCROLLUP = 4,
SCROLLDOWN = 5,
SCROLLLEFT = 6,
SCROLLRIGHT = 7,
};
enum {
RELEASE = 0,
PRESS = 1,
};
enum KeyOpts {
GRAB = (1<<0), // Grab key, making it a "global hotkey".
NOREPEAT = (1<<1), // Disable autorepeat.
};
// Grabbing the keyboard:
void grabkeyboard(const Arg *keysym); // Wait for keysym to be released, if given.
void ungrabkeyboard(const Arg *ignored);
void togglegrabkeyboard(const Arg *ignored);
void grabandmove2scroll(const Arg *ignored);
// Movement and scrolling:
// dir can be any of UP, DOWN, LEFT, RIGHT, bitwise or'd together.
void movestart(const Arg *dir);
void movestop(const Arg *dir);
void move2scroll(const Arg *enable); // enable is treated as a boolean.
void togglem2s(const Arg *ignored);
void scrollstart(const Arg *dir);
void scrollstop(const Arg *dir);
// factor is a float.
void multiplyspeed(const Arg *factor);
void dividespeed(const Arg *factor);
// Clicking:
// btn can be any value from enum Mouse.
void clickpress(const Arg *btn);
void clickrelease(const Arg *btn);
// Misc:
void resetmovement(const Arg *ignored);
void quit(const Arg *ignored);