naiveproxy/services/ui/public/interfaces/cursor/cursor.mojom

87 lines
1.8 KiB
Plaintext
Raw Normal View History

2018-02-02 13:49:39 +03:00
// 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/common/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 CUSTOM, the rest of the fields are relevant.
CursorType cursor_type;
// The delay between cursor frames.
mojo.common.mojom.TimeDelta frame_delay;
// The hotspot in pixels in the source cursor frames.
gfx.mojom.Point hotspot_in_pixels;
// The frames of the cursor.
array<skia.mojom.Bitmap?> cursor_frames;
// This is the image scale of this cursor.
float scale_factor;
};