Blender V4.3
GHOST_ISystem Interface Referenceabstract

#include <GHOST_ISystem.hh>

Inherited by GHOST_System.

Public Member Functions

virtual uint64_t getMilliSeconds () const =0
 
virtual GHOST_ITimerTaskinstallTimer (uint64_t delay, uint64_t interval, GHOST_TimerProcPtr timerProc, GHOST_TUserDataPtr userData=nullptr)=0
 
virtual GHOST_TSuccess removeTimer (GHOST_ITimerTask *timerTask)=0
 
virtual uint8_t getNumDisplays () const =0
 
virtual void getMainDisplayDimensions (uint32_t &width, uint32_t &height) const =0
 
virtual void getAllDisplayDimensions (uint32_t &width, uint32_t &height) const =0
 
virtual GHOST_IWindowcreateWindow (const char *title, int32_t left, int32_t top, uint32_t width, uint32_t height, GHOST_TWindowState state, GHOST_GPUSettings gpuSettings, const bool exclusive=false, const bool is_dialog=false, const GHOST_IWindow *parentWindow=nullptr)=0
 
virtual GHOST_TSuccess disposeWindow (GHOST_IWindow *window)=0
 
virtual GHOST_IContextcreateOffscreenContext (GHOST_GPUSettings gpuSettings)=0
 
virtual GHOST_TSuccess disposeContext (GHOST_IContext *context)=0
 
virtual bool validWindow (GHOST_IWindow *window)=0
 
virtual GHOST_TSuccess beginFullScreen (const GHOST_DisplaySetting &setting, GHOST_IWindow **window, const bool stereoVisual)=0
 
virtual GHOST_TSuccess updateFullScreen (const GHOST_DisplaySetting &setting, GHOST_IWindow **window)=0
 
virtual GHOST_TSuccess endFullScreen ()=0
 
virtual bool getFullScreen ()=0
 
virtual bool useNativePixel ()=0
 
virtual GHOST_TCapabilityFlag getCapabilities () const =0
 
virtual void useWindowFocus (const bool use_focus)=0
 
virtual void setAutoFocus (const bool auto_focus)=0
 
virtual GHOST_IWindowgetWindowUnderCursor (int32_t x, int32_t y)=0
 
virtual bool processEvents (bool waitForEvent)=0
 
virtual void dispatchEvents ()=0
 
virtual GHOST_TSuccess addEventConsumer (GHOST_IEventConsumer *consumer)=0
 
virtual GHOST_TSuccess removeEventConsumer (GHOST_IEventConsumer *consumer)=0
 
virtual GHOST_TSuccess getCursorPositionClientRelative (const GHOST_IWindow *window, int32_t &x, int32_t &y) const =0
 
virtual GHOST_TSuccess setCursorPositionClientRelative (GHOST_IWindow *window, int32_t x, int32_t y)=0
 
virtual GHOST_TSuccess getCursorPosition (int32_t &x, int32_t &y) const =0
 
virtual GHOST_TSuccess setCursorPosition (int32_t x, int32_t y)=0
 
virtual GHOST_TSuccess getModifierKeyState (GHOST_TModifierKey mask, bool &isDown) const =0
 
virtual GHOST_TSuccess getButtonState (GHOST_TButton mask, bool &isDown) const =0
 
virtual void setMultitouchGestures (const bool use)=0
 
virtual void setTabletAPI (GHOST_TTabletAPI api)=0
 
virtual GHOST_TSuccess getPixelAtCursor (float r_color[3]) const =0
 
virtual bool setConsoleWindowState (GHOST_TConsoleWindowState action)=0
 
virtual char * getClipboard (bool selection) const =0
 
virtual void putClipboard (const char *buffer, bool selection) const =0
 
virtual GHOST_TSuccess hasClipboardImage (void) const =0
 
virtual uintgetClipboardImage (int *r_width, int *r_height) const =0
 
virtual GHOST_TSuccess putClipboardImage (uint *rgba, int width, int height) const =0
 
virtual GHOST_TSuccess showMessageBox (const char *, const char *, const char *, const char *, const char *, GHOST_DialogOptions) const =0
 
virtual void initDebug (GHOST_Debug debug)=0
 
virtual bool isDebugEnabled ()=0
 

Static Public Member Functions

static GHOST_TSuccess createSystem (bool verbose, bool background)
 
static GHOST_TSuccess createSystemBackground ()
 
static GHOST_TSuccess disposeSystem ()
 
static GHOST_ISystemgetSystem ()
 
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_ISystemm_system = nullptr
 
