Blender V2.61 - r43446
Public Member Functions | Protected Member Functions

GHOST_WindowSDL Class Reference

#include <GHOST_WindowSDL.h>

Inheritance diagram for GHOST_WindowSDL:
Inheritance graph
[legend]

List of all members.

Public Member Functions

const GHOST_TabletDataGetTabletData ()
 GHOST_WindowSDL (GHOST_SystemSDL *system, const STR_String &title, GHOST_TInt32 left, GHOST_TInt32 top, GHOST_TUns32 width, GHOST_TUns32 height, GHOST_TWindowState state, const GHOST_TEmbedderWindowID parentWindow, GHOST_TDrawingContextType type, const bool stereoVisual, const GHOST_TUns16 numOfAASamples)
 ~GHOST_WindowSDL ()
SDL_Window * getSDLWindow ()
GHOST_TSuccess invalidate (void)
void validate ()
bool getValid () const
void getWindowBounds (GHOST_Rect &bounds) const
void getClientBounds (GHOST_Rect &bounds) const

Protected Member Functions

GHOST_TSuccess installDrawingContext (GHOST_TDrawingContextType type)
GHOST_TSuccess removeDrawingContext ()
GHOST_TSuccess setWindowCursorGrab (GHOST_TGrabCursorMode mode)
GHOST_TSuccess setWindowCursorShape (GHOST_TStandardCursor shape)
GHOST_TSuccess setWindowCustomCursorShape (GHOST_TUns8 bitmap[16][2], GHOST_TUns8 mask[16][2], int hotX, int hotY)
GHOST_TSuccess setWindowCustomCursorShape (GHOST_TUns8 *bitmap, GHOST_TUns8 *mask, int sizex, int sizey, int hotX, int hotY, int fg_color, int bg_color)
GHOST_TSuccess setWindowCursorVisibility (bool visible)
void setTitle (const STR_String &title)
void getTitle (STR_String &title) const
GHOST_TSuccess setClientWidth (GHOST_TUns32 width)
GHOST_TSuccess setClientHeight (GHOST_TUns32 height)
GHOST_TSuccess setClientSize (GHOST_TUns32 width, GHOST_TUns32 height)
void screenToClient (GHOST_TInt32 inX, GHOST_TInt32 inY, GHOST_TInt32 &outX, GHOST_TInt32 &outY) const
void clientToScreen (GHOST_TInt32 inX, GHOST_TInt32 inY, GHOST_TInt32 &outX, GHOST_TInt32 &outY) const
GHOST_TSuccess swapBuffers ()
GHOST_TSuccess activateDrawingContext ()
GHOST_TSuccess setState (GHOST_TWindowState state)
GHOST_TWindowState getState () const
GHOST_TSuccess setOrder (GHOST_TWindowOrder order)

Detailed Description

Definition at line 45 of file GHOST_WindowSDL.h.


Constructor & Destructor Documentation

GHOST_WindowSDL::GHOST_WindowSDL ( GHOST_SystemSDL system,
const STR_String title,
GHOST_TInt32  left,
GHOST_TInt32  top,
GHOST_TUns32  width,
GHOST_TUns32  height,
GHOST_TWindowState  state,
const GHOST_TEmbedderWindowID  parentWindow,
GHOST_TDrawingContextType  type,
const bool  stereoVisual,
const GHOST_TUns16  numOfAASamples 
)

Definition at line 33 of file GHOST_WindowSDL.cpp.

References setTitle().

GHOST_WindowSDL::~GHOST_WindowSDL ( )

Definition at line 75 of file GHOST_WindowSDL.cpp.

References s_firstContext.


Member Function Documentation

GHOST_TSuccess GHOST_WindowSDL::activateDrawingContext ( ) [protected, virtual]

Activates the drawing context of this window.

Returns:
A boolean success indicator.

Implements GHOST_IWindow.

Definition at line 162 of file GHOST_WindowSDL.cpp.

References GHOST_kFailure, GHOST_kSuccess, and NULL.

void GHOST_WindowSDL::clientToScreen ( GHOST_TInt32  inX,
GHOST_TInt32  inY,
GHOST_TInt32 outX,
GHOST_TInt32 outY 
) const [protected, virtual]

Converts a point in screen coordinates to client rectangle coordinates

Parameters:
inXThe x-coordinate in the client rectangle.
inYThe y-coordinate in the client rectangle.
outXThe x-coordinate on the screen.
outYThe y-coordinate on the screen.

Implements GHOST_IWindow.

Definition at line 298 of file GHOST_WindowSDL.cpp.

