|
Blender V4.3
|
#include <GHOST_ISystem.hh>
Inherited by GHOST_System.
Static Public Member Functions | |
| static GHOST_TSuccess | createSystem (bool verbose, bool background) |
| static GHOST_TSuccess | createSystemBackground () |
| static GHOST_TSuccess | disposeSystem () |
| static GHOST_ISystem * | getSystem () |
| static const char * | getSystemBackend () |
| static GHOST_TBacktraceFn | getBacktraceFn () |
| static void | setBacktraceFn (GHOST_TBacktraceFn backtrace_fn) |
Protected Member Functions | |
| GHOST_ISystem () | |
| virtual | ~GHOST_ISystem () |
| virtual GHOST_TSuccess | init ()=0 |
| virtual GHOST_TSuccess | exit ()=0 |
Static Protected Attributes | |
| static GHOST_ISystem * | m_system = nullptr |
| static const char * | m_system_backend_id = nullptr |
| static GHOST_TBacktraceFn | m_backtrace_fn = nullptr |
Interface for classes that provide access to the operating system. There should be only one system class in an application. Therefore, the routines to create and dispose the system are static. Provides:
Definition at line 117 of file GHOST_ISystem.hh.
|
inlineprotected |
Constructor. Protected default constructor to force use of static createSystem member.
Definition at line 158 of file GHOST_ISystem.hh.
|
inlineprotectedvirtual |
Destructor. Protected default constructor to force use of static dispose member.
Definition at line 164 of file GHOST_ISystem.hh.
|
pure virtual |
Adds the given event consumer to our list.
| consumer | The event consumer to add. |
Implemented in GHOST_System.
Referenced by GHOST_AddEventConsumer(), and main().
|
pure virtual |
Begins full screen mode.
| setting | The new setting of the display. |
| window | Window displayed in full screen. This window is invalid after full screen has been ended. |
Implemented in GHOST_System.
Referenced by GHOST_BeginFullScreen(), and Application::processEvent().
|
pure virtual |
Create a new off-screen context. Never explicitly delete the context, use disposeContext() instead.
Implemented in GHOST_System, GHOST_SystemCocoa, GHOST_SystemHeadless, GHOST_SystemSDL, GHOST_SystemWayland, GHOST_SystemWin32, and GHOST_SystemX11.
Referenced by GHOST_CreateGPUContext().
|
static |
Creates the one and only system.
| verbose | report back-ends that were attempted no back-end could be loaded. |
| background | loading the system for background rendering (no visible windows). |
The cause of the failure.
Definition at line 39 of file GHOST_ISystem.cc.
References e, GHOST_kFailure, GHOST_kSuccess, init(), m_system, m_system_backend_id, and verbose.
Referenced by createSystemBackground(), GHOST_CreateSystem(), and main().
|
static |
Definition at line 193 of file GHOST_ISystem.cc.
References createSystem(), GHOST_kFailure, GHOST_kSuccess, init(), and m_system.
Referenced by GHOST_CreateSystemBackground().
|
pure virtual |
Create a new window. The new window is added to the list of windows managed. Never explicitly delete the window, use disposeWindow() instead.
| title | The name of the window (displayed in the title bar of the window if the OS supports it). |
| left | The coordinate of the left edge of the window. |
| top | The coordinate of the top edge of the window. |
| width | The width the window. |
| height | The height the window. |
| state | The state of the window when opened. |
| gpuSettings | Misc GPU settings. |
| exclusive | Use to show the window on top and ignore others (used full-screen). |
| is_dialog | Stay on top of parent window, no icon in taskbar, can't be minimized. |
| parentWindow | Parent (embedder) window |
Implemented in GHOST_SystemCocoa, GHOST_SystemHeadless, GHOST_SystemWayland, GHOST_SystemWin32, and GHOST_SystemX11.
Referenced by Application::Application(), GHOST_System::createFullScreenWindow(), and GHOST_CreateWindow().
|
pure virtual |
Retrieves events from the queue and send them to the event consumers.
Implemented in GHOST_System.
Referenced by GHOST_DispatchEvents(), and main().
|
pure virtual |
Dispose of a context.
| context | Pointer to the context to be disposed. |
Implemented in GHOST_SystemCocoa, GHOST_SystemHeadless, GHOST_SystemSDL, GHOST_SystemWayland, GHOST_SystemWin32, and GHOST_SystemX11.
Referenced by GHOST_DisposeGPUContext().
|
static |
Disposes the one and only system.
Definition at line 217 of file GHOST_ISystem.cc.
References GHOST_kFailure, GHOST_kSuccess, and m_system.
Referenced by GHOST_DisposeSystem(), and main().
|
pure virtual |
Dispose a window.
| window | Pointer to the window to be disposed. |
Implemented in GHOST_System.
Referenced by GHOST_DisposeWindow(), Application::processEvent(), and Application::~Application().
|
pure virtual |
Ends full screen mode.
Implemented in GHOST_System.
Referenced by GHOST_EndFullScreen(), and Application::processEvent().
|
protectedpure virtual |
Shut the system down.
Implemented in GHOST_System, and GHOST_SystemWin32.
|
pure virtual |
Returns the combine dimensions of all monitors.
Implemented in GHOST_SystemCocoa, GHOST_SystemHeadless, GHOST_SystemSDL, GHOST_SystemWayland, GHOST_SystemWin32, and GHOST_SystemX11.
Referenced by GHOST_GetAllDisplayDimensions().
|
static |
Definition at line 240 of file GHOST_ISystem.cc.
References m_backtrace_fn.
Referenced by ghost_wayland_log_handler().
|
pure virtual |
Returns the state of a mouse button (outside the message queue).
| mask | The button state to retrieve. |
| isDown | Button state. |
Implemented in GHOST_System.
Referenced by GHOST_GetButtonState().
|
pure virtual |
Return features supported by the system back-end.
The resulting value doesn't change at run-time.
Implemented in GHOST_SystemCocoa, GHOST_SystemHeadless, GHOST_SystemSDL, GHOST_SystemWayland, GHOST_SystemWin32, and GHOST_SystemX11.
Referenced by GHOST_GetCapabilities().
|
pure virtual |
Returns the selection buffer
Implemented in GHOST_System, GHOST_SystemCocoa, GHOST_SystemHeadless, GHOST_SystemSDL, GHOST_SystemWayland, GHOST_SystemWin32, and GHOST_SystemX11.
Referenced by GHOST_getClipboard().
|
pure virtual |
Get image data from the Clipboard
| r_width | the returned image width in pixels. |
| r_height | the returned image height in pixels. |
Implemented in GHOST_System, GHOST_SystemCocoa, GHOST_SystemWayland, and GHOST_SystemWin32.
Referenced by GHOST_getClipboardImage().
|
pure virtual |
Returns the current location of the cursor (location in screen coordinates)
| x | The x-coordinate of the cursor. |
| y | The y-coordinate of the cursor. |
Implemented in GHOST_SystemCocoa, GHOST_SystemHeadless, GHOST_SystemSDL, GHOST_SystemWayland, GHOST_SystemWin32, and GHOST_SystemX11.
Referenced by GHOST_System::getCursorPositionClientRelative().
|
pure virtual |
Returns the current location of the cursor (location in window coordinates)
| x | The x-coordinate of the cursor. |
| y | The y-coordinate of the cursor. |
Implemented in GHOST_System, and GHOST_SystemWayland.
Referenced by GHOST_GetCursorPosition().
|
pure virtual |
Returns current full screen mode status.
Implemented in GHOST_System.
Referenced by GHOST_GetFullScreen(), and Application::processEvent().
|
pure virtual |
Returns the dimensions of the main display on this system.
Implemented in GHOST_SystemCocoa, GHOST_SystemHeadless, GHOST_SystemSDL, GHOST_SystemWayland, GHOST_SystemWin32, and GHOST_SystemX11.
Referenced by GHOST_GetMainDisplayDimensions().
|
pure virtual |
Returns the system time. Returns the number of milliseconds since the start of the system.
Implemented in GHOST_SystemCocoa, GHOST_SystemHeadless, GHOST_SystemSDL, GHOST_SystemWayland, GHOST_SystemWin32, and GHOST_SystemX11.
Referenced by GHOST_System::dispatchEvents(), GHOST_GetMilliSeconds(), GHOST_System::installTimer(), and GHOST_NDOFManagerUnix::processEvents().
|
pure virtual |
Returns the state of a modifier key (outside the message queue).
| mask | The modifier key state to retrieve. |
| isDown | The state of a modifier key (true == pressed). |
Implemented in GHOST_System.
Referenced by GHOST_GetModifierKeyState(), and Application::processEvent().
|
pure virtual |
Returns the number of displays on this system.
Implemented in GHOST_SystemCocoa, GHOST_SystemHeadless, GHOST_SystemSDL, GHOST_SystemWayland, GHOST_SystemWin32, and GHOST_SystemX11.
Referenced by GHOST_GetNumDisplays().
|
pure virtual |
Get the color of the pixel at the current mouse cursor location
| r_color | returned sRGB float colors |
Implemented in GHOST_System, GHOST_SystemCocoa, GHOST_SystemWin32, and GHOST_SystemX11.
Referenced by GHOST_GetPixelAtCursor().
|
static |
Returns a pointer to the one and only system (nil if it hasn't been created).
Definition at line 230 of file GHOST_ISystem.cc.
References m_system.
Referenced by GHOST_SystemWin32::convertKey(), GHOST_WindowWin32::getPointerInfo(), GHOST_CreateSystem(), GHOST_CreateSystemBackground(), GHOST_GetCapabilities(), GHOST_getClipboard(), GHOST_getClipboardImage(), GHOST_GetPixelAtCursor(), GHOST_hasClipboardImage(), GHOST_putClipboard(), GHOST_putClipboardImage(), GHOST_SetAutoFocus(), GHOST_setConsoleWindowState(), GHOST_UseNativePixels(), GHOST_UseWindowFocus(), GHOST_X11_ApplicationErrorHandler(), GHOST_X11_ApplicationIOErrorHandler(), main(), GHOST_SystemWin32::processButtonEvent(), GHOST_SystemWin32::processCursorEvent(), GHOST_SystemWin32::processKeyEvent(), GHOST_SystemWin32::processPointerEvent(), GHOST_SystemWin32::processTrackpad(), GHOST_SystemWin32::processWheelEvent(), GHOST_SystemWin32::processWindowEvent(), GHOST_SystemWin32::processWindowSizeEvent(), GHOST_SystemWin32::processWintabEvent(), GHOST_SystemWin32::pushDragDropEvent(), and GHOST_SystemWin32::s_wndProc().
|
static |
Return an identifier for the one and only system.
Definition at line 235 of file GHOST_ISystem.cc.
References m_system_backend_id.
Referenced by GHOST_SystemBackend().
|
pure virtual |
Get the Window under the cursor. Although coordinates of the mouse are supplied, platform- specific implementations are free to ignore these and query the mouse location themselves, due to them possibly being incorrect under certain conditions, for example when using multiple monitors that vary in scale and/or DPI.
| x | The x-coordinate of the cursor. |
| y | The y-coordinate of the cursor. |
Implemented in GHOST_System, GHOST_SystemCocoa, GHOST_SystemHeadless, and GHOST_SystemWin32.
Referenced by GHOST_GetWindowUnderCursor().
|
pure virtual |
Returns GHOST_kSuccess if the clipboard contains an image.
Implemented in GHOST_System, GHOST_SystemCocoa, GHOST_SystemWayland, and GHOST_SystemWin32.
Referenced by GHOST_hasClipboardImage().
|
protectedpure virtual |
Initialize the system.
Implemented in GHOST_System, GHOST_SystemCocoa, GHOST_SystemHeadless, GHOST_SystemWayland, GHOST_SystemWin32, and GHOST_SystemX11.
Referenced by createSystem(), and createSystemBackground().
|
pure virtual |
Specify whether debug messages are to be shown.
| debug | Flag for systems to debug. |
Implemented in GHOST_System, and GHOST_SystemWin32.
Referenced by GHOST_SystemInitDebug().
|
pure virtual |
Installs a timer. Note that, on most operating systems, messages need to be processed in order for the timer callbacks to be invoked.
| delay | The time to wait for the first call to the timerProc (in milliseconds). |
| interval | The interval between calls to the timerProc (in milliseconds). |
| timerProc | The callback invoked when the interval expires. |
| userData | Placeholder for user data. |
Implemented in GHOST_System.
Referenced by Application::Application(), GHOST_InstallTimer(), and Application::processEvent().
|
pure virtual |
Check whether debug messages are to be shown.
Implemented in GHOST_System.
Referenced by GHOST_X11_ApplicationErrorHandler(), and GHOST_X11_ApplicationIOErrorHandler().
|
pure virtual |
Retrieves events from the system and stores them in the queue.
| waitForEvent | Flag to wait for an event (or return immediately). |
Implemented in GHOST_SystemCocoa, GHOST_SystemHeadless, GHOST_SystemSDL, GHOST_SystemWayland, GHOST_SystemWin32, and GHOST_SystemX11.
Referenced by GHOST_ProcessEvents(), and main().
|
pure virtual |
Put data to the Clipboard
Implemented in GHOST_System, GHOST_SystemCocoa, GHOST_SystemHeadless, GHOST_SystemSDL, GHOST_SystemWayland, GHOST_SystemWin32, and GHOST_SystemX11.
Referenced by GHOST_putClipboard().
|
pure virtual |
Put image data to the Clipboard
| rgba | uint array in RGBA byte order. |
| width | the image width in pixels. |
| height | the image height in pixels. |
Implemented in GHOST_System, GHOST_SystemCocoa, GHOST_SystemWayland, and GHOST_SystemWin32.
Referenced by GHOST_putClipboardImage().
|
pure virtual |
Removes the given event consumer to our list.
| consumer | The event consumer to remove. |
Implemented in GHOST_System.
Referenced by GHOST_RemoveEventConsumer(), and main().
|
pure virtual |
Removes a timer.
| timerTask | Timer task to be removed. |
Implemented in GHOST_System.
Referenced by GHOST_RemoveTimer(), and Application::processEvent().
|
pure virtual |
Focus and raise windows on mouse hover.
Implemented in GHOST_System.
Referenced by GHOST_SetAutoFocus().
|
static |
Definition at line 245 of file GHOST_ISystem.cc.
References m_backtrace_fn.
Referenced by GHOST_SetBacktraceHandler().
|
pure virtual |
Set the Console State
| action | console state |
Implemented in GHOST_SystemCocoa, GHOST_SystemHeadless, GHOST_SystemSDL, GHOST_SystemWayland, GHOST_SystemWin32, and GHOST_SystemX11.
Referenced by GHOST_setConsoleWindowState().
|
pure virtual |
Updates the location of the cursor (location in screen coordinates). Not all operating systems allow the cursor to be moved (without the input device being moved).
| x | The x-coordinate of the cursor. |
| y | The y-coordinate of the cursor. |
Implemented in GHOST_SystemCocoa, GHOST_SystemHeadless, GHOST_SystemSDL, GHOST_SystemWayland, GHOST_SystemWin32, and GHOST_SystemX11.
Referenced by Application::processEvent(), and GHOST_System::setCursorPositionClientRelative().
|
pure virtual |
Updates the location of the cursor (location in window coordinates).
| x | The x-coordinate of the cursor. |
| y | The y-coordinate of the cursor. |
Implemented in GHOST_System, and GHOST_SystemWayland.
Referenced by GHOST_SetCursorPosition().
|
pure virtual |
Enable multi-touch gestures if supported.
| use | Enable or disable. |
Implemented in GHOST_System, and GHOST_SystemWayland.
Referenced by GHOST_SetMultitouchGestures().
|
pure virtual |
Set which tablet API to use. Only affects Windows, other platforms have a single API.
| api | Enum indicating which API to use. |
Implemented in GHOST_System, and GHOST_SystemWin32.
Referenced by GHOST_SetTabletAPI().
|
pure virtual |
Show a system message box
| title | The title of the message box. |
| message | The message to display. |
| help_label | Help button label. |
| continue_label | Continue button label. |
| link | An optional hyperlink. |
| dialog_options | Options how to display the message. |
Implemented in GHOST_System, GHOST_SystemCocoa, GHOST_SystemWin32, and GHOST_SystemX11.
Referenced by GHOST_ShowMessageBox().
|
pure virtual |
Updates the resolution while in full-screen mode.
| setting | The new setting of the display. |
| window | Window displayed in full screen. |
Implemented in GHOST_System.
|
pure virtual |
Native pixel size support (MacBook 'retina').
Implemented in GHOST_System.
Referenced by GHOST_UseNativePixels().
|
pure virtual |
Focus window after opening, or put them in the background.
Implemented in GHOST_System.
Referenced by GHOST_UseWindowFocus().
|
pure virtual |
Returns whether a window is valid.
| window | Pointer to the window to be checked. |
Implemented in GHOST_System.
Referenced by gearsTimerProc(), GHOST_ValidWindow(), Application::processEvent(), and Application::~Application().
|
staticprotected |
Function to call that sets the back-trace.
Definition at line 561 of file GHOST_ISystem.hh.
Referenced by getBacktraceFn(), and setBacktraceFn().
|
staticprotected |
The one and only system
Copyright (C) 2001 NaN Technologies B.V.
Definition at line 557 of file GHOST_ISystem.hh.
Referenced by createSystem(), createSystemBackground(), disposeSystem(), and getSystem().
|
staticprotected |
Definition at line 558 of file GHOST_ISystem.hh.
Referenced by createSystem(), and getSystemBackend().