naiveproxy/services/ui/public/interfaces/display/display_controller.mojom

56 lines
1.9 KiB
Plaintext
Raw Normal View History

2018-01-28 21:32:06 +03:00
// Copyright 2016 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 display.mojom;
import "ui/gfx/geometry/mojo/geometry.mojom";
// An interface for clients that are allowed to make changes to the display
// state.
interface DisplayController {
// =========================== Keyboard Shortcuts ===========================
// Increase zoom on internal display.
IncreaseInternalDisplayZoom();
// Decrease zoom on internal display.
DecreaseInternalDisplayZoom();
// Reset zoom on internal display to default level.
ResetInternalDisplayZoom();
// Rotate the current display by 90° CW. The current display is the display
// closest to the mouse cursor.
RotateCurrentDisplayCW();
// Swap the primary display and the next display.
SwapPrimaryDisplay();
// Toggles between mirroring and extended mode.
ToggleMirrorMode();
// ============================ Virtual Terminal ============================
// Take control of all display output. This is called when switching from the
// virtual terminal back to Chrome in response to a dbus message.
TakeDisplayControl() => (bool status);
// Relinquish control of all display output. This is called when switching
// from Chrome to the virtual terminal in response to a dbus message.
RelinquishDisplayControl() => (bool status);
// ========================= Configuration Changes ==========================
// Sets the display work area with the provided insets. The display size is
// included to ensure that the insets are for the current display size.
SetDisplayWorkArea(int64 display_id,
gfx.mojom.Size size,
gfx.mojom.Insets insets);
// TODO(kylechar): This interface will need to be expanded to provide
// additional functionality for the display settings page and other ash
// keyboard accelerators.
};