]> Dogcows Code - chaz/openbox/blob - src/xeventhandler.hh
updated doxygen documentation
[chaz/openbox] / src / xeventhandler.hh
1 // -*- mode: C++; indent-tabs-mode: nil; -*-
2 #ifndef __xeventhandler_hh
3 #define __xeventhandler_hh
4
5 /*! @file xeventhandler.hh
6 @brief The class which handles raw XEvents, turning them into high-level
7 user interaction sequences, or processing them as appropriate
8 */
9
10 extern "C" {
11 #include <X11/Xlib.h>
12 }
13
14 namespace ob {
15
16 //! Handles X events
17 /*!
18 There are 2 type of X events:<br>
19 a) User Actions<br>
20 b) Background Events<br>
21 <p>
22 User Actions are events like mouse drags and presses, key presses.
23 Background Events are everything else. Stuff that can't be bound to user
24 input.
25 <p>
26 When an XEvent comes to the application, it is sent to this class. This class
27 will determine what the event means, such as "A Left-Mouse-Button Drag on
28 this window", or "Double click with right mouse button on root window" or
29 "space bar pressed", or Background Event.
30 <p>
31 If the XEvent or combination of XEvents form a User Action, then the action
32 is dispatched to the OBBindingMapper.
33 <p>
34 If the XEvent is a Background Event, it is simply dealt with as appropriate.
35 */
36 class OBXEventHandler
37 {
38 private:
39 //! The time at which the last XEvent with a time was received
40 Time _lasttime;
41
42 //! Handles mouse button press events
43 /*!
44 @param e The XEvent to handle
45 */
46 void buttonPress(const XButtonEvent &e);
47 //! Handles mouse button release events
48 /*!
49 @param e The XEvent to handle
50 */
51 void buttonRelease(const XButtonEvent &e);
52 //! Handles keyboard key press events
53 /*!
54 @param e The XEvent to handle
55 */
56 void keyPress(const XKeyEvent &e);
57 //! Handles mouse motion events
58 /*!
59 @param e The XEvent to handle
60 */
61 void motion(const XMotionEvent &e);
62 //! Handles mouse-enter events
63 /*!
64 @param e The XEvent to handle
65 */
66 void enterNotify(const XCrossingEvent &e);
67 //! Handles mouse-leave events
68 /*!
69 @param e The XEvent to handle
70 */
71 void leaveNotify(const XCrossingEvent &e);
72 //! Handles configure request events
73 /*!
74 @param e The XEvent to handle
75 */
76 void configureRequest(const XConfigureRequestEvent &e);
77 //! Handles window map request events
78 /*!
79 @param e The XEvent to handle
80 */
81 void mapRequest(const XMapRequestEvent &e);
82 //! Handles window unmap events
83 /*!
84 @param e The XEvent to handle
85 */
86 void unmapNotify(const XUnmapEvent &e);
87 //! Handles window destroy events
88 /*!
89 @param e The XEvent to handle
90 */
91 void destroyNotify(const XDestroyWindowEvent &e);
92 //! Handles window reparent events
93 /*!
94 @param e The XEvent to handle
95 */
96 void reparentNotify(const XReparentEvent &e);
97 //! Handles window property change events
98 /*!
99 @param e The XEvent to handle
100 */
101 void propertyNotify(const XPropertyEvent &e);
102 //! Handles window expose events
103 /*!
104 @param e The XEvent to handle
105 */
106 void expose(const XExposeEvent &e);
107 //! Handles colormap events
108 /*!
109 @param e The XEvent to handle
110 */
111 void colormapNotify(const XColormapEvent &e);
112 //! Handles focus-in events
113 /*!
114 @param e The XEvent to handle
115 */
116 void focusIn(const XFocusChangeEvent &e);
117 //! Handles focus-out events
118 /*!
119 @param e The XEvent to handle
120 */
121 void focusOut(const XFocusChangeEvent &e);
122 #if defined(SHAPE) || defined(DOXYGEN_IGNORE)
123 //! Handles Shape extension events
124 /*!
125 @param e The XEvent to handle
126 */
127 void shapeEvent(const XShapeEvent &e);
128 #endif // SHAPE
129 //! Handles client message events
130 /*!
131 @param e The XEvent to handle
132 */
133 void clientMessage(const XClientMessageEvent &e);
134
135
136 public:
137 //! Constructs an OBXEventHandler object
138 OBXEventHandler();
139
140 //! Handle an XEvent
141 /*!
142 @param e The XEvent to handle
143 */
144 void handle(const XEvent &e);
145 };
146
147 }
148
149 #endif // __xeventhandler_hh
This page took 0.039015 seconds and 4 git commands to generate.