#include <eventhandler.hh>
Inheritance diagram for otk::EventHandler:
Public Methods | |
virtual void | handle (const XEvent &e) |
Dispatches events to one of the other handlers based on their type. | |
virtual void | keyPressHandler (const XKeyEvent &) |
Called whenever any key is pressed. | |
virtual void | keyReleaseHandler (const XKeyEvent &) |
Called whenever any key is released. | |
virtual void | buttonPressHandler (const XButtonEvent &) |
Called whenever a button of the pointer is pressed. | |
virtual void | buttonReleaseHandler (const XButtonEvent &) |
Called whenever a button of the pointer is released. | |
virtual void | motionHandler (const XMotionEvent &) |
Called whenever the pointer moved. | |
virtual void | enterHandler (const XCrossingEvent &) |
Called whenever the pointer enters a window. | |
virtual void | leaveHandler (const XCrossingEvent &) |
Called whenever the pointer leaves a window. | |
virtual void | focusHandler (const XFocusChangeEvent &) |
Called when a window gains focus. | |
virtual void | unfocusHandler (const XFocusChangeEvent &) |
Called when a window looses focus. | |
virtual void | exposeHandler (const XExposeEvent &) |
Called when a window becomes visible to the user. | |
virtual void | graphicsExposeHandler (const XGraphicsExposeEvent &) |
Called to handle GraphicsExpose events. | |
virtual void | noExposeEventHandler (const XNoExposeEvent &) |
Called to handle NoExpose events. | |
virtual void | circulateRequestHandler (const XCirculateRequestEvent &) |
Called when the window requests a change in its z-order. | |
virtual void | configureRequestHandler (const XConfigureRequestEvent &) |
Called when a different client initiates a configure window request. | |
virtual void | mapRequestHandler (const XMapRequestEvent &) |
Called when a different client tries to map a window. | |
virtual void | resizeRequestHandler (const XResizeRequestEvent &) |
Called when another client attemps to change the size of a window. | |
virtual void | circulateHandler (const XCirculateEvent &) |
Called when the z-order of the window has changed. | |
virtual void | configureHandler (const XConfigureEvent &) |
Called when the window as been reconfigured. | |
virtual void | createHandler (const XCreateWindowEvent &) |
Called when a window is created. | |
virtual void | destroyHandler (const XDestroyWindowEvent &) |
Called when a window is destroyed. | |
virtual void | gravityHandler (const XGravityEvent &) |
Called when a window is moved because of a change in the size of its parent. | |
virtual void | mapHandler (const XMapEvent &) |
Called when a window is mapped. | |
virtual void | mappingHandler (const XMappingEvent &) |
Called when the server generats a MappingNotify event. | |
virtual void | reparentHandler (const XReparentEvent &) |
Called when a window is reparented. | |
virtual void | unmapHandler (const XUnmapEvent &) |
Called when a window is unmapped. | |
virtual void | visibilityHandler (const XVisibilityEvent &) |
Called when a the visibilty of a window changes. | |
virtual void | colorMapHandler (const XColormapEvent &) |
Called when the colormap changes, or is installed or unistalled. | |
virtual void | propertyHandler (const XPropertyEvent &) |
Called when a property of a window changes. | |
virtual void | selectionClearHandler (const XSelectionClearEvent &) |
Called when the client loses ownership of a selection. | |
virtual void | selectionHandler (const XSelectionEvent &) |
Called when a ConvertSelection protocol request is sent. | |
virtual void | selectionRequestHandler (const XSelectionRequestEvent &) |
Called when a SelectionEvent occurs. | |
virtual void | clientMessageHandler (const XClientMessageEvent &) |
Called when a client calls XSendEvent. | |
virtual void | shapeHandler (const XShapeEvent &) |
Called when a shape extension event fires. | |
virtual void | xkbHandler (const XkbEvent &) |
Called when an xkb extension event fires. | |
virtual | ~EventHandler () |
Protected Methods | |
EventHandler () |
|
Definition at line 17 of file eventhandler.cc.
00018 { 00019 } |
|
Constructor for the EventHandler class. This is protected so that EventHandlers can't be instantiated on their own. Definition at line 12 of file eventhandler.cc.
00013 { 00014 } |
|
Called whenever a button of the pointer is pressed.
Reimplemented in ob::Actions, ob::ButtonWidget, and otk::Button. Definition at line 32 of file eventhandler.hh. Referenced by ob::ButtonWidget::buttonPressHandler(), ob::Actions::buttonPressHandler(), ob::ButtonWidget::buttonReleaseHandler(), and handle().
00032 {} |
|
Called whenever a button of the pointer is released.
Reimplemented in ob::Actions, ob::ButtonWidget, and otk::Button. Definition at line 35 of file eventhandler.hh. Referenced by ob::Actions::buttonReleaseHandler(), and handle().
00035 {} |
|
Called when the z-order of the window has changed.
Definition at line 76 of file eventhandler.hh. Referenced by handle().
00076 {} |
|
Called when the window requests a change in its z-order.
Definition at line 62 of file eventhandler.hh. Referenced by handle().
00063 {} |
|
Called when a client calls XSendEvent. Some types of client messages are filtered out and sent to more specific event handler functions. Reimplemented in ob::Client, ob::Screen, and otk::AppWidget. Definition at line 103 of file eventhandler.cc. Referenced by ob::Screen::clientMessageHandler(), ob::Client::clientMessageHandler(), and handle().
00104 { 00105 00106 } |
|
Called when the colormap changes, or is installed or unistalled.
Definition at line 107 of file eventhandler.hh. Referenced by handle().
00107 {} |
|
Called when the window as been reconfigured.
Reimplemented in otk::Widget. Definition at line 79 of file eventhandler.hh. Referenced by handle().
00079 {} |
|
Called when a different client initiates a configure window request.
Reimplemented in ob::Client. Definition at line 66 of file eventhandler.hh. Referenced by ob::Client::configureRequestHandler(), and handle().
00067 {} |
|
Called when a window is created.
Definition at line 82 of file eventhandler.hh. Referenced by handle().
00082 {} |
|
Called when a window is destroyed.
Reimplemented in ob::Client. Definition at line 85 of file eventhandler.hh. Referenced by ob::Client::destroyHandler(), and handle().
00085 {} |
|
Called whenever the pointer enters a window.
Reimplemented in ob::Actions. Definition at line 41 of file eventhandler.hh. Referenced by ob::Actions::enterHandler(), and handle().
00041 {} |
|
Called when a window becomes visible to the user.
Reimplemented in otk::Widget. Definition at line 53 of file eventhandler.hh. Referenced by handle().
00053 {} |
|
Called when a window gains focus.
Reimplemented in ob::Client. Definition at line 47 of file eventhandler.hh. Referenced by ob::Client::focusHandler(), and handle().
00047 {} |
|
Called to handle GraphicsExpose events.
Definition at line 56 of file eventhandler.hh. Referenced by handle().
00056 {} |
|
Called when a window is moved because of a change in the size of its parent.
Definition at line 89 of file eventhandler.hh. Referenced by handle().
00089 {} |
|
Dispatches events to one of the other handlers based on their type.
Definition at line 22 of file eventhandler.cc. References buttonPressHandler(), buttonReleaseHandler(), circulateHandler(), circulateRequestHandler(), clientMessageHandler(), colorMapHandler(), configureHandler(), configureRequestHandler(), createHandler(), destroyHandler(), otk::display, enterHandler(), exposeHandler(), focusHandler(), graphicsExposeHandler(), gravityHandler(), keyPressHandler(), keyReleaseHandler(), leaveHandler(), mapHandler(), mappingHandler(), mapRequestHandler(), motionHandler(), noExposeEventHandler(), propertyHandler(), reparentHandler(), resizeRequestHandler(), selectionClearHandler(), selectionHandler(), selectionRequestHandler(), otk::Display::shapeEventBase(), shapeHandler(), unfocusHandler(), unmapHandler(), visibilityHandler(), otk::Display::xkbEventBase(), and xkbHandler(). Referenced by otk::EventDispatcher::dispatch().
00023 { 00024 switch(e.type){ 00025 case KeyPress: 00026 return keyPressHandler(e.xkey); 00027 case KeyRelease: 00028 return keyReleaseHandler(e.xkey); 00029 case ButtonPress: 00030 return buttonPressHandler(e.xbutton); 00031 case ButtonRelease: 00032 return buttonReleaseHandler(e.xbutton); 00033 case MotionNotify: 00034 return motionHandler(e.xmotion); 00035 case EnterNotify: 00036 return enterHandler(e.xcrossing); 00037 case LeaveNotify: 00038 return leaveHandler(e.xcrossing); 00039 case FocusIn: 00040 return focusHandler(e.xfocus); 00041 case FocusOut: 00042 return unfocusHandler(e.xfocus); 00043 case Expose: 00044 return exposeHandler(e.xexpose); 00045 case GraphicsExpose: 00046 return graphicsExposeHandler(e.xgraphicsexpose); 00047 case NoExpose: 00048 return noExposeEventHandler(e.xnoexpose); 00049 case CirculateRequest: 00050 return circulateRequestHandler(e.xcirculaterequest); 00051 case ConfigureRequest: 00052 return configureRequestHandler(e.xconfigurerequest); 00053 case MapRequest: 00054 return mapRequestHandler(e.xmaprequest); 00055 case ResizeRequest: 00056 return resizeRequestHandler(e.xresizerequest); 00057 case CirculateNotify: 00058 return circulateHandler(e.xcirculate); 00059 case ConfigureNotify: 00060 return configureHandler(e.xconfigure); 00061 case CreateNotify: 00062 return createHandler(e.xcreatewindow); 00063 case DestroyNotify: 00064 return destroyHandler(e.xdestroywindow); 00065 case GravityNotify: 00066 return gravityHandler(e.xgravity); 00067 case MapNotify: 00068 return mapHandler(e.xmap); 00069 case MappingNotify: 00070 return mappingHandler(e.xmapping); 00071 case ReparentNotify: 00072 return reparentHandler(e.xreparent); 00073 case UnmapNotify: 00074 return unmapHandler(e.xunmap); 00075 case VisibilityNotify: 00076 return visibilityHandler(e.xvisibility); 00077 case ColormapNotify: 00078 return colorMapHandler(e.xcolormap); 00079 case ClientMessage: 00080 return clientMessageHandler(e.xclient); 00081 case PropertyNotify: 00082 return propertyHandler(e.xproperty); 00083 case SelectionClear: 00084 return selectionClearHandler(e.xselectionclear); 00085 case SelectionNotify: 00086 return selectionHandler(e.xselection); 00087 case SelectionRequest: 00088 return selectionRequestHandler(e.xselectionrequest); 00089 default: 00090 #ifdef SHAPE 00091 if (e.type == display->shapeEventBase()) 00092 return shapeHandler((*(XShapeEvent*)&e)); 00093 #endif // SHAPE 00094 #ifdef XKB 00095 if (e.type == display->xkbEventBase()) 00096 return xkbHandler((*(XkbEvent*)&e)); 00097 #endif // XKB 00098 ; 00099 } 00100 } |
|
Called whenever any key is pressed.
Reimplemented in ob::Actions. Definition at line 26 of file eventhandler.hh. Referenced by handle(), and ob::Actions::keyPressHandler().
00026 {} |
|
Called whenever any key is released.
Reimplemented in ob::Actions. Definition at line 29 of file eventhandler.hh. Referenced by handle(), and ob::Actions::keyReleaseHandler().
00029 {} |
|
Called whenever the pointer leaves a window.
Reimplemented in ob::Actions. Definition at line 44 of file eventhandler.hh. Referenced by handle(), and ob::Actions::leaveHandler().
00044 {} |
|
Called when a window is mapped.
Definition at line 92 of file eventhandler.hh. Referenced by handle().
00092 {} |
|
Called when the server generats a MappingNotify event.
Definition at line 95 of file eventhandler.hh. Referenced by handle().
00095 {} |
|
Called when a different client tries to map a window.
Reimplemented in ob::Client, and ob::Screen. Definition at line 70 of file eventhandler.hh. Referenced by handle(), and ob::Screen::mapRequestHandler().
00070 {} |
|
Called whenever the pointer moved.
Reimplemented in ob::Actions. Definition at line 38 of file eventhandler.hh. Referenced by handle(), and ob::Actions::motionHandler().
00038 {} |
|
Called to handle NoExpose events.
Definition at line 59 of file eventhandler.hh. Referenced by handle().
00059 {} |
|
Called when a property of a window changes.
Reimplemented in ob::Client, and ob::Screen. Definition at line 110 of file eventhandler.hh. Referenced by handle(), ob::Screen::propertyHandler(), and ob::Client::propertyHandler().
00110 {} |
|
Called when a window is reparented.
Reimplemented in ob::Client. Definition at line 98 of file eventhandler.hh. Referenced by handle(), and ob::Client::reparentHandler().
00098 {} |
|
Called when another client attemps to change the size of a window.
Definition at line 73 of file eventhandler.hh. Referenced by handle().
00073 {} |
|
Called when the client loses ownership of a selection.
Definition at line 113 of file eventhandler.hh. Referenced by handle().
00113 {} |
|
Called when a ConvertSelection protocol request is sent.
Definition at line 116 of file eventhandler.hh. Referenced by handle().
00116 {} |
|
Called when a SelectionEvent occurs.
Definition at line 119 of file eventhandler.hh. Referenced by handle().
00119 {} |
|
Called when a shape extension event fires.
Definition at line 130 of file eventhandler.hh. Referenced by handle().
00130 {} |
|
Called when a window looses focus.
Reimplemented in ob::Client. Definition at line 50 of file eventhandler.hh. Referenced by handle(), and ob::Client::unfocusHandler().
00050 {} |
|
Called when a window is unmapped.
Reimplemented in ob::Client. Definition at line 101 of file eventhandler.hh. Referenced by handle(), and ob::Client::unmapHandler().
00101 {} |
|
Called when a the visibilty of a window changes.
Definition at line 104 of file eventhandler.hh. Referenced by handle().
00104 {} |
|
Called when an xkb extension event fires.
Definition at line 135 of file eventhandler.hh. Referenced by handle().
00135 {} |