OLD | NEW |
1 // Copyright (c) 2009 The Chromium OS Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium OS Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef __PLATFORM_WINDOW_MANAGER_EVENT_CONSUMER_H__ | 5 #ifndef WINDOW_MANAGER_EVENT_CONSUMER_H_ |
6 #define __PLATFORM_WINDOW_MANAGER_EVENT_CONSUMER_H__ | 6 #define WINDOW_MANAGER_EVENT_CONSUMER_H_ |
7 | 7 |
8 extern "C" { | 8 extern "C" { |
9 #include <X11/Xlib.h> | 9 #include <X11/Xlib.h> |
10 } | 10 } |
11 | 11 |
12 #include "window_manager/wm_ipc.h" // for WmIpc::Message | 12 #include "window_manager/wm_ipc.h" // for WmIpc::Message |
13 | 13 |
14 typedef ::Window XWindow; | 14 typedef ::Window XWindow; |
15 | 15 |
16 namespace chromeos { | 16 namespace window_manager { |
17 | 17 |
18 class Window; | 18 class Window; |
19 | 19 |
20 // This is an abstract base class for consuming events received by the | 20 // This is an abstract base class for consuming events received by the |
21 // WindowManager class. EventConsumer's virtual methods receive | 21 // WindowManager class. EventConsumer's virtual methods receive |
22 // notifications of events and can state that they've consumed an event by | 22 // notifications of events and can state that they've consumed an event by |
23 // returning true. Different consumers' handlers are invoked in an | 23 // returning true. Different consumers' handlers are invoked in an |
24 // arbitrary order; once one consumes an event, it isn't passed to any | 24 // arbitrary order; once one consumes an event, it isn't passed to any |
25 // other consumers. | 25 // other consumers. |
26 class EventConsumer { | 26 class EventConsumer { |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 | 83 |
84 // Handle a regular X ClientMessage event from a client app. | 84 // Handle a regular X ClientMessage event from a client app. |
85 virtual bool HandleClientMessage(const XClientMessageEvent& e) { | 85 virtual bool HandleClientMessage(const XClientMessageEvent& e) { |
86 return false; | 86 return false; |
87 } | 87 } |
88 | 88 |
89 // Handle a focus change on a window. | 89 // Handle a focus change on a window. |
90 virtual bool HandleFocusChange(XWindow xid, bool focus_in) { return false; } | 90 virtual bool HandleFocusChange(XWindow xid, bool focus_in) { return false; } |
91 }; | 91 }; |
92 | 92 |
93 } // namespace chromeos | 93 } // namespace window_manager |
94 | 94 |
95 #endif | 95 #endif |
OLD | NEW |