|
Blender
V2.93
|
GHOST C-API function and type declarations. More...
Go to the source code of this file.
Typedefs | |
| typedef int(* | GHOST_EventCallbackProcPtr) (GHOST_EventHandle event, GHOST_TUserDataPtr userdata) |
Functions | |
| GHOST_SystemHandle | GHOST_CreateSystem (void) |
| void | GHOST_SystemInitDebug (GHOST_SystemHandle systemhandle, int is_debug_enabled) |
| GHOST_TSuccess | GHOST_DisposeSystem (GHOST_SystemHandle systemhandle) |
| void | GHOST_ShowMessageBox (GHOST_SystemHandle systemhandle, const char *title, const char *message, const char *help_label, const char *continue_label, const char *link, GHOST_DialogOptions dialog_options) |
| 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) |
| void | GHOST_GetAllDisplayDimensions (GHOST_SystemHandle systemhandle, GHOST_TUns32 *width, GHOST_TUns32 *height) |
| GHOST_WindowHandle | GHOST_CreateWindow (GHOST_SystemHandle systemhandle, GHOST_WindowHandle parent_windowhandle, const char *title, GHOST_TInt32 left, GHOST_TInt32 top, GHOST_TUns32 width, GHOST_TUns32 height, GHOST_TWindowState state, bool is_dialog, GHOST_TDrawingContextType type, GHOST_GLSettings glSettings) |
| GHOST_ContextHandle | GHOST_CreateOpenGLContext (GHOST_SystemHandle systemhandle, GHOST_GLSettings glSettings) |
| GHOST_TSuccess | GHOST_DisposeOpenGLContext (GHOST_SystemHandle systemhandle, GHOST_ContextHandle contexthandle) |
| GHOST_TUserDataPtr | GHOST_GetWindowUserData (GHOST_WindowHandle windowhandle) |
| void | GHOST_SetWindowUserData (GHOST_WindowHandle windowhandle, GHOST_TUserDataPtr userdata) |
| int | GHOST_IsDialogWindow (GHOST_WindowHandle windowhandle) |
| 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) |
| void | 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_HasCursorShape (GHOST_WindowHandle windowhandle, GHOST_TStandardCursor cursorshape) |
| GHOST_TSuccess | GHOST_SetCustomCursorShape (GHOST_WindowHandle windowhandle, GHOST_TUns8 *bitmap, GHOST_TUns8 *mask, int sizex, int sizey, int hotX, int hotY, GHOST_TUns8 canInvertColor) |
| 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, GHOST_TAxisFlag warp_axis, int bounds[4], const int mouse_ungrab_xy[2]) |
| 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_SetSwapInterval (GHOST_WindowHandle windowhandle, int interval) |
| GHOST_TSuccess | GHOST_GetSwapInterval (GHOST_WindowHandle windowhandle, int *intervalOut) |
| GHOST_TSuccess | GHOST_ActivateWindowDrawingContext (GHOST_WindowHandle windowhandle) |
| GHOST_TSuccess | GHOST_InvalidateWindow (GHOST_WindowHandle windowhandle) |
| GHOST_TSuccess | GHOST_ActivateOpenGLContext (GHOST_ContextHandle contexthandle) |
| GHOST_TSuccess | GHOST_ReleaseOpenGLContext (GHOST_ContextHandle contexthandle) |
| unsigned int | GHOST_GetContextDefaultOpenGLFramebuffer (GHOST_ContextHandle contexthandle) |
| int | GHOST_isUpsideDownContext (GHOST_ContextHandle contexthandle) |
| unsigned int | GHOST_GetDefaultOpenGLFramebuffer (GHOST_WindowHandle windwHandle) |
| void | GHOST_SetTabletAPI (GHOST_SystemHandle systemhandle, GHOST_TTabletAPI api) |
| 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) |
| int | GHOST_toggleConsole (int action) |
| int | GHOST_UseNativePixels (void) |
| void | GHOST_UseWindowFocus (int use_focus) |
| float | GHOST_GetNativePixelSize (GHOST_WindowHandle windowhandle) |
| GHOST_TUns16 | GHOST_GetDPIHint (GHOST_WindowHandle windowhandle) |
| void | GHOST_BeginIME (GHOST_WindowHandle windowhandle, GHOST_TInt32 x, GHOST_TInt32 y, GHOST_TInt32 w, GHOST_TInt32 h, int complete) |
| void | GHOST_EndIME (GHOST_WindowHandle windowhandle) |
GHOST C-API function and type declarations.
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 39 of file GHOST_C-api.h.
| GHOST_TSuccess GHOST_ActivateOpenGLContext | ( | GHOST_ContextHandle | contexthandle | ) |
Activates the drawing context of this context.
| contexthandle | The handle to the context. |
Definition at line 659 of file GHOST_C-api.cpp.
References context, GHOST_kFailure, and GHOST_PRINTF.
Referenced by WM_opengl_context_activate().
| GHOST_TSuccess GHOST_ActivateWindowDrawingContext | ( | GHOST_WindowHandle | windowhandle | ) |
Activates the drawing context of this window.
| windowhandle | The handle to the window. |
Definition at line 652 of file GHOST_C-api.cpp.
References GHOST_IWindow::activateDrawingContext().
Referenced by extrawindow_do_draw(), extrawindow_do_reshape(), ghost_event_proc(), loggerwindow_do_draw(), loggerwindow_do_reshape(), mainwindow_do_draw(), mainwindow_do_reshape(), playanim_toscreen(), setViewPortGL(), wm_ghostwindow_destroy(), WM_window_pixel_sample_read(), WM_window_pixels_read(), and wm_window_set_drawable().
| 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. |
Definition at line 265 of file GHOST_C-api.cpp.
References GHOST_ISystem::addEventConsumer().
Referenced by main(), multitestapp_new(), wm_ghost_init(), and wm_main_playanim_intern().
| 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. |
| stereoVisual | Option for stereo display. |
Definition at line 219 of file GHOST_C-api.cpp.
References GHOST_ISystem::beginFullScreen(), and NULL.
Referenced by processEvent().
| void GHOST_BeginIME | ( | GHOST_WindowHandle | windowhandle, |
| GHOST_TInt32 | x, | ||
| GHOST_TInt32 | y, | ||
| GHOST_TInt32 | w, | ||
| GHOST_TInt32 | h, | ||
| int | complete | ||
| ) |
Enable IME attached to the given window, i.e. allows user-input events to be dispatched to the IME.
| windowhandle | Window handle of the caller. |
| x | Requested x-coordinate of the rectangle. |
| y | Requested y-coordinate of the rectangle. |
| w | Requested width of the rectangle. |
| h | Requested height of the rectangle. |
| complete | Whether or not to complete the ongoing composition.
|
| 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. |
Definition at line 591 of file GHOST_C-api.cpp.
References GHOST_IWindow::clientToScreen().
Referenced by wm_cursor_position_to_ghost().
| 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. |
| anotherrectanglehandle | The rectangle to clip. |
Definition at line 814 of file GHOST_C-api.cpp.
References GHOST_kFailure, GHOST_kSuccess, and result.
| 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. |
Definition at line 74 of file GHOST_C-api.cpp.
Referenced by main(), multitestapp_new(), wm_ghost_init(), and wm_main_playanim_intern().
| GHOST_ContextHandle GHOST_CreateOpenGLContext | ( | GHOST_SystemHandle | systemhandle, |
| GHOST_GLSettings | glSettings | ||
| ) |
Create a new offscreen context. Never explicitly delete the context, use disposeContext() instead.
| systemhandle | The handle to the system. |
| platform_support_callback | An optional callback to check platform support. |
Definition at line 138 of file GHOST_C-api.cpp.
References GHOST_ISystem::createOffscreenContext().
Referenced by blender::gpu::GPUTest::SetUp(), and WM_opengl_context_create().
| GHOST_SystemHandle GHOST_CreateSystem | ( | void | ) |
Creates the one and only system.
Definition at line 40 of file GHOST_C-api.cpp.
References GHOST_ISystem::createSystem(), and GHOST_ISystem::getSystem().
Referenced by main(), multitestapp_new(), blender::gpu::GPUTest::SetUp(), wm_ghost_init(), and wm_main_playanim_intern().
| GHOST_WindowHandle GHOST_CreateWindow | ( | GHOST_SystemHandle | systemhandle, |
| GHOST_WindowHandle | parent_windowhandle, | ||
| const char * | title, | ||
| GHOST_TInt32 | left, | ||
| GHOST_TInt32 | top, | ||
| GHOST_TUns32 | width, | ||
| GHOST_TUns32 | height, | ||
| GHOST_TWindowState | state, | ||
| bool | is_dialog, | ||
| GHOST_TDrawingContextType | type, | ||
| GHOST_GLSettings | glSettings | ||
| ) |
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. |
| parentWindow | Handle of parent (or owner) window, or NULL |
| 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. |
| is_dialog | Stay on top of parent window, no icon in taskbar, can't be minimized. |
| type | The type of drawing context installed in this window. |
| glSettings | Misc OpenGL options. |
Definition at line 155 of file GHOST_C-api.cpp.
References GHOST_ISystem::createWindow(), height, left, state, top, type, and width.
Referenced by extrawindow_new(), loggerwindow_new(), main(), mainwindow_new(), playanim_window_open(), and wm_window_ghostwindow_add().
| void GHOST_DispatchEvents | ( | GHOST_SystemHandle | systemhandle | ) |
Retrieves events from the queue and send them to the event consumers.
| systemhandle | The handle to the system. |
Definition at line 258 of file GHOST_C-api.cpp.
References GHOST_ISystem::dispatchEvents().
Referenced by build_pict_list_ex(), main(), multitestapp_run(), wm_main_playanim_intern(), and wm_window_process_events().
| GHOST_TSuccess GHOST_DisposeEventConsumer | ( | GHOST_EventConsumerHandle | consumerhandle | ) |
Disposes an event consumer object
| consumerhandle | Handle to the event consumer. |
Definition at line 80 of file GHOST_C-api.cpp.
References GHOST_kSuccess.
| GHOST_TSuccess GHOST_DisposeOpenGLContext | ( | GHOST_SystemHandle | systemhandle, |
| GHOST_ContextHandle | contexthandle | ||
| ) |
Dispose of a context.
| systemhandle | The handle to the system. |
| contexthandle | Handle to the context to be disposed. |
Definition at line 146 of file GHOST_C-api.cpp.
References context, and GHOST_ISystem::disposeContext().
Referenced by blender::gpu::GPUTest::TearDown(), and WM_opengl_context_dispose().
| void GHOST_DisposeRectangle | ( | GHOST_RectangleHandle | rectanglehandle | ) |
Disposes a rectangle object.
| rectanglehandle | Handle to the rectangle. |
Definition at line 552 of file GHOST_C-api.cpp.
Referenced by blender::gpu::GLContext::activate(), blender::gpu::GLContext::GLContext(), playanim_window_get_size(), setViewPortGL(), wm_window_ghostwindow_add(), and wm_window_update_size_position().
| GHOST_TSuccess GHOST_DisposeSystem | ( | GHOST_SystemHandle | systemhandle | ) |
Disposes the one and only system.
| systemhandle | The handle to the system. |
Definition at line 55 of file GHOST_C-api.cpp.
References GHOST_ISystem::disposeSystem().
Referenced by main(), multitestapp_free(), blender::gpu::GPUTest::TearDown(), and wm_ghost_exit().
| GHOST_TSuccess GHOST_DisposeWindow | ( | GHOST_SystemHandle | systemhandle, |
| GHOST_WindowHandle | windowhandle | ||
| ) |
Dispose a window.
| systemhandle | The handle to the system. |
| windowhandle | Handle to the window to be disposed. |
Definition at line 202 of file GHOST_C-api.cpp.
References GHOST_ISystem::disposeWindow().
Referenced by extrawindow_free(), loggerwindow_free(), main(), mainwindow_free(), processEvent(), wm_ghostwindow_destroy(), and wm_main_playanim_intern().
| GHOST_TSuccess GHOST_EndFullScreen | ( | GHOST_SystemHandle | systemhandle | ) |
Ends full screen mode.
| systemhandle | The handle to the system. |
Definition at line 237 of file GHOST_C-api.cpp.
References GHOST_ISystem::endFullScreen().
Referenced by processEvent().
| void GHOST_EndIME | ( | GHOST_WindowHandle | windowhandle | ) |
Disable the IME attached to the given window, i.e. prohibits any user-input events from being dispatched to the IME.
| windowhandle | The window handle of the caller. |
| GHOST_TSuccess GHOST_EndProgressBar | ( | GHOST_WindowHandle | windowhandle | ) |
Hides the progress bar in the icon
| windowhandle | The handle to the window. |
Definition at line 288 of file GHOST_C-api.cpp.
References GHOST_IWindow::endProgressBar().
Referenced by WM_progress_clear().
| void GHOST_GetAllDisplayDimensions | ( | GHOST_SystemHandle | systemhandle, |
| GHOST_TUns32 * | width, | ||
| GHOST_TUns32 * | height | ||
| ) |
Returns the dimensions of all displays combine (the current workspace). No need to worry about overlapping monitors.
| systemhandle | The handle to the system. |
| width | A pointer the width gets put in. |
| height | A pointer the height gets put in. |
Definition at line 129 of file GHOST_C-api.cpp.
References GHOST_ISystem::getAllDisplayDimensions(), height, and width.
Referenced by wm_get_desktopsize().
| GHOST_TSuccess GHOST_GetButtonState | ( | GHOST_SystemHandle | systemhandle, |
| GHOST_TButtonMask | mask, | ||
| int * | isDown | ||
| ) |
Returns the state of a mouse button (outside the message queue).
| systemhandle | The handle to the system. |
| mask | The button state to retrieve. |
| isDown | Pointer to return button state in. |
Definition at line 400 of file GHOST_C-api.cpp.
References GHOST_ISystem::getButtonState(), mask(), and result.
| 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. |
Definition at line 541 of file GHOST_C-api.cpp.
References GHOST_IWindow::getClientBounds(), and NULL.
Referenced by blender::gpu::GLContext::activate(), extrawindow_do_reshape(), blender::gpu::GLContext::GLContext(), loggerwindow_do_reshape(), mainwindow_do_reshape(), playanim_window_get_size(), setViewPortGL(), wm_window_ghostwindow_add(), and wm_window_update_size_position().
| GHOST_TUns8* GHOST_getClipboard | ( | int | selection | ) |
Return the data from the clipboard
| selection | Boolean to return the selection instead, X11 only feature. |
Definition at line 825 of file GHOST_C-api.cpp.
References GHOST_ISystem::getClipboard(), and GHOST_ISystem::getSystem().
Referenced by wm_clipboard_text_get_ex().
| unsigned int GHOST_GetContextDefaultOpenGLFramebuffer | ( | GHOST_ContextHandle | contexthandle | ) |
Get the OpenGL frame-buffer handle that serves as a default frame-buffer.
Definition at line 678 of file GHOST_C-api.cpp.
References context.
| 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. |
Definition at line 346 of file GHOST_C-api.cpp.
References GHOST_ISystem::getCursorPosition(), x, and y.
Referenced by ghost_event_proc(), and wm_cursor_position_get().
| GHOST_TStandardCursor GHOST_GetCursorShape | ( | GHOST_WindowHandle | windowhandle | ) |
Returns the current cursor shape.
| windowhandle | The handle to the window. |
Definition at line 295 of file GHOST_C-api.cpp.
References GHOST_IWindow::getCursorShape().
| int GHOST_GetCursorVisibility | ( | GHOST_WindowHandle | windowhandle | ) |
Returns the visibility state of the cursor.
| windowhandle | The handle to the window. |
Definition at line 332 of file GHOST_C-api.cpp.
References GHOST_IWindow::getCursorVisibility().
Referenced by processEvent().
| unsigned int GHOST_GetDefaultOpenGLFramebuffer | ( | GHOST_WindowHandle | windwHandle | ) |
Get the OpenGL frame-buffer handle that serves as a default frame-buffer.
Definition at line 685 of file GHOST_C-api.cpp.
References GHOST_IWindow::getDefaultFramebuffer().
Referenced by blender::gpu::GLContext::GLContext().
| GHOST_TUns16 GHOST_GetDPIHint | ( | GHOST_WindowHandle | windowhandle | ) |
Returns the suggested DPI for this window.
Definition at line 863 of file GHOST_C-api.cpp.
References GHOST_IWindow::getDPIHint().
Referenced by WM_window_set_dpi().
| GHOST_TDrawingContextType GHOST_GetDrawingContextType | ( | GHOST_WindowHandle | windowhandle | ) |
Returns the type of drawing context used in this window.
| windowhandle | The handle to the window. |
Definition at line 492 of file GHOST_C-api.cpp.
References GHOST_IWindow::getDrawingContextType().
| GHOST_TEventDataPtr GHOST_GetEventData | ( | GHOST_EventHandle | eventhandle | ) |
Returns the event data.
| eventhandle | The handle to the event. |
Definition at line 450 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.
| eventhandle | The handle to the event. |
Definition at line 436 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.
| eventhandle | The handle to the event. |
Definition at line 429 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.
| eventhandle | The handle to the event. |
Definition at line 443 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.
| systemhandle | The handle to the system. |
Definition at line 244 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.
| rectanglehandle | The handle to the rectangle. |
Definition at line 710 of file GHOST_C-api.cpp.
Referenced by blender::gpu::GLContext::activate(), extrawindow_do_reshape(), blender::gpu::GLContext::GLContext(), loggerwindow_do_reshape(), mainwindow_do_reshape(), playanim_window_get_size(), setViewPortGL(), and wm_window_ghostwindow_add().
| 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. |
Definition at line 120 of file GHOST_C-api.cpp.
References GHOST_ISystem::getMainDisplayDimensions(), height, and width.
Referenced by loggerwindow_new(), playanim_window_open(), wm_get_screensize(), and wm_main_playanim_intern().
| 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. |
Definition at line 86 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 (outside the message queue).
| systemhandle | The handle to the system. |
| mask | The modifier key state to retrieve. |
| isDown | Pointer to return modifier state in. |
Definition at line 386 of file GHOST_C-api.cpp.
References GHOST_ISystem::getModifierKeyState(), mask(), and result.
Referenced by query_qual().
| float GHOST_GetNativePixelSize | ( | GHOST_WindowHandle | windowhandle | ) |
If window was opened using native pixel size, it returns scaling factor.
Definition at line 855 of file GHOST_C-api.cpp.
References GHOST_IWindow::getNativePixelSize().
Referenced by wm_cursor_arrow_move(), WM_cursor_compatible_xy(), wm_cursor_position_from_ghost(), wm_cursor_position_to_ghost(), WM_window_open(), WM_window_pixels_x(), WM_window_pixels_y(), and WM_window_set_dpi().
| GHOST_TUns8 GHOST_GetNumDisplays | ( | GHOST_SystemHandle | systemhandle | ) |
Returns the number of displays on this system.
| systemhandle | The handle to the system. |
Definition at line 113 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.
| 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. |
Definition at line 715 of file GHOST_C-api.cpp.
References l, GHOST_Rect::m_b, GHOST_Rect::m_l, GHOST_Rect::m_r, GHOST_Rect::m_t, r, and t.
Referenced by wm_window_update_size_position().
| GHOST_TVisibility GHOST_GetRectangleVisibility | ( | GHOST_RectangleHandle | rectanglehandle, |
| GHOST_RectangleHandle | anotherrectanglehandle | ||
| ) |
Returns whether the rectangle is inside this rectangle.
| rectanglehandle | The handle to the rectangle. |
| anotherrectanglehandle | The rectangle to test. |
Definition at line 788 of file GHOST_C-api.cpp.
References GHOST_kNotVisible.
| GHOST_TSuccess GHOST_GetSwapInterval | ( | GHOST_WindowHandle | windowhandle, |
| int * | intervalOut | ||
| ) |
Gets the current swap interval for #swapBuffers.
| windowhandle | The handle to the window |
| intervalOut | pointer to location to return swap interval (left untouched if there is an error) |
Definition at line 645 of file GHOST_C-api.cpp.
References GHOST_IWindow::getSwapInterval().
Referenced by wm_window_get_swap_interval().
| GHOST_TimerProcPtr GHOST_GetTimerProc | ( | GHOST_TimerTaskHandle | timertaskhandle | ) |
Returns the timer callback.
| timertaskhandle | The handle to the timer-task. |
Definition at line 457 of file GHOST_C-api.cpp.
References GHOST_ITimerTask::getTimerProc().
| GHOST_TUserDataPtr GHOST_GetTimerTaskUserData | ( | GHOST_TimerTaskHandle | timertaskhandle | ) |
Returns the timer user data.
| timertaskhandle | The handle to the timertask. |
Definition at line 471 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().
| windowhandle | The handle to the window. |
Definition at line 514 of file GHOST_C-api.cpp.
References GHOST_IWindow::getTitle(), and NULL.
Referenced by event_to_buf(), processEvent(), and WM_window_open().
| int GHOST_GetValid | ( | GHOST_WindowHandle | windowhandle | ) |
Returns indication as to whether the window is valid.
| windowhandle | The handle to the window. |
Definition at line 485 of file GHOST_C-api.cpp.
References GHOST_IWindow::getValid().
| GHOST_TInt32 GHOST_GetWidthRectangle | ( | GHOST_RectangleHandle | rectanglehandle | ) |
Access to rectangle width.
| rectanglehandle | The handle to the rectangle. |
Definition at line 705 of file GHOST_C-api.cpp.
Referenced by blender::gpu::GLContext::activate(), extrawindow_do_reshape(), blender::gpu::GLContext::GLContext(), loggerwindow_do_reshape(), mainwindow_do_reshape(), playanim_window_get_size(), setViewPortGL(), and wm_window_ghostwindow_add().
| GHOST_RectangleHandle GHOST_GetWindowBounds | ( | GHOST_WindowHandle | windowhandle | ) |
Returns the window rectangle dimensions. These are screen coordinates.
| windowhandle | The handle to the window. |
Definition at line 530 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).
| windowhandle | The handle to the window. |
Definition at line 602 of file GHOST_C-api.cpp.
References GHOST_IWindow::getState().
Referenced by ghost_event_proc(), wm_draw_update(), WM_stereo3d_enabled(), wm_window_fullscreen_toggle_exec(), wm_window_ghostwindow_add(), and wm_window_raise().
| GHOST_TUserDataPtr GHOST_GetWindowUserData | ( | GHOST_WindowHandle | windowhandle | ) |
Returns the window user data.
| windowhandle | The handle to the window. |
Definition at line 182 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().
| GHOST_TSuccess GHOST_HasCursorShape | ( | GHOST_WindowHandle | windowhandle, |
| GHOST_TStandardCursor | cursorshape | ||
| ) |
Test if the standard cursor shape is supported by current platform.
Definition at line 310 of file GHOST_C-api.cpp.
References GHOST_IWindow::hasCursorShape().
Referenced by WM_cursor_set().
| 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). |
Definition at line 758 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.
| 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. |
Definition at line 93 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.
| windowhandle | The handle to the window. |
Definition at line 692 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().
| int GHOST_IsDialogWindow | ( | GHOST_WindowHandle | windowhandle | ) |
Definition at line 195 of file GHOST_C-api.cpp.
References GHOST_IWindow::isDialog().
Referenced by wm_window_copy().
| 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. |
Definition at line 738 of file GHOST_C-api.cpp.
References GHOST_kFailure, GHOST_kSuccess, and result.
| 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. |
Definition at line 776 of file GHOST_C-api.cpp.
References GHOST_kFailure, GHOST_kSuccess, isInside(), result, x, and y.
| int GHOST_isUpsideDownContext | ( | GHOST_ContextHandle | contexthandle | ) |
Returns whether a context is rendered upside down compared to OpenGL. This only needs to be called if there's a non-OpenGL context, which is really the exception. So generally, this does not need to be called.
| 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, empty rectangles are valid.
| rectanglehandle | The handle to the rectangle. |
Definition at line 748 of file GHOST_C-api.cpp.
References GHOST_kFailure, GHOST_kSuccess, and result.
| 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. |
Definition at line 251 of file GHOST_C-api.cpp.
References GHOST_ISystem::processEvents().
Referenced by build_pict_list_ex(), main(), multitestapp_run(), wm_main_playanim_intern(), and wm_window_process_events().
| void GHOST_putClipboard | ( | GHOST_TInt8 * | buffer, |
| int | selection | ||
| ) |
Put data to the Clipboard
| buffer | the string buffer to set. |
| selection | Set the selection instead, X11 only feature. |
Definition at line 831 of file GHOST_C-api.cpp.
References buffer, GHOST_ISystem::getSystem(), and GHOST_ISystem::putClipboard().
Referenced by WM_clipboard_text_set().
| GHOST_TSuccess GHOST_ReleaseOpenGLContext | ( | GHOST_ContextHandle | contexthandle | ) |
Release the drawing context bound to this thread.
| contexthandle | The handle to the context. |
Definition at line 671 of file GHOST_C-api.cpp.
References context.
Referenced by WM_opengl_context_release().
| GHOST_TSuccess GHOST_RemoveEventConsumer | ( | GHOST_SystemHandle | systemhandle, |
| GHOST_EventConsumerHandle | consumerhandle | ||
| ) |
Remove the given event consumer to our list.
| systemhandle | The handle to the system. |
| consumerhandle | The event consumer to remove. |
Definition at line 273 of file GHOST_C-api.cpp.
References GHOST_ISystem::removeEventConsumer().
| GHOST_TSuccess GHOST_RemoveTimer | ( | GHOST_SystemHandle | systemhandle, |
| GHOST_TimerTaskHandle | timertaskhandle | ||
| ) |
Removes a timer.
| systemhandle | The handle to the system. |
| timertaskhandle | Timer task to be removed. |
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
| 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. |
Definition at line 580 of file GHOST_C-api.cpp.
References GHOST_IWindow::screenToClient().
Referenced by ghost_event_proc(), loggerwindow_handle(), mainwindow_handle(), and wm_cursor_position_from_ghost().
| 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 422 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.
| rectanglehandle | The handle to the rectangle. |
| cx | Requested center x-coordinate of the rectangle. |
| cy | Requested center y-coordinate of the rectangle. |
Definition at line 798 of file GHOST_C-api.cpp.
| 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. |
Definition at line 564 of file GHOST_C-api.cpp.
References height, and GHOST_IWindow::setClientHeight().
| 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. |
Definition at line 571 of file GHOST_C-api.cpp.
References height, GHOST_IWindow::setClientSize(), and width.
Referenced by playanim_window_zoom(), and wm_window_set_size().
| 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. |
Definition at line 557 of file GHOST_C-api.cpp.
References GHOST_IWindow::setClientWidth(), and width.
| GHOST_TSuccess GHOST_SetCursorGrab | ( | GHOST_WindowHandle | windowhandle, |
| GHOST_TGrabCursorMode | mode, | ||
| GHOST_TAxisFlag | warp_axis, | ||
| int | bounds[4], | ||
| const int | mouse_ungrab_xy[2] | ||
| ) |
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 region (optional) - left,top,right,bottom. |
| mouse_ungrab_xy | XY for new mouse location (optional). |
Definition at line 364 of file GHOST_C-api.cpp.
References bounds(), NULL, and GHOST_IWindow::setCursorGrab().
Referenced by WM_cursor_grab_disable(), and WM_cursor_grab_enable().
| 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. |
Definition at line 355 of file GHOST_C-api.cpp.
References GHOST_ISystem::setCursorPosition(), x, and y.
Referenced by WM_cursor_warp().
| GHOST_TSuccess GHOST_SetCursorShape | ( | GHOST_WindowHandle | windowhandle, |
| GHOST_TStandardCursor | cursorshape | ||
| ) |
Set the shape of the cursor. If the shape is not supported by the platform, it will use the default cursor instead.
| windowhandle | The handle to the window. |
| cursorshape | The new cursor shape type id. |
Definition at line 302 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.
| windowhandle | The handle to the window. |
| visible | The new visibility state of the cursor. |
Definition at line 339 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, | ||
| GHOST_TUns8 * | mask, | ||
| int | sizex, | ||
| int | sizey, | ||
| int | hotX, | ||
| int | hotY, | ||
| GHOST_TUns8 | canInvertColor | ||
| ) |
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 | The width of the cursor. |
| sizey | The height of the cursor. |
| hotX | The X coordinate of the cursor hot-spot. |
| hotY | The Y coordinate of the cursor hot-spot. |
| canInvertColor | Let macOS invert cursor color to match platform convention. |
Definition at line 318 of file GHOST_C-api.cpp.
References mask(), and GHOST_IWindow::setCustomCursorShape().
Referenced by extrawindow_spin_cursor(), window_set_custom_cursor(), and window_set_custom_cursor_ex().
| 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. |
Definition at line 499 of file GHOST_C-api.cpp.
References GHOST_IWindow::setDrawingContextType(), and type.
| 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 percentage (0.0 to 1.0). |
Definition at line 281 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.
| 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. |
Definition at line 729 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.
| 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. |
Definition at line 805 of file GHOST_C-api.cpp.
References w().
| GHOST_TSuccess GHOST_SetSwapInterval | ( | GHOST_WindowHandle | windowhandle, |
| int | interval | ||
| ) |
Sets the swap interval for #swapBuffers.
| interval | The swap interval to use. |
Definition at line 638 of file GHOST_C-api.cpp.
References GHOST_IWindow::setSwapInterval().
Referenced by wm_window_set_swap_interval().
| void GHOST_SetTabletAPI | ( | GHOST_SystemHandle | systemhandle, |
| GHOST_TTabletAPI | api | ||
| ) |
Set which tablet API to use. Only affects Windows, other platforms have a single API.
| systemhandle | The handle to the system. |
| api | Enum indicating which API to use. |
Definition at line 699 of file GHOST_C-api.cpp.
References GHOST_ISystem::setTabletAPI().
Referenced by WM_init_tablet_api().
| void GHOST_SetTimerProc | ( | GHOST_TimerTaskHandle | timertaskhandle, |
| GHOST_TimerProcPtr | timerProc | ||
| ) |
Changes the timer callback.
| timertaskhandle | The handle to the timertask. |
| timerProc | The 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.
| timertaskhandle | The handle to the timertask. |
| userdata | The timer user data. |
Definition at line 478 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.
| windowhandle | The handle to the window. |
| title | The title to display in the title bar. |
Definition at line 507 of file GHOST_C-api.cpp.
References GHOST_IWindow::setTitle().
Referenced by processEvent(), wm_main_playanim_intern(), WM_window_open(), and wm_window_title().
| 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. |
Definition at line 616 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).
| windowhandle | The handle to the window. |
| order | The order of the window. |
Definition at line 624 of file GHOST_C-api.cpp.
References order, and 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).
| windowhandle | The handle to the window. |
| state | The state of the window. |
Definition at line 609 of file GHOST_C-api.cpp.
References GHOST_IWindow::setState(), and state.
Referenced by wm_window_fullscreen_toggle_exec(), wm_window_ghostwindow_add(), and wm_window_raise().
| void GHOST_SetWindowUserData | ( | GHOST_WindowHandle | windowhandle, |
| GHOST_TUserDataPtr | userdata | ||
| ) |
Changes the window user data.
| windowhandle | The handle to the window. |
| userdata | The window user data. |
Definition at line 188 of file GHOST_C-api.cpp.
References GHOST_IWindow::setUserData().
Referenced by extrawindow_new(), loggerwindow_new(), mainwindow_new(), wm_window_ghostwindow_add(), and wm_window_substitute_old().
| void GHOST_ShowMessageBox | ( | GHOST_SystemHandle | systemhandle, |
| const char * | title, | ||
| const char * | message, | ||
| const char * | help_label, | ||
| const char * | continue_label, | ||
| const char * | link, | ||
| GHOST_DialogOptions | dialog_options | ||
| ) |
Show a system message box to the user
| systemhandle | The handle to the system. |
| title | Title of the message box. |
| message | Message of the message box. |
| help_label | Text to show on the help button that opens a link. |
| continue_label | Text to show on the ok button that continues. |
| link | Optional (hyper)link to a webpage to show when pressing help. |
| dialog_options | Options to configure the message box. |
Definition at line 62 of file GHOST_C-api.cpp.
References GHOST_ISystem::showMessageBox().
Referenced by WM_ghost_show_message_box().
| GHOST_TSuccess GHOST_SwapWindowBuffers | ( | GHOST_WindowHandle | windowhandle | ) |
Swaps front and back buffers of a window.
| windowhandle | The handle to the window. |
Definition at line 631 of file GHOST_C-api.cpp.
References GHOST_IWindow::swapBuffers().
Referenced by extrawindow_do_draw(), loggerwindow_do_draw(), mainwindow_do_draw(), playanim_toscreen(), processEvent(), wm_main_playanim_intern(), and wm_window_swap_buffers().
| void GHOST_SystemInitDebug | ( | GHOST_SystemHandle | systemhandle, |
| int | is_debug_enabled | ||
| ) |
Specifies whether debug messages are to be enabled for the specific system handle.
Definition at line 48 of file GHOST_C-api.cpp.
References GHOST_ISystem::initDebug().
Referenced by wm_ghost_init().
| int GHOST_toggleConsole | ( | int | action | ) |
Toggles console
| action |
|
Definition at line 837 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.
| rectanglehandle | The handle to the rectangle. |
| x | The x-coordinate of the point. |
| y | The y-coordinate of the point. |
Definition at line 769 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.
| rectanglehandle | The handle to the rectangle. |
| anotherrectanglehandle | The rectangle that is input for the union operation. |
Definition at line 763 of file GHOST_C-api.cpp.
| int GHOST_UseNativePixels | ( | void | ) |
Use native pixel size (MacBook pro 'retina'), if supported.
Definition at line 843 of file GHOST_C-api.cpp.
References GHOST_ISystem::getSystem(), and GHOST_ISystem::useNativePixel().
Referenced by wm_ghost_init().
| void GHOST_UseWindowFocus | ( | int | use_focus | ) |
Focus window after opening, or put them in the background.
Definition at line 849 of file GHOST_C-api.cpp.
References GHOST_ISystem::getSystem(), and GHOST_ISystem::useWindowFocus().
Referenced by wm_ghost_init().
| int GHOST_ValidWindow | ( | GHOST_SystemHandle | systemhandle, |
| GHOST_WindowHandle | windowhandle | ||
| ) |
Returns whether a window is valid.
| systemhandle | The handle to the system. |
| windowhandle | Handle to the window to be checked. |
Definition at line 211 of file GHOST_C-api.cpp.
References GHOST_ISystem::validWindow().
Referenced by gearsTimerProc(), ghost_event_proc(), main(), multitest_event_handler(), and processEvent().