| 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 UI_AURA_WINDOW_TREE_HOST_X11_H_ | 5 #ifndef UI_AURA_WINDOW_TREE_HOST_X11_H_ |
| 6 #define UI_AURA_WINDOW_TREE_HOST_X11_H_ | 6 #define UI_AURA_WINDOW_TREE_HOST_X11_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "ui/aura/aura_export.h" | 12 #include "ui/aura/aura_export.h" |
| 13 #include "ui/aura/window_tree_host.h" | 13 #include "ui/aura/window_tree_host.h" |
| 14 #include "ui/events/platform/platform_event_dispatcher.h" | 14 #include "ui/events/platform/platform_event_dispatcher.h" |
| 15 #include "ui/gfx/geometry/insets.h" | 15 #include "ui/gfx/geometry/insets.h" |
| 16 #include "ui/gfx/geometry/rect.h" | 16 #include "ui/gfx/geometry/rect.h" |
| 17 #include "ui/gfx/x/x11_atom_cache.h" | 17 #include "ui/gfx/x/x11_atom_cache.h" |
| 18 | 18 |
| 19 // X forward decls to avoid including Xlib.h in a header file. | 19 // X forward decls to avoid including Xlib.h in a header file. |
| 20 typedef struct _XDisplay XDisplay; | 20 typedef struct _XDisplay XDisplay; |
| 21 typedef unsigned long XID; | 21 typedef unsigned long XID; |
| 22 typedef XID Window; | 22 typedef XID Window; |
| 23 | 23 |
| 24 namespace ui { | 24 namespace ui { |
| 25 class MouseEvent; | 25 class MouseEvent; |
| 26 } | 26 } |
| 27 | 27 |
| 28 namespace aura { | 28 namespace aura { |
| 29 | 29 |
| 30 namespace internal { | |
| 31 class TouchEventCalibrate; | |
| 32 } | |
| 33 | |
| 34 class AURA_EXPORT WindowTreeHostX11 : public WindowTreeHost, | 30 class AURA_EXPORT WindowTreeHostX11 : public WindowTreeHost, |
| 35 public ui::PlatformEventDispatcher { | 31 public ui::PlatformEventDispatcher { |
| 36 | |
| 37 public: | 32 public: |
| 38 explicit WindowTreeHostX11(const gfx::Rect& bounds); | 33 explicit WindowTreeHostX11(const gfx::Rect& bounds); |
| 39 ~WindowTreeHostX11() override; | 34 ~WindowTreeHostX11() override; |
| 40 | 35 |
| 41 // ui::PlatformEventDispatcher: | 36 // ui::PlatformEventDispatcher: |
| 42 bool CanDispatchEvent(const ui::PlatformEvent& event) override; | 37 bool CanDispatchEvent(const ui::PlatformEvent& event) override; |
| 43 uint32_t DispatchEvent(const ui::PlatformEvent& event) override; | 38 uint32_t DispatchEvent(const ui::PlatformEvent& event) override; |
| 44 | 39 |
| 45 // WindowTreeHost: | 40 // WindowTreeHost: |
| 46 ui::EventSource* GetEventSource() override; | 41 ui::EventSource* GetEventSource() override; |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 | 83 |
| 89 // Current Aura cursor. | 84 // Current Aura cursor. |
| 90 gfx::NativeCursor current_cursor_; | 85 gfx::NativeCursor current_cursor_; |
| 91 | 86 |
| 92 // Is the window mapped to the screen? | 87 // Is the window mapped to the screen? |
| 93 bool window_mapped_; | 88 bool window_mapped_; |
| 94 | 89 |
| 95 // The bounds of |xwindow_|. | 90 // The bounds of |xwindow_|. |
| 96 gfx::Rect bounds_; | 91 gfx::Rect bounds_; |
| 97 | 92 |
| 98 scoped_ptr<internal::TouchEventCalibrate> touch_calibrate_; | |
| 99 | |
| 100 ui::X11AtomCache atom_cache_; | 93 ui::X11AtomCache atom_cache_; |
| 101 | 94 |
| 102 DISALLOW_COPY_AND_ASSIGN(WindowTreeHostX11); | 95 DISALLOW_COPY_AND_ASSIGN(WindowTreeHostX11); |
| 103 }; | 96 }; |
| 104 | 97 |
| 105 namespace test { | 98 namespace test { |
| 106 | 99 |
| 107 // Set the default value of the override redirect flag used to | 100 // Set the default value of the override redirect flag used to |
| 108 // create a X window for WindowTreeHostX11. | 101 // create a X window for WindowTreeHostX11. |
| 109 AURA_EXPORT void SetUseOverrideRedirectWindowByDefault(bool override_redirect); | 102 AURA_EXPORT void SetUseOverrideRedirectWindowByDefault(bool override_redirect); |
| 110 | 103 |
| 111 } // namespace test | 104 } // namespace test |
| 112 } // namespace aura | 105 } // namespace aura |
| 113 | 106 |
| 114 #endif // UI_AURA_WINDOW_TREE_HOST_X11_H_ | 107 #endif // UI_AURA_WINDOW_TREE_HOST_X11_H_ |
| OLD | NEW |