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_BASE_CURSOR_CURSOR_LOADER_X11_H_ | 5 #ifndef UI_BASE_CURSOR_CURSOR_LOADER_X11_H_ |
6 #define UI_BASE_CURSOR_CURSOR_LOADER_X11_H_ | 6 #define UI_BASE_CURSOR_CURSOR_LOADER_X11_H_ |
7 | 7 |
8 #include <X11/Xcursor/Xcursor.h> | 8 #include <X11/Xcursor/Xcursor.h> |
9 #include <map> | 9 #include <map> |
10 | 10 |
11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
12 #include "ui/base/cursor/cursor.h" | 12 #include "ui/base/cursor/cursor.h" |
13 #include "ui/base/cursor/cursor_loader.h" | 13 #include "ui/base/cursor/cursor_loader.h" |
14 #include "ui/base/ui_export.h" | 14 #include "ui/base/ui_base_export.h" |
15 #include "ui/base/x/x11_util.h" | 15 #include "ui/base/x/x11_util.h" |
16 #include "ui/gfx/display.h" | 16 #include "ui/gfx/display.h" |
17 | 17 |
18 namespace ui { | 18 namespace ui { |
19 | 19 |
20 class UI_EXPORT CursorLoaderX11 : public CursorLoader { | 20 class UI_BASE_EXPORT CursorLoaderX11 : public CursorLoader { |
21 public: | 21 public: |
22 CursorLoaderX11(); | 22 CursorLoaderX11(); |
23 virtual ~CursorLoaderX11(); | 23 virtual ~CursorLoaderX11(); |
24 | 24 |
25 // Overridden from CursorLoader: | 25 // Overridden from CursorLoader: |
26 virtual void LoadImageCursor(int id, | 26 virtual void LoadImageCursor(int id, |
27 int resource_id, | 27 int resource_id, |
28 const gfx::Point& hot) OVERRIDE; | 28 const gfx::Point& hot) OVERRIDE; |
29 virtual void LoadAnimatedCursor(int id, | 29 virtual void LoadAnimatedCursor(int id, |
30 int resource_id, | 30 int resource_id, |
(...skipping 21 matching lines...) Expand all Loading... |
52 AnimatedCursorMap animated_cursors_; | 52 AnimatedCursorMap animated_cursors_; |
53 | 53 |
54 const XScopedCursor invisible_cursor_; | 54 const XScopedCursor invisible_cursor_; |
55 | 55 |
56 DISALLOW_COPY_AND_ASSIGN(CursorLoaderX11); | 56 DISALLOW_COPY_AND_ASSIGN(CursorLoaderX11); |
57 }; | 57 }; |
58 | 58 |
59 // Scale and rotate the cursor's bitmap and hotpoint. | 59 // Scale and rotate the cursor's bitmap and hotpoint. |
60 // |bitmap_in_out| and |hotpoint_in_out| are used as | 60 // |bitmap_in_out| and |hotpoint_in_out| are used as |
61 // both input and output. | 61 // both input and output. |
62 UI_EXPORT void ScaleAndRotateCursorBitmapAndHotpoint( | 62 UI_BASE_EXPORT void ScaleAndRotateCursorBitmapAndHotpoint( |
63 float scale, | 63 float scale, |
64 gfx::Display::Rotation rotation, | 64 gfx::Display::Rotation rotation, |
65 SkBitmap* bitmap_in_out, | 65 SkBitmap* bitmap_in_out, |
66 gfx::Point* hotpoint_in_out); | 66 gfx::Point* hotpoint_in_out); |
67 | 67 |
68 } // namespace ui | 68 } // namespace ui |
69 | 69 |
70 #endif // UI_BASE_CURSOR_CURSOR_LOADER_X11_H_ | 70 #endif // UI_BASE_CURSOR_CURSOR_LOADER_X11_H_ |
OLD | NEW |