Blender V2.61 - r43446
Typedefs | Functions

GHOST_C-api.h File Reference

GHOST C-API function and type declarations. More...

#include "GHOST_Types.h"

Go to the source code of this file.

Typedefs

typedef int(* GHOST_EventCallbackProcPtr )(GHOST_EventHandle event, GHOST_TUserDataPtr userdata)

Functions

 GHOST_DECLARE_HANDLE (GHOST_SystemHandle)
 GHOST_DECLARE_HANDLE (GHOST_TimerTaskHandle)
 GHOST_DECLARE_HANDLE (GHOST_WindowHandle)
 GHOST_DECLARE_HANDLE (GHOST_EventHandle)
 GHOST_DECLARE_HANDLE (GHOST_RectangleHandle)
 GHOST_DECLARE_HANDLE (GHOST_EventConsumerHandle)
GHOST_SystemHandle GHOST_CreateSystem (void)
GHOST_TSuccess GHOST_DisposeSystem (GHOST_SystemHandle systemhandle)
GHOST_EventConsumerHandle GHOST_CreateEventConsumer (GHOST_EventCallbackProcPtr eventCallback, GHOST_TUserDataPtr userdata)
GHOST_TSuccess GHOST_DisposeEventConsumer (GHOST_EventConsumerHandle consumerhandle)
GHOST_TUns64 GHOST_GetMilliSeconds (GHOST_SystemHandle systemhandle)
GHOST_TimerTaskHandle GHOST_InstallTimer (GHOST_SystemHandle systemhandle, GHOST_TUns64 delay, GHOST_TUns64 interval, GHOST_TimerProcPtr timerProc, GHOST_TUserDataPtr userData)
GHOST_TSuccess GHOST_RemoveTimer (GHOST_SystemHandle systemhandle, GHOST_TimerTaskHandle timertaskhandle)
GHOST_TUns8 GHOST_GetNumDisplays (GHOST_SystemHandle systemhandle)
void GHOST_GetMainDisplayDimensions (GHOST_SystemHandle systemhandle, GHOST_TUns32 *width, GHOST_TUns32 *height)
GHOST_WindowHandle GHOST_CreateWindow (GHOST_SystemHandle systemhandle, const char *title, GHOST_TInt32 left, GHOST_TInt32 top, GHOST_TUns32 width, GHOST_TUns32 height, GHOST_TWindowState state, GHOST_TDrawingContextType type, const int stereoVisual, const GHOST_TUns16 numOfAASamples)
GHOST_TUserDataPtr GHOST_GetWindowUserData (GHOST_WindowHandle windowhandle)
void GHOST_SetWindowUserData (GHOST_WindowHandle windowhandle, GHOST_TUserDataPtr userdata)
GHOST_TSuccess GHOST_DisposeWindow (GHOST_SystemHandle systemhandle, GHOST_WindowHandle windowhandle)
int GHOST_ValidWindow (GHOST_SystemHandle systemhandle, GHOST_WindowHandle windowhandle)
GHOST_WindowHandle GHOST_BeginFullScreen (GHOST_SystemHandle systemhandle, GHOST_DisplaySetting *setting, const int stereoVisual)
GHOST_TSuccess GHOST_EndFullScreen (GHOST_SystemHandle systemhandle)
int GHOST_GetFullScreen (GHOST_SystemHandle systemhandle)
int GHOST_ProcessEvents (GHOST_SystemHandle systemhandle, int waitForEvent)
int GHOST_DispatchEvents (GHOST_SystemHandle systemhandle)
GHOST_TSuccess GHOST_AddEventConsumer (GHOST_SystemHandle systemhandle, GHOST_EventConsumerHandle consumerhandle)
GHOST_TSuccess GHOST_RemoveEventConsumer (GHOST_SystemHandle systemhandle, GHOST_EventConsumerHandle consumerhandle)
GHOST_TSuccess GHOST_SetProgressBar (GHOST_WindowHandle windowhandle, float progress)
GHOST_TSuccess GHOST_EndProgressBar (GHOST_WindowHandle windowhandle)
GHOST_TStandardCursor GHOST_GetCursorShape (GHOST_WindowHandle windowhandle)
GHOST_TSuccess GHOST_SetCursorShape (GHOST_WindowHandle windowhandle, GHOST_TStandardCursor cursorshape)
GHOST_TSuccess GHOST_SetCustomCursorShape (GHOST_WindowHandle windowhandle, GHOST_TUns8 bitmap[16][2], GHOST_TUns8 mask[16][2], int hotX, int hotY)
GHOST_TSuccess GHOST_SetCustomCursorShapeEx (GHOST_WindowHandle windowhandle, GHOST_TUns8 *bitmap, GHOST_TUns8 *mask, int sizex, int sizey, int hotX, int hotY, int fg_color, int bg_color)
int GHOST_GetCursorVisibility (GHOST_WindowHandle windowhandle)
GHOST_TSuccess GHOST_SetCursorVisibility (GHOST_WindowHandle windowhandle, int visible)
GHOST_TSuccess GHOST_GetCursorPosition (GHOST_SystemHandle systemhandle, GHOST_TInt32 *x, GHOST_TInt32 *y)
GHOST_TSuccess GHOST_SetCursorPosition (GHOST_SystemHandle systemhandle, GHOST_TInt32 x, GHOST_TInt32 y)
GHOST_TSuccess GHOST_SetCursorGrab (GHOST_WindowHandle windowhandle, GHOST_TGrabCursorMode mode, int *bounds)
GHOST_TSuccess GHOST_GetModifierKeyState (GHOST_SystemHandle systemhandle, GHOST_TModifierKeyMask mask, int *isDown)
GHOST_TSuccess GHOST_GetButtonState (GHOST_SystemHandle systemhandle, GHOST_TButtonMask mask, int *isDown)
void GHOST_setAcceptDragOperation (GHOST_WindowHandle windowhandle, GHOST_TInt8 canAccept)
GHOST_TEventType GHOST_GetEventType (GHOST_EventHandle eventhandle)
GHOST_TUns64 GHOST_GetEventTime (GHOST_EventHandle eventhandle)
GHOST_WindowHandle GHOST_GetEventWindow (GHOST_EventHandle eventhandle)
GHOST_TEventDataPtr GHOST_GetEventData (GHOST_EventHandle eventhandle)
GHOST_TimerProcPtr GHOST_GetTimerProc (GHOST_TimerTaskHandle timertaskhandle)
void GHOST_SetTimerProc (GHOST_TimerTaskHandle timertaskhandle, GHOST_TimerProcPtr timerProc)
GHOST_TUserDataPtr GHOST_GetTimerTaskUserData (GHOST_TimerTaskHandle timertaskhandle)
void GHOST_SetTimerTaskUserData (GHOST_TimerTaskHandle timertaskhandle, GHOST_TUserDataPtr userData)
int GHOST_GetValid (GHOST_WindowHandle windowhandle)
GHOST_TDrawingContextType GHOST_GetDrawingContextType (GHOST_WindowHandle windowhandle)
GHOST_TSuccess GHOST_SetDrawingContextType (GHOST_WindowHandle windowhandle, GHOST_TDrawingContextType type)
void GHOST_SetTitle (GHOST_WindowHandle windowhandle, const char *title)
char * GHOST_GetTitle (GHOST_WindowHandle windowhandle)
GHOST_RectangleHandle GHOST_GetWindowBounds (GHOST_WindowHandle windowhandle)
GHOST_RectangleHandle GHOST_GetClientBounds (GHOST_WindowHandle windowhandle)
void GHOST_DisposeRectangle (GHOST_RectangleHandle rectanglehandle)
GHOST_TSuccess GHOST_SetClientWidth (GHOST_WindowHandle windowhandle, GHOST_TUns32 width)
GHOST_TSuccess GHOST_SetClientHeight (GHOST_WindowHandle windowhandle, GHOST_TUns32 height)
GHOST_TSuccess GHOST_SetClientSize (GHOST_WindowHandle windowhandle, GHOST_TUns32 width, GHOST_TUns32 height)
void GHOST_ScreenToClient (GHOST_WindowHandle windowhandle, GHOST_TInt32 inX, GHOST_TInt32 inY, GHOST_TInt32 *outX, GHOST_TInt32 *outY)
void GHOST_ClientToScreen (GHOST_WindowHandle windowhandle, GHOST_TInt32 inX, GHOST_TInt32 inY, GHOST_TInt32 *outX, GHOST_TInt32 *outY)
GHOST_TWindowState GHOST_GetWindowState (GHOST_WindowHandle windowhandle)
GHOST_TSuccess GHOST_SetWindowState (GHOST_WindowHandle windowhandle, GHOST_TWindowState state)
GHOST_TSuccess GHOST_SetWindowModifiedState (GHOST_WindowHandle windowhandle, GHOST_TUns8 isUnsavedChanges)
GHOST_TSuccess GHOST_SetWindowOrder (GHOST_WindowHandle windowhandle, GHOST_TWindowOrder order)
GHOST_TSuccess GHOST_SwapWindowBuffers (GHOST_WindowHandle windowhandle)
GHOST_TSuccess GHOST_ActivateWindowDrawingContext (GHOST_WindowHandle windowhandle)
GHOST_TSuccess GHOST_InvalidateWindow (GHOST_WindowHandle windowhandle)
const GHOST_TabletDataGHOST_GetTabletData (GHOST_WindowHandle windowhandle)
GHOST_TInt32 GHOST_GetWidthRectangle (GHOST_RectangleHandle rectanglehandle)
GHOST_TInt32 GHOST_GetHeightRectangle (GHOST_RectangleHandle rectanglehandle)
void GHOST_GetRectangle (GHOST_RectangleHandle rectanglehandle, GHOST_TInt32 *l, GHOST_TInt32 *t, GHOST_TInt32 *r, GHOST_TInt32 *b)
void GHOST_SetRectangle (GHOST_RectangleHandle rectanglehandle, GHOST_TInt32 l, GHOST_TInt32 t, GHOST_TInt32 r, GHOST_TInt32 b)
GHOST_TSuccess GHOST_IsEmptyRectangle (GHOST_RectangleHandle rectanglehandle)
GHOST_TSuccess GHOST_IsValidRectangle (GHOST_RectangleHandle rectanglehandle)
void GHOST_InsetRectangle (GHOST_RectangleHandle rectanglehandle, GHOST_TInt32 i)
void GHOST_UnionRectangle (GHOST_RectangleHandle rectanglehandle, GHOST_RectangleHandle anotherrectanglehandle)
void GHOST_UnionPointRectangle (GHOST_RectangleHandle rectanglehandle, GHOST_TInt32 x, GHOST_TInt32 y)
GHOST_TSuccess GHOST_IsInsideRectangle (GHOST_RectangleHandle rectanglehandle, GHOST_TInt32 x, GHOST_TInt32 y)
GHOST_TVisibility GHOST_GetRectangleVisibility (GHOST_RectangleHandle rectanglehandle, GHOST_RectangleHandle anotherrectanglehandle)
void GHOST_SetCenterRectangle (GHOST_RectangleHandle rectanglehandle, GHOST_TInt32 cx, GHOST_TInt32 cy)
void GHOST_SetRectangleCenter (GHOST_RectangleHandle rectanglehandle, GHOST_TInt32 cx, GHOST_TInt32 cy, GHOST_TInt32 w, GHOST_TInt32 h)
GHOST_TSuccess GHOST_ClipRectangle (GHOST_RectangleHandle rectanglehandle, GHOST_RectangleHandle anotherrectanglehandle)
GHOST_TUns8GHOST_getClipboard (int selection)
void GHOST_putClipboard (GHOST_TInt8 *buffer, int selection)
int GHOST_toggleConsole (int action)

