diff options
Diffstat (limited to 'util.cpp')
| -rw-r--r-- | util.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -15,3 +15,10 @@ std::vector<string> split (const string &s, char delim) { return result; } + +const string evNames[] = {"", "", "KeyPress", "KeyRelease", "ButtonPress", "ButtonRelease", "MotionNotify", "EnterNotify", "LeaveNotify", "FocusIn", "FocusOut", "KeymapNotify", "Expose", "GraphicsExpose", "NoExpose", "VisibilityNotify", "CreateNotify", "DestroyNotify", "UnmapNotify", "MapNotify", "MapRequest", "ReparentNotify", "ConfigureNotify", "ConfigureRequest", "GravityNotify", "ResizeRequest", "CirculateNotify", "CirculateRequest", "PropertyNotify", "SelectionClear", "SelectionRequest", "SelectionNotify", "ColormapNotify", "ClientMessage", "MappingNotify", "GenericEvent", "LASTEvent"}; + +string getEventName(int e) +{ + return evNames[e]; +} |