void GHOST_WindowSDL::getClientBounds ( GHOST_Rect bounds) const [virtual]

Returns the client rectangle dimensions. The left and top members of the rectangle are always zero.

Parameters:
boundsThe bounding rectangle of the client area of the window.

Implements GHOST_IWindow.

Definition at line 249 of file GHOST_WindowSDL.cpp.

References GHOST_Rect::m_b, GHOST_Rect::m_l, GHOST_Rect::m_r, GHOST_Rect::m_t, and simple_enum_gen::w.

Referenced by getWindowBounds().

SDL_Window* GHOST_WindowSDL::getSDLWindow ( ) [inline]

Definition at line 74 of file GHOST_WindowSDL.h.

GHOST_TWindowState GHOST_WindowSDL::getState ( ) const [protected, virtual]

Returns the state of the window (normal, minimized, maximized).

Returns:
The state of the window.

Implements GHOST_IWindow.

Definition at line 216 of file GHOST_WindowSDL.cpp.

References GHOST_kWindowStateFullScreen, GHOST_kWindowStateMaximized, GHOST_kWindowStateMinimized, and GHOST_kWindowStateNormal.

const GHOST_TabletData* GHOST_WindowSDL::GetTabletData ( ) [inline, virtual]

Returns the tablet data (pressure etc).

Returns:
The tablet data (pressure etc).

Implements GHOST_IWindow.

Definition at line 57 of file GHOST_WindowSDL.h.

References NULL.

void GHOST_WindowSDL::getTitle ( STR_String title) const [protected, virtual]

Returns the title displayed in the title bar.

Parameters:
titleThe title displayed in the title bar.

Implements GHOST_IWindow.

Definition at line 235 of file GHOST_WindowSDL.cpp.

bool GHOST_WindowSDL::getValid ( ) const [inline, virtual]

Returns indication as to whether the window is valid.

Returns:
The validity of the window.

Implements GHOST_IWindow.

Definition at line 92 of file GHOST_WindowSDL.h.

References NULL.

void GHOST_WindowSDL::getWindowBounds ( GHOST_Rect bounds) const [virtual]

Returns the window rectangle dimensions. These are screen coordinates.

Parameters:
boundsThe bounding rectangle of the window.

Implements GHOST_IWindow.

Definition at line 242 of file GHOST_WindowSDL.cpp.

References getClientBounds().

GHOST_TSuccess GHOST_WindowSDL::installDrawingContext ( GHOST_TDrawingContextType  type) [protected, virtual]

Tries to install a rendering context in this window.

Parameters:
typeThe type of rendering context installed.
Returns:
Indication as to whether installation has succeeded.

Implements GHOST_Window.

Definition at line 90 of file GHOST_WindowSDL.cpp.

References GHOST_kDrawingContextTypeNone, GHOST_kDrawingContextTypeOpenGL, GHOST_kFailure, GHOST_kSuccess, NULL, and s_firstContext.

GHOST_TSuccess GHOST_WindowSDL::invalidate ( void  ) [virtual]

Invalidates the contents of this window.

Returns:
Indication of success.

Implements GHOST_IWindow.

Definition at line 124 of file GHOST_WindowSDL.cpp.

References GHOST_SystemSDL::addDirtyWindow(), and GHOST_kSuccess.

GHOST_TSuccess GHOST_WindowSDL::removeDrawingContext ( ) [protected, virtual]

Removes the current drawing context.

Returns:
Indication as to whether removal has succeeded.

Implements GHOST_Window.

Definition at line 174 of file GHOST_WindowSDL.cpp.

References GHOST_kFailure, GHOST_kSuccess, and NULL.

void GHOST_WindowSDL::screenToClient ( GHOST_TInt32  inX,
GHOST_TInt32  inY,
GHOST_TInt32 outX,
GHOST_TInt32 outY 
) const [protected, virtual]

Converts a point in screen coordinates to client rectangle coordinates

Parameters:
inXThe x-coordinate on the screen.
inYThe y-coordinate on the screen.
outXThe x-coordinate in the client rectangle.
outYThe y-coordinate in the client rectangle.

Implements GHOST_IWindow.

Definition at line 288 of file GHOST_WindowSDL.cpp.

GHOST_TSuccess GHOST_WindowSDL::setClientHeight ( GHOST_TUns32  height) [protected, virtual]

Resizes client rectangle height.

Parameters:
heightThe new height of the client area of the window.

Implements GHOST_IWindow.

Definition at line 271 of file GHOST_WindowSDL.cpp.

References GHOST_kSuccess, and NULL.

