Blender
V3.3
|
#include <GHOST_DisplayManager.h>
Public Types | |
enum | { kMainDisplay = 0 } |
Public Member Functions | |
GHOST_DisplayManager (void) | |
virtual | ~GHOST_DisplayManager (void) |
virtual GHOST_TSuccess | initialize (void) |
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_DisplaySetting > | GHOST_DisplaySettings |
Protected Member Functions | |
GHOST_TSuccess | findMatch (uint8_t display, const GHOST_DisplaySetting &setting, GHOST_DisplaySetting &match) const |
GHOST_TSuccess | initializeSettings (void) |
Protected Attributes | |
bool | m_settingsInitialized |
std::vector< GHOST_DisplaySettings > | m_settings |
Manages system displays (platform independent implementation).
Definition at line 18 of file GHOST_DisplayManager.h.
|
protected |
Definition at line 84 of file GHOST_DisplayManager.h.
anonymous enum |
Enumerator | |
---|---|
kMainDisplay |
Definition at line 20 of file GHOST_DisplayManager.h.
GHOST_DisplayManager::GHOST_DisplayManager | ( | void | ) |
Constructor.
Copyright (C) 2001 NaN Technologies B.V.
Definition at line 15 of file GHOST_DisplayManager.cpp.
|
virtual |
Destructor.
Definition at line 19 of file GHOST_DisplayManager.cpp.
|
protected |
Finds the best display settings match.
display | The index of the display device. |
setting | The setting to match. |
match | The optimal display setting. |
Definition at line 95 of file GHOST_DisplayManager.cpp.
References GHOST_DisplaySetting::bpp, GHOST_DisplaySetting::frequency, GHOST_ASSERT, GHOST_kSuccess, GHOST_PRINT, m_settings, m_settingsInitialized, size(), GHOST_DisplaySetting::xPixels, and GHOST_DisplaySetting::yPixels.
Referenced by GHOST_DisplayManagerWin32::setCurrentDisplaySetting().
|
virtual |
Returns the current setting for this display device.
display | The index of the display to query with 0 <= display < getNumDisplays(). |
setting | The current setting of the display device with this index. |
Reimplemented in GHOST_DisplayManagerX11, GHOST_DisplayManagerWin32, GHOST_DisplayManagerSDL, GHOST_DisplayManagerNULL, and GHOST_DisplayManagerCocoa.
Definition at line 83 of file GHOST_DisplayManager.cpp.
References GHOST_kFailure.
Referenced by GHOST_System::beginFullScreen().
|
virtual |
Returns the current setting for this display device.
display | The index of the display to query with 0 <= display < getNumDisplays(). |
index | The setting index to be returned. |
setting | The setting of the display device with this index. |
Reimplemented in GHOST_DisplayManagerX11, GHOST_DisplayManagerWin32, GHOST_DisplayManagerSDL, GHOST_DisplayManagerNULL, and GHOST_DisplayManagerCocoa.
Definition at line 62 of file GHOST_DisplayManager.cpp.
References getNumDisplays(), GHOST_ASSERT, GHOST_kFailure, GHOST_kSuccess, m_settings, m_settingsInitialized, and size().
Referenced by initializeSettings().
|
virtual |
Returns the number of display devices on this system.
numDisplays | The number of displays on this system. |
Reimplemented in GHOST_DisplayManagerX11, GHOST_DisplayManagerWin32, GHOST_DisplayManagerSDL, GHOST_DisplayManagerNULL, and GHOST_DisplayManagerCocoa.
Definition at line 36 of file GHOST_DisplayManager.cpp.
References GHOST_kFailure.
Referenced by getDisplaySetting(), GHOST_SystemWin32::getNumDisplays(), getNumDisplaySettings(), and initializeSettings().
|
virtual |
Returns the number of display settings for this display device.
display | The index of the display to query with 0 <= display < getNumDisplays(). |
numSettings | The number of settings of the display device with this index. |
Reimplemented in GHOST_DisplayManagerX11, GHOST_DisplayManagerWin32, GHOST_DisplayManagerSDL, GHOST_DisplayManagerNULL, and GHOST_DisplayManagerCocoa.
Definition at line 42 of file GHOST_DisplayManager.cpp.
References getNumDisplays(), GHOST_ASSERT, GHOST_kFailure, GHOST_kSuccess, m_settings, and m_settingsInitialized.
Referenced by initializeSettings().
|
virtual |
Initializes the list with devices and settings.
Definition at line 23 of file GHOST_DisplayManager.cpp.
References GHOST_kSuccess, initializeSettings(), and m_settingsInitialized.
Referenced by GHOST_SystemCocoa::GHOST_SystemCocoa(), and GHOST_SystemWin32::GHOST_SystemWin32().
|
protected |
Retrieves settings for each display device and stores them.
Definition at line 142 of file GHOST_DisplayManager.cpp.
References getDisplaySetting(), getNumDisplays(), getNumDisplaySettings(), GHOST_kSuccess, and m_settings.
Referenced by initialize().
|
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 (
display | The index of the display to query with 0 <= display < getNumDisplays(). |
setting | The setting of the display device to be matched and activated. |
Reimplemented in GHOST_DisplayManagerX11, GHOST_DisplayManagerWin32, GHOST_DisplayManagerSDL, GHOST_DisplayManagerNULL, and GHOST_DisplayManagerCocoa.
Definition at line 89 of file GHOST_DisplayManager.cpp.
References GHOST_kFailure.
Referenced by GHOST_System::beginFullScreen(), GHOST_System::endFullScreen(), and GHOST_System::updateFullScreen().
|
protected |
The list with display settings for the main display.
Definition at line 106 of file GHOST_DisplayManager.h.
Referenced by findMatch(), getDisplaySetting(), getNumDisplaySettings(), and initializeSettings().
|
protected |
Tells whether the list of display modes has been stored already.
Definition at line 104 of file GHOST_DisplayManager.h.
Referenced by findMatch(), getDisplaySetting(), getNumDisplaySettings(), and initialize().