-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMapping.h
More file actions
54 lines (39 loc) · 978 Bytes
/
Copy pathMapping.h
File metadata and controls
54 lines (39 loc) · 978 Bytes
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
//
// Telescope - graphical task switcher
//
// (c) Ilya Skriblovsky, 2010
// <Ilya.Skriblovsky@gmail.com>
//
// $Id: Mapping.h 158 2011-02-22 20:05:07Z mitrandir $
// Mapping - a single key binding
#ifndef __TELESCOPE__MAPPING_H
#define __TELESCOPE__MAPPING_H
#include <X11/Xlib.h>
class TeleWindow;
class Mapping
{
public:
enum Event
{
Press,
GlobalPress
};
enum Type
{
Shell,
Internal
};
private:
Event _event;
KeyCode _keyCode;
Type _type;
char *_action;
Mapping();
Mapping(Event event, KeyCode keyCode, Type type, const char *action);
public:
static Mapping* parseMappingLine(Display *dpy, const char *line, const char **error);
~Mapping();
void handleEvent(TeleWindow *teleWindow, Mapping::Event event, KeyCode keyCode);
void execute(TeleWindow *teleWindow);
};
#endif