# Class TCefDisplayRef

Description
Hierarchy
Fields
Methods
Properties

## 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://bitbucket.org/chromiumembedded/cef/wiki/GeneralUsage#markdown- header-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

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

## Description

### Methods

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

| `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.

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

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

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

| `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.

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

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

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

| `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.

| `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.

| `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.

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

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

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

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

| `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 0.16.0-snapshot.