]> Dogcows Code - chaz/openbox/blob - otk/eventhandler.cc
e4a24df81782e87d38d54bb220d9897f62de61f6
[chaz/openbox] / otk / eventhandler.cc
1 // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
2
3 #ifdef HAVE_CONFIG_H
4 # include "../config.h"
5 #endif
6
7 #include "display.hh"
8 #include "eventhandler.hh"
9
10 namespace otk {
11
12 EventHandler::EventHandler()
13 {
14 }
15
16
17 EventHandler::~EventHandler()
18 {
19 }
20
21
22 void EventHandler::handle(const XEvent &e)
23 {
24 switch(e.type){
25 case KeyPress:
26 return keyPressHandler(e.xkey);
27 case KeyRelease:
28 return keyReleaseHandler(e.xkey);
29 case ButtonPress:
30 return buttonPressHandler(e.xbutton);
31 case ButtonRelease:
32 return buttonReleaseHandler(e.xbutton);
33 case MotionNotify:
34 return motionHandler(e.xmotion);
35 case EnterNotify:
36 return enterHandler(e.xcrossing);
37 case LeaveNotify:
38 return leaveHandler(e.xcrossing);
39 case FocusIn:
40 return focusHandler(e.xfocus);
41 case FocusOut:
42 return unfocusHandler(e.xfocus);
43 case Expose:
44 return exposeHandler(e.xexpose);
45 case GraphicsExpose:
46 return graphicsExposeHandler(e.xgraphicsexpose);
47 case NoExpose:
48 return noExposeEventHandler(e.xnoexpose);
49 case CirculateRequest:
50 return circulateRequestHandler(e.xcirculaterequest);
51 case ConfigureRequest:
52 return configureRequestHandler(e.xconfigurerequest);
53 case MapRequest:
54 return mapRequestHandler(e.xmaprequest);
55 case ResizeRequest:
56 return resizeRequestHandler(e.xresizerequest);
57 case CirculateNotify:
58 return circulateHandler(e.xcirculate);
59 case ConfigureNotify:
60 return configureHandler(e.xconfigure);
61 case CreateNotify:
62 return createHandler(e.xcreatewindow);
63 case DestroyNotify:
64 return destroyHandler(e.xdestroywindow);
65 case GravityNotify:
66 return gravityHandler(e.xgravity);
67 case MapNotify:
68 return mapHandler(e.xmap);
69 case MappingNotify:
70 return mappingHandler(e.xmapping);
71 case ReparentNotify:
72 return reparentHandler(e.xreparent);
73 case UnmapNotify:
74 return unmapHandler(e.xunmap);
75 case VisibilityNotify:
76 return visibilityHandler(e.xvisibility);
77 case ColormapNotify:
78 return colorMapHandler(e.xcolormap);
79 case ClientMessage:
80 return clientMessageHandler(e.xclient);
81 case PropertyNotify:
82 return propertyHandler(e.xproperty);
83 case SelectionClear:
84 return selectionClearHandler(e.xselectionclear);
85 case SelectionNotify:
86 return selectionHandler(e.xselection);
87 case SelectionRequest:
88 return selectionRequestHandler(e.xselectionrequest);
89 default:
90 #ifdef SHAPE
91 if (e.type == Display::shapeEventBase())
92 return shapeHandler((*(XShapeEvent*)&e));
93 #endif // SHAPE
94 #ifdef XKB
95 if (e.type == Display::xkbEventBase())
96 return xkbHandler((*(XkbEvent*)&e));
97 #endif // XKB
98 ;
99 }
100 }
101
102
103 void EventHandler::clientMessageHandler(const XClientMessageEvent &)
104 {
105
106 }
107
108 }
This page took 0.038624 seconds and 4 git commands to generate.