Detailed Description

GHOST C-API function and type declarations.

Definition in file GHOST_C-api.h.


Typedef Documentation

typedef int(* GHOST_EventCallbackProcPtr)(GHOST_EventHandle event, GHOST_TUserDataPtr userdata)

Definition of a callback routine that receives events.

Parameters:
eventThe event received.
userdataThe callback's user data, supplied to GHOST_CreateSystem.

Definition at line 62 of file GHOST_C-api.h.


Function Documentation

GHOST_TSuccess GHOST_ActivateWindowDrawingContext ( GHOST_WindowHandle  windowhandle)

Activates the drawing context of this window.

Parameters:
windowhandleThe handle to the window
Returns:
An intean success indicator.

Definition at line 682 of file GHOST_C-api.cpp.

References GHOST_IWindow::activateDrawingContext().

Referenced by extrawindow_do_draw(), extrawindow_do_reshape(), loggerwindow_do_draw(), loggerwindow_do_reshape(), mainwindow_do_draw(), mainwindow_do_reshape(), setViewPortGL(), and wm_window_make_drawable().

GHOST_TSuccess GHOST_AddEventConsumer ( GHOST_SystemHandle  systemhandle,
GHOST_EventConsumerHandle  consumerhandle 
)

Adds the given event consumer to our list.

