Blender V4.3
GHOST_DisplayManager Class Reference

#include <GHOST_DisplayManager.hh>

Inherited by GHOST_DisplayManagerCocoa, GHOST_DisplayManagerNULL, GHOST_DisplayManagerSDL, GHOST_DisplayManagerWin32, and GHOST_DisplayManagerX11.

Public Types

enum  { kMainDisplay = 0 }
 

Public Member Functions

 GHOST_DisplayManager ()
 
virtual ~GHOST_DisplayManager ()
 
virtual GHOST_TSuccess initialize ()
 
virtual GHOST_TSuccess getNumDisplays (uint8_t &numDisplays) const
 
virtual GHOST_TSuccess getNumDisplaySettings (uint8_t display, int32_t &numSettings) const
 
virtual GHOST_TSuccess getDisplaySetting (uint8_t display, int32_t index, GHOST_DisplaySetting &setting) const
 
virtual GHOST_TSuccess getCurrentDisplaySetting (uint8_t display, GHOST_DisplaySetting &setting) const
 
virtual GHOST_TSuccess setCurrentDisplaySetting (uint8_t display, const GHOST_DisplaySetting &setting)
 

Protected Types

typedef std::vector< GHOST_DisplaySettingGHOST_DisplaySettings
 

Protected Member Functions

GHOST_TSuccess findMatch (uint8_t display, const GHOST_DisplaySetting &setting, GHOST_DisplaySetting &match) const
 
GHOST_TSuccess initializeSettings ()
 

Protected Attributes

bool m_settingsInitialized
 
std::vector< GHOST_DisplaySettingsm_settings
 

Detailed Description

Manages system displays (platform independent implementation).

Definition at line 19 of file GHOST_DisplayManager.hh.

Member Typedef Documentation

◆ GHOST_DisplaySettings

Definition at line 85 of file GHOST_DisplayManager.hh.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
kMainDisplay 

Definition at line 21 of file GHOST_DisplayManager.hh.

Constructor & Destructor Documentation

◆ GHOST_DisplayManager()

GHOST_DisplayManager::GHOST_DisplayManager ( )

Constructor.

Copyright (C) 2001 NaN Technologies B.V.

Definition at line 16 of file GHOST_DisplayManager.cc.

◆ ~GHOST_DisplayManager()

GHOST_DisplayManager::~GHOST_DisplayManager ( )
virtual

Destructor.

Definition at line 18 of file GHOST_DisplayManager.cc.

Member Function Documentation

◆ findMatch()

GHOST_TSuccess GHOST_DisplayManager::findMatch ( uint8_t display,
const GHOST_DisplaySetting & setting,
GHOST_DisplaySetting & match ) const
protected

Finds the best display settings match.

Parameters
displayThe index of the display device.
settingThe setting to match.
matchThe optimal display setting.
Returns
Indication of success.

Definition at line 92 of file GHOST_DisplayManager.cc.

References GHOST_DisplaySetting::bpp, GHOST_DisplaySetting::frequency, GHOST_ASSERT, GHOST_kSuccess, GHOST_PRINT, int, m_settings, m_settingsInitialized, size(), GHOST_DisplaySetting::xPixels, and GHOST_DisplaySetting::yPixels.

Referenced by GHOST_DisplayManagerWin32::setCurrentDisplaySetting().

◆ getCurrentDisplaySetting()

GHOST_TSuccess GHOST_DisplayManager::getCurrentDisplaySetting ( uint8_t display,
GHOST_DisplaySetting & setting ) const
virtual

Returns the current setting for this display device.

Parameters
displayThe index of the display to query with 0 <= display < getNumDisplays().
settingThe current setting of the display device with this index.
Returns
Indication of success.

Reimplemented in GHOST_DisplayManagerCocoa, GHOST_DisplayManagerNULL, GHOST_DisplayManagerSDL, GHOST_DisplayManagerWin32, and GHOST_DisplayManagerX11.

Definition at line 80 of file GHOST_DisplayManager.cc.

References GHOST_kFailure.

Referenced by GHOST_System::beginFullScreen().

◆ getDisplaySetting()

GHOST_TSuccess GHOST_DisplayManager::getDisplaySetting ( uint8_t display,
int32_t index,
GHOST_DisplaySetting & setting ) const
virtual

Returns the current setting for this display device.

Parameters
displayThe index of the display to query with 0 <= display < getNumDisplays().
indexThe setting index to be returned.
settingThe setting of the display device with this index.
Returns
Indication of success.

