Blender V4.3
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 */
9#pragma once
10
11#include "GHOST_Types.h"
12
13#include <stdbool.h>
14
15#ifdef __cplusplus
16extern "C" {
17#endif
18
24typedef bool (*GHOST_EventCallbackProcPtr)(GHOST_EventHandle event, GHOST_TUserDataPtr user_data);
25
30extern GHOST_SystemHandle GHOST_CreateSystem(void);
31extern GHOST_SystemHandle GHOST_CreateSystemBackground(void);
32
38extern void GHOST_SystemInitDebug(GHOST_SystemHandle systemhandle, GHOST_Debug debug);
39
40#if !(defined(WIN32) || defined(__APPLE__))
41extern const char *GHOST_SystemBackend(void);
42#endif
43
49extern GHOST_TSuccess GHOST_DisposeSystem(GHOST_SystemHandle systemhandle);
50
61extern void GHOST_ShowMessageBox(GHOST_SystemHandle systemhandle,
62 const char *title,
63 const char *message,
64 const char *help_label,
65 const char *continue_label,
66 const char *link,
67 GHOST_DialogOptions dialog_options);
68
74extern GHOST_EventConsumerHandle GHOST_CreateEventConsumer(
75 GHOST_EventCallbackProcPtr eventCallback, GHOST_TUserDataPtr user_data);
76
82extern GHOST_TSuccess GHOST_DisposeEventConsumer(GHOST_EventConsumerHandle consumerhandle);
83
91extern uint64_t GHOST_GetMilliSeconds(GHOST_SystemHandle systemhandle);
92
104extern GHOST_TimerTaskHandle GHOST_InstallTimer(GHOST_SystemHandle systemhandle,
105 uint64_t delay,
106 uint64_t interval,
107 GHOST_TimerProcPtr timerProc,
108 GHOST_TUserDataPtr user_data);
109
116extern GHOST_TSuccess GHOST_RemoveTimer(GHOST_SystemHandle systemhandle,
117 GHOST_TimerTaskHandle timertaskhandle);
118
119/***************************************************************************************
120 * Display/window management functionality
121 ***************************************************************************************/
122
128extern uint8_t GHOST_GetNumDisplays(GHOST_SystemHandle systemhandle);
129
137extern GHOST_TSuccess GHOST_GetMainDisplayDimensions(GHOST_SystemHandle systemhandle,
138 uint32_t *r_width,
139 uint32_t *r_height);
140
150extern GHOST_TSuccess GHOST_GetAllDisplayDimensions(GHOST_SystemHandle systemhandle,
151 uint32_t *r_width,
152 uint32_t *r_height);
170extern GHOST_WindowHandle GHOST_CreateWindow(GHOST_SystemHandle systemhandle,
171 GHOST_WindowHandle parent_windowhandle,
172 const char *title,
173 int32_t left,
174 int32_t top,
175 uint32_t width,
176 uint32_t height,
178 bool is_dialog,
179 GHOST_GPUSettings gpuSettings);
180
188extern GHOST_ContextHandle GHOST_CreateGPUContext(GHOST_SystemHandle systemhandle,
189 GHOST_GPUSettings gpuSettings);
190
197extern GHOST_TSuccess GHOST_DisposeGPUContext(GHOST_SystemHandle systemhandle,
198 GHOST_ContextHandle contexthandle);
199
205extern GHOST_TUserDataPtr GHOST_GetWindowUserData(GHOST_WindowHandle windowhandle);
206
212extern void GHOST_SetWindowUserData(GHOST_WindowHandle windowhandle, GHOST_TUserDataPtr user_data);
213
214extern bool GHOST_IsDialogWindow(GHOST_WindowHandle windowhandle);
215
222extern GHOST_TSuccess GHOST_DisposeWindow(GHOST_SystemHandle systemhandle,
223 GHOST_WindowHandle windowhandle);
224
231extern bool GHOST_ValidWindow(GHOST_SystemHandle systemhandle, GHOST_WindowHandle windowhandle);
232
241extern GHOST_WindowHandle GHOST_BeginFullScreen(GHOST_SystemHandle systemhandle,
242 const GHOST_DisplaySetting *setting,
243 const bool stereoVisual);
244
250extern GHOST_TSuccess GHOST_EndFullScreen(GHOST_SystemHandle systemhandle);
251
257extern bool GHOST_GetFullScreen(GHOST_SystemHandle systemhandle);
258
268extern GHOST_WindowHandle GHOST_GetWindowUnderCursor(GHOST_SystemHandle systemhandle,
269 int32_t x,
270 int32_t y);
271
272/***************************************************************************************
273 * Event management functionality
274 ***************************************************************************************/
275
283extern bool GHOST_ProcessEvents(GHOST_SystemHandle systemhandle, bool waitForEvent);
284
289extern void GHOST_DispatchEvents(GHOST_SystemHandle systemhandle);
290
297extern GHOST_TSuccess GHOST_AddEventConsumer(GHOST_SystemHandle systemhandle,
298 GHOST_EventConsumerHandle consumerhandle);
299
306extern GHOST_TSuccess GHOST_RemoveEventConsumer(GHOST_SystemHandle systemhandle,
307 GHOST_EventConsumerHandle consumerhandle);
308
309/***************************************************************************************
310 * Progress bar functionality
311 ***************************************************************************************/
312
318extern GHOST_TSuccess GHOST_SetProgressBar(GHOST_WindowHandle windowhandle, float progress);
319
324extern GHOST_TSuccess GHOST_EndProgressBar(GHOST_WindowHandle windowhandle);
325
326/***************************************************************************************
327 * Cursor management functionality
328 ***************************************************************************************/
329
335extern GHOST_TStandardCursor GHOST_GetCursorShape(GHOST_WindowHandle windowhandle);
336
344extern GHOST_TSuccess GHOST_SetCursorShape(GHOST_WindowHandle windowhandle,
345 GHOST_TStandardCursor cursorshape);
346
351extern GHOST_TSuccess GHOST_HasCursorShape(GHOST_WindowHandle windowhandle,
352 GHOST_TStandardCursor cursorshape);
353
366extern GHOST_TSuccess GHOST_SetCustomCursorShape(GHOST_WindowHandle windowhandle,
367 uint8_t *bitmap,
368 uint8_t *mask,
369 int sizex,
370 int sizey,
371 int hotX,
372 int hotY,
373 bool canInvertColor);
374
375extern GHOST_TSuccess GHOST_GetCursorBitmap(GHOST_WindowHandle windowhandle,
376 GHOST_CursorBitmapRef *bitmap);
377
383extern bool GHOST_GetCursorVisibility(GHOST_WindowHandle windowhandle);
384
391extern GHOST_TSuccess GHOST_SetCursorVisibility(GHOST_WindowHandle windowhandle, bool visible);
392
400GHOST_TSuccess GHOST_GetCursorPosition(const GHOST_SystemHandle systemhandle,
401 const GHOST_WindowHandle windowhandle,
402 int32_t *x,
403 int32_t *y);
412GHOST_TSuccess GHOST_SetCursorPosition(GHOST_SystemHandle systemhandle,
413 GHOST_WindowHandle windowhandle,
414 int32_t x,
415 int32_t y);
416
417void GHOST_GetCursorGrabState(GHOST_WindowHandle windowhandle,
418 GHOST_TGrabCursorMode *r_mode,
419 GHOST_TAxisFlag *r_axis_flag,
420 int r_bounds[4],
421 bool *r_use_software_cursor);
422
433extern GHOST_TSuccess GHOST_SetCursorGrab(GHOST_WindowHandle windowhandle,
435 GHOST_TAxisFlag wrap_axis,
436 const int bounds[4],
437 const int mouse_ungrab_xy[2]);
438
439/***************************************************************************************
440 * Access to mouse button and keyboard states.
441 ***************************************************************************************/
442
450extern GHOST_TSuccess GHOST_GetModifierKeyState(GHOST_SystemHandle systemhandle,
452 bool *r_is_down);
453
461extern GHOST_TSuccess GHOST_GetButtonState(GHOST_SystemHandle systemhandle,
462 GHOST_TButton mask,
463 bool *r_is_down);
464
465#ifdef WITH_INPUT_NDOF
466/***************************************************************************************
467 * Access to 3D mouse.
468 ***************************************************************************************/
469
474extern void GHOST_setNDOFDeadZone(float deadzone);
475#endif
476
477/***************************************************************************************
478 * Drag & drop operations
479 ***************************************************************************************/
480
484extern void GHOST_setAcceptDragOperation(GHOST_WindowHandle windowhandle, bool can_accept);
485
491extern GHOST_TEventType GHOST_GetEventType(GHOST_EventHandle eventhandle);
492
498extern uint64_t GHOST_GetEventTime(GHOST_EventHandle eventhandle);
499
506extern GHOST_WindowHandle GHOST_GetEventWindow(GHOST_EventHandle eventhandle);
507
513extern GHOST_TEventDataPtr GHOST_GetEventData(GHOST_EventHandle eventhandle);
514
520extern GHOST_TimerProcPtr GHOST_GetTimerProc(GHOST_TimerTaskHandle timertaskhandle);
521
527extern void GHOST_SetTimerProc(GHOST_TimerTaskHandle timertaskhandle,
528 GHOST_TimerProcPtr timerProc);
529
535extern GHOST_TUserDataPtr GHOST_GetTimerTaskUserData(GHOST_TimerTaskHandle timertaskhandle);
536
542extern void GHOST_SetTimerTaskUserData(GHOST_TimerTaskHandle timertaskhandle,
543 GHOST_TUserDataPtr user_data);
544
550extern bool GHOST_GetValid(GHOST_WindowHandle windowhandle);
551
557extern GHOST_TDrawingContextType GHOST_GetDrawingContextType(GHOST_WindowHandle windowhandle);
558
565extern GHOST_TSuccess GHOST_SetDrawingContextType(GHOST_WindowHandle windowhandle,
567
573extern GHOST_ContextHandle GHOST_GetDrawingContext(GHOST_WindowHandle windowhandle);
574
580extern void GHOST_SetTitle(GHOST_WindowHandle windowhandle, const char *title);
581
589extern char *GHOST_GetTitle(GHOST_WindowHandle windowhandle);
590
596extern GHOST_TSuccess GHOST_SetPath(GHOST_WindowHandle windowhandle, const char *filepath);
597
604extern GHOST_RectangleHandle GHOST_GetWindowBounds(GHOST_WindowHandle windowhandle);
605
612extern GHOST_RectangleHandle GHOST_GetClientBounds(GHOST_WindowHandle windowhandle);
613
618void GHOST_DisposeRectangle(GHOST_RectangleHandle rectanglehandle);
619
626extern GHOST_TSuccess GHOST_SetClientWidth(GHOST_WindowHandle windowhandle, uint32_t width);
627
634extern GHOST_TSuccess GHOST_SetClientHeight(GHOST_WindowHandle windowhandle, uint32_t height);
635
643extern GHOST_TSuccess GHOST_SetClientSize(GHOST_WindowHandle windowhandle,
644 uint32_t width,
645 uint32_t height);
646
655extern void GHOST_ScreenToClient(
656 GHOST_WindowHandle windowhandle, int32_t inX, int32_t inY, int32_t *outX, int32_t *outY);
657
666extern void GHOST_ClientToScreen(
667 GHOST_WindowHandle windowhandle, int32_t inX, int32_t inY, int32_t *outX, int32_t *outY);
668
674extern GHOST_TWindowState GHOST_GetWindowState(GHOST_WindowHandle windowhandle);
675
682extern GHOST_TSuccess GHOST_SetWindowState(GHOST_WindowHandle windowhandle,
684
691extern GHOST_TSuccess GHOST_SetWindowModifiedState(GHOST_WindowHandle windowhandle,
692 bool isUnsavedChanges);
693
700extern GHOST_TSuccess GHOST_SetWindowOrder(GHOST_WindowHandle windowhandle,
701 GHOST_TWindowOrder order);
702
708extern GHOST_TSuccess GHOST_SwapWindowBuffers(GHOST_WindowHandle windowhandle);
709
715extern GHOST_TSuccess GHOST_SetSwapInterval(GHOST_WindowHandle windowhandle, int interval);
716
724extern GHOST_TSuccess GHOST_GetSwapInterval(GHOST_WindowHandle windowhandle, int *r_interval);
725
731extern GHOST_TSuccess GHOST_ActivateWindowDrawingContext(GHOST_WindowHandle windowhandle);
732
738extern GHOST_TSuccess GHOST_InvalidateWindow(GHOST_WindowHandle windowhandle);
739
745extern GHOST_TSuccess GHOST_ActivateGPUContext(GHOST_ContextHandle contexthandle);
746
752extern GHOST_TSuccess GHOST_ReleaseGPUContext(GHOST_ContextHandle contexthandle);
753
757extern unsigned int GHOST_GetContextDefaultGPUFramebuffer(GHOST_ContextHandle contexthandle);
758
762extern unsigned int GHOST_GetDefaultGPUFramebuffer(GHOST_WindowHandle windowhandle);
763
769extern void GHOST_SetMultitouchGestures(GHOST_SystemHandle systemhandle, const bool use);
770
776extern void GHOST_SetTabletAPI(GHOST_SystemHandle systemhandle, GHOST_TTabletAPI api);
777
783extern GHOST_TSuccess GHOST_GetPixelAtCursor(float r_color[3]);
784
790extern int32_t GHOST_GetWidthRectangle(GHOST_RectangleHandle rectanglehandle);
791
797extern int32_t GHOST_GetHeightRectangle(GHOST_RectangleHandle rectanglehandle);
798
807extern void GHOST_GetRectangle(
808 GHOST_RectangleHandle rectanglehandle, int32_t *l, int32_t *t, int32_t *r, int32_t *b);
809
818extern void GHOST_SetRectangle(
819 GHOST_RectangleHandle rectanglehandle, int32_t l, int32_t t, int32_t r, int32_t b);
820
827extern GHOST_TSuccess GHOST_IsEmptyRectangle(GHOST_RectangleHandle rectanglehandle);
828
836extern GHOST_TSuccess GHOST_IsValidRectangle(GHOST_RectangleHandle rectanglehandle);
837
844extern void GHOST_InsetRectangle(GHOST_RectangleHandle rectanglehandle, int32_t i);
845
852extern void GHOST_UnionRectangle(GHOST_RectangleHandle rectanglehandle,
853 GHOST_RectangleHandle anotherrectanglehandle);
854
861extern void GHOST_UnionPointRectangle(GHOST_RectangleHandle rectanglehandle, int32_t x, int32_t y);
862
871extern GHOST_TSuccess GHOST_IsInsideRectangle(GHOST_RectangleHandle rectanglehandle,
872 int32_t x,
873 int32_t y);
874
882 GHOST_RectangleHandle rectanglehandle, GHOST_RectangleHandle anotherrectanglehandle);
883
891extern void GHOST_SetCenterRectangle(GHOST_RectangleHandle rectanglehandle,
892 int32_t cx,
893 int32_t cy);
894
905extern void GHOST_SetRectangleCenter(
906 GHOST_RectangleHandle rectanglehandle, int32_t cx, int32_t cy, int32_t w, int32_t h);
907
916extern GHOST_TSuccess GHOST_ClipRectangle(GHOST_RectangleHandle rectanglehandle,
917 GHOST_RectangleHandle anotherrectanglehandle);
918
924extern char *GHOST_getClipboard(bool selection);
925
931extern void GHOST_putClipboard(const char *buffer, bool selection);
932
937
944extern uint *GHOST_getClipboardImage(int *r_width, int *r_height);
945
952extern GHOST_TSuccess GHOST_putClipboardImage(uint *rgba, int width, int height);
953
960
964extern bool GHOST_UseNativePixels(void);
965
970
974extern void GHOST_SetBacktraceHandler(GHOST_TBacktraceFn backtrace_fn);
975
979extern void GHOST_UseWindowFocus(bool use_focus);
980
984extern void GHOST_SetAutoFocus(bool auto_focus);
985
989extern float GHOST_GetNativePixelSize(GHOST_WindowHandle windowhandle);
990
994extern uint16_t GHOST_GetDPIHint(GHOST_WindowHandle windowhandle);
995
1008extern void GHOST_BeginIME(
1009 GHOST_WindowHandle windowhandle, int32_t x, int32_t y, int32_t w, int32_t h, bool complete);
1015extern void GHOST_EndIME(GHOST_WindowHandle windowhandle);
1016
1017#ifdef WITH_XR_OPENXR
1018
1019/* XR-context */
1020
1028void GHOST_XrErrorHandler(GHOST_XrErrorHandlerFn handler_fn, void *customdata);
1029
1039GHOST_XrContextHandle GHOST_XrContextCreate(const GHOST_XrContextCreateInfo *create_info);
1043void GHOST_XrContextDestroy(GHOST_XrContextHandle xr_context);
1044
1053void GHOST_XrGraphicsContextBindFuncs(GHOST_XrContextHandle xr_context,
1054 GHOST_XrGraphicsContextBindFn bind_fn,
1055 GHOST_XrGraphicsContextUnbindFn unbind_fn);
1056
1064void GHOST_XrDrawViewFunc(GHOST_XrContextHandle xr_context, GHOST_XrDrawViewFn draw_view_fn);
1065
1072void GHOST_XrPassthroughEnabledFunc(GHOST_XrContextHandle xr_context,
1073 GHOST_XrPassthroughEnabledFn passthrough_enabled_fn);
1074
1081void GHOST_XrDisablePassthroughFunc(GHOST_XrContextHandle xr_context,
1082 GHOST_XrDisablePassthroughFn disable_passthrough_fn);
1083
1084/* sessions */
1090void GHOST_XrSessionStart(GHOST_XrContextHandle xr_context,
1091 const GHOST_XrSessionBeginInfo *begin_info);
1095void GHOST_XrSessionEnd(GHOST_XrContextHandle xr_context);
1102void GHOST_XrSessionDrawViews(GHOST_XrContextHandle xr_context, void *customdata);
1108int GHOST_XrSessionIsRunning(const GHOST_XrContextHandle xr_context);
1109
1115int GHOST_XrSessionNeedsUpsideDownDrawing(const GHOST_XrContextHandle xr_context);
1116
1117/* events */
1124GHOST_TSuccess GHOST_XrEventsHandle(GHOST_XrContextHandle xr_context);
1125
1126/* actions */
1130int GHOST_XrCreateActionSet(GHOST_XrContextHandle xr_context, const GHOST_XrActionSetInfo *info);
1131
1135void GHOST_XrDestroyActionSet(GHOST_XrContextHandle xr_context, const char *action_set_name);
1136
1140int GHOST_XrCreateActions(GHOST_XrContextHandle xr_context,
1141 const char *action_set_name,
1143 const GHOST_XrActionInfo *infos);
1144
1148void GHOST_XrDestroyActions(GHOST_XrContextHandle xr_context,
1149 const char *action_set_name,
1151 const char *const *action_names);
1152
1156int GHOST_XrCreateActionBindings(GHOST_XrContextHandle xr_context,
1157 const char *action_set_name,
1159 const GHOST_XrActionProfileInfo *infos);
1160
1164void GHOST_XrDestroyActionBindings(GHOST_XrContextHandle xr_context,
1165 const char *action_set_name,
1167 const char *const *action_names,
1168 const char *const *profile_paths);
1169
1173int GHOST_XrAttachActionSets(GHOST_XrContextHandle xr_context);
1174
1181int GHOST_XrSyncActions(GHOST_XrContextHandle xr_context, const char *action_set_name);
1182
1186int GHOST_XrApplyHapticAction(GHOST_XrContextHandle xr_context_handle,
1187 const char *action_set_name,
1188 const char *action_name,
1189 const char *subaction_path,
1190 const int64_t *duration,
1191 const float *frequency,
1192 const float *amplitude);
1193
1197void GHOST_XrStopHapticAction(GHOST_XrContextHandle xr_context_handle,
1198 const char *action_set_name,
1199 const char *action_name,
1200 const char *subaction_path);
1201
1205void *GHOST_XrGetActionSetCustomdata(GHOST_XrContextHandle xr_context,
1206 const char *action_set_name);
1207
1211void *GHOST_XrGetActionCustomdata(GHOST_XrContextHandle xr_context,
1212 const char *action_set_name,
1213 const char *action_name);
1214
1218unsigned int GHOST_XrGetActionCount(GHOST_XrContextHandle xr_context, const char *action_set_name);
1219
1223void GHOST_XrGetActionCustomdataArray(GHOST_XrContextHandle xr_context,
1224 const char *action_set_name,
1225 void **r_customdata_array);
1226
1227/* controller model */
1231int GHOST_XrLoadControllerModel(GHOST_XrContextHandle xr_context, const char *subaction_path);
1232
1236void GHOST_XrUnloadControllerModel(GHOST_XrContextHandle xr_context, const char *subaction_path);
1237
1241int GHOST_XrUpdateControllerModelComponents(GHOST_XrContextHandle xr_context,
1242 const char *subaction_path);
1243
1247int GHOST_XrGetControllerModelData(GHOST_XrContextHandle xr_context,
1248 const char *subaction_path,
1249 GHOST_XrControllerModelData *r_data);
1250
1251#endif /* WITH_XR_OPENXR */
1252
1253#ifdef WITH_VULKAN_BACKEND
1254
1284void GHOST_GetVulkanHandles(GHOST_ContextHandle context,
1285 void *r_instance,
1286 void *r_physical_device,
1287 void *r_device,
1288 uint32_t *r_graphic_queue_family,
1289 void *r_queue,
1290 void **r_queue_mutex);
1291
1303void GHOST_SetVulkanSwapBuffersCallbacks(
1304 GHOST_ContextHandle context,
1305 void (*swap_buffers_pre_callback)(const GHOST_VulkanSwapChainData *),
1306 void (*swap_buffers_post_callback)(void));
1307
1320void GHOST_GetVulkanSwapChainFormat(GHOST_WindowHandle windowhandle,
1321 GHOST_VulkanSwapChainData *r_swap_chain_data);
1322
1323#endif
1324
1325#ifdef __cplusplus
1326}
1327
1328#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)
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)
bool GHOST_GetFullScreen(GHOST_SystemHandle systemhandle)
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)
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)
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)
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_EndFullScreen(GHOST_SystemHandle systemhandle)
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)
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)
GHOST_WindowHandle GHOST_BeginFullScreen(GHOST_SystemHandle systemhandle, const GHOST_DisplaySetting *setting, const bool stereoVisual)
void GHOST_SystemInitDebug(GHOST_SystemHandle systemhandle, GHOST_Debug debug)
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)
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)
bool(* GHOST_EventCallbackProcPtr)(GHOST_EventHandle event, GHOST_TUserDataPtr user_data)
Definition GHOST_C-api.h:24
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:85
GHOST_TStandardCursor
GHOST_TEventType
GHOST_TCapabilityFlag
Definition GHOST_Types.h:96
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:87
void(* GHOST_TBacktraceFn)(void *file_handle)
Definition GHOST_Types.h:63
GHOST_TGrabCursorMode
GHOST_TButton
GHOST_TConsoleWindowState
GHOST_TTabletAPI
GHOST_DialogOptions
Definition GHOST_Types.h:80
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
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
local_group_size(16, 16) .push_constant(Type b
int count
static ulong state[N]
unsigned short uint16_t
Definition stdint.h:79
unsigned int uint32_t
Definition stdint.h:80
__int64 int64_t
Definition stdint.h:89
signed int int32_t
Definition stdint.h:77
unsigned char uint8_t
Definition stdint.h:78
unsigned __int64 uint64_t
Definition stdint.h:90