add the config header and emacs comment to all the .cc's
[mikachu/openbox.git] / 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 OtkEventHandler::OtkEventHandler()
13 {
14 }
15
16
17 OtkEventHandler::~OtkEventHandler()
18 {
19 }
20
21
22 void OtkEventHandler::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 EnterNotify:
34     return enterHandler(e.xcrossing);
35   case LeaveNotify:
36     return leaveHandler(e.xcrossing);
37   case FocusIn:
38     return focusHandler(e.xfocus);
39   case FocusOut:
40     return unfocusHandler(e.xfocus);
41   case Expose:
42     return exposeHandler(e.xexpose);
43   case GraphicsExpose:
44     return graphicsExposeHandler(e.xgraphicsexpose);
45   case NoExpose:
46     return noExposeEventHandler(e.xnoexpose);
47   case CirculateRequest:
48     return circulateRequestHandler(e.xcirculaterequest);
49   case ConfigureRequest:
50     return configureRequestHandler(e.xconfigurerequest);
51   case MapRequest:
52     return mapRequestHandler(e.xmaprequest);
53   case ResizeRequest:
54     return resizeRequestHandler(e.xresizerequest);
55   case CirculateNotify:
56     return circulateHandler(e.xcirculate);
57   case ConfigureNotify:
58     return configureHandler(e.xconfigure);
59   case CreateNotify:
60     return createHandler(e.xcreatewindow);
61   case DestroyNotify:
62     return destroyHandler(e.xdestroywindow);
63   case GravityNotify:
64     return gravityHandler(e.xgravity);
65   case MapNotify:
66     return mapHandler(e.xmap);
67   case MappingNotify:
68     return mappingHandler(e.xmapping);
69   case ReparentNotify:
70     return reparentHandler(e.xreparent);
71   case UnmapNotify:
72     return unmapHandler(e.xunmap);
73   case VisibilityNotify:
74     return visibilityHandler(e.xvisibility);
75   case ColormapNotify:
76     return colorMapHandler(e.xcolormap);
77   case ClientMessage:
78     return clientMessageHandler(e.xclient);
79   case PropertyNotify:
80     return propertyHandler(e.xproperty);
81   case SelectionClear:
82     return selectionClearHandler(e.xselectionclear);
83   case SelectionNotify:
84     return selectionHandler(e.xselection);
85   case SelectionRequest:
86     return selectionRequestHandler(e.xselectionrequest);
87   default:
88 #ifdef    SHAPE
89     if (e.type == otk::OBDisplay::shapeEventBase())
90       return shapeHandler((*(XShapeEvent*)&e));
91 #endif // SHAPE
92     ;
93   }
94 }
95
96
97 void OtkEventHandler::clientMessageHandler(const XClientMessageEvent &)
98 {
99   
100 }
101
102 }