Blender
V3.3
|
#include <GHOST_ISystem.h>
Static Public Member Functions | |
static GHOST_TSuccess | createSystem () |
static GHOST_TSuccess | disposeSystem () |
static GHOST_ISystem * | getSystem () |
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 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 116 of file GHOST_ISystem.h.
|
inlineprotected |
Constructor. Protected default constructor to force use of static createSystem member.
Definition at line 144 of file GHOST_ISystem.h.
|
inlineprotectedvirtual |
Destructor. Protected default constructor to force use of static dispose member.
Definition at line 152 of file GHOST_ISystem.h.
|
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_SystemWayland, GHOST_SystemX11, GHOST_SystemWin32, GHOST_SystemSDL, GHOST_SystemNULL, and GHOST_SystemCocoa.
Referenced by GHOST_CreateOpenGLContext().
|
static |
Creates the one and only system.
Definition at line 36 of file GHOST_ISystem.cpp.
References GHOST_kFailure, GHOST_kSuccess, init(), and m_system.
Referenced by GHOST_CreateSystem(), and main().
|
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. |
type | The type of drawing context installed in this window. |
glSettings | Misc OpenGL 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_SystemX11, GHOST_SystemWin32, GHOST_SystemWayland, and GHOST_SystemNULL.
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_SystemWayland, GHOST_SystemX11, GHOST_SystemWin32, GHOST_SystemSDL, GHOST_SystemNULL, and GHOST_SystemCocoa.
Referenced by GHOST_DisposeOpenGLContext().
|
static |
Disposes the one and only system.
Definition at line 88 of file GHOST_ISystem.cpp.
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_SystemWin32, and GHOST_System.
|
pure virtual |
Returns the combine dimensions of all monitors.
Implemented in GHOST_SystemWayland, GHOST_SystemX11, GHOST_SystemWin32, GHOST_SystemSDL, GHOST_SystemNULL, and GHOST_SystemCocoa.
Referenced by GHOST_GetAllDisplayDimensions().
|
static |
Definition at line 106 of file GHOST_ISystem.cpp.
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 |
Returns the selection buffer
Implemented in GHOST_SystemWayland, GHOST_System, GHOST_SystemX11, GHOST_SystemWin32, GHOST_SystemSDL, GHOST_SystemNULL, and GHOST_SystemCocoa.
Referenced by GHOST_getClipboard().
|
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_SystemWayland, GHOST_SystemX11, GHOST_SystemWin32, GHOST_SystemSDL, GHOST_SystemNULL, and GHOST_SystemCocoa.
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_SystemWayland, and GHOST_System.
Referenced by GHOST_GetCursorPosition().
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_SystemWayland, GHOST_SystemX11, GHOST_SystemWin32, GHOST_SystemSDL, GHOST_SystemNULL, and GHOST_SystemCocoa.
Referenced by GHOST_GetMainDisplayDimensions().
|
pure virtual |
Returns the system time. Returns the number of milliseconds since the start of the system process. Based on ANSI clock() routine.
Implemented in GHOST_SystemX11, GHOST_SystemWin32, GHOST_SystemNULL, GHOST_SystemCocoa, and GHOST_System.
Referenced by GHOST_GetMilliSeconds().
|
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_SystemWayland, GHOST_SystemX11, GHOST_SystemWin32, GHOST_SystemSDL, GHOST_SystemNULL, and GHOST_SystemCocoa.
Referenced by GHOST_GetNumDisplays().
|
static |
Returns a pointer to the one and only system (nil if it hasn't been created).
Definition at line 101 of file GHOST_ISystem.cpp.
References m_system.
Referenced by GHOST_SystemWin32::convertKey(), GHOST_WindowWin32::getPointerInfo(), GHOST_CreateSystem(), GHOST_getClipboard(), GHOST_putClipboard(), GHOST_setConsoleWindowState(), GHOST_SetMultitouchGestures(), GHOST_SupportsCursorWarp(), GHOST_SupportsWindowPosition(), GHOST_UseNativePixels(), GHOST_UseWindowFocus(), GHOST_X11_ApplicationErrorHandler(), GHOST_X11_ApplicationIOErrorHandler(), GHOST_SystemWin32::hardKey(), 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().
|
pure virtual |
Get the Window under the cursor.
x | The x-coordinate of the cursor. |
y | The y-coordinate of the cursor. |
Implemented in GHOST_SystemNULL, GHOST_SystemCocoa, and GHOST_System.
Referenced by GHOST_GetWindowUnderCursor().
|
protectedpure virtual |
Initialize the system.
Implemented in GHOST_SystemX11, GHOST_SystemWin32, GHOST_SystemNULL, GHOST_SystemCocoa, and GHOST_System.
Referenced by createSystem().
|
pure virtual |
Specify whether debug messages are to be shown.
debug | Flag for systems to debug. |
Implemented in GHOST_SystemWin32, and GHOST_System.
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().
Retrieves events from the system and stores them in the queue.
waitForEvent | Flag to wait for an event (or return immediately). |
Implemented in GHOST_SystemWayland, GHOST_SystemX11, GHOST_SystemWin32, GHOST_SystemSDL, GHOST_SystemNULL, and GHOST_SystemCocoa.
Referenced by GHOST_ProcessEvents(), and main().
Put data to the Clipboard
Implemented in GHOST_SystemWayland, GHOST_System, GHOST_SystemX11, GHOST_SystemWin32, GHOST_SystemSDL, GHOST_SystemNULL, and GHOST_SystemCocoa.
Referenced by GHOST_putClipboard().
|
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().
|
static |
Definition at line 111 of file GHOST_ISystem.cpp.
References m_backtrace_fn.
Referenced by GHOST_SetBacktraceHandler().
|
pure virtual |
Set the Console State
action | console state |
Implemented in GHOST_SystemX11, GHOST_SystemSDL, GHOST_SystemWayland, GHOST_SystemWin32, GHOST_SystemNULL, and GHOST_SystemCocoa.
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_SystemWayland, GHOST_SystemX11, GHOST_SystemWin32, GHOST_SystemSDL, GHOST_SystemNULL, and GHOST_SystemCocoa.
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_SystemWayland, and GHOST_System.
Referenced by GHOST_SetCursorPosition().
Enable multitouch gestures if supported.
use | Enable or disable. |
Implemented in GHOST_System.
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_SystemWin32, and GHOST_System.
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_SystemX11, GHOST_SystemWin32, and GHOST_System.
Referenced by GHOST_ShowMessageBox().
|
pure virtual |
Return true when warping the cursor is supported.
Implemented in GHOST_System, and GHOST_SystemWayland.
Referenced by GHOST_SupportsCursorWarp().
|
pure virtual |
Return true getting/setting the window position is supported.
Implemented in GHOST_System, and GHOST_SystemWayland.
Referenced by GHOST_SupportsWindowPosition().
|
pure virtual |
Updates the resolution while in fullscreen mode.
setting | The new setting of the display. |
window | Window displayed in full screen. |
Implemented in GHOST_System.
Native pixel size support (MacBook 'retina').
Implemented in GHOST_System.
Referenced by GHOST_UseNativePixels().
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 519 of file GHOST_ISystem.h.
Referenced by getBacktraceFn(), and setBacktraceFn().
|
staticprotected |
The one and only system
Copyright (C) 2001 NaN Technologies B.V.
Definition at line 516 of file GHOST_ISystem.h.
Referenced by createSystem(), disposeSystem(), and getSystem().