OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CHROME_BROWSER_UI_METRO_DRIVER_DEVICES_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_METRO_DRIVER_DEVICES_HANDLER_H_ |
6 #define CHROME_BROWSER_UI_METRO_DRIVER_DEVICES_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_METRO_DRIVER_DEVICES_HANDLER_H_ |
7 | 7 |
8 #include <windows.ui.core.h> | 8 #include <windows.ui.core.h> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "win8/metro_driver/print_handler.h" | 11 #include "win8/metro_driver/print_handler.h" |
12 | 12 |
13 namespace metro_driver { | 13 namespace metro_driver { |
14 | 14 |
15 // This class handles the devices charm. | 15 // This class handles the devices charm. |
16 class DevicesHandler { | 16 class DevicesHandler { |
17 public: | 17 public: |
18 DevicesHandler(); | 18 DevicesHandler(); |
19 ~DevicesHandler(); | 19 ~DevicesHandler(); |
20 | 20 |
21 HRESULT Initialize(winui::Core::ICoreWindow* window); | 21 HRESULT Initialize(winui::Core::ICoreWindow* window); |
22 | 22 |
23 private: | 23 private: |
24 PrintHandler print_handler_; | 24 PrintHandler print_handler_; |
25 | 25 |
26 DISALLOW_COPY_AND_ASSIGN(DevicesHandler); | 26 DISALLOW_COPY_AND_ASSIGN(DevicesHandler); |
27 }; | 27 }; |
28 | 28 |
| 29 // This class helps decoding the pointer properties of an event. |
| 30 class PointerEventHandler { |
| 31 public: |
| 32 PointerEventHandler(); |
| 33 ~PointerEventHandler(); |
| 34 |
| 35 HRESULT Init(winui::Core::IPointerEventArgs* args); |
| 36 |
| 37 bool is_mouse() const { return is_mouse_; } |
| 38 int x() const { return x_; } |
| 39 int y() const { return y_; } |
| 40 |
| 41 private: |
| 42 int x_; |
| 43 int y_; |
| 44 bool is_mouse_; |
| 45 }; |
| 46 |
29 } // namespace metro_driver | 47 } // namespace metro_driver |
30 | 48 |
31 #endif // CHROME_BROWSER_UI_METRO_DRIVER_DEVICES_HANDLER_H_ | 49 #endif // CHROME_BROWSER_UI_METRO_DRIVER_DEVICES_HANDLER_H_ |
OLD | NEW |