Parameters:
systemhandleThe handle to the system
consumerhandleThe event consumer to add.
Returns:
Indication of success.

Definition at line 248 of file GHOST_C-api.cpp.

References GHOST_ISystem::addEventConsumer().

Referenced by main(), multitestapp_new(), and wm_ghost_init().

GHOST_WindowHandle GHOST_BeginFullScreen ( GHOST_SystemHandle  systemhandle,
GHOST_DisplaySetting setting,
const int  stereoVisual 
)

Begins full screen mode.

Parameters:
systemhandleThe handle to the system
settingThe new setting of the display.
Returns:
A handle to the window displayed in full screen. This window is invalid after full screen has been ended.

Definition at line 193 of file GHOST_C-api.cpp.

References GHOST_ISystem::beginFullScreen(), and NULL.

Referenced by processEvent().

void GHOST_ClientToScreen ( GHOST_WindowHandle  windowhandle,
GHOST_TInt32  inX,
GHOST_TInt32  inY,
GHOST_TInt32 outX,
GHOST_TInt32 outY 
)

Converts a point in screen coordinates to client rectangle coordinates

Parameters:
windowhandleThe handle to the window
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.

Definition at line 624 of file GHOST_C-api.cpp.

References GHOST_IWindow::clientToScreen().

Referenced by WM_cursor_warp().

GHOST_TSuccess GHOST_ClipRectangle ( GHOST_RectangleHandle  rectanglehandle,
GHOST_RectangleHandle  anotherrectanglehandle 
)

Clips a rectangle. Updates the rectangle given such that it will fit within this one. This can result in an empty rectangle.

Parameters:
rectanglehandleThe handle to the rectangle
rthe rectangle to clip
Returns:
whether clipping has occurred

Definition at line 840 of file GHOST_C-api.cpp.

References GHOST_kFailure, and GHOST_kSuccess.

GHOST_EventConsumerHandle GHOST_CreateEventConsumer ( GHOST_EventCallbackProcPtr  eventCallback,
GHOST_TUserDataPtr  userdata 
)

Creates an event consumer object

Parameters:
eventCallbackThe event callback routine.
userdataPointer to user data returned to the callback routine.

Definition at line 68 of file GHOST_C-api.cpp.

Referenced by main(), multitestapp_new(), and wm_ghost_init().

GHOST_SystemHandle GHOST_CreateSystem ( void  )

Creates the one and only system.

Returns:
a handle to the system.

Definition at line 50 of file GHOST_C-api.cpp.

References GHOST_ISystem::createSystem(), and GHOST_ISystem::getSystem().

Referenced by main(), multitestapp_new(), and wm_ghost_init().

GHOST_WindowHandle GHOST_CreateWindow ( GHOST_SystemHandle  systemhandle,
const char *  title,
GHOST_TInt32  left,
GHOST_TInt32  top,
GHOST_TUns32  width,
GHOST_TUns32  height,
GHOST_TWindowState  state,
GHOST_TDrawingContextType  type,
const int  stereoVisual,
const GHOST_TUns16  numOfAASamples 
)

Create a new window. The new window is added to the list of windows managed. Never explicitly delete the window, use disposeWindow() instead.

Parameters:
systemhandleThe handle to the system
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.
typeThe type of drawing context installed in this window.
stereoVisualStereo visual for quad buffered stereo.
numOfAASamplesNumber of samples used for AA (zero if no AA)
Returns:
A handle to the new window ( == NULL if creation failed).

Definition at line 135 of file GHOST_C-api.cpp.

References GHOST_ISystem::createWindow().

Referenced by extrawindow_new(), loggerwindow_new(), main(), mainwindow_new(), and wm_window_add_ghostwindow().

GHOST_DECLARE_HANDLE ( GHOST_TimerTaskHandle  )
GHOST_DECLARE_HANDLE ( GHOST_EventHandle  )
GHOST_DECLARE_HANDLE ( GHOST_RectangleHandle  )
GHOST_DECLARE_HANDLE ( GHOST_SystemHandle  )

Creates a "handle" for a C++ GHOST object. A handle is just an opaque pointer to an empty struct. In the API the pointer is casted to the actual C++ class.

Parameters:
nameName of the handle to create.
GHOST_DECLARE_HANDLE ( GHOST_EventConsumerHandle  )
GHOST_DECLARE_HANDLE ( GHOST_WindowHandle  )
int GHOST_DispatchEvents ( GHOST_SystemHandle  systemhandle)

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

Parameters:
systemhandleThe handle to the system
Returns:
Indication of the presence of events.

Definition at line 240 of file GHOST_C-api.cpp.

References GHOST_ISystem::dispatchEvents().

Referenced by main(), multitestapp_run(), wm_window_process_events(), wm_window_process_events_nosleep(), and wm_window_testbreak().

GHOST_TSuccess GHOST_DisposeEventConsumer ( GHOST_EventConsumerHandle  consumerhandle)

Disposes an event consumer object

Parameters:
consumerhandleHandle to the event consumer.
Returns:
An indication of success.

Definition at line 75 of file GHOST_C-api.cpp.

References GHOST_kSuccess.

Referenced by main().

void GHOST_DisposeRectangle ( GHOST_RectangleHandle  rectanglehandle)

Disposes a rectangle object

Parameters:
rectanglehandleHandle to the rectangle.

Definition at line 573 of file GHOST_C-api.cpp.

Referenced by ghost_event_proc(), setViewPortGL(), WM_init_game(), and wm_window_get_size_ghost().

GHOST_TSuccess GHOST_DisposeSystem ( GHOST_SystemHandle  systemhandle)

Disposes the one and only system.

Parameters:
systemhandleThe handle to the system
Returns:
An indication of success.

Definition at line 60 of file GHOST_C-api.cpp.

References GHOST_ISystem::disposeSystem().

Referenced by main(), multitestapp_free(), and wm_ghost_exit().

