chromium/ui/base/cursor/mojom/cursor.mojom

// Copyright 2015 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

module ui.mojom;

import "skia/public/mojom/bitmap.mojom";
import "ui/base/cursor/mojom/cursor_type.mojom";
import "ui/gfx/geometry/mojom/geometry.mojom";

// A description of a cursor.
struct Cursor {
  // The type of cursor. If kCustom, the rest of the fields are relevant.
  CursorType type;

  // The hotspot in pixels in the source cursor frames.
  gfx.mojom.Point hotspot;

  // The custom bitmap. Must be non-empty if |cursor_type| is kCustom.
  skia.mojom.BitmapN32? bitmap;

  // This is the image scale of this cursor.
  float image_scale_factor;
};