-
Notifications
You must be signed in to change notification settings - Fork 4
/
bind.h
50 lines (34 loc) · 1.3 KB
/
bind.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
/* evilwm - minimalist window manager for X11
* Copyright (C) 1999-2022 Ciaran Anscomb <[email protected]>
* see README for license and other details. */
// Maps keyboard and button controls to window manager functions. Handles
// keypress and buttonpress events.
#ifndef EVILWM_BIND_H_
#define EVILWM_BIND_H_
#include <X11/X.h>
#include <X11/Xlib.h>
struct client;
struct screen;
// Modifier binds are kept in an array of mappings:
struct name_to_modifier {
const char *name;
unsigned value;
};
extern struct name_to_modifier name_to_modifier[];
// These modifiers are currently used explicitly in button-based controls, and
// are not reconfigurable beyond changing the modifier bind.
#define grabmask2 (name_to_modifier[1].value)
#define altmask (name_to_modifier[2].value)
// Reset list of binds to the built-ins
void bind_reset(void);
// Alter modifier by name - only used for mask1, mask2, altmask
void bind_modifier(const char *modname, const char *modspec);
// Bind a control to a function + flags
void bind_control(const char *ctlspec, const char *funcspec);
// Apply grabs relevant to screen
void bind_grab_for_screen(struct screen *s);
// Apply grabs relevant to client
void bind_grab_for_client(struct client *c);
void bind_handle_key(XKeyEvent *e);
void bind_handle_button(XButtonEvent *e);
#endif