Blender  V3.3
Public Member Functions | List of all members
GHOST_SystemSDL Class Reference

#include <GHOST_SystemSDL.h>

Inheritance diagram for GHOST_SystemSDL:
GHOST_System GHOST_ISystem

Public Member Functions

void addDirtyWindow (GHOST_WindowSDL *bad_wind)
 
 GHOST_SystemSDL ()
 
 ~GHOST_SystemSDL ()
 
bool processEvents (bool waitForEvent)
 
int setConsoleWindowState (GHOST_TConsoleWindowState)
 
GHOST_TSuccess getModifierKeys (GHOST_ModifierKeys &keys) const
 
GHOST_TSuccess getButtons (GHOST_Buttons &buttons) const
 
char * getClipboard (bool selection) const
 
void putClipboard (const char *buffer, bool selection) const
 
uint64_t getMilliSeconds ()
 
uint8_t getNumDisplays () const
 
GHOST_TSuccess getCursorPosition (int32_t &x, int32_t &y) const
 
GHOST_TSuccess setCursorPosition (int32_t x, int32_t y)
 
void getAllDisplayDimensions (uint32_t &width, uint32_t &height) const
 
void getMainDisplayDimensions (uint32_t &width, uint32_t &height) const
 
GHOST_IContextcreateOffscreenContext (GHOST_GLSettings glSettings)
 
GHOST_TSuccess disposeContext (GHOST_IContext *context)
 
- Public Member Functions inherited from GHOST_System
virtual uint64_t getMilliSeconds () const
 
GHOST_ITimerTaskinstallTimer (uint64_t delay, uint64_t interval, GHOST_TimerProcPtr timerProc, GHOST_TUserDataPtr userData=NULL)
 
GHOST_TSuccess removeTimer (GHOST_ITimerTask *timerTask)
 
GHOST_TSuccess disposeWindow (GHOST_IWindow *window)
 
bool validWindow (GHOST_IWindow *window)
 
GHOST_TSuccess beginFullScreen (const GHOST_DisplaySetting &setting, GHOST_IWindow **window, const bool stereoVisual, const bool alphaBackground)
 
GHOST_TSuccess updateFullScreen (const GHOST_DisplaySetting &setting, GHOST_IWindow **window)
 
GHOST_TSuccess endFullScreen (void)
 
bool getFullScreen (void)
 
bool useNativePixel (void)
 
bool supportsCursorWarp (void)
 
bool supportsWindowPosition (void)
 
void useWindowFocus (const bool use_focus)
 
GHOST_IWindowgetWindowUnderCursor (int32_t x, int32_t y)
 
void dispatchEvents ()
 
GHOST_TSuccess addEventConsumer (GHOST_IEventConsumer *consumer)
 
GHOST_TSuccess removeEventConsumer (GHOST_IEventConsumer *consumer)
 
GHOST_TSuccess getCursorPositionClientRelative (const GHOST_IWindow *window, int32_t &x, int32_t &y) const
 
GHOST_TSuccess setCursorPositionClientRelative (GHOST_IWindow *window, int32_t x, int32_t y)
 
GHOST_TSuccess getModifierKeyState (GHOST_TModifierKey mask, bool &isDown) const
 
GHOST_TSuccess getButtonState (GHOST_TButton mask, bool &isDown) const
 
void setMultitouchGestures (const bool use)
 
virtual void setTabletAPI (GHOST_TTabletAPI api)
 
GHOST_TTabletAPI getTabletAPI (void)
 
GHOST_TSuccess pushEvent (GHOST_IEvent *event)
 
GHOST_TimerManagergetTimerManager () const
 
GHOST_EventManagergetEventManager () const
 
GHOST_WindowManagergetWindowManager () const
 
virtual GHOST_TSuccess showMessageBox (const char *, const char *, const char *, const char *, const char *, GHOST_DialogOptions) const
 
virtual void initDebug (GHOST_Debug debug)
 
virtual bool isDebugEnabled ()
 

Additional Inherited Members

- Static Public Member Functions inherited from GHOST_ISystem
static GHOST_TSuccess createSystem ()
 
static GHOST_TSuccess disposeSystem ()
 
static GHOST_ISystemgetSystem ()
 
static GHOST_TBacktraceFn getBacktraceFn ()
 
static void setBacktraceFn (GHOST_TBacktraceFn backtrace_fn)
 
- Public Attributes inherited from GHOST_System
bool m_nativePixel
 
bool m_windowFocus
 
- Protected Member Functions inherited from GHOST_System
 GHOST_System ()
 
virtual ~GHOST_System ()
 
virtual GHOST_TSuccess exit ()
 
GHOST_TSuccess createFullScreenWindow (GHOST_Window **window, const GHOST_DisplaySetting &settings, const bool stereoVisual, const bool alphaBackground=0)
 
- Protected Member Functions inherited from GHOST_ISystem
 GHOST_ISystem ()
 
virtual ~GHOST_ISystem ()
 
- Protected Attributes inherited from GHOST_System
GHOST_DisplayManagerm_displayManager
 
GHOST_TimerManagerm_timerManager
 
GHOST_WindowManagerm_windowManager
 
GHOST_EventManagerm_eventManager
 
GHOST_DisplaySetting m_preFullScreenSetting
 
bool m_multitouchGestures
 
GHOST_TTabletAPI m_tabletAPI
 
bool m_is_debug_enabled
 
- Static Protected Attributes inherited from GHOST_ISystem
static GHOST_ISystemm_system = nullptr
 
static GHOST_TBacktraceFn m_backtrace_fn = nullptr
 

Detailed Description

Definition at line 27 of file GHOST_SystemSDL.h.

Constructor & Destructor Documentation

◆ GHOST_SystemSDL()