static const char * m_system_backend_id = nullptr
 
static GHOST_TBacktraceFn m_backtrace_fn = nullptr
 

Detailed Description

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:

  1. Time(r) management.
  2. Display/window management (windows are only created on the main display).
  3. Event management.
  4. Cursor shape management (no custom cursors for now).
  5. Access to the state of the mouse buttons and the keyboard.
  6. Menus for windows with events generated when they are accessed (this is work in progress).

Definition at line 117 of file GHOST_ISystem.hh.

Constructor & Destructor Documentation

◆ GHOST_ISystem()

GHOST_ISystem::GHOST_ISystem ( )
inlineprotected

Constructor. Protected default constructor to force use of static createSystem member.

Definition at line 158 of file GHOST_ISystem.hh.

◆ ~GHOST_ISystem()

virtual GHOST_ISystem::~GHOST_ISystem ( )
inlineprotectedvirtual

Destructor. Protected default constructor to force use of static dispose member.

Definition at line 164 of file GHOST_ISystem.hh.

Member Function Documentation

◆ addEventConsumer()

virtual GHOST_TSuccess GHOST_ISystem::addEventConsumer ( GHOST_IEventConsumer * consumer)
pure virtual

Adds the given event consumer to our list.

Parameters
consumerThe event consumer to add.
Returns
Indication of success.

Implemented in GHOST_System.

Referenced by GHOST_AddEventConsumer(), and main().

◆ beginFullScreen()

virtual GHOST_TSuccess GHOST_ISystem::beginFullScreen ( const GHOST_DisplaySetting & setting,
GHOST_IWindow ** window,
const bool stereoVisual )
pure virtual

Begins full screen mode.

Parameters
settingThe new setting of the display.
windowWindow displayed in full screen. This window is invalid after full screen has been ended.
Returns
Indication of success.

Implemented in GHOST_System.

Referenced by GHOST_BeginFullScreen(), and Application::processEvent().

◆ createOffscreenContext()

virtual GHOST_IContext * GHOST_ISystem::createOffscreenContext ( GHOST_GPUSettings gpuSettings)
pure virtual

Create a new off-screen context. Never explicitly delete the context, use disposeContext() instead.

Returns
The new context (or 0 if creation failed).

Implemented in GHOST_System, GHOST_SystemCocoa, GHOST_SystemHeadless, GHOST_SystemSDL, GHOST_SystemWayland, GHOST_SystemWin32, and GHOST_SystemX11.

Referenced by GHOST_CreateGPUContext().

◆ createSystem()

GHOST_TSuccess GHOST_ISystem::createSystem ( bool verbose,
bool background )
static

Creates the one and only system.

Parameters
verbosereport back-ends that were attempted no back-end could be loaded.
backgroundloading the system for background rendering (no visible windows).
Returns
An indication of success.

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().

◆ createSystemBackground()

GHOST_TSuccess GHOST_ISystem::createSystemBackground ( )
static

Definition at line 193 of file GHOST_ISystem.cc.

References createSystem(), GHOST_kFailure, GHOST_kSuccess, init(), and m_system.

Referenced by GHOST_CreateSystemBackground().

◆ createWindow()

virtual GHOST_IWindow * GHOST_ISystem::createWindow ( const char * title,
int32_t left,
int32_t top,
uint32_t width,
uint32_t height,
GHOST_TWindowState state,
GHOST_GPUSettings gpuSettings,
const bool exclusive = false,
const bool is_dialog = false,
const GHOST_IWindow * parentWindow = nullptr )
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.

Parameters
titleThe name of the window (displayed in the title bar of the window if the OS supports it).
leftThe coordinate of the left edge of the window.
topThe coordinate of the top edge of the window.
widthThe width the window.
heightThe height the window.
stateThe state of the window when opened.
gpuSettingsMisc GPU settings.
exclusiveUse to show the window on top and ignore others (used full-screen).
is_dialogStay on top of parent window, no icon in taskbar, can't be minimized.
parentWindowParent (embedder) window
Returns
The new window (or 0 if creation failed).

Implemented in GHOST_SystemCocoa, GHOST_SystemHeadless, GHOST_SystemWayland, GHOST_SystemWin32, and GHOST_SystemX11.

Referenced by Application::Application(), GHOST_System::createFullScreenWindow(), and GHOST_CreateWindow().

◆ dispatchEvents()

virtual void GHOST_ISystem::dispatchEvents ( )
pure virtual

Retrieves events from the queue and send them to the event consumers.

