# Class TCefDisplayRef

Description
Hierarchy
Methods

## Unit

uCEFDisplay

## Declaration

`type TCefDisplayRef = class(TCefBaseRefCountedRef, ICefDisplay)`

## Description

This interface typically, but not always, corresponds to a physical display connected to the system. A fake Display may exist on a headless system, or a Display may correspond to a remote, virtual display. All size and position values are in density independent pixel (DIP) coordinates unless otherwise indicated. Methods must be called on the browser process UI thread unless otherwise indicated.

For details on coordinate systems and usage see https://chromiumembedded.github.io/cef/general_usage#coordinate-systems

<see href="https://bitbucket.org/chromiumembedded/cef/src/master/include/capi/views/cef_display_capi.h">CEF source file: /include/capi/views/cef_display_capi.h (cef_display_t))

## Hierarchy

- TInterfacedObject
- TCefBaseRefCountedRef
- TCefDisplayRef

## Overview

### Methods

Protected | `function GetID: int64;`
Protected | `function GetDeviceScaleFactor: Single;`
Protected | `procedure ConvertPointToPixels(var point: TCefPoint);`
Protected | `procedure ConvertPointFromPixels(var point: TCefPoint);`
Protected | `function GetBounds: TCefRect;`
Protected | `function GetWorkArea: TCefRect;`
Protected | `function GetRotation: Integer;`
Public | `class function UnWrap(data: Pointer): ICefDisplay;`
Public | `class function Primary: ICefDisplay;`
Public | `class function NearestPoint(const point: TCefPoint; input_pixel_coords: boolean): ICefDisplay;`
Public | `class function MatchingBounds(const bounds: TCefRect; input_pixel_coords: boolean): ICefDisplay;`
Public | `class function GetCount: NativeUInt;`
Public | `class function GetAlls(var aDisplayArray : TCefDisplayArray) : boolean;`
Public | `class function ScreenPointToPixels(const aScreenPoint : TPoint) : TPoint;`
Public | `class function ScreenPointFromPixels(const aPixelsPoint : TPoint) : TPoint;`
Public | `class function ScreenRectToPixels(const aScreenRect : TRect) : TRect;`
Public | `class function ScreenRectFromPixels(const aPixelsRect : TRect) : TRect;`

## Description

### Methods

Protected | `function GetID: int64;`
Returns the unique identifier for this Display.

Protected | `function GetDeviceScaleFactor: Single;`
Returns this Display's device pixel scale factor. This specifies how much the UI should be scaled when the actual output has more pixels than standard displays (which is around 100~120dpi). The potential return values differ by platform. Windowed browsers with 1.0 zoom will have a JavaScript `window.devicePixelRatio` value matching the associated Display's get_device_scale_factor() value.

Protected | `procedure ConvertPointToPixels(var point: TCefPoint);`
Convert |point| from DIP coordinates to pixel coordinates using this Display's device scale factor.

Protected | `procedure ConvertPointFromPixels(var point: TCefPoint);`
Convert |point| from pixel coordinates to DIP coordinates using this Display's device scale factor.

Protected | `function GetBounds: TCefRect;`
Returns this Display's bounds in DIP screen coordinates. This is the full size of the display.

Protected | `function GetWorkArea: TCefRect;`
Returns this Display's work area in DIP screen coordinates. This excludes areas of the display that are occupied with window manager toolbars, etc.

Protected | `function GetRotation: Integer;`
Returns this Display's rotation in degrees.

Public | `class function UnWrap(data: Pointer): ICefDisplay;`
Returns a ICefDisplay instance using a PCefDisplay data pointer.

Public | `class function Primary: ICefDisplay;`
Returns the primary Display.

Public | `class function NearestPoint(const point: TCefPoint; input_pixel_coords: boolean): ICefDisplay;`
Returns the Display nearest |point|. Set |input_pixel_coords| to true (1) if |point| is in pixel screen coordinates instead of DIP screen coordinates.

Public | `class function MatchingBounds(const bounds: TCefRect; input_pixel_coords: boolean): ICefDisplay;`
Returns the Display that most closely intersects |bounds|. Set |input_pixel_coords| to true (1) if |bounds| is in pixel screen coordinates instead of DIP screen coordinates.

Public | `class function GetCount: NativeUInt;`
Returns the total number of Displays. Mirrored displays are excluded; this function is intended to return the number of distinct, usable displays.

Public | `class function GetAlls(var aDisplayArray : TCefDisplayArray) : boolean;`
Returns all Displays. Mirrored displays are excluded; this function is intended to return distinct, usable displays.

Public | `class function ScreenPointToPixels(const aScreenPoint : TPoint) : TPoint;`
Convert |point| from DIP screen coordinates to pixel screen coordinates. This function is only used on Windows.

Public | `class function ScreenPointFromPixels(const aPixelsPoint : TPoint) : TPoint;`
Convert |point| from pixel screen coordinates to DIP screen coordinates. This function is only used on Windows.

Public | `class function ScreenRectToPixels(const aScreenRect : TRect) : TRect;`
Convert |rect| from DIP screen coordinates to pixel screen coordinates. This function is only used on Windows.

Public | `class function ScreenRectFromPixels(const aPixelsRect : TRect) : TRect;`
Convert |rect| from pixel screen coordinates to DIP screen coordinates. This function is only used on Windows.

Generated by PasDoc 1.0.4.