blob: 4a643d01f9bf93d093d0612d53e404e027d8bc34 [file] [log] [blame]
// Copyright 2017 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";
// Interface for ash client (e.g. Chrome) to connect to the highlighter
// controller, the component implementing on-screen content selection
// with a stylus.
interface HighlighterController {
// Sets the client interface.
SetClient(HighlighterControllerClient client);
// Exits the highlighter mode if it is currently enabled.
ExitHighlighterMode();
};
// Interface for ash to notify the client (e.g. Chrome) about the highlighter
// selection and state.
interface HighlighterControllerClient {
// Called when when a valid selection is made. Selected rectangle is in
// screen coordinates, clipped to screen bounds if necessary.
HandleSelection(gfx.mojom.Rect rect);
// Called when the highlighter tool becomes enabled or disabled.
HandleEnabledStateChange(bool enabled);
};