GHOST_TSuccess GHOST_DisposeWindow ( GHOST_SystemHandle  systemhandle,
GHOST_WindowHandle  windowhandle 
)

Dispose a window.

Parameters:
systemhandleThe handle to the system
windowHandle to the window to be disposed.
Returns:
Indication of success.

Definition at line 171 of file GHOST_C-api.cpp.

References GHOST_ISystem::disposeWindow().

Referenced by extrawindow_free(), loggerwindow_free(), main(), mainwindow_free(), processEvent(), and wm_ghostwindow_destroy().

GHOST_TSuccess GHOST_EndFullScreen ( GHOST_SystemHandle  systemhandle)

Ends full screen mode.

Parameters:
systemhandleThe handle to the system
Returns:
Indication of success.

Definition at line 213 of file GHOST_C-api.cpp.

References GHOST_ISystem::endFullScreen().

Referenced by processEvent().

GHOST_TSuccess GHOST_EndProgressBar ( GHOST_WindowHandle  windowhandle)

Hides the progress bar in the icon

Parameters:
windowhandleThe handle to the window

Definition at line 269 of file GHOST_C-api.cpp.

References GHOST_IWindow::endProgressBar().

Referenced by WM_progress_clear().

GHOST_TSuccess GHOST_GetButtonState ( GHOST_SystemHandle  systemhandle,
GHOST_TButtonMask  mask,
int *  isDown 
)

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

Parameters:
systemhandleThe handle to the system
maskThe button state to retrieve.
isDownPointer to return button state in.
Returns:
Indication of success.

Definition at line 398 of file GHOST_C-api.cpp.

References GHOST_ISystem::getButtonState().

GHOST_RectangleHandle GHOST_GetClientBounds ( GHOST_WindowHandle  windowhandle)

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

Parameters:
windowhandleThe handle to the window
Returns:
A handle to the bounding rectangle of the window.

Definition at line 560 of file GHOST_C-api.cpp.

References GHOST_IWindow::getClientBounds(), and NULL.

Referenced by extrawindow_do_reshape(), ghost_event_proc(), loggerwindow_do_reshape(), mainwindow_do_reshape(), setViewPortGL(), WM_init_game(), and wm_window_get_size_ghost().

GHOST_TUns8* GHOST_getClipboard ( int  selection)

Return the data from the clipboad

Parameters:
returnthe selection instead, X11 only feature
Returns:
clipboard data

Definition at line 851 of file GHOST_C-api.cpp.

References GHOST_ISystem::getClipboard(), and GHOST_ISystem::getSystem().

Referenced by WM_clipboard_text_get().

GHOST_TSuccess GHOST_GetCursorPosition ( GHOST_SystemHandle  systemhandle,
GHOST_TInt32 x,
GHOST_TInt32 y 
)

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

Parameters:
systemhandleThe handle to the system
xThe x-coordinate of the cursor.
yThe y-coordinate of the cursor.
Returns:
Indication of success.

Definition at line 342 of file GHOST_C-api.cpp.

References GHOST_ISystem::getCursorPosition().

Referenced by ghost_event_proc(), and wm_get_cursor_position().

GHOST_TStandardCursor GHOST_GetCursorShape ( GHOST_WindowHandle  windowhandle)

Returns the current cursor shape.

Parameters:
windowhandleThe handle to the window
Returns:
The current cursor shape.

Definition at line 277 of file GHOST_C-api.cpp.

References GHOST_IWindow::getCursorShape().

int GHOST_GetCursorVisibility ( GHOST_WindowHandle  windowhandle)

Returns the visibility state of the cursor.

Parameters:
windowhandleThe handle to the window
Returns:
The visibility state of the cursor.

Definition at line 323 of file GHOST_C-api.cpp.

References GHOST_IWindow::getCursorVisibility().

Referenced by processEvent().

GHOST_TDrawingContextType GHOST_GetDrawingContextType ( GHOST_WindowHandle  windowhandle)

Returns the type of drawing context used in this window.

Parameters:
windowhandleThe handle to the window
Returns:
The current type of drawing context.

Definition at line 502 of file GHOST_C-api.cpp.

References GHOST_IWindow::getDrawingContextType().

GHOST_TEventDataPtr GHOST_GetEventData ( GHOST_EventHandle  eventhandle)

Returns the event data.

Parameters:
eventhandleThe handle to the event
Returns:
The event data.

Definition at line 446 of file GHOST_C-api.cpp.

References GHOST_IEvent::getData().

Referenced by event_to_buf(), extrawindow_handle(), ghost_event_proc(), loggerwindow_handle(), mainwindow_handle(), and processEvent().

GHOST_TUns64 GHOST_GetEventTime ( GHOST_EventHandle  eventhandle)

Returns the time this event was generated.

Parameters:
eventhandleThe handle to the event
Returns:
The event generation time.

Definition at line 430 of file GHOST_C-api.cpp.

References GHOST_IEvent::getTime().

Referenced by event_to_buf(), extrawindow_handle(), and ghost_event_proc().

GHOST_TEventType GHOST_GetEventType ( GHOST_EventHandle  eventhandle)

Returns the event type.

Parameters:
eventhandleThe handle to the event
Returns:
The event type.

Definition at line 421 of file GHOST_C-api.cpp.

References GHOST_IEvent::getType().

Referenced by event_to_buf(), extrawindow_handle(), ghost_event_proc(), loggerwindow_handle(), mainwindow_handle(), multitest_event_handler(), and processEvent().

GHOST_WindowHandle GHOST_GetEventWindow ( GHOST_EventHandle  eventhandle)

Returns the window this event was generated on, or NULL if it is a 'system' event.

Parameters:
eventhandleThe handle to the event
Returns:
The generating window.

Definition at line 438 of file GHOST_C-api.cpp.

References GHOST_IEvent::getWindow().

Referenced by event_to_buf(), ghost_event_proc(), multitest_event_handler(), and processEvent().

int GHOST_GetFullScreen ( GHOST_SystemHandle  systemhandle)

Returns current full screen mode status.

Parameters:
systemhandleThe handle to the system
Returns:
The current status.

Definition at line 222 of file GHOST_C-api.cpp.

References GHOST_ISystem::getFullScreen().

Referenced by gearsTimerProc(), and processEvent().

