naiveproxy/services/ui/public/interfaces/event_injector.mojom
2018-08-11 05:35:24 +00:00

22 lines
952 B
Plaintext

// 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 ui.mojom;
import "ui/events/mojo/event.mojom";
// An interface offered by the window server which allows clients to inject
// events which are dispatched as if they came from the system. Used for things
// like remoting, where the window manager is receiving input from a remote
// process, along with testing.
interface EventInjector {
// Takes an event and dispatches it as if it came from the native platform.
// Returns false on bad |display_id| or bad |event|; returns true once the
// target client has completed processing the event.
//
// If |event| is a LocatedEvent, then the coordinates must be in pixels, and
// relative to the origin of the display identified by |display_id|.
InjectEvent(int64 display_id, ui.mojom.Event event) => (bool result);
};