31 return (GHOST_SystemHandle)system;
39 return (GHOST_SystemHandle)system;
54#if !(defined(WIN32) || defined(__APPLE__))
64 const char *help_label,
65 const char *continue_label,
70 system->
showMessageBox(title, message, help_label, continue_label, link, dialog_options);
100 return (GHOST_TimerTaskHandle)system->
installTimer(delay, interval, timerproc, user_data);
104 GHOST_TimerTaskHandle timertaskhandle)
150 GHOST_ContextHandle contexthandle)
159 GHOST_WindowHandle parent_windowhandle,
204 GHOST_WindowHandle windowhandle)
233 return (GHOST_WindowHandle)window;
251 GHOST_EventConsumerHandle consumerhandle)
259 GHOST_EventConsumerHandle consumerhandle)
304 const uint8_t *bitmap,
307 const int hot_spot[2],
308 bool can_invert_color)
353GHOST_TSuccess GHOST_GetCursorPositionScreenCoords(GHOST_SystemHandle systemhandle,
362GHOST_TSuccess GHOST_SetCursorPositionScreenCoords(GHOST_SystemHandle systemhandle,
373 const GHOST_WindowHandle windowhandle,
384 GHOST_WindowHandle windowhandle,
398 const int mouse_ungrab_xy[2])
407 if (mouse_ungrab_xy) {
408 mouse_xy[0] = mouse_ungrab_xy[0];
409 mouse_xy[1] = mouse_ungrab_xy[1];
413 mode, wrap_axis,
bounds ? &bounds_rect :
nullptr, mouse_ungrab_xy ? mouse_xy :
nullptr);
420 bool *r_use_software_cursor)
424 bool use_software_cursor;
426 r_bounds[0] = bounds_rect.
l_;
427 r_bounds[1] = bounds_rect.
t_;
428 r_bounds[2] = bounds_rect.
r_;
429 r_bounds[3] = bounds_rect.
b_;
430 *r_use_software_cursor = use_software_cursor;
439 bool is_down =
false;
442 *r_is_down = is_down;
453 bool is_down =
false;
456 *r_is_down = is_down;
461#ifdef WITH_INPUT_NDOF
462void GHOST_setNDOFDeadZone(
float deadzone)
465 system->setNDOFDeadZone(deadzone);
494 return (GHOST_WindowHandle)
event->
getWindow();
571 std::string title = window->
getTitle();
573 const size_t ctitle_size = title.size() + 1;
574 char *ctitle = (
char *)malloc(ctitle_size);
576 if (ctitle ==
nullptr) {
580 memcpy(ctitle, title.c_str(), ctitle_size);
589 return window->
setPath(filepath);
593 GHOST_WindowHandle windowhandle)
627 return (GHOST_RectangleHandle)rectangle;
638 return (GHOST_RectangleHandle)rectangle;
700 bool is_unsaved_changes)
753 return context->activateDrawingContext();
763 return context->releaseDrawingContext();
775 return context->getDefaultFramebuffer();
812 return ((
GHOST_Rect *)rectanglehandle)->getWidth();
817 return ((
GHOST_Rect *)rectanglehandle)->getHeight();
841 if (((
GHOST_Rect *)rectanglehandle)->isEmpty()) {
851 if (((
GHOST_Rect *)rectanglehandle)->isValid()) {
863 GHOST_RectangleHandle anotherrectanglehandle)
884 GHOST_RectangleHandle anotherrectanglehandle)
888 visible = ((
GHOST_Rect *)rectanglehandle)->getVisibility(*(
GHOST_Rect *)anotherrectanglehandle);
895 ((
GHOST_Rect *)rectanglehandle)->setCenter(cx, cy);
901 ((
GHOST_Rect *)rectanglehandle)->setCenter(cx, cy,
w, h);
905 GHOST_RectangleHandle anotherrectanglehandle)
1000#ifdef WITH_INPUT_IME
1006 window->beginIME(
x,
y,
w, h, complete);
1017#ifdef WITH_XR_OPENXR
1019# define GHOST_XR_CAPI_CALL(call, ctx) \
1023 catch (GHOST_XrException & e) { \
1024 (ctx)->dispatchErrorMessage(&e); \
1027# define GHOST_XR_CAPI_CALL_RET(call, ctx) \
1031 catch (GHOST_XrException & e) { \
1032 (ctx)->dispatchErrorMessage(&e); \
1035void GHOST_XrSessionStart(GHOST_XrContextHandle xr_contexthandle,
1036 const GHOST_XrSessionBeginInfo *begin_info)
1039 GHOST_XR_CAPI_CALL(xr_context->
startSession(begin_info), xr_context);
1042void GHOST_XrSessionEnd(GHOST_XrContextHandle xr_contexthandle)
1045 GHOST_XR_CAPI_CALL(xr_context->
endSession(), xr_context);
1048void GHOST_XrSessionDrawViews(GHOST_XrContextHandle xr_contexthandle,
void *draw_customdata)
1051 GHOST_XR_CAPI_CALL(xr_context->
drawSessionViews(draw_customdata), xr_context);
1054int GHOST_XrSessionIsRunning(
const GHOST_XrContextHandle xr_contexthandle)
1061void GHOST_XrGraphicsContextBindFuncs(GHOST_XrContextHandle xr_contexthandle,
1062 GHOST_XrGraphicsContextBindFn bind_fn,
1063 GHOST_XrGraphicsContextUnbindFn unbind_fn)
1069void GHOST_XrDrawViewFunc(GHOST_XrContextHandle xr_contexthandle, GHOST_XrDrawViewFn draw_view_fn)
1072 GHOST_XR_CAPI_CALL(xr_context->
setDrawViewFunc(draw_view_fn), xr_context);
1075void GHOST_XrPassthroughEnabledFunc(GHOST_XrContextHandle xr_contexthandle,
1076 GHOST_XrPassthroughEnabledFn passthrough_enabled_fn)
1082void GHOST_XrDisablePassthroughFunc(GHOST_XrContextHandle xr_contexthandle,
1083 GHOST_XrDisablePassthroughFn disable_passthrough_fn)
1089int GHOST_XrSessionNeedsUpsideDownDrawing(
const GHOST_XrContextHandle xr_contexthandle)
1097int GHOST_XrCreateActionSet(GHOST_XrContextHandle xr_contexthandle,
1098 const GHOST_XrActionSetInfo *info)
1102 GHOST_XR_CAPI_CALL_RET(xr_session->
createActionSet(*info), xr_context);
1106void GHOST_XrDestroyActionSet(GHOST_XrContextHandle xr_contexthandle,
const char *action_set_name)
1110 GHOST_XR_CAPI_CALL(xr_session->
destroyActionSet(action_set_name), xr_context);
1113int GHOST_XrCreateActions(GHOST_XrContextHandle xr_contexthandle,
1114 const char *action_set_name,
1116 const GHOST_XrActionInfo *infos)
1120 GHOST_XR_CAPI_CALL_RET(xr_session->
createActions(action_set_name,
count, infos), xr_context);
1124void GHOST_XrDestroyActions(GHOST_XrContextHandle xr_contexthandle,
1125 const char *action_set_name,
1127 const char *
const *action_names)
1131 GHOST_XR_CAPI_CALL(xr_session->
destroyActions(action_set_name,
count, action_names), xr_context);
1134int GHOST_XrCreateActionBindings(GHOST_XrContextHandle xr_contexthandle,
1135 const char *action_set_name,
1137 const GHOST_XrActionProfileInfo *infos)
1146void GHOST_XrDestroyActionBindings(GHOST_XrContextHandle xr_contexthandle,
1147 const char *action_set_name,
1149 const char *
const *action_names,
1150 const char *
const *profile_paths)
1159int GHOST_XrAttachActionSets(GHOST_XrContextHandle xr_contexthandle)
1167int GHOST_XrSyncActions(GHOST_XrContextHandle xr_contexthandle,
const char *action_set_name)
1171 GHOST_XR_CAPI_CALL_RET(xr_session->
syncActions(action_set_name), xr_context);
1175int GHOST_XrApplyHapticAction(GHOST_XrContextHandle xr_contexthandle,
1176 const char *action_set_name,
1177 const char *action_name,
1178 const char *subaction_path,
1180 const float *frequency,
1181 const float *amplitude)
1185 GHOST_XR_CAPI_CALL_RET(
1187 action_set_name, action_name, subaction_path, *duration, *frequency, *amplitude),
1192void GHOST_XrStopHapticAction(GHOST_XrContextHandle xr_contexthandle,
1193 const char *action_set_name,
1194 const char *action_name,
1195 const char *subaction_path)
1199 GHOST_XR_CAPI_CALL(xr_session->
stopHapticAction(action_set_name, action_name, subaction_path),
1203void *GHOST_XrGetActionSetCustomdata(GHOST_XrContextHandle xr_contexthandle,
1204 const char *action_set_name)
1212void *GHOST_XrGetActionCustomdata(GHOST_XrContextHandle xr_contexthandle,
1213 const char *action_set_name,
1214 const char *action_name)
1223uint GHOST_XrGetActionCount(GHOST_XrContextHandle xr_contexthandle,
const char *action_set_name)
1227 GHOST_XR_CAPI_CALL_RET(xr_session->
getActionCount(action_set_name), xr_context);
1231void GHOST_XrGetActionCustomdataArray(GHOST_XrContextHandle xr_contexthandle,
1232 const char *action_set_name,
1233 void **r_customdata_array)
1241int GHOST_XrLoadControllerModel(GHOST_XrContextHandle xr_contexthandle,
const char *subaction_path)
1249void GHOST_XrUnloadControllerModel(GHOST_XrContextHandle xr_contexthandle,
1250 const char *subaction_path)
1257int GHOST_XrUpdateControllerModelComponents(GHOST_XrContextHandle xr_contexthandle,
1258 const char *subaction_path)
1266int GHOST_XrGetControllerModelData(GHOST_XrContextHandle xr_contexthandle,
1267 const char *subaction_path,
1268 GHOST_XrControllerModelData *r_data)
1278#ifdef WITH_VULKAN_BACKEND
1280void GHOST_GetVulkanHandles(GHOST_ContextHandle contexthandle, GHOST_VulkanHandles *r_handles)
1283 context->getVulkanHandles(*r_handles);
1286void GHOST_SetVulkanSwapBuffersCallbacks(
1287 GHOST_ContextHandle contexthandle,
1288 void (*swap_buffer_draw_callback)(
const GHOST_VulkanSwapChainData *),
1289 void (*swap_buffer_acquired_callback)(
void),
1290 void (*openxr_acquire_image_callback)(GHOST_VulkanOpenXRData *),
1291 void (*openxr_release_image_callback)(GHOST_VulkanOpenXRData *))
1294 context->setVulkanSwapBuffersCallbacks(swap_buffer_draw_callback,
1295 swap_buffer_acquired_callback,
1296 openxr_acquire_image_callback,
1297 openxr_release_image_callback);
1300void GHOST_GetVulkanSwapChainFormat(GHOST_WindowHandle windowhandle,
1301 GHOST_VulkanSwapChainData *r_swap_chain_data)
1304 window->getVulkanSwapChainFormat(r_swap_chain_data);
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_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_WindowHandle GHOST_GetWindowUnderCursor(GHOST_SystemHandle systemhandle, int32_t x, int32_t y)
GHOST_EventConsumerHandle GHOST_CreateEventConsumer(GHOST_EventCallbackProcPtr eventCallback, GHOST_TUserDataPtr user_data)
GHOST_TSuccess GHOST_AddEventConsumer(GHOST_SystemHandle systemhandle, GHOST_EventConsumerHandle consumerhandle)
GHOST_TSuccess GHOST_GetAllDisplayDimensions(GHOST_SystemHandle systemhandle, uint32_t *r_width, uint32_t *r_height)
GHOST_TimerProcPtr GHOST_GetTimerProc(GHOST_TimerTaskHandle timertaskhandle)
uint GHOST_GetContextDefaultGPUFramebuffer(GHOST_ContextHandle contexthandle)
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_hasClipboardImage()
GHOST_TSuccess GHOST_RemoveEventConsumer(GHOST_SystemHandle systemhandle, GHOST_EventConsumerHandle consumerhandle)
uint16_t GHOST_GetDPIHint(GHOST_WindowHandle windowhandle)
GHOST_TSuccess GHOST_IsEmptyRectangle(GHOST_RectangleHandle rectanglehandle)
uint GHOST_GetDefaultGPUFramebuffer(GHOST_WindowHandle windowhandle)
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)
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()
const char * GHOST_SystemBackend()
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_SystemHandle GHOST_CreateSystem()
GHOST_SystemHandle GHOST_CreateSystemBackground()
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)
void GHOST_SetTimerProc(GHOST_TimerTaskHandle timertaskhandle, GHOST_TimerProcPtr timerproc)
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)
GHOST_TSuccess GHOST_RemoveTimer(GHOST_SystemHandle systemhandle, GHOST_TimerTaskHandle timertaskhandle)
int32_t GHOST_GetHeightRectangle(GHOST_RectangleHandle rectanglehandle)
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)
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)
GHOST_TCapabilityFlag GHOST_GetCapabilities()
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)
char * GHOST_GetTitle(GHOST_WindowHandle windowhandle)
bool GHOST_UseNativePixels()
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)
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_DisposeSystem(GHOST_SystemHandle)
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)
GHOST_TimerTaskHandle GHOST_InstallTimer(GHOST_SystemHandle systemhandle, uint64_t delay, uint64_t interval, GHOST_TimerProcPtr timerproc, GHOST_TUserDataPtr user_data)
void GHOST_InsetRectangle(GHOST_RectangleHandle rectanglehandle, int32_t i)
GHOST_RectangleHandle GHOST_GetClientBounds(GHOST_WindowHandle windowhandle)
uint8_t GHOST_GetNumDisplays(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 C-API function and type declarations.
void GHOST_BeginIME(GHOST_WindowHandle windowhandle, int32_t x, int32_t y, int32_t w, int32_t h, bool complete)
bool(*)(GHOST_EventHandle event, GHOST_TUserDataPtr user_data) GHOST_EventCallbackProcPtr
void GHOST_EndIME(GHOST_WindowHandle windowhandle)
#define GHOST_PRINTF(x,...)
void * GHOST_TUserDataPtr
void(* GHOST_TimerProcPtr)(struct GHOST_TimerTaskHandle__ *task, uint64_t time)
const void * GHOST_TEventDataPtr
GHOST_TDrawingContextType
void(* GHOST_TBacktraceFn)(void *file_handle)
GHOST_TConsoleWindowState
GHOST_TWindowDecorationStyleFlags
ATTR_WARN_UNUSED_RESULT const BMLoop * l
virtual bool isInside(const btVector3 &pt, btScalar tolerance) const
unsigned long long int uint64_t
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
static btDbvtVolume bounds(btDbvtNode **leaves, int count)
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
static GHOST_IContext * getActiveDrawingContext()
virtual GHOST_TEventType getType() const =0
virtual GHOST_TEventDataPtr getData() const =0
virtual GHOST_IWindow * getWindow() const =0
virtual uint64_t getTime() const =0
static GHOST_ISystem * getSystem()
virtual void putClipboard(const char *buffer, bool selection) const =0
virtual GHOST_TSuccess getModifierKeyState(GHOST_TModifierKey mask, bool &is_down) const =0
static void setUseWindowFrame(bool use_window_frame)
static void setBacktraceFn(GHOST_TBacktraceFn backtrace_fn)
virtual GHOST_TSuccess showMessageBox(const char *, const char *, const char *, const char *, const char *, GHOST_DialogOptions) const =0
virtual void initDebug(GHOST_Debug debug)=0
virtual void setTabletAPI(GHOST_TTabletAPI api)=0
virtual char * getClipboard(bool selection) const =0
virtual GHOST_TSuccess setCursorPositionClientRelative(GHOST_IWindow *window, int32_t x, int32_t y)=0
virtual void getMainDisplayDimensions(uint32_t &width, uint32_t &height) const =0
virtual GHOST_TSuccess hasClipboardImage() const =0
virtual bool validWindow(GHOST_IWindow *window)=0
virtual GHOST_TSuccess getCursorPosition(int32_t &x, int32_t &y) const =0
virtual GHOST_IWindow * createWindow(const char *title, int32_t left, int32_t top, uint32_t width, uint32_t height, GHOST_TWindowState state, GHOST_GPUSettings gpu_settings, const bool exclusive=false, const bool is_dialog=false, const GHOST_IWindow *parent_window=nullptr)=0
virtual void getAllDisplayDimensions(uint32_t &width, uint32_t &height) const =0
virtual uint * getClipboardImage(int *r_width, int *r_height) const =0
virtual GHOST_IContext * createOffscreenContext(GHOST_GPUSettings gpu_settings)=0
virtual GHOST_TSuccess addEventConsumer(GHOST_IEventConsumer *consumer)=0
virtual GHOST_ITimerTask * installTimer(uint64_t delay, uint64_t interval, GHOST_TimerProcPtr timer_proc, GHOST_TUserDataPtr user_data=nullptr)=0
virtual void useWindowFocus(const bool use_focus)=0
virtual GHOST_TSuccess disposeContext(GHOST_IContext *context)=0
virtual GHOST_TSuccess removeTimer(GHOST_ITimerTask *timerTask)=0
virtual bool useNativePixel()=0
static GHOST_TSuccess createSystem(bool verbose, bool background)
static GHOST_TSuccess disposeSystem()
virtual uint8_t getNumDisplays() const =0
virtual void setMultitouchGestures(const bool use)=0
virtual bool setConsoleWindowState(GHOST_TConsoleWindowState action)=0
virtual void dispatchEvents()=0
static const char * getSystemBackend()
virtual GHOST_TCapabilityFlag getCapabilities() const =0
virtual uint32_t getCursorPreferredLogicalSize() const =0
virtual GHOST_TSuccess putClipboardImage(uint *rgba, int width, int height) const =0
virtual GHOST_TSuccess getButtonState(GHOST_TButton mask, bool &is_down) const =0
virtual void setAutoFocus(const bool auto_focus)=0
virtual GHOST_TSuccess getCursorPositionClientRelative(const GHOST_IWindow *window, int32_t &x, int32_t &y) const =0
virtual uint64_t getMilliSeconds() const =0
virtual GHOST_TSuccess disposeWindow(GHOST_IWindow *window)=0
virtual GHOST_TSuccess setCursorPosition(int32_t x, int32_t y)=0
virtual GHOST_TSuccess removeEventConsumer(GHOST_IEventConsumer *consumer)=0
virtual GHOST_TSuccess getPixelAtCursor(float r_color[3]) const =0
virtual GHOST_IWindow * getWindowUnderCursor(int32_t x, int32_t y)=0
virtual bool processEvents(bool waitForEvent)=0
static GHOST_TSuccess createSystemBackground()
virtual GHOST_TUserDataPtr getUserData() const =0
virtual void setUserData(const GHOST_TUserDataPtr user_data)=0
virtual GHOST_TimerProcPtr getTimerProc() const =0
virtual void setTimerProc(const GHOST_TimerProcPtr timer_proc)=0
virtual void setTitle(const char *title)=0
virtual void getClientBounds(GHOST_Rect &bounds) const =0
virtual GHOST_TSuccess activateDrawingContext()=0
virtual GHOST_TSuccess getCursorBitmap(GHOST_CursorBitmapRef *bitmap)=0
virtual GHOST_TSuccess endProgressBar()=0
virtual GHOST_TSuccess setCursorShape(GHOST_TStandardCursor cursor_shape)=0
virtual void setWindowDecorationStyleSettings(GHOST_WindowDecorationStyleSettings decoration_settings)=0
virtual GHOST_TSuccess setOrder(GHOST_TWindowOrder order)=0
virtual void clientToScreen(int32_t inX, int32_t inY, int32_t &outX, int32_t &outY) const =0
virtual GHOST_TSuccess setClientHeight(uint32_t height)=0
virtual GHOST_TSuccess setProgressBar(float progress)=0
virtual GHOST_TSuccess setCustomCursorShape(const uint8_t *bitmap, const uint8_t *mask, const int size[2], const int hot_spot[2], bool can_invert_color)=0
virtual GHOST_TSuccess swapBufferRelease()=0
virtual bool isDialog() const =0
virtual GHOST_WindowHDRInfo getHDRInfo()=0
virtual std::string getTitle() const =0
virtual GHOST_TSuccess setClientSize(uint32_t width, uint32_t height)=0
virtual GHOST_TSuccess applyWindowDecorationStyle()=0
virtual GHOST_TSuccess setState(GHOST_TWindowState state)=0
virtual GHOST_TSuccess setClientWidth(uint32_t width)=0
virtual float getNativePixelSize()=0
virtual GHOST_IContext * getDrawingContext()=0
virtual GHOST_TSuccess setCursorVisibility(bool visible)=0
virtual GHOST_TSuccess getSwapInterval(int &interval_out)=0
virtual void getCursorGrabState(GHOST_TGrabCursorMode &mode, GHOST_TAxisFlag &axis_flag, GHOST_Rect &bounds, bool &use_software_cursor)=0
virtual void screenToClient(int32_t inX, int32_t inY, int32_t &outX, int32_t &outY) const =0
virtual GHOST_TSuccess swapBufferAcquire()=0
virtual void getWindowBounds(GHOST_Rect &bounds) const =0
virtual void setUserData(const GHOST_TUserDataPtr user_data)=0
virtual bool getCursorVisibility() const =0
virtual GHOST_TSuccess setPath(const char *filepath)=0
virtual GHOST_TWindowDecorationStyleFlags getWindowDecorationStyleFlags()=0
virtual void setAcceptDragOperation(bool can_accept)=0
virtual GHOST_TSuccess setDrawingContextType(GHOST_TDrawingContextType type)=0
virtual bool getValid() const =0
virtual GHOST_TSuccess setSwapInterval(int interval)=0
virtual GHOST_TUserDataPtr getUserData() const =0
virtual void setWindowDecorationStyleFlags(GHOST_TWindowDecorationStyleFlags style_flags)=0
virtual GHOST_TSuccess invalidate()=0
virtual GHOST_TDrawingContextType getDrawingContextType()=0
virtual GHOST_TSuccess setCustomCursorGenerator(GHOST_CursorGenerator *cursor_generator)=0
virtual GHOST_TStandardCursor getCursorShape() const =0
virtual uint16_t getDPIHint()=0
virtual GHOST_TWindowState getState() const =0
virtual GHOST_TSuccess setCursorGrab(GHOST_TGrabCursorMode, GHOST_TAxisFlag, GHOST_Rect *, int32_t[2])
virtual GHOST_TSuccess setModifiedState(bool is_unsaved_changes)=0
virtual unsigned int getDefaultFramebuffer()=0
virtual GHOST_TSuccess hasCursorShape(GHOST_TStandardCursor cursor_shape)=0
virtual void endSession()=0
virtual GHOST_XrSession * getSession()=0
virtual void setDisablePassthroughFunc(GHOST_XrDisablePassthroughFn disable_passthrough_fn)=0
virtual void startSession(const GHOST_XrSessionBeginInfo *begin_info)=0
virtual void setPassthroughEnabledFunc(GHOST_XrPassthroughEnabledFn passthrough_enabled_fn)=0
virtual bool needsUpsideDownDrawing() const =0
virtual void setGraphicsContextBindFuncs(GHOST_XrGraphicsContextBindFn bind_fn, GHOST_XrGraphicsContextUnbindFn unbind_fn)=0
virtual void drawSessionViews(void *draw_customdata)=0
virtual bool isSessionRunning() const =0
virtual void setDrawViewFunc(GHOST_XrDrawViewFn draw_view_fn)=0
void destroyActionBindings(const char *action_set_name, uint32_t count, const char *const *action_names, const char *const *profile_paths)
void destroyActionSet(const char *action_set_name)
bool createActionSet(const GHOST_XrActionSetInfo &info)
void * getActionCustomdata(const char *action_set_name, const char *action_name)
void unloadControllerModel(const char *subaction_path)
void * getActionSetCustomdata(const char *action_set_name)
bool updateControllerModelComponents(const char *subaction_path)
bool createActionBindings(const char *action_set_name, uint32_t count, const GHOST_XrActionProfileInfo *infos)
void stopHapticAction(const char *action_set_name, const char *action_name, const char *subaction_path)
void getActionCustomdataArray(const char *action_set_name, void **r_customdata_array)
bool loadControllerModel(const char *subaction_path)
bool syncActions(const char *action_set_name=nullptr)
void destroyActions(const char *action_set_name, uint32_t count, const char *const *action_names)
bool applyHapticAction(const char *action_set_name, const char *action_name, const char *subaction_path, const int64_t &duration, const float &frequency, const float &litude)
uint32_t getActionCount(const char *action_set_name)
bool getControllerModelData(const char *subaction_path, GHOST_XrControllerModelData &r_data)
bool createActions(const char *action_set_name, uint32_t count, const GHOST_XrActionInfo *infos)
ccl_device_inline float2 mask(const MaskType mask, const float2 a)
int context(const bContext *C, const char *member, bContextDataResult *result)