Implemented in GHOST_System.

Referenced by GHOST_DispatchEvents(), and main().

◆ disposeContext()

virtual GHOST_TSuccess GHOST_ISystem::disposeContext ( GHOST_IContext * context)
pure virtual

Dispose of a context.

Parameters
contextPointer to the context to be disposed.
Returns
Indication of success.

Implemented in GHOST_SystemCocoa, GHOST_SystemHeadless, GHOST_SystemSDL, GHOST_SystemWayland, GHOST_SystemWin32, and GHOST_SystemX11.

Referenced by GHOST_DisposeGPUContext().

◆ disposeSystem()

GHOST_TSuccess GHOST_ISystem::disposeSystem ( )
static

Disposes the one and only system.

Returns
An indication of success.

Definition at line 217 of file GHOST_ISystem.cc.

References GHOST_kFailure, GHOST_kSuccess, and m_system.

Referenced by GHOST_DisposeSystem(), and main().

◆ disposeWindow()

virtual GHOST_TSuccess GHOST_ISystem::disposeWindow ( GHOST_IWindow * window)
pure virtual

Dispose a window.

Parameters
windowPointer to the window to be disposed.
Returns
Indication of success.

Implemented in GHOST_System.

Referenced by GHOST_DisposeWindow(), Application::processEvent(), and Application::~Application().

◆ endFullScreen()

virtual GHOST_TSuccess GHOST_ISystem::endFullScreen ( )
pure virtual

Ends full screen mode.

Returns
Indication of success.

Implemented in GHOST_System.

Referenced by GHOST_EndFullScreen(), and Application::processEvent().

◆ exit()

virtual GHOST_TSuccess GHOST_ISystem::exit ( )
protectedpure virtual

Shut the system down.

Returns
Indication of success.

Implemented in GHOST_System, and GHOST_SystemWin32.

◆ getAllDisplayDimensions()

virtual void GHOST_ISystem::getAllDisplayDimensions ( uint32_t & width,
uint32_t & height ) const
pure virtual

Returns the combine dimensions of all monitors.

Returns
The dimension of the workspace.

Implemented in GHOST_SystemCocoa, GHOST_SystemHeadless, GHOST_SystemSDL, GHOST_SystemWayland, GHOST_SystemWin32, and GHOST_SystemX11.

Referenced by GHOST_GetAllDisplayDimensions().

◆ getBacktraceFn()

GHOST_TBacktraceFn GHOST_ISystem::getBacktraceFn ( )
static

Definition at line 240 of file GHOST_ISystem.cc.

References m_backtrace_fn.

Referenced by ghost_wayland_log_handler().

◆ getButtonState()

virtual GHOST_TSuccess GHOST_ISystem::getButtonState ( GHOST_TButton mask,
bool & isDown ) const
pure virtual

Returns the state of a mouse button (outside the message queue).

Parameters
maskThe button state to retrieve.
isDownButton state.
Returns
Indication of success.

Implemented in GHOST_System.

Referenced by GHOST_GetButtonState().

◆ getCapabilities()

virtual GHOST_TCapabilityFlag GHOST_ISystem::getCapabilities ( ) const
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().

◆ getClipboard()

virtual char * GHOST_ISystem::getClipboard ( bool selection) const
pure virtual

Returns the selection buffer

Returns
"unsigned char" from X11 XA_CUT_BUFFER0 buffer

Implemented in GHOST_System, GHOST_SystemCocoa, GHOST_SystemHeadless, GHOST_SystemSDL, GHOST_SystemWayland, GHOST_SystemWin32, and GHOST_SystemX11.

Referenced by GHOST_getClipboard().

◆ getClipboardImage()

virtual uint * GHOST_ISystem::getClipboardImage ( int * r_width,
int * r_height ) const
pure virtual

Get image data from the Clipboard

Parameters
r_widththe returned image width in pixels.
r_heightthe returned image height in pixels.
Returns
pointer uint array in RGBA byte order. Caller must free.

Implemented in GHOST_System, GHOST_SystemCocoa, GHOST_SystemWayland, and GHOST_SystemWin32.

Referenced by GHOST_getClipboardImage().

◆ getCursorPosition()

virtual GHOST_TSuccess GHOST_ISystem::getCursorPosition ( int32_t & x,
int32_t & y ) const
pure virtual

Returns the current location of the cursor (location in screen coordinates)

Parameters
xThe x-coordinate of the cursor.
yThe y-coordinate of the cursor.
Returns
Indication of success.

