| // Copyright 2015 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 mojo; |
| |
| import "geometry/interfaces/geometry.mojom"; |
| |
| enum DisplayType { |
| NONE = 0, |
| UNKNOWN = 1, |
| INTERNAL = 2, |
| VGA = 4, |
| HDMI = 8, |
| DVI = 16, |
| DISPLAYPORT = 32, |
| NETWORK = 64, |
| LAST = NETWORK |
| }; |
| |
| struct DisplayMode { |
| Size size; |
| bool is_interlaced; |
| float refresh_rate; |
| }; |
| |
| struct DisplaySnapshot { |
| // The internal display identifier. |
| int64 display_id; |
| Point origin; |
| Size physical_size; |
| DisplayType type; |
| bool has_current_mode; |
| bool has_native_mode; |
| array<DisplayMode> modes; |
| // The mode currently active on this display. |
| // TODO(cstout): can this be just an index into the modes array? |
| DisplayMode current_mode; |
| // The display's native mode. |
| // TODO(cstout): can this be just an index into the modes array? |
| DisplayMode native_mode; |
| // The identifier for the model of the display. |
| int64 product_id; |
| string string_representation; |
| }; |
| |
| interface OzoneDrmGpu { |
| AddGraphicsDevice(string file_path, int32 file_descriptor); |
| CreateWindow(int64 widget); |
| WindowBoundsChanged(int64 widget, Rect bounds); |
| |
| RefreshNativeDisplays(); |
| ConfigureNativeDisplay(int64 id, DisplayMode mode, Point originhost); |
| }; |