GHOST_SystemSDL::GHOST_SystemSDL ( )

Definition at line 20 of file GHOST_SystemSDL.cpp.

◆ ~GHOST_SystemSDL()

GHOST_SystemSDL::~GHOST_SystemSDL ( )

Definition at line 33 of file GHOST_SystemSDL.cpp.

Member Function Documentation

◆ addDirtyWindow()

void GHOST_SystemSDL::addDirtyWindow ( GHOST_WindowSDL bad_wind)

Definition at line 736 of file GHOST_SystemSDL.cpp.

References GHOST_ASSERT.

Referenced by GHOST_WindowSDL::invalidate().

◆ createOffscreenContext()

GHOST_IContext * GHOST_SystemSDL::createOffscreenContext ( GHOST_GLSettings  glSettings)
virtual

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

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

Implements GHOST_System.

Definition at line 128 of file GHOST_SystemSDL.cpp.

References blender::compositor::context, GHOST_OPENGL_SDL_CONTEXT_FLAGS, and GHOST_OPENGL_SDL_RESET_NOTIFICATION_STRATEGY.

◆ disposeContext()

GHOST_TSuccess GHOST_SystemSDL::disposeContext ( GHOST_IContext context)
virtual

Dispose of a context.

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

Implements GHOST_ISystem.

Definition at line 146 of file GHOST_SystemSDL.cpp.

References blender::compositor::context, and GHOST_kSuccess.

◆ getAllDisplayDimensions()

void GHOST_SystemSDL::getAllDisplayDimensions ( uint32_t width,
uint32_t height 
) const
virtual

Returns the dimensions of the main display on this system.

Returns
The dimension of the main display.

Implements GHOST_ISystem.

Definition at line 107 of file GHOST_SystemSDL.cpp.

References height, and width.

◆ getButtons()

GHOST_TSuccess GHOST_SystemSDL::getButtons ( GHOST_Buttons buttons) const
virtual

Returns the state of the mouse buttons (outside the message queue).

Parameters
buttonsThe state of the buttons.
Returns
Indication of success.

Implements GHOST_System.

Definition at line 743 of file GHOST_SystemSDL.cpp.

References GHOST_kButtonMaskLeft, GHOST_kButtonMaskMiddle, GHOST_kButtonMaskRight, GHOST_kSuccess, GHOST_Buttons::set(), and state.

◆ getClipboard()

char * GHOST_SystemSDL::getClipboard ( bool  selection) const
virtual

Returns the selection buffer

Parameters
selectionOnly used on X11.
Returns
Returns the clipboard data

Implements GHOST_System.

Definition at line 753 of file GHOST_SystemSDL.cpp.

◆ getCursorPosition()

GHOST_TSuccess GHOST_SystemSDL::getCursorPosition ( int32_t x,
int32_t y 
) const
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.

Implements GHOST_ISystem.

Definition at line 621 of file GHOST_SystemSDL.cpp.

References GHOST_kSuccess, x, and y.

◆ getMainDisplayDimensions()

void GHOST_SystemSDL::getMainDisplayDimensions ( uint32_t width,
uint32_t height 
) const
virtual

Returns the dimensions of the main display on this system.

Returns
The dimension of the main display.

Implements GHOST_ISystem.

Definition at line 115 of file GHOST_SystemSDL.cpp.

References height, and width.

◆ getMilliSeconds()

uint64_t GHOST_SystemSDL::getMilliSeconds ( )

Definition at line 763 of file GHOST_SystemSDL.cpp.

Referenced by processEvents().

◆ getModifierKeys()

GHOST_TSuccess GHOST_SystemSDL::getModifierKeys ( GHOST_ModifierKeys keys) const
virtual

Returns the state of all modifier keys.

Parameters
keysThe state of all modifier keys (true == pressed).
Returns
Indication of success.

Implements GHOST_System.

Definition at line 153 of file GHOST_SystemSDL.cpp.

References GHOST_kModifierKeyLeftAlt, GHOST_kModifierKeyLeftControl, GHOST_kModifierKeyLeftShift, GHOST_kModifierKeyOS, GHOST_kModifierKeyRightAlt, GHOST_kModifierKeyRightControl, GHOST_kModifierKeyRightShift, GHOST_kSuccess, mod(), and GHOST_ModifierKeys::set().

◆ getNumDisplays()

uint8_t GHOST_SystemSDL::getNumDisplays ( ) const
virtual

Returns the number of displays on this system.

Returns
The number of displays.

Implements GHOST_ISystem.

Definition at line 123 of file GHOST_SystemSDL.cpp.

◆ processEvents()

bool GHOST_SystemSDL::processEvents ( bool  waitForEvent)
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.

Implements GHOST_ISystem.

Definition at line 667 of file GHOST_SystemSDL.cpp.

References GHOST_TimerManager::fireTimers(), getMilliSeconds(), GHOST_System::getTimerManager(), GHOST_kFireTimeNever, next, and GHOST_TimerManager::nextFireTime().

◆ putClipboard()

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

Put data to the Clipboard

Parameters
bufferThe buffer to copy to the clipboard.
selectionThe clipboard to copy too only used on X11.

Implements GHOST_System.

Definition at line 758 of file GHOST_SystemSDL.cpp.

References buffer.

◆ setConsoleWindowState()

int GHOST_SystemSDL::setConsoleWindowState ( GHOST_TConsoleWindowState  action)
inlinevirtual

Set the Console State

Parameters
actionconsole state
Returns
current status (1 -visible, 0 - hidden)

Implements GHOST_ISystem.

Definition at line 36 of file GHOST_SystemSDL.h.

◆ setCursorPosition()

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

Implements GHOST_ISystem.

Definition at line 635 of file GHOST_SystemSDL.cpp.

References GHOST_kSuccess, x, and y.


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