Implemented in GHOST_SystemCocoa, GHOST_SystemHeadless, GHOST_SystemSDL, GHOST_SystemWayland, GHOST_SystemWin32, and GHOST_SystemX11.

Referenced by GHOST_System::getCursorPositionClientRelative().

◆ getCursorPositionClientRelative()

virtual GHOST_TSuccess GHOST_ISystem::getCursorPositionClientRelative ( const GHOST_IWindow * window,
int32_t & x,
int32_t & y ) const
pure virtual

Returns the current location of the cursor (location in window coordinates)

Parameters
xThe x-coordinate of the cursor.
yThe y-coordinate of the cursor.
Returns
Indication of success.

Implemented in GHOST_System, and GHOST_SystemWayland.

Referenced by GHOST_GetCursorPosition().

◆ getFullScreen()

virtual bool GHOST_ISystem::getFullScreen ( )
pure virtual

Returns current full screen mode status.

Returns
The current status.

Implemented in GHOST_System.

Referenced by GHOST_GetFullScreen(), and Application::processEvent().

◆ getMainDisplayDimensions()

virtual void GHOST_ISystem::getMainDisplayDimensions ( uint32_t & width,
uint32_t & height ) const
pure virtual

Returns the dimensions of the main display on this system.

Returns
The dimension of the main display.

Implemented in GHOST_SystemCocoa, GHOST_SystemHeadless, GHOST_SystemSDL, GHOST_SystemWayland, GHOST_SystemWin32, and GHOST_SystemX11.

Referenced by GHOST_GetMainDisplayDimensions().

◆ getMilliSeconds()

virtual uint64_t GHOST_ISystem::getMilliSeconds ( ) const
pure virtual

Returns the system time. Returns the number of milliseconds since the start of the system.

Note
The exact method used is platform dependent however monotonic methods should be used instead of wall-clock time.
Returns
The number of milliseconds.

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().

◆ getModifierKeyState()

virtual GHOST_TSuccess GHOST_ISystem::getModifierKeyState ( GHOST_TModifierKey mask,
bool & isDown ) const
pure virtual

Returns the state of a modifier key (outside the message queue).

Parameters
maskThe modifier key state to retrieve.
isDownThe state of a modifier key (true == pressed).
Returns
Indication of success.

Implemented in GHOST_System.

Referenced by GHOST_GetModifierKeyState(), and Application::processEvent().

◆ getNumDisplays()

virtual uint8_t GHOST_ISystem::getNumDisplays ( ) const
pure virtual

Returns the number of displays on this system.

Returns
The number of displays.

Implemented in GHOST_SystemCocoa, GHOST_SystemHeadless, GHOST_SystemSDL, GHOST_SystemWayland, GHOST_SystemWin32, and GHOST_SystemX11.

Referenced by GHOST_GetNumDisplays().

◆ getPixelAtCursor()

virtual GHOST_TSuccess GHOST_ISystem::getPixelAtCursor ( float r_color[3]) const
pure virtual

Get the color of the pixel at the current mouse cursor location

Parameters
r_colorreturned sRGB float colors
Returns
Success value (true == successful and supported by platform)

Implemented in GHOST_System, GHOST_SystemCocoa, GHOST_SystemWin32, and GHOST_SystemX11.

Referenced by GHOST_GetPixelAtCursor().

◆ getSystem()

◆ getSystemBackend()

const char * GHOST_ISystem::getSystemBackend ( )
static

Return an identifier for the one and only system.

Warning
while it may be tempting this should never be used to check for supported features, in that case, the GHOST API should be extended to query capabilities. This is needed for X11/WAYLAND on Unix, without this - there is no convenient way for users to check if WAYLAND or XWAYLAND are in use since they are dynamically selected at startup. When dynamically switching between X11/WAYLAND is removed, this function can go too.

Definition at line 235 of file GHOST_ISystem.cc.

References m_system_backend_id.

Referenced by GHOST_SystemBackend().

◆ getWindowUnderCursor()

virtual GHOST_IWindow * GHOST_ISystem::getWindowUnderCursor ( int32_t x,
int32_t y )
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.

Parameters
xThe x-coordinate of the cursor.
yThe y-coordinate of the cursor.
Returns
The window under the cursor or nullptr if none.

Implemented in GHOST_System, GHOST_SystemCocoa, GHOST_SystemHeadless, and GHOST_SystemWin32.

Referenced by GHOST_GetWindowUnderCursor().

◆ hasClipboardImage()