GHOST_TSuccess GHOST_WindowSDL::setClientSize ( GHOST_TUns32  width,
GHOST_TUns32  height 
) [protected, virtual]

Resizes client rectangle.

Parameters:
widthThe new width of the client area of the window.
heightThe new height of the client area of the window.

Implements GHOST_IWindow.

Definition at line 280 of file GHOST_WindowSDL.cpp.

References GHOST_kSuccess.

GHOST_TSuccess GHOST_WindowSDL::setClientWidth ( GHOST_TUns32  width) [protected, virtual]

Resizes client rectangle width.

Parameters:
widthThe new width of the client area of the window.

Implements GHOST_IWindow.

Definition at line 262 of file GHOST_WindowSDL.cpp.

References GHOST_kSuccess, and NULL.

GHOST_TSuccess GHOST_WindowSDL::setOrder ( GHOST_TWindowOrder  order) [inline, protected, virtual]

Sets the order of the window (bottom, top).

Parameters:
orderThe order of the window.
Returns:
Indication of success.

Implements GHOST_IWindow.

Definition at line 161 of file GHOST_WindowSDL.h.

References GHOST_kSuccess.

GHOST_TSuccess GHOST_WindowSDL::setState ( GHOST_TWindowState  state) [protected, virtual]

Sets the state of the window (normal, minimized, maximized).

Parameters:
stateThe state of the window.
Returns:
Indication of success.

Implements GHOST_IWindow.

Definition at line 190 of file GHOST_WindowSDL.cpp.

References GHOST_kSuccess, GHOST_kWindowStateFullScreen, GHOST_kWindowStateMaximized, GHOST_kWindowStateMinimized, and GHOST_kWindowStateNormal.

void GHOST_WindowSDL::setTitle ( const STR_String title) [protected, virtual]

Sets the title displayed in the title bar.

Parameters:
titleThe title to display in the title bar.

Implements GHOST_IWindow.

Definition at line 228 of file GHOST_WindowSDL.cpp.

References STR_String::ReadPtr().

Referenced by GHOST_WindowSDL().

GHOST_TSuccess GHOST_WindowSDL::setWindowCursorGrab ( GHOST_TGrabCursorMode  mode) [protected, virtual]

Sets the cursor grab on the window using native window system calls.

Reimplemented from GHOST_Window.

Definition at line 569 of file GHOST_WindowSDL.cpp.

References GHOST_kSuccess.

GHOST_TSuccess GHOST_WindowSDL::setWindowCursorShape ( GHOST_TStandardCursor  shape) [protected, virtual]

Sets the cursor shape on the window using native window system calls.

Implements GHOST_Window.

Definition at line 576 of file GHOST_WindowSDL.cpp.

References GHOST_kSuccess, NULL, sdl_cursor_init(), and sdl_std_cursor_array.

GHOST_TSuccess GHOST_WindowSDL::setWindowCursorVisibility ( bool  visible) [protected, virtual]

Sets the cursor visibility on the window using native window system calls.

Implements GHOST_Window.

Definition at line 623 of file GHOST_WindowSDL.cpp.

References GHOST_kSuccess.

GHOST_TSuccess GHOST_WindowSDL::setWindowCustomCursorShape ( GHOST_TUns8 bitmap,
GHOST_TUns8 mask,
int  sizex,
int  sizey,
int  hotX,
int  hotY,
int  fg_color,
int  bg_color 
) [protected, virtual]

Implements GHOST_Window.

Definition at line 602 of file GHOST_WindowSDL.cpp.

References GHOST_kSuccess, and sdl_ghost_CreateCursor().

GHOST_TSuccess GHOST_WindowSDL::setWindowCustomCursorShape ( GHOST_TUns8  bitmap[16][2],
GHOST_TUns8  mask[16][2],
int  hotX,
int  hotY 
) [protected, virtual]

Sets the cursor shape on the window using native window system calls.

Implements GHOST_Window.

Definition at line 588 of file GHOST_WindowSDL.cpp.

GHOST_TSuccess GHOST_WindowSDL::swapBuffers ( ) [protected, virtual]

Swaps front and back buffers of a window.

Returns:
A boolean success indicator.

Implements GHOST_IWindow.

Definition at line 149 of file GHOST_WindowSDL.cpp.

References GHOST_Window::getDrawingContextType(), GHOST_kDrawingContextTypeOpenGL, GHOST_kFailure, and GHOST_kSuccess.

void GHOST_WindowSDL::validate ( ) [inline]

called by the X11 system implementation when expose events for the window have been pushed onto the GHOST queue

Definition at line 87 of file GHOST_WindowSDL.h.


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