+// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
+
+#ifdef HAVE_CONFIG_H
+# include "../config.h"
+#endif
+
+#include "display.hh"
#include "eventhandler.hh"
-#include <iostream>
namespace otk {
-OtkEventHandler::OtkEventHandler()
+EventHandler::EventHandler()
{
}
-OtkEventHandler::~OtkEventHandler()
+EventHandler::~EventHandler()
{
}
-void OtkEventHandler::handle(const XEvent &e)
+void EventHandler::handle(const XEvent &e)
{
switch(e.type){
case KeyPress:
return buttonPressHandler(e.xbutton);
case ButtonRelease:
return buttonReleaseHandler(e.xbutton);
+ case MotionNotify:
+ return motionHandler(e.xmotion);
case EnterNotify:
return enterHandler(e.xcrossing);
case LeaveNotify:
return selectionHandler(e.xselection);
case SelectionRequest:
return selectionRequestHandler(e.xselectionrequest);
- };
+ default:
+#ifdef SHAPE
+ if (e.type == display->shapeEventBase())
+ return shapeHandler((*(XShapeEvent*)&e));
+#endif // SHAPE
+#ifdef XKB
+ if (e.type == display->xkbEventBase())
+ return xkbHandler((*(XkbEvent*)&e));
+#endif // XKB
+ ;
+ }
+}
+
+
+void EventHandler::clientMessageHandler(const XClientMessageEvent &)
+{
+
}
}