]>
Dogcows Code - chaz/openbox/blob - otk/eventhandler.hh
1 #ifndef __eventhandler__hh
2 #define __eventhandler__hh
10 class OtkEventHandler
{
12 //! Dispatches events to one of the other handlers based on their type.
13 virtual void handle(const XEvent
&e
);
15 //! Called whenever any key is pressed.
16 virtual void keyPressHandler(const XKeyEvent
&) {}
18 //! Called whenever any key is released.
19 virtual void keyReleaseHandler(const XKeyEvent
&) {}
21 //! Called whenever a button of the pointer is pressed.
22 virtual void buttonPressHandler(const XButtonEvent
&) {}
24 //! Called whenever a button of the pointer is released.
25 virtual void buttonReleaseHandler(const XButtonEvent
&) {}
27 //! Called whenever the pointer enters a window.
28 virtual void enterHandler(const XCrossingEvent
&) {}
30 //! Called whenever the pointer leaves a window.
31 virtual void leaveHandler(const XCrossingEvent
&) {}
33 //! Called when a window gains focus.
34 virtual void focusHandler(const XFocusChangeEvent
&) {}
36 //! Called when a window looses focus.
37 virtual void unfocusHandler(const XFocusChangeEvent
&) {}
39 //! Called when a window becomes visible to the user.
40 virtual void exposeHandler(const XExposeEvent
&) {}
42 //! Called to handle GraphicsExpose events.
43 virtual void graphicsExposeHandler(const XGraphicsExposeEvent
&) {}
45 //! Called to handle NoExpose events.
46 virtual void noExposeEventHandler(const XNoExposeEvent
&) {}
48 //! Called when the window requests a change in its z-order.
49 virtual void circulateRequestHandler(const XCirculateRequestEvent
&)
52 //! Called when a different client initiates a configure window request.
53 virtual void configureRequestHandler(const XConfigureRequestEvent
&)
56 //! Called when a different client tries to map a window.
57 virtual void mapRequestHandler(const XMapRequestEvent
&) {}
59 //! Called when another client attemps to change the size of a window.
60 virtual void resizeRequestHandler(const XResizeRequestEvent
&) {}
62 //! Called when the z-order of the window has changed.
63 virtual void circulateHandler(const XCirculateEvent
&) {}
65 //! Called when the window as been reconfigured.
66 virtual void configureHandler(const XConfigureEvent
&) {}
68 //! Called when a window is created.
69 virtual void createHandler(const XCreateWindowEvent
&) {}
71 //! Called when a window is destroyed.
72 virtual void destroyHandler(const XDestroyWindowEvent
&) {}
74 //! Called when a window is moved because of a change in the size of its
76 virtual void gravityHandler(const XGravityEvent
&) {}
78 //! Called when a window is mapped.
79 virtual void mapHandler(const XMapEvent
&) {}
81 //! Called when the server generats a MappingNotify event
82 virtual void mappingHandler(const XMappingEvent
&) {}
84 //! Called when a window is reparented
85 virtual void reparentHandler(const XReparentEvent
&) {}
87 //! Called when a window is unmapped
88 virtual void unmapHandler(const XUnmapEvent
&) {}
90 //! Called when a the visibilty of a window changes
91 virtual void visibilityHandler(const XVisibilityEvent
&) {}
93 //! Called when the colormap changes, or is installed or unistalled
94 virtual void colorMapHandler(const XColormapEvent
&) {}
96 //! Called when a client calls XSendEvent
97 virtual void clientMessageHandler(const XClientMessageEvent
&) {}
99 //! Called when a property of a window changes
100 virtual void propertyHandler(const XPropertyEvent
&) {}
102 //! Called when the client loses ownership of a selection
103 virtual void selectionClearHandler(const XSelectionClearEvent
&) {}
105 //! Called when a ConvertSelection protocol request is sent
106 virtual void selectionHandler(const XSelectionEvent
&) {}
108 //! Called when a SelectionEvent occurs
109 virtual void selectionRequestHandler(const XSelectionRequestEvent
&) {}
111 virtual ~OtkEventHandler();
114 /*! Constructor for the XEventHandler class.
115 This is protected so that XEventHandlers can't be instantiated on their
This page took 0.043283 seconds and 5 git commands to generate.