// Copyright 2015 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. module ui.mojom; import "mojo/public/mojom/base/time.mojom"; import "skia/public/interfaces/bitmap.mojom"; import "ui/gfx/geometry/mojo/geometry.mojom"; // Standard Cursor numbers. These are the same as Chrome's ui::Cursor and // blink's WebCursorInfo. enum CursorType { // kNull is kept for compatibility with chrome declarations. In chrome code, // it is treated exactly like kPointer, the default pointer. kNull = 0, kPointer, kCross, kHand, kIBeam, kWait, kHelp, kEastResize, kNorthResize, kNorthEastResize, kNorthWestResize, kSouthResize, kSouthEastResize, kSouthWestResize, kWestResize, kNorthSouthResize, kEastWestResize, kNorthEastSouthWestResize, kNorthWestSouthEastResize, kColumnResize, kRowResize, kMiddlePanning, kEastPanning, kNorthPanning, kNorthEastPanning, kNorthWestPanning, kSouthPanning, kSouthEastPanning, kSouthWestPanning, kWestPanning, kMove, kVerticalText, kCell, kContextMenu, kAlias, kProgress, kNoDrop, kCopy, kNone, kNotAllowed, kZoomIn, kZoomOut, kGrab, kGrabbing, kCustom }; // Whether we use normal or large cursors. These are the same as Chrome's // ui::CursorSize. enum CursorSize { kNormal, kLarge }; // A description of a cursor. struct CursorData { // The type of cursor. If kCustom, the rest of the fields are relevant. CursorType cursor_type; // The delay between cursor frames. mojo_base.mojom.TimeDelta frame_delay; // The hotspot in pixels in the source cursor frames. gfx.mojom.Point hotspot_in_pixels; // The frames of the cursor. Must be non-empty if |cursor_type| is kCustom. array cursor_frames; // This is the image scale of this cursor. float scale_factor; };