| // Copyright 2020 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 blink.mojom; |
| |
| import "third_party/blink/public/mojom/widget/screen_orientation.mojom"; |
| import "ui/gfx/geometry/mojom/geometry.mojom"; |
| import "ui/gfx/mojom/display_color_spaces.mojom"; |
| |
| // Information about the screen on which a WidgetBase is being displayed. This |
| // is the content counterpart to blink::ScreenInfo. |
| struct ScreenInfo { |
| // Device scale factor. Specifies the ratio between physical and logical |
| // pixels. |
| float device_scale_factor = 1; |
| |
| // The color spaces and buffer formats that this screen will use for various |
| // content types. |
| gfx.mojom.DisplayColorSpaces display_color_spaces; |
| |
| // The screen depth in bits per pixel. |
| uint32 depth; |
| |
| // The bits per colour component. This assumes that the colours are balanced |
| // equally. |
| uint32 depth_per_component; |
| |
| // This can be true for black and white printers |
| bool is_monochrome = false; |
| |
| // The display frequency in Hz of the monitor. Set to 0 if it fails in the |
| // monitor frequency query. |
| uint32 display_frequency; |
| |
| // The display monitor rectangle in virtual-screen coordinates. Note that |
| // this may be negative. |
| gfx.mojom.Rect rect; |
| |
| // The portion of the monitor's rectangle that can be used by applications. |
| gfx.mojom.Rect available_rect; |
| |
| // The monitor's orientation. |
| ScreenOrientation orientation_type = ScreenOrientation.kUndefined; |
| |
| // This is the orientation angle of the displayed content in degrees. |
| // It is the opposite of the physical rotation. |
| uint16 orientation_angle; |
| |
| // Proposed: https://github.com/webscreens/window-placement |
| // Whether this Screen is part of a multi-screen extended visual workspace. |
| bool is_extended; |
| }; |