Blender V5.0
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 timer_proc,
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 gpu_settings);
178
186extern GHOST_ContextHandle GHOST_CreateGPUContext(GHOST_SystemHandle systemhandle,
187 GHOST_GPUSettings gpu_settings);
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
231/*
232 **
233 * Returns high dynamic range color information about this window.
234 * \return HDR info.
235 */
236extern GHOST_WindowHDRInfo GHOST_WindowGetHDRInfo(GHOST_WindowHandle windowhandle);
237
247extern GHOST_WindowHandle GHOST_GetWindowUnderCursor(GHOST_SystemHandle systemhandle,
248 int32_t x,
249 int32_t y);
250
251/***************************************************************************************
252 * Event management functionality
253 ***************************************************************************************/
254
262extern bool GHOST_ProcessEvents(GHOST_SystemHandle systemhandle, bool waitForEvent);
263
268extern void GHOST_DispatchEvents(GHOST_SystemHandle systemhandle);
269
276extern GHOST_TSuccess GHOST_AddEventConsumer(GHOST_SystemHandle systemhandle,
277 GHOST_EventConsumerHandle consumerhandle);
278
285extern GHOST_TSuccess GHOST_RemoveEventConsumer(GHOST_SystemHandle systemhandle,
286 GHOST_EventConsumerHandle consumerhandle);
287
288/***************************************************************************************
289 * Progress bar functionality
290 ***************************************************************************************/
291
297extern GHOST_TSuccess GHOST_SetProgressBar(GHOST_WindowHandle windowhandle, float progress);
298
303extern GHOST_TSuccess GHOST_EndProgressBar(GHOST_WindowHandle windowhandle);
304
305/***************************************************************************************
306 * Cursor management functionality
307 ***************************************************************************************/
308
314extern GHOST_TStandardCursor GHOST_GetCursorShape(GHOST_WindowHandle windowhandle);
315
323extern GHOST_TSuccess GHOST_SetCursorShape(GHOST_WindowHandle windowhandle,
324 GHOST_TStandardCursor cursorshape);
325
330extern GHOST_TSuccess GHOST_HasCursorShape(GHOST_WindowHandle windowhandle,
331 GHOST_TStandardCursor cursorshape);
332
347extern GHOST_TSuccess GHOST_SetCustomCursorShape(GHOST_WindowHandle windowhandle,
348 const uint8_t *bitmap,
349 const uint8_t *mask,
350 const int size[2],
351 const int hot_spot[2],
352 bool can_invert_color);
363extern GHOST_TSuccess GHOST_SetCustomCursorGenerator(GHOST_WindowHandle windowhandle,
364 GHOST_CursorGenerator *cursor_generator);
365
366extern GHOST_TSuccess GHOST_GetCursorBitmap(GHOST_WindowHandle windowhandle,
367 GHOST_CursorBitmapRef *bitmap);
368
372extern uint32_t GHOST_GetCursorPreferredLogicalSize(const GHOST_SystemHandle systemhandle);
373
379extern bool GHOST_GetCursorVisibility(GHOST_WindowHandle windowhandle);
380
387extern GHOST_TSuccess GHOST_SetCursorVisibility(GHOST_WindowHandle windowhandle, bool visible);
388
396GHOST_TSuccess GHOST_GetCursorPosition(const GHOST_SystemHandle systemhandle,
397 const GHOST_WindowHandle windowhandle,
398 int32_t *x,
399 int32_t *y);
408GHOST_TSuccess GHOST_SetCursorPosition(GHOST_SystemHandle systemhandle,
409 GHOST_WindowHandle windowhandle,
410 int32_t x,
411 int32_t y);
412
413void GHOST_GetCursorGrabState(GHOST_WindowHandle windowhandle,
414 GHOST_TGrabCursorMode *r_mode,
415 GHOST_TAxisFlag *r_axis_flag,
416 int r_bounds[4],
417 bool *r_use_software_cursor);
418
429extern GHOST_TSuccess GHOST_SetCursorGrab(GHOST_WindowHandle windowhandle,
431 GHOST_TAxisFlag wrap_axis,
432 const int bounds[4],
433 const int mouse_ungrab_xy[2]);
434
435/***************************************************************************************
436 * Access to mouse button and keyboard states.
437 ***************************************************************************************/
438
446extern GHOST_TSuccess GHOST_GetModifierKeyState(GHOST_SystemHandle systemhandle,
448 bool *r_is_down);
449
457extern GHOST_TSuccess GHOST_GetButtonState(GHOST_SystemHandle systemhandle,
459 bool *r_is_down);
460
461#ifdef WITH_INPUT_NDOF
462/***************************************************************************************
463 * Access to 3D mouse.
464 ***************************************************************************************/
465
470extern void GHOST_setNDOFDeadZone(float deadzone);
471#endif
472
473/***************************************************************************************
474 * Drag & drop operations
475 ***************************************************************************************/
476
480extern void GHOST_setAcceptDragOperation(GHOST_WindowHandle windowhandle, bool can_accept);
481
487extern GHOST_TEventType GHOST_GetEventType(GHOST_EventHandle eventhandle);
488
494extern uint64_t GHOST_GetEventTime(GHOST_EventHandle eventhandle);
495
502extern GHOST_WindowHandle GHOST_GetEventWindow(GHOST_EventHandle eventhandle);
503
509extern GHOST_TEventDataPtr GHOST_GetEventData(GHOST_EventHandle eventhandle);
510
516extern GHOST_TimerProcPtr GHOST_GetTimerProc(GHOST_TimerTaskHandle timertaskhandle);
517
523extern void GHOST_SetTimerProc(GHOST_TimerTaskHandle timertaskhandle,
524 GHOST_TimerProcPtr timer_proc);
525
531extern GHOST_TUserDataPtr GHOST_GetTimerTaskUserData(GHOST_TimerTaskHandle timertaskhandle);
532
538extern void GHOST_SetTimerTaskUserData(GHOST_TimerTaskHandle timertaskhandle,
539 GHOST_TUserDataPtr user_data);
540
546extern bool GHOST_GetValid(GHOST_WindowHandle windowhandle);
547
553extern GHOST_TDrawingContextType GHOST_GetDrawingContextType(GHOST_WindowHandle windowhandle);
554
561extern GHOST_TSuccess GHOST_SetDrawingContextType(GHOST_WindowHandle windowhandle,
563
569extern GHOST_ContextHandle GHOST_GetDrawingContext(GHOST_WindowHandle windowhandle);
570
576extern void GHOST_SetTitle(GHOST_WindowHandle windowhandle, const char *title);
577
585extern char *GHOST_GetTitle(GHOST_WindowHandle windowhandle);
586
592extern GHOST_TSuccess GHOST_SetPath(GHOST_WindowHandle windowhandle, const char *filepath);
593
598 GHOST_WindowHandle windowhandle);
599
604extern void GHOST_SetWindowDecorationStyleFlags(GHOST_WindowHandle windowhandle,
606
612 GHOST_WindowHandle windowhandle, GHOST_WindowDecorationStyleSettings decoration_settings);
613
617extern GHOST_TSuccess GHOST_ApplyWindowDecorationStyle(GHOST_WindowHandle windowhandle);
618
625extern GHOST_RectangleHandle GHOST_GetWindowBounds(GHOST_WindowHandle windowhandle);
626
633extern GHOST_RectangleHandle GHOST_GetClientBounds(GHOST_WindowHandle windowhandle);
634
639void GHOST_DisposeRectangle(GHOST_RectangleHandle rectanglehandle);
640
647extern GHOST_TSuccess GHOST_SetClientWidth(GHOST_WindowHandle windowhandle, uint32_t width);
648
655extern GHOST_TSuccess GHOST_SetClientHeight(GHOST_WindowHandle windowhandle, uint32_t height);
656
664extern GHOST_TSuccess GHOST_SetClientSize(GHOST_WindowHandle windowhandle,
665 uint32_t width,
666 uint32_t height);
667
676extern void GHOST_ScreenToClient(
677 GHOST_WindowHandle windowhandle, int32_t inX, int32_t inY, int32_t *outX, int32_t *outY);
678
687extern void GHOST_ClientToScreen(
688 GHOST_WindowHandle windowhandle, int32_t inX, int32_t inY, int32_t *outX, int32_t *outY);
689
695extern GHOST_TWindowState GHOST_GetWindowState(GHOST_WindowHandle windowhandle);
696
703extern GHOST_TSuccess GHOST_SetWindowState(GHOST_WindowHandle windowhandle,
705
712extern GHOST_TSuccess GHOST_SetWindowModifiedState(GHOST_WindowHandle windowhandle,
713 bool is_unsaved_changes);
714
721extern GHOST_TSuccess GHOST_SetWindowOrder(GHOST_WindowHandle windowhandle,
722 GHOST_TWindowOrder order);
723
729extern GHOST_TSuccess GHOST_SwapWindowBufferAcquire(GHOST_WindowHandle windowhandle);
730
736extern GHOST_TSuccess GHOST_SwapWindowBufferRelease(GHOST_WindowHandle windowhandle);
737
743extern GHOST_TSuccess GHOST_SetSwapInterval(GHOST_WindowHandle windowhandle, int interval);
744
752extern GHOST_TSuccess GHOST_GetSwapInterval(GHOST_WindowHandle windowhandle, int *r_interval);
753
759extern GHOST_TSuccess GHOST_ActivateWindowDrawingContext(GHOST_WindowHandle windowhandle);
760
766extern GHOST_TSuccess GHOST_InvalidateWindow(GHOST_WindowHandle windowhandle);
767
773extern GHOST_TSuccess GHOST_ActivateGPUContext(GHOST_ContextHandle contexthandle);
774
780extern GHOST_TSuccess GHOST_ReleaseGPUContext(GHOST_ContextHandle contexthandle);
781
785extern GHOST_ContextHandle GHOST_GetActiveGPUContext();
786
790extern unsigned int GHOST_GetContextDefaultGPUFramebuffer(GHOST_ContextHandle contexthandle);
791
795extern unsigned int GHOST_GetDefaultGPUFramebuffer(GHOST_WindowHandle windowhandle);
796
802extern void GHOST_SetMultitouchGestures(GHOST_SystemHandle systemhandle, const bool use);
803
809extern void GHOST_SetTabletAPI(GHOST_SystemHandle systemhandle, GHOST_TTabletAPI api);
810
816extern GHOST_TSuccess GHOST_GetPixelAtCursor(float r_color[3]);
817
823extern int32_t GHOST_GetWidthRectangle(GHOST_RectangleHandle rectanglehandle);
824
830extern int32_t GHOST_GetHeightRectangle(GHOST_RectangleHandle rectanglehandle);
831
840extern void GHOST_GetRectangle(
841 GHOST_RectangleHandle rectanglehandle, int32_t *l, int32_t *t, int32_t *r, int32_t *b);
842
851extern void GHOST_SetRectangle(
852 GHOST_RectangleHandle rectanglehandle, int32_t l, int32_t t, int32_t r, int32_t b);
853
860extern GHOST_TSuccess GHOST_IsEmptyRectangle(GHOST_RectangleHandle rectanglehandle);
861
869extern GHOST_TSuccess GHOST_IsValidRectangle(GHOST_RectangleHandle rectanglehandle);
870
877extern void GHOST_InsetRectangle(GHOST_RectangleHandle rectanglehandle, int32_t i);
878
885extern void GHOST_UnionRectangle(GHOST_RectangleHandle rectanglehandle,
886 GHOST_RectangleHandle anotherrectanglehandle);
887
894extern void GHOST_UnionPointRectangle(GHOST_RectangleHandle rectanglehandle, int32_t x, int32_t y);
895
904extern GHOST_TSuccess GHOST_IsInsideRectangle(GHOST_RectangleHandle rectanglehandle,
905 int32_t x,
906 int32_t y);
907
915 GHOST_RectangleHandle rectanglehandle, GHOST_RectangleHandle anotherrectanglehandle);
916
924extern void GHOST_SetCenterRectangle(GHOST_RectangleHandle rectanglehandle,
925 int32_t cx,
926 int32_t cy);
927
938extern void GHOST_SetRectangleCenter(
939 GHOST_RectangleHandle rectanglehandle, int32_t cx, int32_t cy, int32_t w, int32_t h);
940
949extern GHOST_TSuccess GHOST_ClipRectangle(GHOST_RectangleHandle rectanglehandle,
950 GHOST_RectangleHandle anotherrectanglehandle);
951
958extern char *GHOST_getClipboard(bool selection);
959
965extern void GHOST_putClipboard(const char *buffer, bool selection);
966
971
978extern uint *GHOST_getClipboardImage(int *r_width, int *r_height);
979
986extern GHOST_TSuccess GHOST_putClipboardImage(uint *rgba, int width, int height);
987
994
998extern bool GHOST_UseNativePixels(void);
999
1004
1008extern void GHOST_SetBacktraceHandler(GHOST_TBacktraceFn backtrace_fn);
1009
1015extern void GHOST_UseWindowFrame(bool use_window_frame);
1016
1020extern void GHOST_UseWindowFocus(bool use_focus);
1021
1025extern void GHOST_SetAutoFocus(bool auto_focus);
1026
1030extern float GHOST_GetNativePixelSize(GHOST_WindowHandle windowhandle);
1031
1035extern uint16_t GHOST_GetDPIHint(GHOST_WindowHandle windowhandle);
1036
1049extern void GHOST_BeginIME(
1050 GHOST_WindowHandle windowhandle, int32_t x, int32_t y, int32_t w, int32_t h, bool complete);
1056extern void GHOST_EndIME(GHOST_WindowHandle windowhandle);
1057
1058#ifdef WITH_XR_OPENXR
1059
1060/* XR-context */
1061
1069void GHOST_XrErrorHandler(GHOST_XrErrorHandlerFn handler_fn, void *customdata);
1070
1080GHOST_XrContextHandle GHOST_XrContextCreate(const GHOST_XrContextCreateInfo *create_info);
1084void GHOST_XrContextDestroy(GHOST_XrContextHandle xr_context);
1085
1094void GHOST_XrGraphicsContextBindFuncs(GHOST_XrContextHandle xr_context,
1095 GHOST_XrGraphicsContextBindFn bind_fn,
1096 GHOST_XrGraphicsContextUnbindFn unbind_fn);
1097
1105void GHOST_XrDrawViewFunc(GHOST_XrContextHandle xr_context, GHOST_XrDrawViewFn draw_view_fn);
1106
1113void GHOST_XrPassthroughEnabledFunc(GHOST_XrContextHandle xr_context,
1114 GHOST_XrPassthroughEnabledFn passthrough_enabled_fn);
1115
1122void GHOST_XrDisablePassthroughFunc(GHOST_XrContextHandle xr_context,
1123 GHOST_XrDisablePassthroughFn disable_passthrough_fn);
1124
1125/* sessions */
1131void GHOST_XrSessionStart(GHOST_XrContextHandle xr_context,
1132 const GHOST_XrSessionBeginInfo *begin_info);
1136void GHOST_XrSessionEnd(GHOST_XrContextHandle xr_context);
1143void GHOST_XrSessionDrawViews(GHOST_XrContextHandle xr_context, void *customdata);
1149int GHOST_XrSessionIsRunning(const GHOST_XrContextHandle xr_context);
1150
1156int GHOST_XrSessionNeedsUpsideDownDrawing(const GHOST_XrContextHandle xr_context);
1157
1158/* events */
1165GHOST_TSuccess GHOST_XrEventsHandle(GHOST_XrContextHandle xr_context);
1166
1167/* actions */
1171int GHOST_XrCreateActionSet(GHOST_XrContextHandle xr_context, const GHOST_XrActionSetInfo *info);
1172
1176void GHOST_XrDestroyActionSet(GHOST_XrContextHandle xr_context, const char *action_set_name);
1177
1181int GHOST_XrCreateActions(GHOST_XrContextHandle xr_context,
1182 const char *action_set_name,
1183 uint32_t count,
1184 const GHOST_XrActionInfo *infos);
1185
1189void GHOST_XrDestroyActions(GHOST_XrContextHandle xr_context,
1190 const char *action_set_name,
1191 uint32_t count,
1192 const char *const *action_names);
1193
1197int GHOST_XrCreateActionBindings(GHOST_XrContextHandle xr_context,
1198 const char *action_set_name,
1199 uint32_t count,
1200 const GHOST_XrActionProfileInfo *infos);
1201
1205void GHOST_XrDestroyActionBindings(GHOST_XrContextHandle xr_context,
1206 const char *action_set_name,
1207 uint32_t count,
1208 const char *const *action_names,
1209 const char *const *profile_paths);
1210
1214int GHOST_XrAttachActionSets(GHOST_XrContextHandle xr_context);
1215
1222int GHOST_XrSyncActions(GHOST_XrContextHandle xr_context, const char *action_set_name);
1223
1227int GHOST_XrApplyHapticAction(GHOST_XrContextHandle xr_context_handle,
1228 const char *action_set_name,
1229 const char *action_name,
1230 const char *subaction_path,
1231 const int64_t *duration,
1232 const float *frequency,
1233 const float *amplitude);
1234
1238void GHOST_XrStopHapticAction(GHOST_XrContextHandle xr_context_handle,
1239 const char *action_set_name,
1240 const char *action_name,
1241 const char *subaction_path);
1242
1246void *GHOST_XrGetActionSetCustomdata(GHOST_XrContextHandle xr_context,
1247 const char *action_set_name);
1248
1252void *GHOST_XrGetActionCustomdata(GHOST_XrContextHandle xr_context,
1253 const char *action_set_name,
1254 const char *action_name);
1255
1259unsigned int GHOST_XrGetActionCount(GHOST_XrContextHandle xr_context, const char *action_set_name);
1260
1264void GHOST_XrGetActionCustomdataArray(GHOST_XrContextHandle xr_context,
1265 const char *action_set_name,
1266 void **r_customdata_array);
1267
1268/* controller model */
1272int GHOST_XrLoadControllerModel(GHOST_XrContextHandle xr_context, const char *subaction_path);
1273
1277void GHOST_XrUnloadControllerModel(GHOST_XrContextHandle xr_context, const char *subaction_path);
1278
1282int GHOST_XrUpdateControllerModelComponents(GHOST_XrContextHandle xr_context,
1283 const char *subaction_path);
1284
1288int GHOST_XrGetControllerModelData(GHOST_XrContextHandle xr_context,
1289 const char *subaction_path,
1290 GHOST_XrControllerModelData *r_data);
1291
1292#endif /* WITH_XR_OPENXR */
1293
1294#ifdef WITH_VULKAN_BACKEND
1295
1309void GHOST_GetVulkanHandles(GHOST_ContextHandle context, GHOST_VulkanHandles *r_handles);
1310
1326void GHOST_SetVulkanSwapBuffersCallbacks(
1327 GHOST_ContextHandle context,
1328 void (*swap_buffer_draw_callback)(const GHOST_VulkanSwapChainData *),
1329 void (*swap_buffer_acquired_callback)(void),
1330 void (*openxr_acquire_image_callback)(GHOST_VulkanOpenXRData *),
1331 void (*openxr_release_image_callback)(GHOST_VulkanOpenXRData *));
1332
1345void GHOST_GetVulkanSwapChainFormat(GHOST_WindowHandle windowhandle,
1346 GHOST_VulkanSwapChainData *r_swap_chain_data);
1347
1348#endif
1349
1350#ifdef __cplusplus
1351}
1352
1353#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)
int32_t GHOST_GetWidthRectangle(GHOST_RectangleHandle rectanglehandle)
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 gpu_settings)
GHOST_TSuccess GHOST_SetWindowOrder(GHOST_WindowHandle windowhandle, GHOST_TWindowOrder order)
GHOST_TUserDataPtr GHOST_GetWindowUserData(GHOST_WindowHandle windowhandle)
GHOST_TSuccess GHOST_SwapWindowBufferRelease(GHOST_WindowHandle windowhandle)
GHOST_TSuccess GHOST_SetClientSize(GHOST_WindowHandle windowhandle, uint32_t width, uint32_t height)
GHOST_TSuccess GHOST_hasClipboardImage(void)
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_SetWindowDecorationStyleSettings(GHOST_WindowHandle windowhandle, GHOST_WindowDecorationStyleSettings decoration_settings)
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_SetCustomCursorGenerator(GHOST_WindowHandle windowhandle, GHOST_CursorGenerator *cursor_generator)
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)
GHOST_TSuccess GHOST_SwapWindowBufferAcquire(GHOST_WindowHandle windowhandle)
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)
void GHOST_SetWindowDecorationStyleFlags(GHOST_WindowHandle windowhandle, GHOST_TWindowDecorationStyleFlags style_flags)
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)
void GHOST_SetTimerProc(GHOST_TimerTaskHandle timertaskhandle, GHOST_TimerProcPtr timer_proc)
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)
GHOST_TSuccess GHOST_SetWindowModifiedState(GHOST_WindowHandle windowhandle, bool is_unsaved_changes)
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)
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)
GHOST_TSuccess GHOST_SetCustomCursorShape(GHOST_WindowHandle windowhandle, const uint8_t *bitmap, const uint8_t *mask, const int size[2], const int hot_spot[2], bool can_invert_color)
void GHOST_SetMultitouchGestures(GHOST_SystemHandle systemhandle, const bool use)
GHOST_TEventDataPtr GHOST_GetEventData(GHOST_EventHandle eventhandle)
bool GHOST_GetCursorVisibility(GHOST_WindowHandle windowhandle)
GHOST_WindowHDRInfo GHOST_WindowGetHDRInfo(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)
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_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 gpu_settings)
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)
GHOST_TimerTaskHandle GHOST_InstallTimer(GHOST_SystemHandle systemhandle, uint64_t delay, uint64_t interval, GHOST_TimerProcPtr timer_proc, GHOST_TUserDataPtr user_data)
void GHOST_SetRectangle(GHOST_RectangleHandle rectanglehandle, int32_t l, int32_t t, int32_t r, int32_t b)
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)
void GHOST_UseWindowFrame(bool use_window_frame)
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_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:55
GHOST_TStandardCursor
GHOST_TEventType
GHOST_TCapabilityFlag
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:57
void(* GHOST_TBacktraceFn)(void *file_handle)
Definition GHOST_Types.h:53
GHOST_TGrabCursorMode
GHOST_TButton
GHOST_TConsoleWindowState
GHOST_TTabletAPI
GHOST_DialogOptions
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
ATTR_WARN_UNUSED_RESULT const BMLoop * l
long long int int64_t
unsigned long long int uint64_t
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
Definition btDbvt.cpp:52
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