GHOST_TInt32 GHOST_GetHeightRectangle ( GHOST_RectangleHandle  rectanglehandle)

Access to rectangle height.

Parameters:
rectanglehandleThe handle to the rectangle
Returns:
height of the rectangle

Definition at line 712 of file GHOST_C-api.cpp.

Referenced by extrawindow_do_reshape(), loggerwindow_do_reshape(), mainwindow_do_reshape(), setViewPortGL(), WM_init_game(), and wm_window_get_size_ghost().

void GHOST_GetMainDisplayDimensions ( GHOST_SystemHandle  systemhandle,
GHOST_TUns32 width,
GHOST_TUns32 height 
)

Returns the dimensions of the main display on this system.

Parameters:
systemhandleThe handle to the system
widthA pointer the width gets put in
heightA pointer the height gets put in
Returns:
void.

Definition at line 124 of file GHOST_C-api.cpp.

References GHOST_ISystem::getMainDisplayDimensions().

Referenced by loggerwindow_new(), and wm_get_screensize().

GHOST_TUns64 GHOST_GetMilliSeconds ( GHOST_SystemHandle  systemhandle)

Returns the system time. Returns the number of milliseconds since the start of the system process. Based on ANSI clock() routine.

Parameters:
systemhandleThe handle to the system
Returns:
The number of milliseconds.

Definition at line 82 of file GHOST_C-api.cpp.

References GHOST_ISystem::getMilliSeconds().

GHOST_TSuccess GHOST_GetModifierKeyState ( GHOST_SystemHandle  systemhandle,
GHOST_TModifierKeyMask  mask,
int *  isDown 
)

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

Parameters:
systemhandleThe handle to the system
maskThe modifier key state to retrieve.
isDownPointer to return modifier state in.
Returns:
Indication of success.

Definition at line 382 of file GHOST_C-api.cpp.

References GHOST_ISystem::getModifierKeyState().

Referenced by query_qual().

GHOST_TUns8 GHOST_GetNumDisplays ( GHOST_SystemHandle  systemhandle)

Returns the number of displays on this system.

Parameters:
systemhandleThe handle to the system
Returns:
The number of displays.

Definition at line 115 of file GHOST_C-api.cpp.

References GHOST_ISystem::getNumDisplays().

void GHOST_GetRectangle ( GHOST_RectangleHandle  rectanglehandle,
GHOST_TInt32 l,
GHOST_TInt32 t,
GHOST_TInt32 r,
GHOST_TInt32 b 
)

Gets all members of the rectangle.

Parameters:
rectanglehandleThe handle to the rectangle
lPointer to return left coordinate in.
tPointer to return top coordinate in.
rPointer to return right coordinate in.
bPointer to return bottom coordinate in.

Definition at line 719 of file GHOST_C-api.cpp.

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

Referenced by ghost_event_proc().

GHOST_TVisibility GHOST_GetRectangleVisibility ( GHOST_RectangleHandle  rectanglehandle,
GHOST_RectangleHandle  anotherrectanglehandle 
)

Returns whether the rectangle is inside this rectangle.

Parameters:
rectanglehandleThe handle to the rectangle
rrectangle to test.
Returns:
visibility (not, partially or fully visible).

Definition at line 808 of file GHOST_C-api.cpp.

References GHOST_kNotVisible.

const GHOST_TabletData* GHOST_GetTabletData ( GHOST_WindowHandle  windowhandle)

Returns the status of the tablet

Parameters:
windowhandleThe handle to the window
Returns:
Status of tablet

Definition at line 699 of file GHOST_C-api.cpp.

Referenced by update_tablet_data(), and WM_cursor_grab().

GHOST_TimerProcPtr GHOST_GetTimerProc ( GHOST_TimerTaskHandle  timertaskhandle)

Returns the timer callback.

Parameters:
timertaskhandleThe handle to the timertask
Returns:
The timer callback.

Definition at line 455 of file GHOST_C-api.cpp.

References GHOST_ITimerTask::getTimerProc().

GHOST_TUserDataPtr GHOST_GetTimerTaskUserData ( GHOST_TimerTaskHandle  timertaskhandle)

Returns the timer user data.

Parameters:
timertaskhandleThe handle to the timertask
Returns:
The timer user data.

Definition at line 474 of file GHOST_C-api.cpp.

References GHOST_ITimerTask::getUserData().

Referenced by gearsTimerProc(), and mainwindow_timer_proc().

char* GHOST_GetTitle ( GHOST_WindowHandle  windowhandle)

Returns the title displayed in the title bar. The title should be free'd with free().

Parameters:
windowhandleThe handle to the window
Returns:
The title, free with free().

Definition at line 530 of file GHOST_C-api.cpp.

References GHOST_IWindow::getTitle(), STR_String::Length(), NULL, and STR_String::Ptr().

Referenced by event_to_buf(), processEvent(), and wm_window_title().

int GHOST_GetValid ( GHOST_WindowHandle  windowhandle)

Returns indication as to whether the window is valid.

Parameters:
windowhandleThe handle to the window
Returns:
The validity of the window.

Definition at line 493 of file GHOST_C-api.cpp.

References GHOST_IWindow::getValid().

GHOST_TInt32 GHOST_GetWidthRectangle ( GHOST_RectangleHandle  rectanglehandle)

Access to rectangle width.

Parameters:
rectanglehandleThe handle to the rectangle
Returns:
width of the rectangle

Definition at line 705 of file GHOST_C-api.cpp.

Referenced by extrawindow_do_reshape(), loggerwindow_do_reshape(), mainwindow_do_reshape(), setViewPortGL(), WM_init_game(), and wm_window_get_size_ghost().

GHOST_RectangleHandle GHOST_GetWindowBounds ( GHOST_WindowHandle  windowhandle)

Returns the window rectangle dimensions. These are screen coordinates.

Parameters:
windowhandleThe handle to the window
Returns:
A handle to the bounding rectangle of the window.

Definition at line 547 of file GHOST_C-api.cpp.

References GHOST_IWindow::getWindowBounds(), and NULL.

GHOST_TWindowState GHOST_GetWindowState ( GHOST_WindowHandle  windowhandle)

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

Parameters:
windowhandleThe handle to the window
Returns:
The state of the window.

Definition at line 637 of file GHOST_C-api.cpp.

References GHOST_IWindow::getState().

Referenced by ghost_event_proc(), and wm_window_fullscreen_toggle_exec().

