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_ROOT_WINDOW_HOST_LINUX_H_ | 5 #ifndef UI_AURA_ROOT_WINDOW_HOST_LINUX_H_ |
6 #define UI_AURA_ROOT_WINDOW_HOST_LINUX_H_ | 6 #define UI_AURA_ROOT_WINDOW_HOST_LINUX_H_ |
7 | 7 |
8 #include <X11/Xlib.h> | 8 #include <X11/Xlib.h> |
9 | 9 |
10 // Get rid of a macro from Xlib.h that conflicts with Aura's RootWindow class. | 10 // Get rid of a macro from Xlib.h that conflicts with Aura's RootWindow class. |
(...skipping 19 matching lines...) Expand all Loading... |
30 virtual ~RootWindowHostLinux(); | 30 virtual ~RootWindowHostLinux(); |
31 | 31 |
32 // Overridden from Dispatcher overrides: | 32 // Overridden from Dispatcher overrides: |
33 virtual bool Dispatch(const base::NativeEvent& event) OVERRIDE; | 33 virtual bool Dispatch(const base::NativeEvent& event) OVERRIDE; |
34 | 34 |
35 private: | 35 private: |
36 // RootWindowHost Overrides. | 36 // RootWindowHost Overrides. |
37 virtual RootWindow* GetRootWindow() OVERRIDE; | 37 virtual RootWindow* GetRootWindow() OVERRIDE; |
38 virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE; | 38 virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE; |
39 virtual void Show() OVERRIDE; | 39 virtual void Show() OVERRIDE; |
| 40 virtual void Hide() OVERRIDE; |
40 virtual void ToggleFullScreen() OVERRIDE; | 41 virtual void ToggleFullScreen() OVERRIDE; |
41 virtual gfx::Rect GetBounds() const OVERRIDE; | 42 virtual gfx::Rect GetBounds() const OVERRIDE; |
42 virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE; | 43 virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE; |
43 virtual gfx::Point GetLocationOnNativeScreen() const OVERRIDE; | 44 virtual gfx::Point GetLocationOnNativeScreen() const OVERRIDE; |
44 virtual void SetCapture() OVERRIDE; | 45 virtual void SetCapture() OVERRIDE; |
45 virtual void ReleaseCapture() OVERRIDE; | 46 virtual void ReleaseCapture() OVERRIDE; |
46 virtual void SetCursor(gfx::NativeCursor cursor_type) OVERRIDE; | 47 virtual void SetCursor(gfx::NativeCursor cursor_type) OVERRIDE; |
47 virtual void ShowCursor(bool show) OVERRIDE; | 48 virtual void ShowCursor(bool show) OVERRIDE; |
48 virtual bool QueryMouseLocation(gfx::Point* location_return) OVERRIDE; | 49 virtual bool QueryMouseLocation(gfx::Point* location_return) OVERRIDE; |
49 virtual bool ConfineCursorToRootWindow() OVERRIDE; | 50 virtual bool ConfineCursorToRootWindow() OVERRIDE; |
(...skipping 20 matching lines...) Expand all Loading... |
70 // The display and the native X window hosting the root window. | 71 // The display and the native X window hosting the root window. |
71 Display* xdisplay_; | 72 Display* xdisplay_; |
72 ::Window xwindow_; | 73 ::Window xwindow_; |
73 | 74 |
74 // The native root window. | 75 // The native root window. |
75 ::Window x_root_window_; | 76 ::Window x_root_window_; |
76 | 77 |
77 // Current Aura cursor. | 78 // Current Aura cursor. |
78 gfx::NativeCursor current_cursor_; | 79 gfx::NativeCursor current_cursor_; |
79 | 80 |
| 81 // Is the window mapped to the screen? |
| 82 bool window_mapped_; |
| 83 |
80 // Is the cursor currently shown? | 84 // Is the cursor currently shown? |
81 bool cursor_shown_; | 85 bool cursor_shown_; |
82 | 86 |
83 // The invisible cursor. | 87 // The invisible cursor. |
84 ::Cursor invisible_cursor_; | 88 ::Cursor invisible_cursor_; |
85 | 89 |
86 // The bounds of |xwindow_|. | 90 // The bounds of |xwindow_|. |
87 gfx::Rect bounds_; | 91 gfx::Rect bounds_; |
88 | 92 |
89 // True if the window should be focused when the window is shown. | 93 // True if the window should be focused when the window is shown. |
90 bool focus_when_shown_; | 94 bool focus_when_shown_; |
91 | 95 |
92 scoped_array<XID> pointer_barriers_; | 96 scoped_array<XID> pointer_barriers_; |
93 | 97 |
94 scoped_ptr<ui::ViewProp> prop_; | 98 scoped_ptr<ui::ViewProp> prop_; |
95 | 99 |
96 class ImageCursors; | 100 class ImageCursors; |
97 scoped_ptr<ImageCursors> image_cursors_; | 101 scoped_ptr<ImageCursors> image_cursors_; |
98 | 102 |
99 X11AtomCache atom_cache_; | 103 X11AtomCache atom_cache_; |
100 | 104 |
101 DISALLOW_COPY_AND_ASSIGN(RootWindowHostLinux); | 105 DISALLOW_COPY_AND_ASSIGN(RootWindowHostLinux); |
102 }; | 106 }; |
103 | 107 |
104 } // namespace aura | 108 } // namespace aura |
105 | 109 |
106 #endif // UI_AURA_ROOT_WINDOW_HOST_LINUX_H_ | 110 #endif // UI_AURA_ROOT_WINDOW_HOST_LINUX_H_ |
OLD | NEW |