]> Dogcows Code - chaz/openbox/blobdiff - otk/eventhandler.hh
set the log domain for each plugin properly
[chaz/openbox] / otk / eventhandler.hh
index 05dfac3bc95c92b68176aa0eb8f4c2f56ff230ce..f2457568d81ada4fd9e46cde254948e2fd5f320c 100644 (file)
@@ -1,13 +1,23 @@
+// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
 #ifndef __eventhandler__hh
 #define __eventhandler__hh
 
 extern "C" {
 #include <X11/Xlib.h>
+
+#ifdef    SHAPE
+#include <X11/extensions/shape.h>
+#endif // SHAPE
+
+#ifdef    XKB
+#include <X11/XKBlib.h>
+#endif // XKB
+
 }
 
 namespace otk {
 
-class OtkEventHandler{
+class EventHandler {
 public:
   //! Dispatches events to one of the other handlers based on their type.
   virtual void handle(const XEvent &e);
@@ -24,6 +34,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 +106,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,14 +118,31 @@ public:
   //! Called when a SelectionEvent occurs
   virtual void selectionRequestHandler(const XSelectionRequestEvent &) {}
 
-  virtual ~OtkEventHandler();
+  //! 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 ~EventHandler();
 
 protected:
-  /*! Constructor for the XEventHandler class.
-    This is protected so that XEventHandlers can't be instantiated on their
+  /*! Constructor for the EventHandler class.
+    This is protected so that EventHandlers can't be instantiated on their
     own.
   */
-  OtkEventHandler();
+  EventHandler();
 
 private:
 };
This page took 0.025514 seconds and 4 git commands to generate.