GHOST_TUserDataPtr GHOST_GetWindowUserData ( GHOST_WindowHandle  windowhandle)

Returns the window user data.

Parameters:
windowhandleThe handle to the window
Returns:
The window user data.

Definition at line 158 of file GHOST_C-api.cpp.

References GHOST_IWindow::getUserData().

Referenced by extrawindow_free(), ghost_event_proc(), loggerwindow_free(), mainwindow_free(), and multitest_event_handler().

void GHOST_InsetRectangle ( GHOST_RectangleHandle  rectanglehandle,
GHOST_TInt32  i 
)

Grows (or shrinks the rectangle). The method avoids negative insets making the rectangle invalid

Parameters:
rectanglehandleThe handle to the rectangle
iThe amount of offset given to each extreme (negative values shrink the rectangle).

Definition at line 769 of file GHOST_C-api.cpp.

GHOST_TimerTaskHandle GHOST_InstallTimer ( GHOST_SystemHandle  systemhandle,
GHOST_TUns64  delay,
GHOST_TUns64  interval,
GHOST_TimerProcPtr  timerProc,
GHOST_TUserDataPtr  userData 
)

Installs a timer. Note that, on most operating systems, messages need to be processed in order for the timer callbacks to be invoked.

Parameters:
systemhandleThe handle to the system
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).

Definition at line 91 of file GHOST_C-api.cpp.

References GHOST_ISystem::installTimer().

Referenced by main(), mainwindow_new(), and processEvent().

GHOST_TSuccess GHOST_InvalidateWindow ( GHOST_WindowHandle  windowhandle)

Invalidates the contents of this window.

Parameters:
windowhandleThe handle to the window
Returns:
Indication of success.

Definition at line 691 of file GHOST_C-api.cpp.

References GHOST_IWindow::invalidate().

Referenced by gearsTimerProc(), loggerwindow_do_button(), loggerwindow_do_move(), loggerwindow_log(), mainwindow_do_button(), mainwindow_do_key(), and mainwindow_do_move().

GHOST_TSuccess GHOST_IsEmptyRectangle ( GHOST_RectangleHandle  rectanglehandle)

Returns whether this rectangle is empty. Empty rectangles are rectangles that have width==0 and/or height==0.

Parameters:
rectanglehandleThe handle to the rectangle
Returns:
intean value (true == empty rectangle)

Definition at line 745 of file GHOST_C-api.cpp.

References GHOST_kFailure, and GHOST_kSuccess.

GHOST_TSuccess GHOST_IsInsideRectangle ( GHOST_RectangleHandle  rectanglehandle,
GHOST_TInt32  x,
GHOST_TInt32  y 
)

Returns whether the point is inside this rectangle. Point on the boundary is considered inside.

Parameters:
rectanglehandleThe handle to the rectangle
xx-coordinate of point to test.
yy-coordinate of point to test.
Returns:
intean value (true if point is inside).

Definition at line 794 of file GHOST_C-api.cpp.

References GHOST_kFailure, and GHOST_kSuccess.

GHOST_TSuccess GHOST_IsValidRectangle ( GHOST_RectangleHandle  rectanglehandle)

Returns whether this rectangle is valid. Valid rectangles are rectangles that have m_l <= m_r and m_t <= m_b. Thus, emapty rectangles are valid.

Parameters:
rectanglehandleThe handle to the rectangle
Returns:
intean value (true==valid rectangle)

Definition at line 757 of file GHOST_C-api.cpp.

References GHOST_kFailure, and GHOST_kSuccess.

int GHOST_ProcessEvents ( GHOST_SystemHandle  systemhandle,
int  waitForEvent 
)

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

Parameters:
systemhandleThe handle to the system
waitForEventBoolean to indicate that ProcessEvents should wait (block) until the next event before returning.
Returns:
Indication of the presence of events.

Definition at line 231 of file GHOST_C-api.cpp.

References GHOST_ISystem::processEvents().

Referenced by main(), multitestapp_run(), wm_window_process_events(), wm_window_process_events_nosleep(), and wm_window_testbreak().

void GHOST_putClipboard ( GHOST_TInt8 buffer,
int  selection 
)

Put data to the Clipboard

Parameters:
setthe selection instead, X11 only feature

Definition at line 857 of file GHOST_C-api.cpp.

References GHOST_ISystem::getSystem(), and GHOST_ISystem::putClipboard().

Referenced by WM_clipboard_text_set().

GHOST_TSuccess GHOST_RemoveEventConsumer ( GHOST_SystemHandle  systemhandle,
GHOST_EventConsumerHandle  consumerhandle 
)

Remove the given event consumer to our list.

Parameters:
systemhandleThe handle to the system
consumerhandleThe event consumer to remove.
Returns:
Indication of success.

Definition at line 255 of file GHOST_C-api.cpp.

References GHOST_ISystem::removeEventConsumer().

GHOST_TSuccess GHOST_RemoveTimer ( GHOST_SystemHandle  systemhandle,
GHOST_TimerTaskHandle  timertaskhandle 
)

Removes a timer.

Parameters:
systemhandleThe handle to the system
timerTaskTimer task to be removed.
Returns:
Indication of success.

Definition at line 104 of file GHOST_C-api.cpp.

References GHOST_ISystem::removeTimer().

Referenced by processEvent().

void GHOST_ScreenToClient ( GHOST_WindowHandle  windowhandle,
GHOST_TInt32  inX,
GHOST_TInt32  inY,
GHOST_TInt32 outX,
GHOST_TInt32 outY 
)

Converts a point in screen coordinates to client rectangle coordinates

Parameters:
windowhandleThe handle to the window
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.

Definition at line 611 of file GHOST_C-api.cpp.

References GHOST_IWindow::screenToClient().

Referenced by ghost_event_proc(), loggerwindow_handle(), mainwindow_handle(), wm_event_add_ghostevent(), and wm_get_cursor_position().

void GHOST_setAcceptDragOperation ( GHOST_WindowHandle  windowhandle,
GHOST_TInt8  canAccept 
)

Tells if the ongoing drag'n'drop object can be accepted upon mouse drop

Definition at line 413 of file GHOST_C-api.cpp.

References GHOST_IWindow::setAcceptDragOperation().

