Loading...
Searching...
No Matches
juce::Displays::Display Struct Reference

Detailed Description

Represents a connected display device.


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

Public Member Functions

JUCE_BEGIN_IGNORE_DEPRECATION_WARNINGS Display ()=default
 Display (Display &&) noexcept=default
 Display (const Display &)=default
Displayoperator= (Display &&) noexcept=default
Displayoperator= (const Display &)=default

Public Attributes

JUCE_END_IGNORE_DEPRECATION_WARNINGS bool isMain
 This will be true if this is the user's main display device.
Rectangle< int > totalArea
Rectangle< float > logicalBounds
 The total area of this display in logical pixels including any OS-dependent objects like the taskbar, menu bar, etc.
Rectangle< int > userArea
Rectangle< float > userBounds
 The total area of this display in logical pixels which isn't covered by OS-dependent objects like the taskbar, menu bar, etc.
BorderSize< int > safeAreaInsets
 Represents the area of this display in logical pixels that is not functional for displaying content.
BorderSize< int > keyboardInsets
 Represents the area of this display in logical pixels that is obscured by an onscreen keyboard.
Point< int > topLeftPhysical
Rectangle< int > physicalBounds
 The full area of this display in physical pixels.
double scale
 The scale factor of this display.
double dpi
 The DPI of the display.
std::optional< double > verticalFrequencyHz
 The vertical refresh rate of the display if applicable.

Constructors and Destructors

◆ Display() [1/3]

JUCE_BEGIN_IGNORE_DEPRECATION_WARNINGS juce::Displays::Display::Display ( )
default

Referenced by Display(), Display(), operator=(), and operator=().

◆ Display() [2/3]

juce::Displays::Display::Display ( Display && )
defaultnoexcept

References Display().

◆ Display() [3/3]

juce::Displays::Display::Display ( const Display & )
default

References Display().

Member Functions

◆ operator=() [1/2]

Display & juce::Displays::Display::operator= ( Display && )
defaultnoexcept

References Display().

◆ operator=() [2/2]

Display & juce::Displays::Display::operator= ( const Display & )
default

Member Data Documentation

◆ isMain

JUCE_END_IGNORE_DEPRECATION_WARNINGS bool juce::Displays::Display::isMain

This will be true if this is the user's main display device.

◆ totalArea

Rectangle<int> juce::Displays::Display::totalArea

◆ logicalBounds

Rectangle<float> juce::Displays::Display::logicalBounds

The total area of this display in logical pixels including any OS-dependent objects like the taskbar, menu bar, etc.

On mobile (Android, iOS) this is the full area of the display.

◆ userArea

Rectangle<int> juce::Displays::Display::userArea

◆ userBounds

Rectangle<float> juce::Displays::Display::userBounds

The total area of this display in logical pixels which isn't covered by OS-dependent objects like the taskbar, menu bar, etc.

On mobile (iOS, Android), the system UI will be made transparent whenever possible, and the JUCE app may draw behind these bars. Therefore, on these platforms, the userBounds is not restricted by the system UI. Instead, potentially-obscured areas of the display can be found by querying the safeAreaInsets and keyboardInsets.

Mobile platforms that support multiple windows (e.g. Android in split screen) will return the screen area currently available to the application here. The resulting area may be significantly smaller than the total screen area, but may overlap the system decorations.

Referenced by juce::StandaloneFilterWindow::StandaloneFilterWindow().

◆ safeAreaInsets

BorderSize<int> juce::Displays::Display::safeAreaInsets

Represents the area of this display in logical pixels that is not functional for displaying content.

These insets are applied relative to the userArea.

On mobile devices this may be the area covered by display cutouts and notches, where you still want to draw a background but should not position important content.

Note that these insets may change depending on the current state of the system. As a simple example, entering/leaving kiosk mode may cause the system UI visibility to change, which may affect the safe areas. A more complex example would be split-screen state on Android, where an activity occupying the top portion of the screen is likely to have insets for the status bar but not the navigation bar, whereas an activity on the bottom may have navigation insets but not status insets.

The insets may also change as a result of rotating the screen, as this will rotate any physical screen cutouts, and could also cause system UI elements to be repositioned.

◆ keyboardInsets

BorderSize<int> juce::Displays::Display::keyboardInsets

Represents the area of this display in logical pixels that is obscured by an onscreen keyboard.

This is currently only supported on iOS, and on Android 11+.

This will only return the bounds of the keyboard when it is in 'docked' mode. If the keyboard is floating (e.g. on an iPad using the split keyboard mode), no insets will be reported.

◆ topLeftPhysical

Point<int> juce::Displays::Display::topLeftPhysical

◆ physicalBounds

Rectangle<int> juce::Displays::Display::physicalBounds

The full area of this display in physical pixels.

◆ scale

double juce::Displays::Display::scale

The scale factor of this display.

For higher-resolution displays, or displays with a user-defined scale factor set, this may be a value other than 1.0.

This value is used to convert between physical and logical pixels. For example, a Component with size 10x10 will use 20x20 physical pixels on a display with a scale factor of 2.0.

◆ dpi

double juce::Displays::Display::dpi

The DPI of the display.

This is the number of physical pixels per inch. To get the number of logical pixels per inch, divide this by the Display::scale value.

◆ verticalFrequencyHz

std::optional<double> juce::Displays::Display::verticalFrequencyHz

The vertical refresh rate of the display if applicable.

Currently this is only used on Linux for display rate repainting.

linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram