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

Side by Side Diff: services/ui/public/interfaces/cursor/cursor.mojom

Issue 2833163002: Change ui cursor identifiers to an enum class. (Closed)
Patch Set: OK, it can't be explicit for mac. Created 3 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
OLDNEW
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"; 7 import "mojo/common/time.mojom";
8 import "skia/public/interfaces/bitmap_array.mojom"; 8 import "skia/public/interfaces/bitmap_array.mojom";
9 import "ui/gfx/geometry/mojo/geometry.mojom"; 9 import "ui/gfx/geometry/mojo/geometry.mojom";
10 10
11 // 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
12 // blink's WebCursorInfo. 12 // blink's WebCursorInfo.
13 enum CursorType { 13 enum CursorType {
14 // NULL is kept for compatibility with chrome declarations. In chrome code, it 14 // kNull is kept for compatibility with chrome declarations. In chrome code,
15 // is treated exactly like POINTER, the default pointer. 15 // it is treated exactly like kPointer, the default pointer.
16 CURSOR_NULL = 0, 16 kNull = 0,
17 POINTER, 17 kPointer,
18 CROSS, 18 kCross,
19 HAND, 19 kHand,
20 IBEAM, 20 kIBeam,
21 WAIT, 21 kWait,
22 HELP, 22 kHelp,
23 EAST_RESIZE, 23 kEastResize,
24 NORTH_RESIZE, 24 kNorthResize,
25 NORTH_EAST_RESIZE, 25 kNorthEastResize,
26 NORTH_WEST_RESIZE, 26 kNorthWestResize,
27 SOUTH_RESIZE, 27 kSouthResize,
28 SOUTH_EAST_RESIZE, 28 kSouthEastResize,
29 SOUTH_WEST_RESIZE, 29 kSouthWestResize,
30 WEST_RESIZE, 30 kWestResize,
31 NORTH_SOUTH_RESIZE, 31 kNorthSouthResize,
32 EAST_WEST_RESIZE, 32 kEastWestResize,
33 NORTH_EAST_SOUTH_WEST_RESIZE, 33 kNorthEastSouthWestResize,
34 NORTH_WEST_SOUTH_EAST_RESIZE, 34 kNorthWestSouthEastResize,
35 COLUMN_RESIZE, 35 kColumnResize,
36 ROW_RESIZE, 36 kRowResize,
37 MIDDLE_PANNING, 37 kMiddlePanning,
38 EAST_PANNING, 38 kEastPanning,
39 NORTH_PANNING, 39 kNorthPanning,
40 NORTH_EAST_PANNING, 40 kNorthEastPanning,
41 NORTH_WEST_PANNING, 41 kNorthWestPanning,
42 SOUTH_PANNING, 42 kSouthPanning,
43 SOUTH_EAST_PANNING, 43 kSouthEastPanning,
44 SOUTH_WEST_PANNING, 44 kSouthWestPanning,
45 WEST_PANNING, 45 kWestPanning,
46 MOVE, 46 kMove,
47 VERTICAL_TEXT, 47 kVerticalText,
48 CELL, 48 kCell,
49 CONTEXT_MENU, 49 kContextMenu,
50 ALIAS, 50 kAlias,
51 PROGRESS, 51 kProgress,
52 NO_DROP, 52 kNoDrop,
53 COPY, 53 kCopy,
54 NONE, 54 kNone,
55 NOT_ALLOWED, 55 kNotAllowed,
56 ZOOM_IN, 56 kZoomIn,
57 ZOOM_OUT, 57 kZoomOut,
58 GRAB, 58 kGrab,
59 GRABBING, 59 kGrabbing,
60 CUSTOM 60 kCustom
61 }; 61 };
62 62
63 // A description of a cursor. 63 // A description of a cursor.
64 struct CursorData { 64 struct CursorData {
65 // The type of cursor. If CUSTOM, the rest of the fields are relevant. 65 // The type of cursor. If CUSTOM, the rest of the fields are relevant.
66 CursorType cursor_type; 66 CursorType cursor_type;
67 67
68 // The delay between cursor frames. 68 // The delay between cursor frames.
69 mojo.common.mojom.TimeDelta frame_delay; 69 mojo.common.mojom.TimeDelta frame_delay;
70 70
71 // The hotspot in pixels in the source cursor frames. 71 // The hotspot in pixels in the source cursor frames.
72 gfx.mojom.Point hotspot_in_pixels; 72 gfx.mojom.Point hotspot_in_pixels;
73 73
74 // The frames of the cursor. 74 // The frames of the cursor.
75 skia.mojom.BitmapArray cursor_frames; 75 skia.mojom.BitmapArray cursor_frames;
76 76
77 // This is the image scale of this cursor. 77 // This is the image scale of this cursor.
78 float scale_factor; 78 float scale_factor;
79 }; 79 };
OLDNEW
« no previous file with comments | « remoting/host/chromeos/mouse_cursor_monitor_aura.cc ('k') | services/ui/public/interfaces/cursor/cursor_struct_traits.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698