naiveproxy/ash/public/interfaces/accessibility_focus_ring_controller.mojom
2018-08-11 05:35:24 +00:00

38 lines
1.3 KiB
Plaintext

// Copyright 2018 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 ash.mojom;
import "ui/gfx/geometry/mojo/geometry.mojom";
enum FocusRingBehavior { FADE_OUT_FOCUS_RING, PERSIST_FOCUS_RING };
// Interface for ash client (e.g. Chrome) to control and query accessibility
// focus ring features.
interface AccessibilityFocusRingController {
// Sets the focus ring color.
SetFocusRingColor(uint32 skcolor);
// Resets the focus ring color back to the default.
ResetFocusRingColor();
// Draws a focus ring around the given set of rects in screen coordinates. Use
// |focus_ring_behavior| to specify whether the focus ring should persist or
// fade out.
SetFocusRing(array<gfx.mojom.Rect> rects_in_screen,
FocusRingBehavior focus_ring_behavior);
// Hides focus ring on screen.
HideFocusRing();
// Draws a highlight at the given rects in screen coordinates. Rects may be
// overlapping and will be merged into one layer. This looks similar to
// selecting a region with the cursor, except it is drawn in the foreground
// rather than behind a text layer.
SetHighlights(array<gfx.mojom.Rect> rects_in_screen, uint32 skcolor);
// Hides highlight on screen.
HideHighlights();
};