virtual GHOST_TSuccess GHOST_ISystem::hasClipboardImage ( void ) const
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().

◆ init()

virtual GHOST_TSuccess GHOST_ISystem::init ( )
protectedpure virtual

Initialize the system.

Returns
Indication of success.

Implemented in GHOST_System, GHOST_SystemCocoa, GHOST_SystemHeadless, GHOST_SystemWayland, GHOST_SystemWin32, and GHOST_SystemX11.

Referenced by createSystem(), and createSystemBackground().

◆ initDebug()

virtual void GHOST_ISystem::initDebug ( GHOST_Debug debug)
pure virtual

Specify whether debug messages are to be shown.

Parameters
debugFlag for systems to debug.

Implemented in GHOST_System, and GHOST_SystemWin32.

Referenced by GHOST_SystemInitDebug().

◆ installTimer()

virtual GHOST_ITimerTask * GHOST_ISystem::installTimer ( uint64_t delay,
uint64_t interval,
GHOST_TimerProcPtr timerProc,
GHOST_TUserDataPtr userData = nullptr )
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.

Parameters
delayThe time to wait for the first call to the timerProc (in milliseconds).
intervalThe interval between calls to the timerProc (in milliseconds).
timerProcThe callback invoked when the interval expires.
userDataPlaceholder for user data.
Returns
A timer task (0 if timer task installation failed).

Implemented in GHOST_System.

Referenced by Application::Application(), GHOST_InstallTimer(), and Application::processEvent().

◆ isDebugEnabled()

virtual bool GHOST_ISystem::isDebugEnabled ( )
pure virtual

Check whether debug messages are to be shown.

Implemented in GHOST_System.

Referenced by GHOST_X11_ApplicationErrorHandler(), and GHOST_X11_ApplicationIOErrorHandler().

◆ processEvents()

virtual bool GHOST_ISystem::processEvents ( bool waitForEvent)
pure virtual

Retrieves events from the system and stores them in the queue.

Parameters
waitForEventFlag to wait for an event (or return immediately).
Returns
Indication of the presence of events.

Implemented in GHOST_SystemCocoa, GHOST_SystemHeadless, GHOST_SystemSDL, GHOST_SystemWayland, GHOST_SystemWin32, and GHOST_SystemX11.

Referenced by GHOST_ProcessEvents(), and main().

◆ putClipboard()

virtual void GHOST_ISystem::putClipboard ( const char * buffer,
bool selection ) const
pure virtual

◆ putClipboardImage()

virtual GHOST_TSuccess GHOST_ISystem::putClipboardImage ( uint * rgba,
int width,
int height ) const
pure virtual

Put image data to the Clipboard

Parameters
rgbauint array in RGBA byte order.
widththe image width in pixels.
heightthe image height in pixels.

Implemented in GHOST_System, GHOST_SystemCocoa, GHOST_SystemWayland, and GHOST_SystemWin32.

Referenced by GHOST_putClipboardImage().

◆ removeEventConsumer()

virtual GHOST_TSuccess GHOST_ISystem::removeEventConsumer ( GHOST_IEventConsumer * consumer)
pure virtual

Removes the given event consumer to our list.

Parameters
consumerThe event consumer to remove.
Returns
Indication of success.

Implemented in GHOST_System.

Referenced by GHOST_RemoveEventConsumer(), and main().

◆ removeTimer()

virtual GHOST_TSuccess GHOST_ISystem::removeTimer ( GHOST_ITimerTask * timerTask)
pure virtual

Removes a timer.

Parameters
timerTaskTimer task to be removed.
Returns
Indication of success.

Implemented in GHOST_System.

Referenced by GHOST_RemoveTimer(), and Application::processEvent().

◆ setAutoFocus()

virtual void GHOST_ISystem::setAutoFocus ( const bool auto_focus)
pure virtual

Focus and raise windows on mouse hover.

Implemented in GHOST_System.

Referenced by GHOST_SetAutoFocus().

◆ setBacktraceFn()

void GHOST_ISystem::setBacktraceFn ( GHOST_TBacktraceFn backtrace_fn)
static

Definition at line 245 of file GHOST_ISystem.cc.

References m_backtrace_fn.

Referenced by GHOST_SetBacktraceHandler().

◆ setConsoleWindowState()

virtual bool GHOST_ISystem::setConsoleWindowState ( GHOST_TConsoleWindowState action)
pure virtual

Set the Console State

Parameters
actionconsole state
Returns
current status (true: visible, 0: hidden)