void GHOST_SetCenterRectangle ( GHOST_RectangleHandle  rectanglehandle,
GHOST_TInt32  cx,
GHOST_TInt32  cy 
)

Sets rectangle members. Sets rectangle members such that it is centered at the given location.

Parameters:
rectanglehandleThe handle to the rectangle
cxrequested center x-coordinate of the rectangle
cyrequested center y-coordinate of the rectangle

Definition at line 820 of file GHOST_C-api.cpp.

GHOST_TSuccess GHOST_SetClientHeight ( GHOST_WindowHandle  windowhandle,
GHOST_TUns32  height 
)

Resizes client rectangle height.

Parameters:
windowhandleThe handle to the window
heightThe new height of the client area of the window.
Returns:
Indication of success.

Definition at line 590 of file GHOST_C-api.cpp.

References GHOST_IWindow::setClientHeight().

GHOST_TSuccess GHOST_SetClientSize ( GHOST_WindowHandle  windowhandle,
GHOST_TUns32  width,
GHOST_TUns32  height 
)

Resizes client rectangle.

Parameters:
windowhandleThe handle to the window
widthThe new width of the client area of the window.
heightThe new height of the client area of the window.
Returns:
Indication of success.

Definition at line 600 of file GHOST_C-api.cpp.

References GHOST_IWindow::setClientSize().

Referenced by wm_window_set_size().

GHOST_TSuccess GHOST_SetClientWidth ( GHOST_WindowHandle  windowhandle,
GHOST_TUns32  width 
)

Resizes client rectangle width.

Parameters:
windowhandleThe handle to the window
widthThe new width of the client area of the window.
Returns:
Indication of success.

Definition at line 580 of file GHOST_C-api.cpp.

References GHOST_IWindow::setClientWidth().

GHOST_TSuccess GHOST_SetCursorGrab ( GHOST_WindowHandle  windowhandle,
GHOST_TGrabCursorMode  mode,
int *  bounds 
)

Grabs the cursor for a modal operation, to keep receiving events when the mouse is outside the window. X11 only, others do this automatically.

Parameters:
windowhandleThe handle to the window
modeThe new grab state of the cursor.
boundsThe grab ragion (optional) - left,top,right,bottom
Returns:
Indication of success.

Definition at line 363 of file GHOST_C-api.cpp.

References GHOST_IWindow::clientToScreen(), GHOST_IWindow::getClientBounds(), GHOST_Rect::getHeight(), GHOST_Rect::m_b, GHOST_Rect::m_l, GHOST_Rect::m_r, GHOST_Rect::m_t, NULL, and GHOST_IWindow::setCursorGrab().

Referenced by WM_cursor_grab(), and WM_cursor_ungrab().

GHOST_TSuccess GHOST_SetCursorPosition ( GHOST_SystemHandle  systemhandle,
GHOST_TInt32  x,
GHOST_TInt32  y 
)

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:
systemhandleThe handle to the system
xThe x-coordinate of the cursor.
yThe y-coordinate of the cursor.
Returns:
Indication of success.

Definition at line 353 of file GHOST_C-api.cpp.

References GHOST_ISystem::setCursorPosition().

Referenced by WM_cursor_warp().

GHOST_TSuccess GHOST_SetCursorShape ( GHOST_WindowHandle  windowhandle,
GHOST_TStandardCursor  cursorshape 
)

Set the shape of the cursor.

Parameters:
windowhandleThe handle to the window
cursorThe new cursor shape type id.
Returns:
Indication of success.

Definition at line 286 of file GHOST_C-api.cpp.

References GHOST_IWindow::setCursorShape().

Referenced by loggerwindow_do_button(), mainwindow_do_key(), processEvent(), and WM_cursor_set().

GHOST_TSuccess GHOST_SetCursorVisibility ( GHOST_WindowHandle  windowhandle,
int  visible 
)

Shows or hides the cursor.

Parameters:
windowhandleThe handle to the window
visibleThe new visibility state of the cursor.
Returns:
Indication of success.

Definition at line 332 of file GHOST_C-api.cpp.

References GHOST_IWindow::setCursorVisibility().

Referenced by mainwindow_do_key(), processEvent(), and WM_cursor_set().

GHOST_TSuccess GHOST_SetCustomCursorShape ( GHOST_WindowHandle  windowhandle,
GHOST_TUns8  bitmap[16][2],
GHOST_TUns8  mask[16][2],
int  hotX,
int  hotY 
)

Set the shape of the cursor to a custom cursor.

Parameters:
windowhandleThe handle to the window
bitmapThe bitmap data for the cursor.
maskThe mask data for the cursor.
hotXThe X coordinate of the cursor hotspot.
hotYThe Y coordinate of the cursor hotspot.
Returns:
Indication of success.

Definition at line 294 of file GHOST_C-api.cpp.

References GHOST_IWindow::setCustomCursorShape().

Referenced by extrawindow_spin_cursor(), and window_set_custom_cursor().

GHOST_TSuccess GHOST_SetCustomCursorShapeEx ( GHOST_WindowHandle  windowhandle,
GHOST_TUns8 bitmap,
GHOST_TUns8 mask,
int  sizex,
int  sizey,
int  hotX,
int  hotY,
int  fg_color,
int  bg_color 
)

Set the shape of the cursor to a custom cursor of specified size.

Parameters:
windowhandleThe handle to the window
bitmapThe bitmap data for the cursor.
maskThe mask data for the cursor. sizex, sizey The size of the cursor
hotXThe X coordinate of the cursor hotspot.
hotYThe Y coordinate of the cursor hotspot.
fg_color,bg_colorColors of the cursor
Returns:
Indication of success.

Definition at line 305 of file GHOST_C-api.cpp.

References GHOST_IWindow::setCustomCursorShape().

Referenced by window_set_custom_cursor_ex().

GHOST_TSuccess GHOST_SetDrawingContextType ( GHOST_WindowHandle  windowhandle,
GHOST_TDrawingContextType  type 
)

Tries to install a rendering context in this window.

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

Definition at line 511 of file GHOST_C-api.cpp.

References GHOST_IWindow::setDrawingContextType().

GHOST_TSuccess GHOST_SetProgressBar ( GHOST_WindowHandle  windowhandle,
float  progress 
)

Sets the progress bar value displayed in the window/application icon

Parameters:
windowhandleThe handle to the window
progressThe progress % (0.0 to 1.0)

