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

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

Issue 851853002: It is time. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Trying to reup because the last upload failed. Created 5 years, 11 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
« no previous file with comments | « ui/ozone/platform/dri/dri_console_buffer.cc ('k') | ui/ozone/platform/dri/dri_cursor.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef UI_OZONE_PLATFORM_DRI_DRI_CURSOR_H_
6 #define UI_OZONE_PLATFORM_DRI_DRI_CURSOR_H_
7
8 #include "base/memory/ref_counted.h"
9 #include "ui/base/cursor/cursor.h"
10 #include "ui/events/ozone/evdev/cursor_delegate_evdev.h"
11 #include "ui/gfx/native_widget_types.h"
12
13 namespace gfx {
14 class PointF;
15 class Vector2dF;
16 }
17
18 namespace ui {
19
20 class BitmapCursorOzone;
21 class BitmapCursorFactoryOzone;
22 class DriWindowManager;
23 class HardwareCursorDelegate;
24
25 class DriCursor : public CursorDelegateEvdev {
26 public:
27 explicit DriCursor(HardwareCursorDelegate* hardware,
28 DriWindowManager* window_manager);
29 virtual ~DriCursor();
30
31 void SetCursor(gfx::AcceleratedWidget widget, PlatformCursor platform_cursor);
32 void ShowCursor();
33 void HideCursor();
34 gfx::AcceleratedWidget GetCursorWindow();
35
36 // CursorDelegateEvdev:
37 virtual void MoveCursorTo(gfx::AcceleratedWidget widget,
38 const gfx::PointF& location) override;
39 virtual void MoveCursor(const gfx::Vector2dF& delta) override;
40 virtual bool IsCursorVisible() override;
41 virtual gfx::PointF location() override;
42
43 private:
44 // The location of the bitmap (the cursor location is the hotspot location).
45 gfx::Point bitmap_location();
46
47 // The DRI implementation for setting the hardware cursor.
48 HardwareCursorDelegate* hardware_;
49
50 DriWindowManager* window_manager_; // Not owned.
51
52 // The current cursor bitmap.
53 scoped_refptr<BitmapCursorOzone> cursor_;
54
55 // The window under the cursor.
56 gfx::AcceleratedWidget cursor_window_;
57
58 // The location of the cursor within the window.
59 gfx::PointF cursor_location_;
60 };
61
62 } // namespace ui
63
64 #endif // UI_OZONE_PLATFORM_DRI_DRI_CURSOR_H_
OLDNEW
« no previous file with comments | « ui/ozone/platform/dri/dri_console_buffer.cc ('k') | ui/ozone/platform/dri/dri_cursor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698