Implemented in GHOST_SystemCocoa, GHOST_SystemHeadless, GHOST_SystemSDL, GHOST_SystemWayland, GHOST_SystemWin32, and GHOST_SystemX11.

Referenced by GHOST_setConsoleWindowState().

◆ setCursorPosition()

virtual GHOST_TSuccess GHOST_ISystem::setCursorPosition ( int32_t x,
int32_t y )
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).

Parameters
xThe x-coordinate of the cursor.
yThe y-coordinate of the cursor.
Returns
Indication of success.

Implemented in GHOST_SystemCocoa, GHOST_SystemHeadless, GHOST_SystemSDL, GHOST_SystemWayland, GHOST_SystemWin32, and GHOST_SystemX11.

Referenced by Application::processEvent(), and GHOST_System::setCursorPositionClientRelative().

◆ setCursorPositionClientRelative()

virtual GHOST_TSuccess GHOST_ISystem::setCursorPositionClientRelative ( GHOST_IWindow * window,
int32_t x,
int32_t y )
pure virtual

Updates the location of the cursor (location in window coordinates).

Parameters
xThe x-coordinate of the cursor.
yThe y-coordinate of the cursor.
Returns
Indication of success.

Implemented in GHOST_System, and GHOST_SystemWayland.

Referenced by GHOST_SetCursorPosition().

◆ setMultitouchGestures()

virtual void GHOST_ISystem::setMultitouchGestures ( const bool use)
pure virtual

Enable multi-touch gestures if supported.

Parameters
useEnable or disable.

Implemented in GHOST_System, and GHOST_SystemWayland.

Referenced by GHOST_SetMultitouchGestures().

◆ setTabletAPI()

virtual void GHOST_ISystem::setTabletAPI ( GHOST_TTabletAPI api)
pure virtual

Set which tablet API to use. Only affects Windows, other platforms have a single API.

Parameters
apiEnum indicating which API to use.

Implemented in GHOST_System, and GHOST_SystemWin32.

Referenced by GHOST_SetTabletAPI().

◆ showMessageBox()

virtual GHOST_TSuccess GHOST_ISystem::showMessageBox ( const char * ,
const char * ,
const char * ,
const char * ,
const char * ,
GHOST_DialogOptions  ) const
pure virtual

Show a system message box

Parameters
titleThe title of the message box.
messageThe message to display.
help_labelHelp button label.
continue_labelContinue button label.
linkAn optional hyperlink.
dialog_optionsOptions how to display the message.

Implemented in GHOST_System, GHOST_SystemCocoa, GHOST_SystemWin32, and GHOST_SystemX11.

Referenced by GHOST_ShowMessageBox().

◆ updateFullScreen()

virtual GHOST_TSuccess GHOST_ISystem::updateFullScreen ( const GHOST_DisplaySetting & setting,
GHOST_IWindow ** window )
pure virtual

Updates the resolution while in full-screen mode.

Parameters
settingThe new setting of the display.
windowWindow displayed in full screen.
Returns
Indication of success.

Implemented in GHOST_System.

◆ useNativePixel()

virtual bool GHOST_ISystem::useNativePixel ( )
pure virtual

Native pixel size support (MacBook 'retina').

Implemented in GHOST_System.

Referenced by GHOST_UseNativePixels().

◆ useWindowFocus()

virtual void GHOST_ISystem::useWindowFocus ( const bool use_focus)
pure virtual

Focus window after opening, or put them in the background.

Implemented in GHOST_System.

Referenced by GHOST_UseWindowFocus().

◆ validWindow()

virtual bool GHOST_ISystem::validWindow ( GHOST_IWindow * window)
pure virtual

Returns whether a window is valid.

Parameters
windowPointer to the window to be checked.
Returns
Indication of validity.

Implemented in GHOST_System.

Referenced by gearsTimerProc(), GHOST_ValidWindow(), Application::processEvent(), and Application::~Application().

Member Data Documentation

◆ m_backtrace_fn

GHOST_TBacktraceFn GHOST_ISystem::m_backtrace_fn = nullptr
staticprotected

Function to call that sets the back-trace.

Definition at line 561 of file GHOST_ISystem.hh.

Referenced by getBacktraceFn(), and setBacktraceFn().

◆ m_system

GHOST_ISystem * GHOST_ISystem::m_system = nullptr
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().

◆ m_system_backend_id

const char * GHOST_ISystem::m_system_backend_id = nullptr
staticprotected

Definition at line 558 of file GHOST_ISystem.hh.

Referenced by createSystem(), and getSystemBackend().


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