Chromium Embedded Framework (CEF)  114.2.1+gd70a0a8+chromium-114.0.5735.45
CefDisplay Class Referenceabstract

This class typically, but not always, corresponds to a physical display connected to the system. More...

#include "include/views/cef_display.h"

Inheritance diagram for CefDisplay:
CefBaseRefCounted

Public Member Functions

virtual int64 GetID ()=0
 Returns the unique identifier for this Display. More...
 
virtual float GetDeviceScaleFactor ()=0
 Returns this Display's device pixel scale factor. More...
 
virtual void ConvertPointToPixels (CefPoint &point)=0
 Convert |point| from DIP coordinates to pixel coordinates using this Display's device scale factor. More...
 
virtual void ConvertPointFromPixels (CefPoint &point)=0
 Convert |point| from pixel coordinates to DIP coordinates using this Display's device scale factor. More...
 
virtual CefRect GetBounds ()=0
 Returns this Display's bounds in DIP screen coordinates. More...
 
virtual CefRect GetWorkArea ()=0
 Returns this Display's work area in DIP screen coordinates. More...
 
virtual int GetRotation ()=0
 Returns this Display's rotation in degrees. More...
 
- Public Member Functions inherited from CefBaseRefCounted
virtual void AddRef () const =0
 Called to increment the reference count for the object. More...
 
virtual bool Release () const =0
 Called to decrement the reference count for the object. More...
 
virtual bool HasOneRef () const =0
 Returns true if the reference count is 1. More...
 
virtual bool HasAtLeastOneRef () const =0
 Returns true if the reference count is at least 1. More...
 

Static Public Member Functions

static CefRefPtr< CefDisplayGetPrimaryDisplay ()
 Returns the primary Display. More...
 
static CefRefPtr< CefDisplayGetDisplayNearestPoint (const CefPoint &point, bool input_pixel_coords)
 Returns the Display nearest |point|. More...
 
static CefRefPtr< CefDisplayGetDisplayMatchingBounds (const CefRect &bounds, bool input_pixel_coords)
 Returns the Display that most closely intersects |bounds|. More...
 
static size_t GetDisplayCount ()
 Returns the total number of Displays. More...
 
static void GetAllDisplays (std::vector< CefRefPtr< CefDisplay >> &displays)
 Returns all Displays. More...
 
static CefPoint ConvertScreenPointToPixels (const CefPoint &point)
 Convert |point| from DIP screen coordinates to pixel screen coordinates. More...
 
static CefPoint ConvertScreenPointFromPixels (const CefPoint &point)
 Convert |point| from pixel screen coordinates to DIP screen coordinates. More...
 
static CefRect ConvertScreenRectToPixels (const CefRect &rect)
 Convert |rect| from DIP screen coordinates to pixel screen coordinates. More...
 
static CefRect ConvertScreenRectFromPixels (const CefRect &rect)
 Convert |rect| from pixel screen coordinates to DIP screen coordinates. More...
 

Additional Inherited Members

- Protected Member Functions inherited from CefBaseRefCounted
virtual ~CefBaseRefCounted ()
 

Detailed Description

This class 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.

Member Function Documentation

◆ ConvertPointFromPixels()

virtual void CefDisplay::ConvertPointFromPixels ( CefPoint point)
pure virtual

Convert |point| from pixel coordinates to DIP coordinates using this Display's device scale factor.

◆ ConvertPointToPixels()

virtual void CefDisplay::ConvertPointToPixels ( CefPoint point)
pure virtual

Convert |point| from DIP coordinates to pixel coordinates using this Display's device scale factor.

◆ ConvertScreenPointFromPixels()

static CefPoint CefDisplay::ConvertScreenPointFromPixels ( const CefPoint point)
static

Convert |point| from pixel screen coordinates to DIP screen coordinates.

This method is only used on Windows.

◆ ConvertScreenPointToPixels()

static CefPoint CefDisplay::ConvertScreenPointToPixels ( const CefPoint point)
static

Convert |point| from DIP screen coordinates to pixel screen coordinates.

This method is only used on Windows.

◆ ConvertScreenRectFromPixels()

static CefRect CefDisplay::ConvertScreenRectFromPixels ( const CefRect rect)
static

Convert |rect| from pixel screen coordinates to DIP screen coordinates.

This method is only used on Windows.

◆ ConvertScreenRectToPixels()

static CefRect CefDisplay::ConvertScreenRectToPixels ( const CefRect rect)
static

Convert |rect| from DIP screen coordinates to pixel screen coordinates.

This method is only used on Windows.

◆ GetAllDisplays()

static void CefDisplay::GetAllDisplays ( std::vector< CefRefPtr< CefDisplay >> &  displays)
static

Returns all Displays.

Mirrored displays are excluded; this method is intended to return distinct, usable displays.

◆ GetBounds()

virtual CefRect CefDisplay::GetBounds ( )
pure virtual

Returns this Display's bounds in DIP screen coordinates.

This is the full size of the display.

◆ GetDeviceScaleFactor()

virtual float CefDisplay::GetDeviceScaleFactor ( )
pure virtual

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.

◆ GetDisplayCount()

static size_t CefDisplay::GetDisplayCount ( )
static

Returns the total number of Displays.

Mirrored displays are excluded; this method is intended to return the number of distinct, usable displays.

◆ GetDisplayMatchingBounds()

static CefRefPtr<CefDisplay> CefDisplay::GetDisplayMatchingBounds ( const CefRect bounds,
bool  input_pixel_coords 
)
static

Returns the Display that most closely intersects |bounds|.

Set |input_pixel_coords| to true if |bounds| is in pixel screen coordinates instead of DIP screen coordinates.

◆ GetDisplayNearestPoint()

static CefRefPtr<CefDisplay> CefDisplay::GetDisplayNearestPoint ( const CefPoint point,
bool  input_pixel_coords 
)
static

Returns the Display nearest |point|.

Set |input_pixel_coords| to true if |point| is in pixel screen coordinates instead of DIP screen coordinates.

◆ GetID()

virtual int64 CefDisplay::GetID ( )
pure virtual

Returns the unique identifier for this Display.

◆ GetPrimaryDisplay()

static CefRefPtr<CefDisplay> CefDisplay::GetPrimaryDisplay ( )
static

Returns the primary Display.

◆ GetRotation()

virtual int CefDisplay::GetRotation ( )
pure virtual

Returns this Display's rotation in degrees.

◆ GetWorkArea()

virtual CefRect CefDisplay::GetWorkArea ( )
pure virtual

Returns this Display's work area in DIP screen coordinates.

This excludes areas of the display that are occupied with window manager toolbars, etc.


The documentation for this class was generated from the following file: