OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 module ui.mojom; | 5 module ui.mojom; |
6 | 6 |
| 7 import "mojo/common/time.mojom"; |
| 8 import "skia/public/interfaces/bitmap_array.mojom"; |
| 9 import "ui/gfx/geometry/mojo/geometry.mojom"; |
| 10 |
7 // Standard Cursor numbers. These are the same as Chrome's ui::Cursor and | 11 // Standard Cursor numbers. These are the same as Chrome's ui::Cursor and |
8 // blink's WebCursorInfo. | 12 // blink's WebCursorInfo. |
9 enum CursorType { | 13 enum CursorType { |
10 // NULL is kept for compatibility with chrome declarations. In chrome code, it | 14 // NULL is kept for compatibility with chrome declarations. In chrome code, it |
11 // is treated exactly like POINTER, the default pointer. | 15 // is treated exactly like POINTER, the default pointer. |
12 CURSOR_NULL = 0, | 16 CURSOR_NULL = 0, |
13 POINTER, | 17 POINTER, |
14 CROSS, | 18 CROSS, |
15 HAND, | 19 HAND, |
16 IBEAM, | 20 IBEAM, |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 NO_DROP, | 52 NO_DROP, |
49 COPY, | 53 COPY, |
50 NONE, | 54 NONE, |
51 NOT_ALLOWED, | 55 NOT_ALLOWED, |
52 ZOOM_IN, | 56 ZOOM_IN, |
53 ZOOM_OUT, | 57 ZOOM_OUT, |
54 GRAB, | 58 GRAB, |
55 GRABBING, | 59 GRABBING, |
56 CUSTOM | 60 CUSTOM |
57 }; | 61 }; |
| 62 |
| 63 // A description of a cursor. |
| 64 struct CursorData { |
| 65 // The type of cursor. If CUSTOM, the rest of the fields are relevant. |
| 66 CursorType cursor_type; |
| 67 |
| 68 // The delay between cursor frames. |
| 69 mojo.common.mojom.TimeDelta frame_delay; |
| 70 |
| 71 // The hotspot in pixels in the source cursor frames. |
| 72 gfx.mojom.Point hotspot_in_pixels; |
| 73 |
| 74 // The frames of the cursor. |
| 75 skia.mojom.BitmapArray cursor_frames; |
| 76 |
| 77 // This is the image scale of this cursor. |
| 78 float scale_factor; |
| 79 }; |
OLD | NEW |