X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=otk%2Feventhandler.hh;h=96bdff94432f2721f5eadef258848d2c7f5fda34;hb=26d95a52860277c118efd95fb251fee28b502d8c;hp=05dfac3bc95c92b68176aa0eb8f4c2f56ff230ce;hpb=12a95bfdb31595ec53d72adef4e0fd6bf1ccf218;p=chaz%2Fopenbox diff --git a/otk/eventhandler.hh b/otk/eventhandler.hh index 05dfac3b..96bdff94 100644 --- a/otk/eventhandler.hh +++ b/otk/eventhandler.hh @@ -3,11 +3,20 @@ extern "C" { #include + +#ifdef SHAPE +#include +#endif // SHAPE + +#ifdef XKB +#include +#endif // XKB + } namespace otk { -class OtkEventHandler{ +class OtkEventHandler { public: //! Dispatches events to one of the other handlers based on their type. virtual void handle(const XEvent &e); @@ -24,6 +33,9 @@ public: //! Called whenever a button of the pointer is released. virtual void buttonReleaseHandler(const XButtonEvent &) {} + //! Called whenever the pointer moved + virtual void motionHandler(const XMotionEvent &) {} + //! Called whenever the pointer enters a window. virtual void enterHandler(const XCrossingEvent &) {} @@ -93,9 +105,6 @@ public: //! Called when the colormap changes, or is installed or unistalled virtual void colorMapHandler(const XColormapEvent &) {} - //! Called when a client calls XSendEvent - virtual void clientMessageHandler(const XClientMessageEvent &) {} - //! Called when a property of a window changes virtual void propertyHandler(const XPropertyEvent &) {} @@ -108,11 +117,28 @@ public: //! Called when a SelectionEvent occurs virtual void selectionRequestHandler(const XSelectionRequestEvent &) {} + //! Called when a client calls XSendEvent + /*! + Some types of client messages are filtered out and sent to more specific + event handler functions. + */ + virtual void clientMessageHandler(const XClientMessageEvent &); + +#if defined(SHAPE) || defined(DOXYGEN_IGNORE) + //! Called when a shape extension event fires + virtual void shapeHandler(const XShapeEvent &) {} +#endif // SHAPE + +#if defined(XKB) || defined(DOXYGEN_IGNORE) + //! Called when an xkb extension event fires + virtual void xkbHandler(const XkbEvent &) {} +#endif // XKB + virtual ~OtkEventHandler(); protected: - /*! Constructor for the XEventHandler class. - This is protected so that XEventHandlers can't be instantiated on their + /*! Constructor for the OtkEventHandler class. + This is protected so that OtkEventHandlers can't be instantiated on their own. */ OtkEventHandler();