OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium 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 UI_VIEWS_FOCUS_ACCELERATOR_HANDLER_H_ | 5 #ifndef UI_VIEWS_FOCUS_ACCELERATOR_HANDLER_H_ |
6 #define UI_VIEWS_FOCUS_ACCELERATOR_HANDLER_H_ | 6 #define UI_VIEWS_FOCUS_ACCELERATOR_HANDLER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
10 | 10 |
11 #if defined(TOOLKIT_USES_GTK) | 11 #if defined(TOOLKIT_USES_GTK) |
12 #include <gdk/gdk.h> | 12 #include <gdk/gdk.h> |
13 #endif | 13 #endif |
14 | 14 |
15 #include <set> | 15 #include <set> |
16 #include <vector> | 16 #include <vector> |
17 | 17 |
18 #include "base/message_loop.h" | 18 #include "base/message_loop.h" |
19 | 19 |
20 namespace ui { | 20 namespace ui { |
21 | 21 |
22 #if defined(TOUCH_UI) | 22 #if defined(TOUCH_UI) |
23 // Dispatch an XEvent to the RootView. Return true if the event was dispatched | 23 // Dispatch an XEvent to the RootView. Return true if the event was dispatched |
24 // and handled, false otherwise. | 24 // and handled, false otherwise. |
25 bool DispatchXEvent(XEvent* xevent); | 25 bool DispatchXEvent(XEvent* xevent); |
26 | 26 |
27 #if defined(HAVE_XINPUT2) | |
28 // Keep a list of touch devices so that it is possible to determine if a pointer | 27 // Keep a list of touch devices so that it is possible to determine if a pointer |
29 // event is a touch-event or a mouse-event. | 28 // event is a touch-event or a mouse-event. |
30 void SetTouchDeviceList(std::vector<unsigned int>& devices); | 29 void SetTouchDeviceList(std::vector<unsigned int>& devices); |
31 #endif // HAVE_XINPUT2 | |
32 #endif // TOUCH_UI | 30 #endif // TOUCH_UI |
33 | 31 |
34 //////////////////////////////////////////////////////////////////////////////// | 32 //////////////////////////////////////////////////////////////////////////////// |
35 // AcceleratorHandler class | 33 // AcceleratorHandler class |
36 // | 34 // |
37 // An object that pre-screens all UI messages for potential accelerators. | 35 // An object that pre-screens all UI messages for potential accelerators. |
38 // Registered accelerators are processed regardless of focus within a given | 36 // Registered accelerators are processed regardless of focus within a given |
39 // Widget or Window. | 37 // Widget or Window. |
40 // | 38 // |
41 // This processing is done at the Dispatcher level rather than on the Widget | 39 // This processing is done at the Dispatcher level rather than on the Widget |
(...skipping 20 matching lines...) Expand all Loading... |
62 // The keys currently pressed and consumed by the FocusManager. | 60 // The keys currently pressed and consumed by the FocusManager. |
63 std::set<WPARAM> pressed_keys_; | 61 std::set<WPARAM> pressed_keys_; |
64 #endif | 62 #endif |
65 | 63 |
66 DISALLOW_COPY_AND_ASSIGN(AcceleratorHandler); | 64 DISALLOW_COPY_AND_ASSIGN(AcceleratorHandler); |
67 }; | 65 }; |
68 | 66 |
69 } // namespace ui | 67 } // namespace ui |
70 | 68 |
71 #endif // UI_VIEWS_FOCUS_ACCELERATOR_HANDLER_H_ | 69 #endif // UI_VIEWS_FOCUS_ACCELERATOR_HANDLER_H_ |
OLD | NEW |