| 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 18 matching lines...) Expand all  Loading... | 
| 29   virtual ~RootWindowHostLinux(); | 29   virtual ~RootWindowHostLinux(); | 
| 30 | 30 | 
| 31   // Overridden from Dispatcher overrides: | 31   // Overridden from Dispatcher overrides: | 
| 32   virtual bool Dispatch(const base::NativeEvent& event) OVERRIDE; | 32   virtual bool Dispatch(const base::NativeEvent& event) OVERRIDE; | 
| 33 | 33 | 
| 34  private: | 34  private: | 
| 35   // RootWindowHost Overrides. | 35   // RootWindowHost Overrides. | 
| 36   virtual void SetRootWindow(RootWindow* root_window) OVERRIDE; | 36   virtual void SetRootWindow(RootWindow* root_window) OVERRIDE; | 
| 37   virtual RootWindow* GetRootWindow() OVERRIDE; | 37   virtual RootWindow* GetRootWindow() OVERRIDE; | 
| 38   virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE; | 38   virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE; | 
|  | 39   virtual gfx::AcceleratedWidget GetAcceleratedWidgetUsedForEvents() OVERRIDE; | 
| 39   virtual void Show() OVERRIDE; | 40   virtual void Show() 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 gfx::Point QueryMouseLocation() OVERRIDE; | 49   virtual gfx::Point QueryMouseLocation() OVERRIDE; | 
| 49   virtual bool ConfineCursorToRootWindow() OVERRIDE; | 50   virtual bool ConfineCursorToRootWindow() OVERRIDE; | 
| 50   virtual void UnConfineCursor() OVERRIDE; | 51   virtual void UnConfineCursor() OVERRIDE; | 
| 51   virtual void MoveCursorTo(const gfx::Point& location) OVERRIDE; | 52   virtual void MoveCursorTo(const gfx::Point& location) OVERRIDE; | 
| 52   virtual void SetFocusWhenShown(bool focus_when_shown) OVERRIDE; | 53   virtual void SetFocusWhenShown(bool focus_when_shown) OVERRIDE; | 
| 53   virtual bool GrabSnapshot( | 54   virtual bool GrabSnapshot( | 
| 54       const gfx::Rect& snapshot_bounds, | 55       const gfx::Rect& snapshot_bounds, | 
| 55       std::vector<unsigned char>* png_representation) OVERRIDE; | 56       std::vector<unsigned char>* png_representation) OVERRIDE; | 
| 56   virtual void PostNativeEvent(const base::NativeEvent& event) OVERRIDE; | 57   virtual void PostNativeEvent(const base::NativeEvent& event) OVERRIDE; | 
|  | 58   virtual bool DispatchNativeEvent(const base::NativeEvent& event) OVERRIDE; | 
| 57   virtual void OnDeviceScaleFactorChanged(float device_scale_factor) OVERRIDE; | 59   virtual void OnDeviceScaleFactorChanged(float device_scale_factor) OVERRIDE; | 
| 58 | 60 | 
| 59   // Returns true if there's an X window manager present... in most cases.  Some | 61   // Returns true if there's an X window manager present... in most cases.  Some | 
| 60   // window managers (notably, ion3) don't implement enough of ICCCM for us to | 62   // window managers (notably, ion3) don't implement enough of ICCCM for us to | 
| 61   // detect that they're there. | 63   // detect that they're there. | 
| 62   bool IsWindowManagerPresent(); | 64   bool IsWindowManagerPresent(); | 
| 63 | 65 | 
| 64   // Sets the cursor on |xwindow_| to |cursor|.  Does not check or update | 66   // Sets the cursor on |xwindow_| to |cursor|.  Does not check or update | 
| 65   // |current_cursor_|. | 67   // |current_cursor_|. | 
| 66   void SetCursorInternal(gfx::NativeCursor cursor); | 68   void SetCursorInternal(gfx::NativeCursor cursor); | 
| 67 | 69 | 
| 68   RootWindow* root_window_; | 70   RootWindow* root_window_; | 
| 69 | 71 | 
| 70   // The display and the native X window hosting the root window. | 72   // The display and the native X window hosting the root window. | 
| 71   Display* xdisplay_; | 73   Display* xdisplay_; | 
| 72   ::Window xwindow_; | 74   ::Window xwindow_; | 
|  | 75   ::Window x_output_window_; | 
| 73 | 76 | 
| 74   // The native root window. | 77   // The native root window. | 
| 75   ::Window x_root_window_; | 78   ::Window x_root_window_; | 
| 76 | 79 | 
| 77   // Current Aura cursor. | 80   // Current Aura cursor. | 
| 78   gfx::NativeCursor current_cursor_; | 81   gfx::NativeCursor current_cursor_; | 
| 79 | 82 | 
| 80   // Is the cursor currently shown? | 83   // Is the cursor currently shown? | 
| 81   bool cursor_shown_; | 84   bool cursor_shown_; | 
| 82 | 85 | 
| (...skipping 14 matching lines...) Expand all  Loading... | 
| 97   scoped_ptr<ImageCursors> image_cursors_; | 100   scoped_ptr<ImageCursors> image_cursors_; | 
| 98 | 101 | 
| 99   X11AtomCache atom_cache_; | 102   X11AtomCache atom_cache_; | 
| 100 | 103 | 
| 101   DISALLOW_COPY_AND_ASSIGN(RootWindowHostLinux); | 104   DISALLOW_COPY_AND_ASSIGN(RootWindowHostLinux); | 
| 102 }; | 105 }; | 
| 103 | 106 | 
| 104 }  // namespace aura | 107 }  // namespace aura | 
| 105 | 108 | 
| 106 #endif  // UI_AURA_ROOT_WINDOW_HOST_LINUX_H_ | 109 #endif  // UI_AURA_ROOT_WINDOW_HOST_LINUX_H_ | 
| OLD | NEW | 
|---|