Reimplemented in GHOST_DisplayManagerCocoa, GHOST_DisplayManagerNULL, GHOST_DisplayManagerSDL, GHOST_DisplayManagerWin32, and GHOST_DisplayManagerX11.

Definition at line 59 of file GHOST_DisplayManager.cc.

References getNumDisplays(), GHOST_ASSERT, GHOST_kFailure, GHOST_kSuccess, m_settings, m_settingsInitialized, and size().

Referenced by initializeSettings().

◆ getNumDisplays()

GHOST_TSuccess GHOST_DisplayManager::getNumDisplays ( uint8_t & numDisplays) const
virtual

Returns the number of display devices on this system.

Parameters
numDisplaysThe number of displays on this system.
Returns
Indication of success.

Reimplemented in GHOST_DisplayManagerCocoa, GHOST_DisplayManagerNULL, GHOST_DisplayManagerSDL, GHOST_DisplayManagerWin32, and GHOST_DisplayManagerX11.

Definition at line 33 of file GHOST_DisplayManager.cc.

References GHOST_kFailure.

Referenced by getDisplaySetting(), GHOST_SystemWin32::getNumDisplays(), getNumDisplaySettings(), and initializeSettings().

◆ getNumDisplaySettings()

GHOST_TSuccess GHOST_DisplayManager::getNumDisplaySettings ( uint8_t display,
int32_t & numSettings ) const
virtual

Returns the number of display settings for this display device.

Parameters
displayThe index of the display to query with 0 <= display < getNumDisplays().
numSettingsThe number of settings of the display device with this index.
Returns
Indication of success.

Reimplemented in GHOST_DisplayManagerCocoa, GHOST_DisplayManagerNULL, GHOST_DisplayManagerSDL, GHOST_DisplayManagerWin32, and GHOST_DisplayManagerX11.

Definition at line 39 of file GHOST_DisplayManager.cc.

References getNumDisplays(), GHOST_ASSERT, GHOST_kFailure, GHOST_kSuccess, m_settings, and m_settingsInitialized.

Referenced by initializeSettings().

◆ initialize()

GHOST_TSuccess GHOST_DisplayManager::initialize ( )
virtual

Initializes the list with devices and settings.

Returns
Indication of success.

Definition at line 20 of file GHOST_DisplayManager.cc.

References GHOST_kSuccess, initializeSettings(), and m_settingsInitialized.

Referenced by GHOST_SystemWin32::GHOST_SystemWin32().

◆ initializeSettings()

GHOST_TSuccess GHOST_DisplayManager::initializeSettings ( )
protected

Retrieves settings for each display device and stores them.

Returns
Indication of success.

Definition at line 143 of file GHOST_DisplayManager.cc.

References getDisplaySetting(), getNumDisplays(), getNumDisplaySettings(), GHOST_kSuccess, and m_settings.

Referenced by initialize().

◆ setCurrentDisplaySetting()

GHOST_TSuccess GHOST_DisplayManager::setCurrentDisplaySetting ( uint8_t display,
const GHOST_DisplaySetting & setting )
virtual

Changes the current setting for this display device. The setting given to this method is matched against the available display settings. The best match is activated (

See also
findMatch()).
Parameters
displayThe index of the display to query with 0 <= display < getNumDisplays().
settingThe setting of the display device to be matched and activated.
Returns
Indication of success.

Reimplemented in GHOST_DisplayManagerCocoa, GHOST_DisplayManagerNULL, GHOST_DisplayManagerSDL, GHOST_DisplayManagerWin32, and GHOST_DisplayManagerX11.

Definition at line 86 of file GHOST_DisplayManager.cc.

References GHOST_kFailure.

Referenced by GHOST_System::beginFullScreen(), GHOST_System::endFullScreen(), and GHOST_System::updateFullScreen().

Member Data Documentation

◆ m_settings

std::vector<GHOST_DisplaySettings> GHOST_DisplayManager::m_settings
protected

The list with display settings for the main display.

Definition at line 107 of file GHOST_DisplayManager.hh.

Referenced by findMatch(), getDisplaySetting(), getNumDisplaySettings(), and initializeSettings().

◆ m_settingsInitialized

bool GHOST_DisplayManager::m_settingsInitialized
protected

Tells whether the list of display modes has been stored already.

Definition at line 105 of file GHOST_DisplayManager.hh.

Referenced by findMatch(), getDisplaySetting(), getNumDisplaySettings(), and initialize().


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