Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(27)

Side by Side Diff: ui/ozone/platform/dri/cursor_factory_evdev_dri.h

Issue 262163003: [Ozone] Proper cursor support for multi-monitor configurations (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: GetActiveWindow -> GetCursorWindow Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_OZONE_PLATFORM_DRI_CURSOR_FACTORY_EVDEV_DRI_H_ 5 #ifndef UI_OZONE_PLATFORM_DRI_CURSOR_FACTORY_EVDEV_DRI_H_
6 #define UI_OZONE_PLATFORM_DRI_CURSOR_FACTORY_EVDEV_DRI_H_ 6 #define UI_OZONE_PLATFORM_DRI_CURSOR_FACTORY_EVDEV_DRI_H_
7 7
8 #include "ui/base/cursor/ozone/bitmap_cursor_factory_ozone.h" 8 #include "ui/base/cursor/ozone/bitmap_cursor_factory_ozone.h"
9 #include "ui/events/ozone/evdev/cursor_delegate_evdev.h" 9 #include "ui/events/ozone/evdev/cursor_delegate_evdev.h"
10 #include "ui/gfx/geometry/point.h" 10 #include "ui/gfx/geometry/point.h"
11 #include "ui/gfx/geometry/point_f.h" 11 #include "ui/gfx/geometry/point_f.h"
12 #include "ui/gfx/geometry/rect_f.h" 12 #include "ui/gfx/geometry/rect_f.h"
13 #include "ui/gfx/native_widget_types.h" 13 #include "ui/gfx/native_widget_types.h"
14 14
15 namespace ui { 15 namespace ui {
16 class DriSurfaceFactory; 16 class DriSurfaceFactory;
17 } 17 }
18 18
19 namespace ui { 19 namespace ui {
20 20
21 class CursorFactoryEvdevDri : public BitmapCursorFactoryOzone, 21 class CursorFactoryEvdevDri : public BitmapCursorFactoryOzone,
22 public CursorDelegateEvdev { 22 public CursorDelegateEvdev {
23 public: 23 public:
24 CursorFactoryEvdevDri(DriSurfaceFactory* dri); 24 CursorFactoryEvdevDri(DriSurfaceFactory* dri);
25 virtual ~CursorFactoryEvdevDri(); 25 virtual ~CursorFactoryEvdevDri();
26 26
27 // BitmapCursorFactoryOzone: 27 // BitmapCursorFactoryOzone:
28 virtual gfx::AcceleratedWidget GetCursorWindow() OVERRIDE;
28 virtual void SetBitmapCursor(gfx::AcceleratedWidget widget, 29 virtual void SetBitmapCursor(gfx::AcceleratedWidget widget,
29 scoped_refptr<BitmapCursorOzone> cursor) 30 scoped_refptr<BitmapCursorOzone> cursor)
30 OVERRIDE; 31 OVERRIDE;
31 32
32 // CursorDelegateEvdev: 33 // CursorDelegateEvdev:
33 virtual void MoveCursorTo(gfx::AcceleratedWidget widget, 34 virtual void MoveCursorTo(gfx::AcceleratedWidget widget,
34 const gfx::PointF& location) OVERRIDE; 35 const gfx::PointF& location) OVERRIDE;
35 virtual void MoveCursor(const gfx::Vector2dF& delta) OVERRIDE; 36 virtual void MoveCursor(const gfx::Vector2dF& delta) OVERRIDE;
36 virtual gfx::AcceleratedWidget window() OVERRIDE;
37 virtual gfx::PointF location() OVERRIDE; 37 virtual gfx::PointF location() OVERRIDE;
38 38
39 private: 39 private:
40 // The location of the bitmap (the cursor location is the hotspot location). 40 // The location of the bitmap (the cursor location is the hotspot location).
41 gfx::Point bitmap_location(); 41 gfx::Point bitmap_location();
42 42
43 // The DRI implementation for setting the hardware cursor. 43 // The DRI implementation for setting the hardware cursor.
44 DriSurfaceFactory* dri_; 44 DriSurfaceFactory* dri_;
45 45
46 // The current cursor bitmap. 46 // The current cursor bitmap.
47 scoped_refptr<BitmapCursorOzone> cursor_; 47 scoped_refptr<BitmapCursorOzone> cursor_;
48 48
49 // The window under the cursor. 49 // The window under the cursor.
50 gfx::AcceleratedWidget cursor_window_; 50 gfx::AcceleratedWidget cursor_window_;
51 51
52 // The bounds of the window under the cursor.
53 gfx::RectF cursor_bounds_;
54
55 // The location of the cursor within the window. 52 // The location of the cursor within the window.
56 gfx::PointF cursor_location_; 53 gfx::PointF cursor_location_;
57 }; 54 };
58 55
59 } // namespace ui 56 } // namespace ui
60 57
61 #endif // UI_OZONE_PLATFORM_DRI_CURSOR_FACTORY_EVDEV_DRI_H_ 58 #endif // UI_OZONE_PLATFORM_DRI_CURSOR_FACTORY_EVDEV_DRI_H_
OLDNEW
« no previous file with comments | « ui/events/ozone/evdev/cursor_delegate_evdev.h ('k') | ui/ozone/platform/dri/cursor_factory_evdev_dri.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698