Definition at line 262 of file GHOST_C-api.cpp.

References GHOST_IWindow::setProgressBar().

Referenced by WM_progress_set().

void GHOST_SetRectangle ( GHOST_RectangleHandle  rectanglehandle,
GHOST_TInt32  l,
GHOST_TInt32  t,
GHOST_TInt32  r,
GHOST_TInt32  b 
)

Sets all members of the rectangle.

Parameters:
rectanglehandleThe handle to the rectangle
lrequested left coordinate of the rectangle
trequested top coordinate of the rectangle
rrequested right coordinate of the rectangle
brequested bottom coordinate of the rectangle

Definition at line 734 of file GHOST_C-api.cpp.

void GHOST_SetRectangleCenter ( GHOST_RectangleHandle  rectanglehandle,
GHOST_TInt32  cx,
GHOST_TInt32  cy,
GHOST_TInt32  w,
GHOST_TInt32  h 
)

Sets rectangle members. Sets rectangle members such that it is centered at the given location, with the width requested.

Parameters:
rectanglehandleThe handle to the rectangle
cxrequested center x-coordinate of the rectangle
cyrequested center y-coordinate of the rectangle
wrequested width of the rectangle
hrequested height of the rectangle

Definition at line 829 of file GHOST_C-api.cpp.

void GHOST_SetTimerProc ( GHOST_TimerTaskHandle  timertaskhandle,
GHOST_TimerProcPtr  timerProc 
)

Changes the timer callback.

Parameters:
timertaskhandleThe handle to the timertask
timerProcThe timer callback.

Definition at line 464 of file GHOST_C-api.cpp.

References GHOST_ITimerTask::setTimerProc().

void GHOST_SetTimerTaskUserData ( GHOST_TimerTaskHandle  timertaskhandle,
GHOST_TUserDataPtr  userData 
)

Changes the time user data.

Parameters:
timertaskhandleThe handle to the timertask
dataThe timer user data.

Definition at line 483 of file GHOST_C-api.cpp.

References GHOST_ITimerTask::setUserData().

void GHOST_SetTitle ( GHOST_WindowHandle  windowhandle,
const char *  title 
)

Sets the title displayed in the title bar.

Parameters:
windowhandleThe handle to the window
titleThe title to display in the title bar.

Definition at line 521 of file GHOST_C-api.cpp.

References GHOST_IWindow::setTitle().

Referenced by processEvent(), WM_window_open_temp(), and wm_window_title().

GHOST_TSuccess GHOST_SetWindowModifiedState ( GHOST_WindowHandle  windowhandle,
GHOST_TUns8  isUnsavedChanges 
)

Sets the window "modified" status, indicating unsaved changes

Parameters:
windowhandleThe handle to the window
isUnsavedChangesUnsaved changes or not
Returns:
Indication of success.

Definition at line 655 of file GHOST_C-api.cpp.

References GHOST_IWindow::setModifiedState().

Referenced by wm_window_title().

GHOST_TSuccess GHOST_SetWindowOrder ( GHOST_WindowHandle  windowhandle,
GHOST_TWindowOrder  order 
)

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

Parameters:
windowhandleThe handle to the window
orderThe order of the window.
Returns:
Indication of success.

Definition at line 663 of file GHOST_C-api.cpp.

References GHOST_IWindow::setOrder().

Referenced by mainwindow_do_key(), wm_window_lower(), and wm_window_raise().

GHOST_TSuccess GHOST_SetWindowState ( GHOST_WindowHandle  windowhandle,
GHOST_TWindowState  state 
)

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

Parameters:
windowhandleThe handle to the window
stateThe state of the window.
Returns:
Indication of success.

Definition at line 646 of file GHOST_C-api.cpp.

References GHOST_IWindow::setState().

Referenced by wm_window_add_ghostwindow(), wm_window_fullscreen_toggle_exec(), and wm_window_title().

void GHOST_SetWindowUserData ( GHOST_WindowHandle  windowhandle,
GHOST_TUserDataPtr  userdata 
)

Changes the window user data.

Parameters:
windowhandleThe handle to the window
dataThe window user data.

Definition at line 164 of file GHOST_C-api.cpp.

References GHOST_IWindow::setUserData().

Referenced by extrawindow_new(), loggerwindow_new(), mainwindow_new(), wm_window_add_ghostwindow(), and wm_window_match_do().

GHOST_TSuccess GHOST_SwapWindowBuffers ( GHOST_WindowHandle  windowhandle)

Swaps front and back buffers of a window.

Parameters:
windowhandleThe handle to the window
Returns:
An intean success indicator.

Definition at line 673 of file GHOST_C-api.cpp.

References GHOST_IWindow::swapBuffers().

Referenced by extrawindow_do_draw(), loggerwindow_do_draw(), mainwindow_do_draw(), processEvent(), and wm_window_swap_buffers().

int GHOST_toggleConsole ( int  action)

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)

Definition at line 863 of file GHOST_C-api.cpp.

References GHOST_ISystem::getSystem(), and GHOST_ISystem::toggleConsole().

Referenced by WM_init().

void GHOST_UnionPointRectangle ( GHOST_RectangleHandle  rectanglehandle,
GHOST_TInt32  x,
GHOST_TInt32  y 
)

Grows the rectangle to included a point.

Parameters:
rectanglehandleThe handle to the rectangle
xThe x-coordinate of the point.
yThe y-coordinate of the point.

Definition at line 785 of file GHOST_C-api.cpp.

void GHOST_UnionRectangle ( GHOST_RectangleHandle  rectanglehandle,
GHOST_RectangleHandle  anotherrectanglehandle 
)

Does a union of the rectangle given and this rectangle. The result is stored in this rectangle.

Parameters:
rectanglehandleThe handle to the rectangle
rThe rectangle that is input for the union operation.

Definition at line 777 of file GHOST_C-api.cpp.

int GHOST_ValidWindow ( GHOST_SystemHandle  systemhandle,
GHOST_WindowHandle  windowhandle 
)

Returns whether a window is valid.

Parameters:
systemhandleThe handle to the system
windowHandle to the window to be checked.
Returns:
Indication of validity.

Definition at line 182 of file GHOST_C-api.cpp.

References GHOST_ISystem::validWindow().

Referenced by gearsTimerProc(), ghost_event_proc(), main(), multitest_event_handler(), and processEvent().