|
Blender V2.27
|
#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_SetProgressBar (GHOST_WindowHandle windowhandle, float progress) |
| GHOST_TSuccess | GHOST_EndProgressBar (GHOST_WindowHandle windowhandle) |
| int | GHOST_OpenNDOF (GHOST_SystemHandle systemhandle, GHOST_WindowHandle windowhandle, GHOST_NDOFLibraryInit_fp setNdofLibraryInit, GHOST_NDOFLibraryShutdown_fp setNdofLibraryShutdown, GHOST_NDOFDeviceOpen_fp setNdofDeviceOpen) |
| 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_TabletData * | GHOST_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_TUns8 * | GHOST_getClipboard (int selection) |
| void | GHOST_putClipboard (GHOST_TInt8 *buffer, int selection) |
***** BEGIN GPL LICENSE BLOCK *****
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. All rights reserved.
The Original Code is: all of this file.
Contributor(s): none yet.
***** END GPL LICENSE BLOCK *****
GHOST C-API function and type declarations. The C-API wraps the C++ objects with the
Definition in file GHOST_C-api.h.
| typedef int(* GHOST_EventCallbackProcPtr)(GHOST_EventHandle event, GHOST_TUserDataPtr userdata) |
Definition of a callback routine that receives events.
| event | The event received. |
| userdata | The callback's user data, supplied to GHOST_CreateSystem. |
Definition at line 63 of file GHOST_C-api.h.
| GHOST_TSuccess GHOST_ActivateWindowDrawingContext | ( | GHOST_WindowHandle | windowhandle | ) |
Activates the drawing context of this window.
| windowhandle | The handle to the window |
| GHOST_TSuccess GHOST_AddEventConsumer | ( | GHOST_SystemHandle | systemhandle, |
| GHOST_EventConsumerHandle | consumerhandle | ||
| ) |
Adds the given event consumer to our list.
| systemhandle | The handle to the system |
| consumerhandle | The event consumer to add. |
| GHOST_WindowHandle GHOST_BeginFullScreen | ( | GHOST_SystemHandle | systemhandle, |
| GHOST_DisplaySetting * | setting, | ||
| const int | stereoVisual | ||
| ) |
Begins full screen mode.
| systemhandle | The handle to the system |
| setting | The new setting of the display. |
| 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
| windowhandle | The handle to the window |
| inX | The x-coordinate in the client rectangle. |
| inY | The y-coordinate in the client rectangle. |
| outX | The x-coordinate on the screen. |
| outY | The y-coordinate on the screen. |
| 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.
| rectanglehandle | The handle to the rectangle |
| r | the rectangle to clip |
| GHOST_EventConsumerHandle GHOST_CreateEventConsumer | ( | GHOST_EventCallbackProcPtr | eventCallback, |
| GHOST_TUserDataPtr | userdata | ||
| ) |
Creates an event consumer object
| eventCallback | The event callback routine. |
| userdata | Pointer to user data returned to the callback routine. |
| GHOST_SystemHandle GHOST_CreateSystem | ( | void | ) |
Creates the one and only system.
| 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.
| systemhandle | The handle to the system |
| title | The name of the window (displayed in the title bar of the window if the OS supports it). |
| left | The coordinate of the left edge of the window. |
| top | The coordinate of the top edge of the window. |
| width | The width the window. |
| height | The height the window. |
| state | The state of the window when opened. |
| type | The type of drawing context installed in this window. |
| stereoVisual | Stereo visual for quad buffered stereo. |
| numOfAASamples | Number of samples used for AA (zero if no AA) |
| 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.
| name | Name of the handle to create. |
| int GHOST_DispatchEvents | ( | GHOST_SystemHandle | systemhandle | ) |
Retrieves events from the queue and send them to the event consumers.
| systemhandle | The handle to the system |
| GHOST_TSuccess GHOST_DisposeEventConsumer | ( | GHOST_EventConsumerHandle | consumerhandle | ) |
Disposes an event consumer object
| consumerhandle | Handle to the event consumer. |
| void GHOST_DisposeRectangle | ( | GHOST_RectangleHandle | rectanglehandle | ) |
Disposes a rectangle object
| rectanglehandle | Handle to the rectangle. |
| GHOST_TSuccess GHOST_DisposeSystem | ( | GHOST_SystemHandle | systemhandle | ) |
Disposes the one and only system.
| systemhandle | The handle to the system |
| GHOST_TSuccess GHOST_DisposeWindow | ( | GHOST_SystemHandle | systemhandle, |
| GHOST_WindowHandle | windowhandle | ||
| ) |
Dispose a window.
| systemhandle | The handle to the system |
| window | Handle to the window to be disposed. |
| GHOST_TSuccess GHOST_EndFullScreen | ( | GHOST_SystemHandle | systemhandle | ) |
Ends full screen mode.
| systemhandle | The handle to the system |
| GHOST_TSuccess GHOST_EndProgressBar | ( | GHOST_WindowHandle | windowhandle | ) |
Hides the progress bar in the icon
| windowhandle | The handle to the window |
| GHOST_TSuccess GHOST_GetButtonState | ( | GHOST_SystemHandle | systemhandle, |
| GHOST_TButtonMask | mask, | ||
| int * | isDown | ||
| ) |
Returns the state of a mouse button (ouside the message queue).
| systemhandle | The handle to the system |
| mask | The button state to retrieve. |
| isDown | Pointer to return button state in. |
| GHOST_RectangleHandle GHOST_GetClientBounds | ( | GHOST_WindowHandle | windowhandle | ) |
Returns the client rectangle dimensions. The left and top members of the rectangle are always zero.
| windowhandle | The handle to the window |
| GHOST_TUns8* GHOST_getClipboard | ( | int | selection | ) |
Return the data from the clipboad
| return | the selection instead, X11 only feature |
| GHOST_TSuccess GHOST_GetCursorPosition | ( | GHOST_SystemHandle | systemhandle, |
| GHOST_TInt32 * | x, | ||
| GHOST_TInt32 * | y | ||
| ) |
Returns the current location of the cursor (location in screen coordinates)
| systemhandle | The handle to the system |
| x | The x-coordinate of the cursor. |
| y | The y-coordinate of the cursor. |
| GHOST_TStandardCursor GHOST_GetCursorShape | ( | GHOST_WindowHandle | windowhandle | ) |
Returns the current cursor shape.
| windowhandle | The handle to the window |
| int GHOST_GetCursorVisibility | ( | GHOST_WindowHandle | windowhandle | ) |
Returns the visibility state of the cursor.
| windowhandle | The handle to the window |
| GHOST_TDrawingContextType GHOST_GetDrawingContextType | ( | GHOST_WindowHandle | windowhandle | ) |
Returns the type of drawing context used in this window.
| windowhandle | The handle to the window |
| GHOST_TEventDataPtr GHOST_GetEventData | ( | GHOST_EventHandle | eventhandle | ) |
Returns the event data.
| eventhandle | The handle to the event |
| GHOST_TUns64 GHOST_GetEventTime | ( | GHOST_EventHandle | eventhandle | ) |
Returns the time this event was generated.
| eventhandle | The handle to the event |
| GHOST_TEventType GHOST_GetEventType | ( | GHOST_EventHandle | eventhandle | ) |
Returns the event type.
| eventhandle | The handle to the event |
| GHOST_WindowHandle GHOST_GetEventWindow | ( | GHOST_EventHandle | eventhandle | ) |
Returns the window this event was generated on, or NULL if it is a 'system' event.
| eventhandle | The handle to the event |
| int GHOST_GetFullScreen | ( | GHOST_SystemHandle | systemhandle | ) |
Returns current full screen mode status.
| systemhandle | The handle to the system |
| GHOST_TInt32 GHOST_GetHeightRectangle | ( | GHOST_RectangleHandle | rectanglehandle | ) |
Access to rectangle height.
| rectanglehandle | The handle to the rectangle |
| void GHOST_GetMainDisplayDimensions | ( | GHOST_SystemHandle | systemhandle, |
| GHOST_TUns32 * | width, | ||
| GHOST_TUns32 * | height | ||
| ) |
Returns the dimensions of the main display on this system.
| systemhandle | The handle to the system |
| width | A pointer the width gets put in |
| height | A pointer the height gets put in |
| 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.
| systemhandle | The handle to the system |
| GHOST_TSuccess GHOST_GetModifierKeyState | ( | GHOST_SystemHandle | systemhandle, |
| GHOST_TModifierKeyMask | mask, | ||
| int * | isDown | ||
| ) |
Returns the state of a modifier key (ouside the message queue).
| systemhandle | The handle to the system |
| mask | The modifier key state to retrieve. |
| isDown | Pointer to return modifier state in. |
| GHOST_TUns8 GHOST_GetNumDisplays | ( | GHOST_SystemHandle | systemhandle | ) |
Returns the number of displays on this system.
| systemhandle | The handle to the system |
| void GHOST_GetRectangle | ( | GHOST_RectangleHandle | rectanglehandle, |
| GHOST_TInt32 * | l, | ||
| GHOST_TInt32 * | t, | ||
| GHOST_TInt32 * | r, | ||
| GHOST_TInt32 * | b | ||
| ) |
Gets all members of the rectangle.
| rectanglehandle | The handle to the rectangle |
| l | Pointer to return left coordinate in. |
| t | Pointer to return top coordinate in. |
| r | Pointer to return right coordinate in. |
| b | Pointer to return bottom coordinate in. |
| GHOST_TVisibility GHOST_GetRectangleVisibility | ( | GHOST_RectangleHandle | rectanglehandle, |
| GHOST_RectangleHandle | anotherrectanglehandle | ||
| ) |
Returns whether the rectangle is inside this rectangle.
| rectanglehandle | The handle to the rectangle |
| r | rectangle to test. |
| const GHOST_TabletData* GHOST_GetTabletData | ( | GHOST_WindowHandle | windowhandle | ) |
Returns the status of the tablet
| windowhandle | The handle to the window |
| GHOST_TimerProcPtr GHOST_GetTimerProc | ( | GHOST_TimerTaskHandle | timertaskhandle | ) |
Returns the timer callback.
| timertaskhandle | The handle to the timertask |
| GHOST_TUserDataPtr GHOST_GetTimerTaskUserData | ( | GHOST_TimerTaskHandle | timertaskhandle | ) |
Returns the timer user data.
| timertaskhandle | The handle to the timertask |
| char* GHOST_GetTitle | ( | GHOST_WindowHandle | windowhandle | ) |
Returns the title displayed in the title bar. The title should be free'd with free().
| windowhandle | The handle to the window |
| int GHOST_GetValid | ( | GHOST_WindowHandle | windowhandle | ) |
Returns indication as to whether the window is valid.
| windowhandle | The handle to the window |
| GHOST_TInt32 GHOST_GetWidthRectangle | ( | GHOST_RectangleHandle | rectanglehandle | ) |
Access to rectangle width.
| rectanglehandle | The handle to the rectangle |
| GHOST_RectangleHandle GHOST_GetWindowBounds | ( | GHOST_WindowHandle | windowhandle | ) |
Returns the window rectangle dimensions. These are screen coordinates.
| windowhandle | The handle to the window |
| GHOST_TWindowState GHOST_GetWindowState | ( | GHOST_WindowHandle | windowhandle | ) |
Returns the state of the window (normal, minimized, maximized).
| windowhandle | The handle to the window |
| GHOST_TUserDataPtr GHOST_GetWindowUserData | ( | GHOST_WindowHandle | windowhandle | ) |
Returns the window user data.
| windowhandle | The handle to the window |
| void GHOST_InsetRectangle | ( | GHOST_RectangleHandle | rectanglehandle, |
| GHOST_TInt32 | i | ||
| ) |
Grows (or shrinks the rectangle). The method avoids negative insets making the rectangle invalid
| rectanglehandle | The handle to the rectangle |
| i | The amount of offset given to each extreme (negative values shrink the rectangle). |
| 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.
| systemhandle | The handle to the system |
| delay | The time to wait for the first call to the timerProc (in milliseconds) |
| interval | The interval between calls to the timerProc (in milliseconds) |
| timerProc | The callback invoked when the interval expires, |
| userData | Placeholder for user data. |
| GHOST_TSuccess GHOST_InvalidateWindow | ( | GHOST_WindowHandle | windowhandle | ) |
Invalidates the contents of this window.
| windowhandle | The handle to the window |
| 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.
| rectanglehandle | The handle to the rectangle |
| 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.
| rectanglehandle | The handle to the rectangle |
| x | x-coordinate of point to test. |
| y | y-coordinate of point to test. |
| 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.
| rectanglehandle | The handle to the rectangle |
| int GHOST_OpenNDOF | ( | GHOST_SystemHandle | systemhandle, |
| GHOST_WindowHandle | windowhandle, | ||
| GHOST_NDOFLibraryInit_fp | setNdofLibraryInit, | ||
| GHOST_NDOFLibraryShutdown_fp | setNdofLibraryShutdown, | ||
| GHOST_NDOFDeviceOpen_fp | setNdofDeviceOpen | ||
| ) |
Open N-degree of freedom devices
| int GHOST_ProcessEvents | ( | GHOST_SystemHandle | systemhandle, |
| int | waitForEvent | ||
| ) |
Retrieves events from the system and stores them in the queue.
| systemhandle | The handle to the system |
| waitForEvent | Boolean to indicate that ProcessEvents should wait (block) until the next event before returning. |
| void GHOST_putClipboard | ( | GHOST_TInt8 * | buffer, |
| int | selection | ||
| ) |
Put data to the Clipboard
| set | the selection instead, X11 only feature |
| GHOST_TSuccess GHOST_RemoveTimer | ( | GHOST_SystemHandle | systemhandle, |
| GHOST_TimerTaskHandle | timertaskhandle | ||
| ) |
Removes a timer.
| systemhandle | The handle to the system |
| timerTask | Timer task to be removed. |
| 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
| windowhandle | The handle to the window |
| inX | The x-coordinate on the screen. |
| inY | The y-coordinate on the screen. |
| outX | The x-coordinate in the client rectangle. |
| outY | The y-coordinate in the client rectangle. |
| void GHOST_setAcceptDragOperation | ( | GHOST_WindowHandle | windowhandle, |
| GHOST_TInt8 | canAccept | ||
| ) |
Tells if the ongoing drag'n'drop object can be accepted upon mouse drop
| 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.
| rectanglehandle | The handle to the rectangle |
| cx | requested center x-coordinate of the rectangle |
| cy | requested center y-coordinate of the rectangle |
| GHOST_TSuccess GHOST_SetClientHeight | ( | GHOST_WindowHandle | windowhandle, |
| GHOST_TUns32 | height | ||
| ) |
Resizes client rectangle height.
| windowhandle | The handle to the window |
| height | The new height of the client area of the window. |
| GHOST_TSuccess GHOST_SetClientSize | ( | GHOST_WindowHandle | windowhandle, |
| GHOST_TUns32 | width, | ||
| GHOST_TUns32 | height | ||
| ) |
Resizes client rectangle.
| windowhandle | The handle to the window |
| width | The new width of the client area of the window. |
| height | The new height of the client area of the window. |
| GHOST_TSuccess GHOST_SetClientWidth | ( | GHOST_WindowHandle | windowhandle, |
| GHOST_TUns32 | width | ||
| ) |
Resizes client rectangle width.
| windowhandle | The handle to the window |
| width | The new width of the client area of the window. |
| 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.
| windowhandle | The handle to the window |
| mode | The new grab state of the cursor. |
| bounds | The grab ragion (optional) - left,top,right,bottom |
| 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).
| systemhandle | The handle to the system |
| x | The x-coordinate of the cursor. |
| y | The y-coordinate of the cursor. |
| GHOST_TSuccess GHOST_SetCursorShape | ( | GHOST_WindowHandle | windowhandle, |
| GHOST_TStandardCursor | cursorshape | ||
| ) |
Set the shape of the cursor.
| windowhandle | The handle to the window |
| cursor | The new cursor shape type id. |
| GHOST_TSuccess GHOST_SetCursorVisibility | ( | GHOST_WindowHandle | windowhandle, |
| int | visible | ||
| ) |
Shows or hides the cursor.
| windowhandle | The handle to the window |
| visible | The new visibility state of the cursor. |
| 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.
| windowhandle | The handle to the window |
| bitmap | The bitmap data for the cursor. |
| mask | The mask data for the cursor. |
| hotX | The X coordinate of the cursor hotspot. |
| hotY | The Y coordinate of the cursor hotspot. |
| 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.
| windowhandle | The handle to the window |
| bitmap | The bitmap data for the cursor. |
| mask | The mask data for the cursor. sizex, sizey The size of the cursor |
| hotX | The X coordinate of the cursor hotspot. |
| hotY | The Y coordinate of the cursor hotspot. |
| fg_color,bg_color | Colors of the cursor |
| GHOST_TSuccess GHOST_SetDrawingContextType | ( | GHOST_WindowHandle | windowhandle, |
| GHOST_TDrawingContextType | type | ||
| ) |
Tries to install a rendering context in this window.
| windowhandle | The handle to the window |
| type | The type of rendering context installed. |
| GHOST_TSuccess GHOST_SetProgressBar | ( | GHOST_WindowHandle | windowhandle, |
| float | progress | ||
| ) |
Sets the progress bar value displayed in the window/application icon
| windowhandle | The handle to the window |
| progress | The progress % (0.0 to 1.0) |
| void GHOST_SetRectangle | ( | GHOST_RectangleHandle | rectanglehandle, |
| GHOST_TInt32 | l, | ||
| GHOST_TInt32 | t, | ||
| GHOST_TInt32 | r, | ||
| GHOST_TInt32 | b | ||
| ) |
Sets all members of the rectangle.
| rectanglehandle | The handle to the rectangle |
| l | requested left coordinate of the rectangle |
| t | requested top coordinate of the rectangle |
| r | requested right coordinate of the rectangle |
| b | requested bottom coordinate of the rectangle |
| 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.
| rectanglehandle | The handle to the rectangle |
| cx | requested center x-coordinate of the rectangle |
| cy | requested center y-coordinate of the rectangle |
| w | requested width of the rectangle |
| h | requested height of the rectangle |
| void GHOST_SetTimerProc | ( | GHOST_TimerTaskHandle | timertaskhandle, |
| GHOST_TimerProcPtr | timerProc | ||
| ) |
Changes the timer callback.
| timertaskhandle | The handle to the timertask |
| timerProc | The timer callback. |
| void GHOST_SetTimerTaskUserData | ( | GHOST_TimerTaskHandle | timertaskhandle, |
| GHOST_TUserDataPtr | userData | ||
| ) |
Changes the time user data.
| timertaskhandle | The handle to the timertask |
| data | The timer user data. |
| void GHOST_SetTitle | ( | GHOST_WindowHandle | windowhandle, |
| const char * | title | ||
| ) |
Sets the title displayed in the title bar.
| windowhandle | The handle to the window |
| title | The title to display in the title bar. |
| GHOST_TSuccess GHOST_SetWindowModifiedState | ( | GHOST_WindowHandle | windowhandle, |
| GHOST_TUns8 | isUnsavedChanges | ||
| ) |
Sets the window "modified" status, indicating unsaved changes
| windowhandle | The handle to the window |
| isUnsavedChanges | Unsaved changes or not |
| GHOST_TSuccess GHOST_SetWindowOrder | ( | GHOST_WindowHandle | windowhandle, |
| GHOST_TWindowOrder | order | ||
| ) |
Sets the order of the window (bottom, top).
| windowhandle | The handle to the window |
| order | The order of the window. |
| GHOST_TSuccess GHOST_SetWindowState | ( | GHOST_WindowHandle | windowhandle, |
| GHOST_TWindowState | state | ||
| ) |
Sets the state of the window (normal, minimized, maximized).
| windowhandle | The handle to the window |
| state | The state of the window. |
| void GHOST_SetWindowUserData | ( | GHOST_WindowHandle | windowhandle, |
| GHOST_TUserDataPtr | userdata | ||
| ) |
Changes the window user data.
| windowhandle | The handle to the window |
| data | The window user data. |
| GHOST_TSuccess GHOST_SwapWindowBuffers | ( | GHOST_WindowHandle | windowhandle | ) |
Swaps front and back buffers of a window.
| windowhandle | The handle to the window |
| void GHOST_UnionPointRectangle | ( | GHOST_RectangleHandle | rectanglehandle, |
| GHOST_TInt32 | x, | ||
| GHOST_TInt32 | y | ||
| ) |
Grows the rectangle to included a point.
| rectanglehandle | The handle to the rectangle |
| x | The x-coordinate of the point. |
| y | The y-coordinate of the point. |
| 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.
| rectanglehandle | The handle to the rectangle |
| r | The rectangle that is input for the union operation. |
| int GHOST_ValidWindow | ( | GHOST_SystemHandle | systemhandle, |
| GHOST_WindowHandle | windowhandle | ||
| ) |
Returns whether a window is valid.
| systemhandle | The handle to the system |
| window | Handle to the window to be checked. |
1.7.3