otk/eventhandler.cc (raw)
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 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 |
// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*- #ifdef HAVE_CONFIG_H # include "../config.h" #endif #include "display.hh" #include "eventhandler.hh" namespace otk { OtkEventHandler::OtkEventHandler() { } OtkEventHandler::~OtkEventHandler() { } void OtkEventHandler::handle(const XEvent &e) { switch(e.type){ case KeyPress: return keyPressHandler(e.xkey); case KeyRelease: return keyReleaseHandler(e.xkey); case ButtonPress: 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 leaveHandler(e.xcrossing); case FocusIn: return focusHandler(e.xfocus); case FocusOut: return unfocusHandler(e.xfocus); case Expose: return exposeHandler(e.xexpose); case GraphicsExpose: return graphicsExposeHandler(e.xgraphicsexpose); case NoExpose: return noExposeEventHandler(e.xnoexpose); case CirculateRequest: return circulateRequestHandler(e.xcirculaterequest); case ConfigureRequest: return configureRequestHandler(e.xconfigurerequest); case MapRequest: return mapRequestHandler(e.xmaprequest); case ResizeRequest: return resizeRequestHandler(e.xresizerequest); case CirculateNotify: return circulateHandler(e.xcirculate); case ConfigureNotify: return configureHandler(e.xconfigure); case CreateNotify: return createHandler(e.xcreatewindow); case DestroyNotify: return destroyHandler(e.xdestroywindow); case GravityNotify: return gravityHandler(e.xgravity); case MapNotify: return mapHandler(e.xmap); case MappingNotify: return mappingHandler(e.xmapping); case ReparentNotify: return reparentHandler(e.xreparent); case UnmapNotify: return unmapHandler(e.xunmap); case VisibilityNotify: return visibilityHandler(e.xvisibility); case ColormapNotify: return colorMapHandler(e.xcolormap); case ClientMessage: return clientMessageHandler(e.xclient); case PropertyNotify: return propertyHandler(e.xproperty); case SelectionClear: return selectionClearHandler(e.xselectionclear); case SelectionNotify: return selectionHandler(e.xselection); case SelectionRequest: return selectionRequestHandler(e.xselectionrequest); default: #ifdef SHAPE if (e.type == otk::OBDisplay::shapeEventBase()) return shapeHandler((*(XShapeEvent*)&e)); #endif // SHAPE ; } } void OtkEventHandler::clientMessageHandler(const XClientMessageEvent &) { } } |