Blender V2.61 - r43446
Public Member Functions

GHOST_SystemSDL Class Reference

#include <GHOST_SystemSDL.h>

Inheritance diagram for GHOST_SystemSDL:
Inheritance graph
[legend]

List of all members.

Public Member Functions

void addDirtyWindow (GHOST_WindowSDL *bad_wind)
 GHOST_SystemSDL ()
 ~GHOST_SystemSDL ()
bool processEvents (bool waitForEvent)
int toggleConsole (int action)
GHOST_TSuccess getModifierKeys (GHOST_ModifierKeys &keys) const
GHOST_TSuccess getButtons (GHOST_Buttons &buttons) const
GHOST_TUns8getClipboard (bool selection) const
void putClipboard (GHOST_TInt8 *buffer, bool selection) const
GHOST_TUns64 getMilliSeconds ()
GHOST_TUns8 getNumDisplays () const
GHOST_TSuccess getCursorPosition (GHOST_TInt32 &x, GHOST_TInt32 &y) const
GHOST_TSuccess setCursorPosition (GHOST_TInt32 x, GHOST_TInt32 y)
void getMainDisplayDimensions (GHOST_TUns32 &width, GHOST_TUns32 &height) const

Detailed Description

Definition at line 50 of file GHOST_SystemSDL.h.


Constructor & Destructor Documentation

GHOST_SystemSDL::GHOST_SystemSDL ( )

Definition at line 38 of file GHOST_SystemSDL.cpp.

GHOST_SystemSDL::~GHOST_SystemSDL ( )

Definition at line 56 of file GHOST_SystemSDL.cpp.


Member Function Documentation

void GHOST_SystemSDL::addDirtyWindow ( GHOST_WindowSDL bad_wind)

Definition at line 582 of file GHOST_SystemSDL.cpp.

References GHOST_ASSERT, and NULL.

Referenced by GHOST_WindowSDL::invalidate().

GHOST_TSuccess GHOST_SystemSDL::getButtons ( GHOST_Buttons buttons) const [virtual]

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

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

Implements GHOST_System.

Definition at line 590 of file GHOST_SystemSDL.cpp.

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

GHOST_TUns8 * 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 601 of file GHOST_SystemSDL.cpp.

GHOST_TSuccess GHOST_SystemSDL::getCursorPosition ( GHOST_TInt32 x,
GHOST_TInt32 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 454 of file GHOST_SystemSDL.cpp.

References GHOST_kSuccess.

void GHOST_SystemSDL::getMainDisplayDimensions ( GHOST_TUns32 width,
GHOST_TUns32 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.

GHOST_TUns64 GHOST_SystemSDL::getMilliSeconds ( )

Definition at line 613 of file GHOST_SystemSDL.cpp.

Referenced by processEvents().

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

GHOST_TUns8 GHOST_SystemSDL::getNumDisplays ( ) const [virtual]

Returns the number of displays on this system.

Returns:
The number of displays.

Implements GHOST_ISystem.

Definition at line 117 of file GHOST_SystemSDL.cpp.

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 511 of file GHOST_SystemSDL.cpp.

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

void GHOST_SystemSDL::putClipboard ( GHOST_TInt8 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 607 of file GHOST_SystemSDL.cpp.

GHOST_TSuccess GHOST_SystemSDL::setCursorPosition ( GHOST_TInt32  x,
GHOST_TInt32  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 470 of file GHOST_SystemSDL.cpp.

References GHOST_kSuccess.

int GHOST_SystemSDL::toggleConsole ( int  action) [inline, virtual]

Toggles console 0 - Hides 1 - Shows 2 - Toggles 3 - Hides if it runs not from command line

  • Does nothing
    Returns:
    current status (1 -visible, 0 - hidden)

Implements GHOST_ISystem.

Definition at line 62 of file GHOST_SystemSDL.h.


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