Blender V4.5
GHOST_C-api.h
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2001-2002 NaN Holding BV. All rights reserved.
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
8
9#pragma once
10
11#include "GHOST_Types.h"
12
13#ifdef __cplusplus
14extern "C" {
15#endif
16
22using GHOST_EventCallbackProcPtr = bool (*)(GHOST_EventHandle event, GHOST_TUserDataPtr user_data);
23
28extern GHOST_SystemHandle GHOST_CreateSystem(void);
29extern GHOST_SystemHandle GHOST_CreateSystemBackground(void);
30
36extern void GHOST_SystemInitDebug(GHOST_SystemHandle systemhandle, GHOST_Debug debug);
37
38#if !(defined(WIN32) || defined(__APPLE__))
39extern const char *GHOST_SystemBackend(void);
40#endif
41
47extern GHOST_TSuccess GHOST_DisposeSystem(GHOST_SystemHandle systemhandle);
48
59extern void GHOST_ShowMessageBox(GHOST_SystemHandle systemhandle,
60 const char *title,
61 const char *message,
62 const char *help_label,
63 const char *continue_label,
64 const char *link,
65 GHOST_DialogOptions dialog_options);
66
72extern GHOST_EventConsumerHandle GHOST_CreateEventConsumer(
73 GHOST_EventCallbackProcPtr eventCallback, GHOST_TUserDataPtr user_data);
74
80extern GHOST_TSuccess GHOST_DisposeEventConsumer(GHOST_EventConsumerHandle consumerhandle);
81
89extern uint64_t GHOST_GetMilliSeconds(GHOST_SystemHandle systemhandle);
90
102extern GHOST_TimerTaskHandle GHOST_InstallTimer(GHOST_SystemHandle systemhandle,
103 uint64_t delay,
104 uint64_t interval,
105 GHOST_TimerProcPtr timerProc,
106 GHOST_TUserDataPtr user_data);
107
114extern GHOST_TSuccess GHOST_RemoveTimer(GHOST_SystemHandle systemhandle,
115 GHOST_TimerTaskHandle timertaskhandle);
116
117/***************************************************************************************
118 * Display/window management functionality
119 ***************************************************************************************/
120
126extern uint8_t GHOST_GetNumDisplays(GHOST_SystemHandle systemhandle);
127
135extern GHOST_TSuccess GHOST_GetMainDisplayDimensions(GHOST_SystemHandle systemhandle,
136 uint32_t *r_width,
137 uint32_t *r_height);
138
148extern GHOST_TSuccess GHOST_GetAllDisplayDimensions(GHOST_SystemHandle systemhandle,
149 uint32_t *r_width,
150 uint32_t *r_height);
168extern GHOST_WindowHandle GHOST_CreateWindow(GHOST_SystemHandle systemhandle,
169 GHOST_WindowHandle parent_windowhandle,
170 const char *title,
172 int32_t top,
173 uint32_t width,
174 uint32_t height,
176 bool is_dialog,
177 GHOST_GPUSettings gpuSettings);
178
186extern GHOST_ContextHandle GHOST_CreateGPUContext(GHOST_SystemHandle systemhandle,
187 GHOST_GPUSettings gpuSettings);
188
195extern GHOST_TSuccess GHOST_DisposeGPUContext(GHOST_SystemHandle systemhandle,
196 GHOST_ContextHandle contexthandle);
197
203extern GHOST_TUserDataPtr GHOST_GetWindowUserData(GHOST_WindowHandle windowhandle);
204
210extern void GHOST_SetWindowUserData(GHOST_WindowHandle windowhandle, GHOST_TUserDataPtr user_data);
211
212extern bool GHOST_IsDialogWindow(GHOST_WindowHandle windowhandle);
213
220extern GHOST_TSuccess GHOST_DisposeWindow(GHOST_SystemHandle systemhandle,
221 GHOST_WindowHandle windowhandle);
222
229extern bool GHOST_ValidWindow(GHOST_SystemHandle systemhandle, GHOST_WindowHandle windowhandle);
230
240extern GHOST_WindowHandle GHOST_GetWindowUnderCursor(GHOST_SystemHandle systemhandle,
241 int32_t x,
242 int32_t y);
243
244/***************************************************************************************
245 * Event management functionality
246 ***************************************************************************************/
247
255extern bool GHOST_ProcessEvents(GHOST_SystemHandle systemhandle, bool waitForEvent);
256
261extern void GHOST_DispatchEvents(GHOST_SystemHandle systemhandle);
262
269extern GHOST_TSuccess GHOST_AddEventConsumer(GHOST_SystemHandle systemhandle,
270 GHOST_EventConsumerHandle consumerhandle);
271
278extern GHOST_TSuccess GHOST_RemoveEventConsumer(GHOST_SystemHandle systemhandle,
279 GHOST_EventConsumerHandle consumerhandle);
280
281/***************************************************************************************
282 * Progress bar functionality
283 ***************************************************************************************/
284
290extern GHOST_TSuccess GHOST_SetProgressBar(GHOST_WindowHandle windowhandle, float progress);
291
296extern GHOST_TSuccess GHOST_EndProgressBar(GHOST_WindowHandle windowhandle);
297
298/***************************************************************************************
299 * Cursor management functionality
300 ***************************************************************************************/
301
307extern GHOST_TStandardCursor GHOST_GetCursorShape(GHOST_WindowHandle windowhandle);
308
316extern GHOST_TSuccess GHOST_SetCursorShape(GHOST_WindowHandle windowhandle,
317 GHOST_TStandardCursor cursorshape);
318
323extern GHOST_TSuccess GHOST_HasCursorShape(GHOST_WindowHandle windowhandle,
324 GHOST_TStandardCursor cursorshape);
325
338extern GHOST_TSuccess GHOST_SetCustomCursorShape(GHOST_WindowHandle windowhandle,
339 uint8_t *bitmap,
340 uint8_t *mask,
341 int sizex,
342 int sizey,
343 int hotX,
344 int hotY,
345 bool canInvertColor);
346
347extern GHOST_TSuccess GHOST_GetCursorBitmap(GHOST_WindowHandle windowhandle,
348 GHOST_CursorBitmapRef *bitmap);
349
353extern uint32_t GHOST_GetCursorPreferredLogicalSize(const GHOST_SystemHandle systemhandle);
354
360extern bool GHOST_GetCursorVisibility(GHOST_WindowHandle windowhandle);
361
368extern GHOST_TSuccess GHOST_SetCursorVisibility(GHOST_WindowHandle windowhandle, bool visible);
369
377GHOST_TSuccess GHOST_GetCursorPosition(const GHOST_SystemHandle systemhandle,
378 const GHOST_WindowHandle windowhandle,
379 int32_t *x,
380 int32_t *y);
389GHOST_TSuccess GHOST_SetCursorPosition(GHOST_SystemHandle systemhandle,
390 GHOST_WindowHandle windowhandle,
391 int32_t x,
392 int32_t y);
393
394void GHOST_GetCursorGrabState(GHOST_WindowHandle windowhandle,
395 GHOST_TGrabCursorMode *r_mode,
396 GHOST_TAxisFlag *r_axis_flag,
397 int r_bounds[4],
398 bool *r_use_software_cursor);
399
410extern GHOST_TSuccess GHOST_SetCursorGrab(GHOST_WindowHandle windowhandle,
412 GHOST_TAxisFlag wrap_axis,
413 const int bounds[4],
414 const int mouse_ungrab_xy[2]);
415
416/***************************************************************************************
417 * Access to mouse button and keyboard states.
418 ***************************************************************************************/
419
427extern GHOST_TSuccess GHOST_GetModifierKeyState(GHOST_SystemHandle systemhandle,
429 bool *r_is_down);
430
438extern GHOST_TSuccess GHOST_GetButtonState(GHOST_SystemHandle systemhandle,
440 bool *r_is_down);
441
442#ifdef WITH_INPUT_NDOF
443/***************************************************************************************
444 * Access to 3D mouse.
445 ***************************************************************************************/
446
451extern void GHOST_setNDOFDeadZone(float deadzone);
452#endif
453
454/***************************************************************************************
455 * Drag & drop operations
456 ***************************************************************************************/
457
461extern void GHOST_setAcceptDragOperation(GHOST_WindowHandle windowhandle, bool can_accept);
462
468extern GHOST_TEventType GHOST_GetEventType(GHOST_EventHandle eventhandle);
469
475extern uint64_t GHOST_GetEventTime(GHOST_EventHandle eventhandle);
476
483extern GHOST_WindowHandle GHOST_GetEventWindow(GHOST_EventHandle eventhandle);
484
490extern GHOST_TEventDataPtr GHOST_GetEventData(GHOST_EventHandle eventhandle);
491
497extern GHOST_TimerProcPtr GHOST_GetTimerProc(GHOST_TimerTaskHandle timertaskhandle);
498
504extern void GHOST_SetTimerProc(GHOST_TimerTaskHandle timertaskhandle,
505 GHOST_TimerProcPtr timerProc);
506
512extern GHOST_TUserDataPtr GHOST_GetTimerTaskUserData(GHOST_TimerTaskHandle timertaskhandle);
513
519extern void GHOST_SetTimerTaskUserData(GHOST_TimerTaskHandle timertaskhandle,
520 GHOST_TUserDataPtr user_data);
521
527extern bool GHOST_GetValid(GHOST_WindowHandle windowhandle);
528
534extern GHOST_TDrawingContextType GHOST_GetDrawingContextType(GHOST_WindowHandle windowhandle);
535
542extern GHOST_TSuccess GHOST_SetDrawingContextType(GHOST_WindowHandle windowhandle,
544
550extern GHOST_ContextHandle GHOST_GetDrawingContext(GHOST_WindowHandle windowhandle);
551
557extern void GHOST_SetTitle(GHOST_WindowHandle windowhandle, const char *title);
558
566extern char *GHOST_GetTitle(GHOST_WindowHandle windowhandle);
567
573extern GHOST_TSuccess GHOST_SetPath(GHOST_WindowHandle windowhandle, const char *filepath);
574
579 GHOST_WindowHandle windowhandle);
580
585extern void GHOST_SetWindowDecorationStyleFlags(GHOST_WindowHandle windowhandle,
587
593 GHOST_WindowHandle windowhandle, GHOST_WindowDecorationStyleSettings decorationSettings);
594
598extern GHOST_TSuccess GHOST_ApplyWindowDecorationStyle(GHOST_WindowHandle windowhandle);
599
606extern GHOST_RectangleHandle GHOST_GetWindowBounds(GHOST_WindowHandle windowhandle);
607
614extern GHOST_RectangleHandle GHOST_GetClientBounds(GHOST_WindowHandle windowhandle);
615
620void GHOST_DisposeRectangle(GHOST_RectangleHandle rectanglehandle);
621
628extern GHOST_TSuccess GHOST_SetClientWidth(GHOST_WindowHandle windowhandle, uint32_t width);
629
636extern GHOST_TSuccess GHOST_SetClientHeight(GHOST_WindowHandle windowhandle, uint32_t height);
637
645extern GHOST_TSuccess GHOST_SetClientSize(GHOST_WindowHandle windowhandle,
646 uint32_t width,
647 uint32_t height);
648
657extern void GHOST_ScreenToClient(
658 GHOST_WindowHandle windowhandle, int32_t inX, int32_t inY, int32_t *outX, int32_t *outY);
659
668extern void GHOST_ClientToScreen(
669 GHOST_WindowHandle windowhandle, int32_t inX, int32_t inY, int32_t *outX, int32_t *outY);
670
676extern GHOST_TWindowState GHOST_GetWindowState(GHOST_WindowHandle windowhandle);
677
684extern GHOST_TSuccess GHOST_SetWindowState(GHOST_WindowHandle windowhandle,
686
693extern GHOST_TSuccess GHOST_SetWindowModifiedState(GHOST_WindowHandle windowhandle,
694 bool isUnsavedChanges);
695
702extern GHOST_TSuccess GHOST_SetWindowOrder(GHOST_WindowHandle windowhandle,
703 GHOST_TWindowOrder order);
704
710extern GHOST_TSuccess GHOST_SwapWindowBuffers(GHOST_WindowHandle windowhandle);
711
717extern GHOST_TSuccess GHOST_SetSwapInterval(GHOST_WindowHandle windowhandle, int interval);
718
726extern GHOST_TSuccess GHOST_GetSwapInterval(GHOST_WindowHandle windowhandle, int *r_interval);
727
733extern GHOST_TSuccess GHOST_ActivateWindowDrawingContext(GHOST_WindowHandle windowhandle);
734
740extern GHOST_TSuccess GHOST_InvalidateWindow(GHOST_WindowHandle windowhandle);
741
747extern GHOST_TSuccess GHOST_ActivateGPUContext(GHOST_ContextHandle contexthandle);
748
754extern GHOST_TSuccess GHOST_ReleaseGPUContext(GHOST_ContextHandle contexthandle);
755
759extern GHOST_ContextHandle GHOST_GetActiveGPUContext();
760
764extern unsigned int GHOST_GetContextDefaultGPUFramebuffer(GHOST_ContextHandle contexthandle);
765
769extern unsigned int GHOST_GetDefaultGPUFramebuffer(GHOST_WindowHandle windowhandle);
770
776extern void GHOST_SetMultitouchGestures(GHOST_SystemHandle systemhandle, const bool use);
777
783extern void GHOST_SetTabletAPI(GHOST_SystemHandle systemhandle, GHOST_TTabletAPI api);
784
790extern GHOST_TSuccess GHOST_GetPixelAtCursor(float r_color[3]);
791
797extern int32_t GHOST_GetWidthRectangle(GHOST_RectangleHandle rectanglehandle);
798
804extern int32_t GHOST_GetHeightRectangle(GHOST_RectangleHandle rectanglehandle);
805
814extern void GHOST_GetRectangle(
815 GHOST_RectangleHandle rectanglehandle, int32_t *l, int32_t *t, int32_t *r, int32_t *b);
816
825extern void GHOST_SetRectangle(
826 GHOST_RectangleHandle rectanglehandle, int32_t l, int32_t t, int32_t r, int32_t b);
827
834extern GHOST_TSuccess GHOST_IsEmptyRectangle(GHOST_RectangleHandle rectanglehandle);
835
843extern GHOST_TSuccess GHOST_IsValidRectangle(GHOST_RectangleHandle rectanglehandle);
844
851extern void GHOST_InsetRectangle(GHOST_RectangleHandle rectanglehandle, int32_t i);
852
859extern void GHOST_UnionRectangle(GHOST_RectangleHandle rectanglehandle,
860 GHOST_RectangleHandle anotherrectanglehandle);
861
868extern void GHOST_UnionPointRectangle(GHOST_RectangleHandle rectanglehandle, int32_t x, int32_t y);
869
878extern GHOST_TSuccess GHOST_IsInsideRectangle(GHOST_RectangleHandle rectanglehandle,
879 int32_t x,
880 int32_t y);
881
889 GHOST_RectangleHandle rectanglehandle, GHOST_RectangleHandle anotherrectanglehandle);
890
898extern void GHOST_SetCenterRectangle(GHOST_RectangleHandle rectanglehandle,
899 int32_t cx,
900 int32_t cy);
901
912extern void GHOST_SetRectangleCenter(
913 GHOST_RectangleHandle rectanglehandle, int32_t cx, int32_t cy, int32_t w, int32_t h);
914
923extern GHOST_TSuccess GHOST_ClipRectangle(GHOST_RectangleHandle rectanglehandle,
924 GHOST_RectangleHandle anotherrectanglehandle);
925
931extern char *GHOST_getClipboard(bool selection);
932
938extern void GHOST_putClipboard(const char *buffer, bool selection);
939
944
951extern uint *GHOST_getClipboardImage(int *r_width, int *r_height);
952
959extern GHOST_TSuccess GHOST_putClipboardImage(uint *rgba, int width, int height);
960
967
971extern bool GHOST_UseNativePixels(void);
972
977
981extern void GHOST_SetBacktraceHandler(GHOST_TBacktraceFn backtrace_fn);
982
986extern void GHOST_UseWindowFocus(bool use_focus);
987
991extern void GHOST_SetAutoFocus(bool auto_focus);
992
996extern float GHOST_GetNativePixelSize(GHOST_WindowHandle windowhandle);
997
1001extern uint16_t GHOST_GetDPIHint(GHOST_WindowHandle windowhandle);
1002
1015extern void GHOST_BeginIME(
1016 GHOST_WindowHandle windowhandle, int32_t x, int32_t y, int32_t w, int32_t h, bool complete);
1022extern void GHOST_EndIME(GHOST_WindowHandle windowhandle);
1023
1024#ifdef WITH_XR_OPENXR
1025
1026/* XR-context */
1027
1035void GHOST_XrErrorHandler(GHOST_XrErrorHandlerFn handler_fn, void *customdata);
1036
1046GHOST_XrContextHandle GHOST_XrContextCreate(const GHOST_XrContextCreateInfo *create_info);
1050void GHOST_XrContextDestroy(GHOST_XrContextHandle xr_context);
1051
1060void GHOST_XrGraphicsContextBindFuncs(GHOST_XrContextHandle xr_context,
1061 GHOST_XrGraphicsContextBindFn bind_fn,
1062 GHOST_XrGraphicsContextUnbindFn unbind_fn);
1063
1071void GHOST_XrDrawViewFunc(GHOST_XrContextHandle xr_context, GHOST_XrDrawViewFn draw_view_fn);
1072
1079void GHOST_XrPassthroughEnabledFunc(GHOST_XrContextHandle xr_context,
1080 GHOST_XrPassthroughEnabledFn passthrough_enabled_fn);
1081
1088void GHOST_XrDisablePassthroughFunc(GHOST_XrContextHandle xr_context,
1089 GHOST_XrDisablePassthroughFn disable_passthrough_fn);
1090
1091/* sessions */
1097void GHOST_XrSessionStart(GHOST_XrContextHandle xr_context,
1098 const GHOST_XrSessionBeginInfo *begin_info);
1102void GHOST_XrSessionEnd(GHOST_XrContextHandle xr_context);
1109void GHOST_XrSessionDrawViews(GHOST_XrContextHandle xr_context, void *customdata);
1115int GHOST_XrSessionIsRunning(const GHOST_XrContextHandle xr_context);
1116
1122int GHOST_XrSessionNeedsUpsideDownDrawing(const GHOST_XrContextHandle xr_context);
1123
1124/* events */
1131GHOST_TSuccess GHOST_XrEventsHandle(GHOST_XrContextHandle xr_context);
1132
1133/* actions */
1137int GHOST_XrCreateActionSet(GHOST_XrContextHandle xr_context, const GHOST_XrActionSetInfo *info);
1138
1142void GHOST_XrDestroyActionSet(GHOST_XrContextHandle xr_context, const char *action_set_name);
1143
1147int GHOST_XrCreateActions(GHOST_XrContextHandle xr_context,
1148 const char *action_set_name,
1149 uint32_t count,
1150 const GHOST_XrActionInfo *infos);
1151
1155void GHOST_XrDestroyActions(GHOST_XrContextHandle xr_context,
1156 const char *action_set_name,
1157 uint32_t count,
1158 const char *const *action_names);
1159
1163int GHOST_XrCreateActionBindings(GHOST_XrContextHandle xr_context,
1164 const char *action_set_name,
1165 uint32_t count,
1166 const GHOST_XrActionProfileInfo *infos);
1167
1171void GHOST_XrDestroyActionBindings(GHOST_XrContextHandle xr_context,
1172 const char *action_set_name,
1173 uint32_t count,
1174 const char *const *action_names,
1175 const char *const *profile_paths);
1176
1180int GHOST_XrAttachActionSets(GHOST_XrContextHandle xr_context);
1181
1188int GHOST_XrSyncActions(GHOST_XrContextHandle xr_context, const char *action_set_name);
1189
1193int GHOST_XrApplyHapticAction(GHOST_XrContextHandle xr_context_handle,
1194 const char *action_set_name,
1195 const char *action_name,
1196 const char *subaction_path,
1197 const int64_t *duration,
1198 const float *frequency,
1199 const float *amplitude);
1200
1204void GHOST_XrStopHapticAction(GHOST_XrContextHandle xr_context_handle,
1205 const char *action_set_name,
1206 const char *action_name,
1207 const char *subaction_path);
1208
1212void *GHOST_XrGetActionSetCustomdata(GHOST_XrContextHandle xr_context,
1213 const char *action_set_name);
1214
1218void *GHOST_XrGetActionCustomdata(GHOST_XrContextHandle xr_context,
1219 const char *action_set_name,
1220 const char *action_name);
1221
1225unsigned int GHOST_XrGetActionCount(GHOST_XrContextHandle xr_context, const char *action_set_name);
1226
1230void GHOST_XrGetActionCustomdataArray(GHOST_XrContextHandle xr_context,
1231 const char *action_set_name,
1232 void **r_customdata_array);
1233
1234/* controller model */
1238int GHOST_XrLoadControllerModel(GHOST_XrContextHandle xr_context, const char *subaction_path);
1239
1243void GHOST_XrUnloadControllerModel(GHOST_XrContextHandle xr_context, const char *subaction_path);
1244
1248int GHOST_XrUpdateControllerModelComponents(GHOST_XrContextHandle xr_context,
1249 const char *subaction_path);
1250
1254int GHOST_XrGetControllerModelData(GHOST_XrContextHandle xr_context,
1255 const char *subaction_path,
1256 GHOST_XrControllerModelData *r_data);
1257
1258#endif /* WITH_XR_OPENXR */
1259
1260#ifdef WITH_VULKAN_BACKEND
1261
1275void GHOST_GetVulkanHandles(GHOST_ContextHandle context, GHOST_VulkanHandles *r_handles);
1276
1292void GHOST_SetVulkanSwapBuffersCallbacks(
1293 GHOST_ContextHandle context,
1294 void (*swap_buffers_pre_callback)(const GHOST_VulkanSwapChainData *),
1295 void (*swap_buffers_post_callback)(void),
1296 void (*openxr_acquire_image_callback)(GHOST_VulkanOpenXRData *),
1297 void (*openxr_release_image_callback)(GHOST_VulkanOpenXRData *));
1298
1311void GHOST_GetVulkanSwapChainFormat(GHOST_WindowHandle windowhandle,
1312 GHOST_VulkanSwapChainData *r_swap_chain_data);
1313
1314#endif
1315
1316#ifdef __cplusplus
1317}
1318
1319#endif
unsigned int uint
GHOST_TSuccess GHOST_IsInsideRectangle(GHOST_RectangleHandle rectanglehandle, int32_t x, int32_t y)
GHOST_TWindowState GHOST_GetWindowState(GHOST_WindowHandle windowhandle)
GHOST_TSuccess GHOST_putClipboardImage(uint *rgba, int width, int height)
GHOST_TSuccess GHOST_SetCustomCursorShape(GHOST_WindowHandle windowhandle, uint8_t *bitmap, uint8_t *mask, int sizex, int sizey, int hotX, int hotY, bool canInvertColor)
int32_t GHOST_GetWidthRectangle(GHOST_RectangleHandle rectanglehandle)
void GHOST_SetWindowDecorationStyleSettings(GHOST_WindowHandle windowhandle, GHOST_WindowDecorationStyleSettings decorationSettings)
GHOST_TSuccess GHOST_GetPixelAtCursor(float r_color[3])
GHOST_TVisibility GHOST_GetRectangleVisibility(GHOST_RectangleHandle rectanglehandle, GHOST_RectangleHandle anotherrectanglehandle)
GHOST_TSuccess GHOST_GetCursorPosition(const GHOST_SystemHandle systemhandle, const GHOST_WindowHandle windowhandle, int32_t *x, int32_t *y)
GHOST_ContextHandle GHOST_CreateGPUContext(GHOST_SystemHandle systemhandle, GHOST_GPUSettings gpuSettings)
GHOST_TSuccess GHOST_SetWindowOrder(GHOST_WindowHandle windowhandle, GHOST_TWindowOrder order)
GHOST_TUserDataPtr GHOST_GetWindowUserData(GHOST_WindowHandle windowhandle)
GHOST_TSuccess GHOST_SetClientSize(GHOST_WindowHandle windowhandle, uint32_t width, uint32_t height)
GHOST_TSuccess GHOST_hasClipboardImage(void)
void GHOST_SetWindowDecorationStyleFlags(GHOST_WindowHandle windowhandle, GHOST_TWindowDecorationStyleFlags styleFlags)
GHOST_TSuccess GHOST_SetCursorPosition(GHOST_SystemHandle systemhandle, GHOST_WindowHandle windowhandle, int32_t x, int32_t y)
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)
void GHOST_UnionRectangle(GHOST_RectangleHandle rectanglehandle, GHOST_RectangleHandle anotherrectanglehandle)
void GHOST_ClientToScreen(GHOST_WindowHandle windowhandle, int32_t inX, int32_t inY, int32_t *outX, int32_t *outY)
GHOST_TCapabilityFlag GHOST_GetCapabilities(void)
GHOST_WindowHandle GHOST_GetWindowUnderCursor(GHOST_SystemHandle systemhandle, int32_t x, int32_t y)
GHOST_EventConsumerHandle GHOST_CreateEventConsumer(GHOST_EventCallbackProcPtr eventCallback, GHOST_TUserDataPtr user_data)
GHOST_SystemHandle GHOST_CreateSystem(void)
GHOST_TSuccess GHOST_AddEventConsumer(GHOST_SystemHandle systemhandle, GHOST_EventConsumerHandle consumerhandle)
GHOST_SystemHandle GHOST_CreateSystemBackground(void)
GHOST_TSuccess GHOST_GetAllDisplayDimensions(GHOST_SystemHandle systemhandle, uint32_t *r_width, uint32_t *r_height)
GHOST_TimerProcPtr GHOST_GetTimerProc(GHOST_TimerTaskHandle timertaskhandle)
void GHOST_SetRectangleCenter(GHOST_RectangleHandle rectanglehandle, int32_t cx, int32_t cy, int32_t w, int32_t h)
GHOST_TSuccess GHOST_RemoveEventConsumer(GHOST_SystemHandle systemhandle, GHOST_EventConsumerHandle consumerhandle)
uint16_t GHOST_GetDPIHint(GHOST_WindowHandle windowhandle)
GHOST_TSuccess GHOST_IsEmptyRectangle(GHOST_RectangleHandle rectanglehandle)
uint32_t GHOST_GetCursorPreferredLogicalSize(const GHOST_SystemHandle systemhandle)
void GHOST_DisposeRectangle(GHOST_RectangleHandle rectanglehandle)
GHOST_TSuccess GHOST_SetPath(GHOST_WindowHandle windowhandle, const char *filepath)
void GHOST_UseWindowFocus(bool use_focus)
bool GHOST_ProcessEvents(GHOST_SystemHandle systemhandle, bool waitForEvent)
void GHOST_SetTitle(GHOST_WindowHandle windowhandle, const char *title)
GHOST_TStandardCursor GHOST_GetCursorShape(GHOST_WindowHandle windowhandle)
void GHOST_BeginIME(GHOST_WindowHandle windowhandle, int32_t x, int32_t y, int32_t w, int32_t h, bool complete)
GHOST_TSuccess GHOST_ReleaseGPUContext(GHOST_ContextHandle contexthandle)
GHOST_TSuccess GHOST_SetClientWidth(GHOST_WindowHandle windowhandle, uint32_t width)
GHOST_TSuccess GHOST_SetClientHeight(GHOST_WindowHandle windowhandle, uint32_t height)
GHOST_ContextHandle GHOST_GetActiveGPUContext()
void GHOST_ScreenToClient(GHOST_WindowHandle windowhandle, int32_t inX, int32_t inY, int32_t *outX, int32_t *outY)
GHOST_TSuccess GHOST_SetCursorShape(GHOST_WindowHandle windowhandle, GHOST_TStandardCursor cursorshape)
GHOST_TSuccess GHOST_ClipRectangle(GHOST_RectangleHandle rectanglehandle, GHOST_RectangleHandle anotherrectanglehandle)
GHOST_TSuccess GHOST_DisposeEventConsumer(GHOST_EventConsumerHandle consumerhandle)
char * GHOST_getClipboard(bool selection)
GHOST_RectangleHandle GHOST_GetWindowBounds(GHOST_WindowHandle windowhandle)
uint64_t GHOST_GetEventTime(GHOST_EventHandle eventhandle)
GHOST_TSuccess GHOST_SetProgressBar(GHOST_WindowHandle windowhandle, float progress)
GHOST_TUserDataPtr GHOST_GetTimerTaskUserData(GHOST_TimerTaskHandle timertaskhandle)
GHOST_TSuccess GHOST_SetWindowModifiedState(GHOST_WindowHandle windowhandle, bool isUnsavedChanges)
void GHOST_SetAutoFocus(bool auto_focus)
GHOST_TSuccess GHOST_InvalidateWindow(GHOST_WindowHandle windowhandle)
GHOST_TSuccess GHOST_SetCursorGrab(GHOST_WindowHandle windowhandle, GHOST_TGrabCursorMode mode, GHOST_TAxisFlag wrap_axis, const int bounds[4], const int mouse_ungrab_xy[2])
GHOST_TSuccess GHOST_DisposeWindow(GHOST_SystemHandle systemhandle, GHOST_WindowHandle windowhandle)
bool GHOST_setConsoleWindowState(GHOST_TConsoleWindowState action)
GHOST_TSuccess GHOST_ActivateGPUContext(GHOST_ContextHandle contexthandle)
void GHOST_SetTimerTaskUserData(GHOST_TimerTaskHandle timertaskhandle, GHOST_TUserDataPtr user_data)
GHOST_TSuccess GHOST_SetWindowState(GHOST_WindowHandle windowhandle, GHOST_TWindowState state)
void GHOST_SetBacktraceHandler(GHOST_TBacktraceFn backtrace_fn)
bool(*)(GHOST_EventHandle event, GHOST_TUserDataPtr user_data) GHOST_EventCallbackProcPtr
Definition GHOST_C-api.h:22
GHOST_TSuccess GHOST_RemoveTimer(GHOST_SystemHandle systemhandle, GHOST_TimerTaskHandle timertaskhandle)
int32_t GHOST_GetHeightRectangle(GHOST_RectangleHandle rectanglehandle)
unsigned int GHOST_GetContextDefaultGPUFramebuffer(GHOST_ContextHandle contexthandle)
void GHOST_SetTabletAPI(GHOST_SystemHandle systemhandle, GHOST_TTabletAPI api)
GHOST_TSuccess GHOST_SwapWindowBuffers(GHOST_WindowHandle windowhandle)
void GHOST_GetCursorGrabState(GHOST_WindowHandle windowhandle, GHOST_TGrabCursorMode *r_mode, GHOST_TAxisFlag *r_axis_flag, int r_bounds[4], bool *r_use_software_cursor)
GHOST_TSuccess GHOST_GetCursorBitmap(GHOST_WindowHandle windowhandle, GHOST_CursorBitmapRef *bitmap)
void GHOST_SetCenterRectangle(GHOST_RectangleHandle rectanglehandle, int32_t cx, int32_t cy)
void GHOST_SetMultitouchGestures(GHOST_SystemHandle systemhandle, const bool use)
GHOST_TEventDataPtr GHOST_GetEventData(GHOST_EventHandle eventhandle)
bool GHOST_GetCursorVisibility(GHOST_WindowHandle windowhandle)
GHOST_TSuccess GHOST_SetCursorVisibility(GHOST_WindowHandle windowhandle, bool visible)
uint * GHOST_getClipboardImage(int *r_width, int *r_height)
GHOST_TSuccess GHOST_ActivateWindowDrawingContext(GHOST_WindowHandle windowhandle)
GHOST_TSuccess GHOST_GetModifierKeyState(GHOST_SystemHandle systemhandle, GHOST_TModifierKey mask, bool *r_is_down)
GHOST_WindowHandle GHOST_CreateWindow(GHOST_SystemHandle systemhandle, GHOST_WindowHandle parent_windowhandle, const char *title, int32_t left, int32_t top, uint32_t width, uint32_t height, GHOST_TWindowState state, bool is_dialog, GHOST_GPUSettings gpuSettings)
bool GHOST_ValidWindow(GHOST_SystemHandle systemhandle, GHOST_WindowHandle windowhandle)
float GHOST_GetNativePixelSize(GHOST_WindowHandle windowhandle)
GHOST_TEventType GHOST_GetEventType(GHOST_EventHandle eventhandle)
bool GHOST_IsDialogWindow(GHOST_WindowHandle windowhandle)
void GHOST_SystemInitDebug(GHOST_SystemHandle systemhandle, GHOST_Debug debug)
GHOST_TSuccess GHOST_ApplyWindowDecorationStyle(GHOST_WindowHandle windowhandle)
unsigned int GHOST_GetDefaultGPUFramebuffer(GHOST_WindowHandle windowhandle)
void GHOST_setAcceptDragOperation(GHOST_WindowHandle windowhandle, bool can_accept)
void GHOST_putClipboard(const char *buffer, bool selection)
GHOST_ContextHandle GHOST_GetDrawingContext(GHOST_WindowHandle windowhandle)
void GHOST_SetWindowUserData(GHOST_WindowHandle windowhandle, GHOST_TUserDataPtr user_data)
const char * GHOST_SystemBackend(void)
GHOST_WindowHandle GHOST_GetEventWindow(GHOST_EventHandle eventhandle)
void GHOST_GetRectangle(GHOST_RectangleHandle rectanglehandle, int32_t *l, int32_t *t, int32_t *r, int32_t *b)
GHOST_TWindowDecorationStyleFlags GHOST_GetWindowDecorationStyleFlags(GHOST_WindowHandle windowhandle)
void GHOST_EndIME(GHOST_WindowHandle windowhandle)
char * GHOST_GetTitle(GHOST_WindowHandle windowhandle)
bool GHOST_UseNativePixels(void)
GHOST_TDrawingContextType GHOST_GetDrawingContextType(GHOST_WindowHandle windowhandle)
GHOST_TSuccess GHOST_HasCursorShape(GHOST_WindowHandle windowhandle, GHOST_TStandardCursor cursorshape)
GHOST_TSuccess GHOST_IsValidRectangle(GHOST_RectangleHandle rectanglehandle)
void GHOST_DispatchEvents(GHOST_SystemHandle systemhandle)
void GHOST_SetRectangle(GHOST_RectangleHandle rectanglehandle, int32_t l, int32_t t, int32_t r, int32_t b)
void GHOST_SetTimerProc(GHOST_TimerTaskHandle timertaskhandle, GHOST_TimerProcPtr timerProc)
GHOST_TSuccess GHOST_SetDrawingContextType(GHOST_WindowHandle windowhandle, GHOST_TDrawingContextType type)
GHOST_TSuccess GHOST_DisposeGPUContext(GHOST_SystemHandle systemhandle, GHOST_ContextHandle contexthandle)
GHOST_TSuccess GHOST_EndProgressBar(GHOST_WindowHandle windowhandle)
GHOST_TSuccess GHOST_SetSwapInterval(GHOST_WindowHandle windowhandle, int interval)
void GHOST_InsetRectangle(GHOST_RectangleHandle rectanglehandle, int32_t i)
GHOST_RectangleHandle GHOST_GetClientBounds(GHOST_WindowHandle windowhandle)
uint8_t GHOST_GetNumDisplays(GHOST_SystemHandle systemhandle)
GHOST_TimerTaskHandle GHOST_InstallTimer(GHOST_SystemHandle systemhandle, uint64_t delay, uint64_t interval, GHOST_TimerProcPtr timerProc, GHOST_TUserDataPtr user_data)
GHOST_TSuccess GHOST_DisposeSystem(GHOST_SystemHandle systemhandle)
uint64_t GHOST_GetMilliSeconds(GHOST_SystemHandle systemhandle)
void GHOST_UnionPointRectangle(GHOST_RectangleHandle rectanglehandle, int32_t x, int32_t y)
bool GHOST_GetValid(GHOST_WindowHandle windowhandle)
GHOST_TSuccess GHOST_GetSwapInterval(GHOST_WindowHandle windowhandle, int *r_interval)
GHOST_TSuccess GHOST_GetButtonState(GHOST_SystemHandle systemhandle, GHOST_TButton mask, bool *r_is_down)
GHOST_TSuccess GHOST_GetMainDisplayDimensions(GHOST_SystemHandle systemhandle, uint32_t *r_width, uint32_t *r_height)
GHOST_TWindowState
void * GHOST_TUserDataPtr
Definition GHOST_Types.h:78
GHOST_TStandardCursor
GHOST_TEventType
GHOST_TCapabilityFlag
Definition GHOST_Types.h:89
GHOST_TVisibility
GHOST_TAxisFlag
void(* GHOST_TimerProcPtr)(struct GHOST_TimerTaskHandle__ *task, uint64_t time)
const void * GHOST_TEventDataPtr
GHOST_TDrawingContextType
GHOST_TWindowOrder
GHOST_TModifierKey
GHOST_TSuccess
Definition GHOST_Types.h:80
void(* GHOST_TBacktraceFn)(void *file_handle)
Definition GHOST_Types.h:56
GHOST_TGrabCursorMode
GHOST_TButton
GHOST_TConsoleWindowState
GHOST_TTabletAPI
GHOST_DialogOptions
Definition GHOST_Types.h:73
GHOST_TWindowDecorationStyleFlags
GHOST_TSuccess GHOST_XrEventsHandle(GHOST_XrContextHandle xr_contexthandle)
GHOST_XrContextHandle GHOST_XrContextCreate(const GHOST_XrContextCreateInfo *create_info)
Definition GHOST_Xr.cc:20
void GHOST_XrContextDestroy(GHOST_XrContextHandle xr_contexthandle)
Definition GHOST_Xr.cc:38
void GHOST_XrErrorHandler(GHOST_XrErrorHandlerFn handler_fn, void *customdata)
Definition GHOST_Xr.cc:43
float progress
Definition WM_types.hh:1019
ATTR_WARN_UNUSED_RESULT const BMLoop * l
long long int int64_t
unsigned long long int uint64_t
static btDbvtVolume bounds(btDbvtNode **leaves, int count)
Definition btDbvt.cpp:299
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
Definition btQuadWord.h:119
uint top
int count
ccl_device_inline float2 mask(const MaskType mask, const float2 a)
static ulong state[N]
static int left
i
Definition text_draw.cc:230