Blender V4.5
GHOST_C-api.cc
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 */
4
10
11#include <cstdlib>
12#include <cstring>
13
14#include "GHOST_C-api.h"
15#include "GHOST_IEvent.hh"
17#include "GHOST_ISystem.hh"
18#include "intern/GHOST_Debug.hh"
19#ifdef WITH_XR_OPENXR
20# include "GHOST_IXrContext.hh"
22#endif
25
26GHOST_SystemHandle GHOST_CreateSystem()
27{
28 GHOST_ISystem::createSystem(true, false);
30
31 return (GHOST_SystemHandle)system;
32}
33
34GHOST_SystemHandle GHOST_CreateSystemBackground()
35{
38
39 return (GHOST_SystemHandle)system;
40}
41
42void GHOST_SystemInitDebug(GHOST_SystemHandle systemhandle, GHOST_Debug debug)
43{
44 GHOST_ISystem *system = (GHOST_ISystem *)systemhandle;
45
46 system->initDebug(debug);
47}
48
49GHOST_TSuccess GHOST_DisposeSystem(GHOST_SystemHandle /*systemhandle*/)
50{
52}
53
54#if !(defined(WIN32) || defined(__APPLE__))
56{
58}
59#endif
60
61void 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{
69 const GHOST_ISystem *system = (const GHOST_ISystem *)systemhandle;
70 system->showMessageBox(title, message, help_label, continue_label, link, dialog_options);
71}
72
73GHOST_EventConsumerHandle GHOST_CreateEventConsumer(GHOST_EventCallbackProcPtr eventCallback,
74 GHOST_TUserDataPtr user_data)
75{
76 return (GHOST_EventConsumerHandle) new GHOST_CallbackEventConsumer(eventCallback, user_data);
77}
78
79GHOST_TSuccess GHOST_DisposeEventConsumer(GHOST_EventConsumerHandle consumerhandle)
80{
81 delete ((GHOST_CallbackEventConsumer *)consumerhandle);
82 return GHOST_kSuccess;
83}
84
85uint64_t GHOST_GetMilliSeconds(GHOST_SystemHandle systemhandle)
86{
87 const GHOST_ISystem *system = (const GHOST_ISystem *)systemhandle;
88
89 return system->getMilliSeconds();
90}
91
92GHOST_TimerTaskHandle GHOST_InstallTimer(GHOST_SystemHandle systemhandle,
93 uint64_t delay,
94 uint64_t interval,
95 GHOST_TimerProcPtr timerproc,
96 GHOST_TUserDataPtr user_data)
97{
98 GHOST_ISystem *system = (GHOST_ISystem *)systemhandle;
99
100 return (GHOST_TimerTaskHandle)system->installTimer(delay, interval, timerproc, user_data);
101}
102
103GHOST_TSuccess GHOST_RemoveTimer(GHOST_SystemHandle systemhandle,
104 GHOST_TimerTaskHandle timertaskhandle)
105{
106 GHOST_ISystem *system = (GHOST_ISystem *)systemhandle;
107 GHOST_ITimerTask *timertask = (GHOST_ITimerTask *)timertaskhandle;
108
109 return system->removeTimer(timertask);
110}
111
112uint8_t GHOST_GetNumDisplays(GHOST_SystemHandle systemhandle)
113{
114 const GHOST_ISystem *system = (const GHOST_ISystem *)systemhandle;
115
116 return system->getNumDisplays();
117}
118
119GHOST_TSuccess GHOST_GetMainDisplayDimensions(GHOST_SystemHandle systemhandle,
120 uint32_t *r_width,
121 uint32_t *r_height)
122{
123 const GHOST_ISystem *system = (const GHOST_ISystem *)systemhandle;
124 *r_width = 0;
125 *r_height = 0;
126 system->getMainDisplayDimensions(*r_width, *r_height);
127 return (*r_width == 0 && *r_height == 0) ? GHOST_kFailure : GHOST_kSuccess;
128}
129
130GHOST_TSuccess GHOST_GetAllDisplayDimensions(GHOST_SystemHandle systemhandle,
131 uint32_t *r_width,
132 uint32_t *r_height)
133{
134 const GHOST_ISystem *system = (const GHOST_ISystem *)systemhandle;
135 *r_width = 0;
136 *r_height = 0;
137 system->getAllDisplayDimensions(*r_width, *r_height);
138 return (*r_width == 0 && *r_height == 0) ? GHOST_kFailure : GHOST_kSuccess;
139}
140
141GHOST_ContextHandle GHOST_CreateGPUContext(GHOST_SystemHandle systemhandle,
142 GHOST_GPUSettings gpuSettings)
143{
144 GHOST_ISystem *system = (GHOST_ISystem *)systemhandle;
145
146 return (GHOST_ContextHandle)system->createOffscreenContext(gpuSettings);
147}
148
149GHOST_TSuccess GHOST_DisposeGPUContext(GHOST_SystemHandle systemhandle,
150 GHOST_ContextHandle contexthandle)
151{
152 GHOST_ISystem *system = (GHOST_ISystem *)systemhandle;
153 GHOST_IContext *context = (GHOST_IContext *)contexthandle;
154
155 return system->disposeContext(context);
156}
157
158GHOST_WindowHandle GHOST_CreateWindow(GHOST_SystemHandle systemhandle,
159 GHOST_WindowHandle parent_windowhandle,
160 const char *title,
162 int32_t top,
163 uint32_t width,
164 uint32_t height,
166 bool is_dialog,
167 GHOST_GPUSettings gpuSettings)
168{
169 GHOST_ISystem *system = (GHOST_ISystem *)systemhandle;
170
171 return (GHOST_WindowHandle)system->createWindow(title,
172 left,
173 top,
174 width,
175 height,
176 state,
177 gpuSettings,
178 false,
179 is_dialog,
180 (GHOST_IWindow *)parent_windowhandle);
181}
182
183GHOST_TUserDataPtr GHOST_GetWindowUserData(GHOST_WindowHandle windowhandle)
184{
185 const GHOST_IWindow *window = (const GHOST_IWindow *)windowhandle;
186
187 return window->getUserData();
188}
189void GHOST_SetWindowUserData(GHOST_WindowHandle windowhandle, GHOST_TUserDataPtr user_data)
190{
191 GHOST_IWindow *window = (GHOST_IWindow *)windowhandle;
192
193 window->setUserData(user_data);
194}
195
196bool GHOST_IsDialogWindow(GHOST_WindowHandle windowhandle)
197{
198 const GHOST_IWindow *window = (const GHOST_IWindow *)windowhandle;
199
200 return window->isDialog();
201}
202
203GHOST_TSuccess GHOST_DisposeWindow(GHOST_SystemHandle systemhandle,
204 GHOST_WindowHandle windowhandle)
205{
206 GHOST_ISystem *system = (GHOST_ISystem *)systemhandle;
207 GHOST_IWindow *window = (GHOST_IWindow *)windowhandle;
208
209 return system->disposeWindow(window);
210}
211
212bool GHOST_ValidWindow(GHOST_SystemHandle systemhandle, GHOST_WindowHandle windowhandle)
213{
214 GHOST_ISystem *system = (GHOST_ISystem *)systemhandle;
215 GHOST_IWindow *window = (GHOST_IWindow *)windowhandle;
216
217 return system->validWindow(window);
218}
219
220GHOST_WindowHandle GHOST_GetWindowUnderCursor(GHOST_SystemHandle systemhandle,
221 int32_t x,
222 int32_t y)
223{
224 GHOST_ISystem *system = (GHOST_ISystem *)systemhandle;
225 GHOST_IWindow *window = system->getWindowUnderCursor(x, y);
226
227 return (GHOST_WindowHandle)window;
228}
229
230bool GHOST_ProcessEvents(GHOST_SystemHandle systemhandle, bool waitForEvent)
231{
232 GHOST_ISystem *system = (GHOST_ISystem *)systemhandle;
233
234 return system->processEvents(waitForEvent);
235}
236
237void GHOST_DispatchEvents(GHOST_SystemHandle systemhandle)
238{
239 GHOST_ISystem *system = (GHOST_ISystem *)systemhandle;
240
241 system->dispatchEvents();
242}
243
244GHOST_TSuccess GHOST_AddEventConsumer(GHOST_SystemHandle systemhandle,
245 GHOST_EventConsumerHandle consumerhandle)
246{
247 GHOST_ISystem *system = (GHOST_ISystem *)systemhandle;
248
249 return system->addEventConsumer((GHOST_CallbackEventConsumer *)consumerhandle);
250}
251
252GHOST_TSuccess GHOST_RemoveEventConsumer(GHOST_SystemHandle systemhandle,
253 GHOST_EventConsumerHandle consumerhandle)
254{
255 GHOST_ISystem *system = (GHOST_ISystem *)systemhandle;
256
257 return system->removeEventConsumer((GHOST_CallbackEventConsumer *)consumerhandle);
258}
259
260GHOST_TSuccess GHOST_SetProgressBar(GHOST_WindowHandle windowhandle, float progress)
261{
262 GHOST_IWindow *window = (GHOST_IWindow *)windowhandle;
263
264 return window->setProgressBar(progress);
265}
266
267GHOST_TSuccess GHOST_EndProgressBar(GHOST_WindowHandle windowhandle)
268{
269 GHOST_IWindow *window = (GHOST_IWindow *)windowhandle;
270
271 return window->endProgressBar();
272}
273
274GHOST_TStandardCursor GHOST_GetCursorShape(GHOST_WindowHandle windowhandle)
275{
276 const GHOST_IWindow *window = (const GHOST_IWindow *)windowhandle;
277
278 return window->getCursorShape();
279}
280
281GHOST_TSuccess GHOST_SetCursorShape(GHOST_WindowHandle windowhandle,
282 GHOST_TStandardCursor cursorshape)
283{
284 GHOST_IWindow *window = (GHOST_IWindow *)windowhandle;
285
286 return window->setCursorShape(cursorshape);
287}
288
289GHOST_TSuccess GHOST_HasCursorShape(GHOST_WindowHandle windowhandle,
290 GHOST_TStandardCursor cursorshape)
291{
292 GHOST_IWindow *window = (GHOST_IWindow *)windowhandle;
293
294 return window->hasCursorShape(cursorshape);
295}
296
297GHOST_TSuccess GHOST_SetCustomCursorShape(GHOST_WindowHandle windowhandle,
298 uint8_t *bitmap,
299 uint8_t *mask,
300 int sizex,
301 int sizey,
302 int hotX,
303 int hotY,
304 bool canInvertColor)
305{
306 GHOST_IWindow *window = (GHOST_IWindow *)windowhandle;
307
308 return window->setCustomCursorShape(bitmap, mask, sizex, sizey, hotX, hotY, canInvertColor);
309}
310
311GHOST_TSuccess GHOST_GetCursorBitmap(GHOST_WindowHandle windowhandle,
312 GHOST_CursorBitmapRef *bitmap)
313{
314 GHOST_IWindow *window = (GHOST_IWindow *)windowhandle;
315
316 return window->getCursorBitmap(bitmap);
317}
318
319uint32_t GHOST_GetCursorPreferredLogicalSize(const GHOST_SystemHandle systemhandle)
320{
321 const GHOST_ISystem *system = (const GHOST_ISystem *)systemhandle;
322
323 return system->getCursorPreferredLogicalSize();
324}
325
326bool GHOST_GetCursorVisibility(GHOST_WindowHandle windowhandle)
327{
328 const GHOST_IWindow *window = (const GHOST_IWindow *)windowhandle;
329
330 return window->getCursorVisibility();
331}
332
333GHOST_TSuccess GHOST_SetCursorVisibility(GHOST_WindowHandle windowhandle, bool visible)
334{
335 GHOST_IWindow *window = (GHOST_IWindow *)windowhandle;
336
337 return window->setCursorVisibility(visible);
338}
339
340/* Unused, can expose again if needed although WAYLAND
341 * can only properly use client relative coordinates, so leave disabled if possible. */
342#if 0
343GHOST_TSuccess GHOST_GetCursorPositionScreenCoords(GHOST_SystemHandle systemhandle,
344 int32_t *x,
345 int32_t *y)
346{
347 GHOST_ISystem *system = (GHOST_ISystem *)systemhandle;
348
349 return system->getCursorPosition(*x, *y);
350}
351
352GHOST_TSuccess GHOST_SetCursorPositionScreenCoords(GHOST_SystemHandle systemhandle,
353 int32_t x,
354 int32_t y)
355{
356 GHOST_ISystem *system = (GHOST_ISystem *)systemhandle;
357
358 return system->setCursorPosition(x, y);
359}
360#endif
361
362GHOST_TSuccess GHOST_GetCursorPosition(const GHOST_SystemHandle systemhandle,
363 const GHOST_WindowHandle windowhandle,
364 int32_t *x,
365 int32_t *y)
366{
367 const GHOST_ISystem *system = (const GHOST_ISystem *)systemhandle;
368 const GHOST_IWindow *window = (const GHOST_IWindow *)windowhandle;
369
370 return system->getCursorPositionClientRelative(window, *x, *y);
371}
372
373GHOST_TSuccess GHOST_SetCursorPosition(GHOST_SystemHandle systemhandle,
374 GHOST_WindowHandle windowhandle,
375 int32_t x,
376 int32_t y)
377{
378 GHOST_ISystem *system = (GHOST_ISystem *)systemhandle;
379 GHOST_IWindow *window = (GHOST_IWindow *)windowhandle;
380
381 return system->setCursorPositionClientRelative(window, x, y);
382}
383
384GHOST_TSuccess GHOST_SetCursorGrab(GHOST_WindowHandle windowhandle,
386 GHOST_TAxisFlag wrap_axis,
387 const int bounds[4],
388 const int mouse_ungrab_xy[2])
389{
390 GHOST_IWindow *window = (GHOST_IWindow *)windowhandle;
391 GHOST_Rect bounds_rect;
392 int32_t mouse_xy[2];
393
394 if (bounds) {
395 bounds_rect = GHOST_Rect(bounds[0], bounds[1], bounds[2], bounds[3]);
396 }
397 if (mouse_ungrab_xy) {
398 mouse_xy[0] = mouse_ungrab_xy[0];
399 mouse_xy[1] = mouse_ungrab_xy[1];
400 }
401
402 return window->setCursorGrab(
403 mode, wrap_axis, bounds ? &bounds_rect : nullptr, mouse_ungrab_xy ? mouse_xy : nullptr);
404}
405
406void GHOST_GetCursorGrabState(GHOST_WindowHandle windowhandle,
407 GHOST_TGrabCursorMode *r_mode,
408 GHOST_TAxisFlag *r_axis_flag,
409 int r_bounds[4],
410 bool *r_use_software_cursor)
411{
412 GHOST_IWindow *window = (GHOST_IWindow *)windowhandle;
413 GHOST_Rect bounds_rect;
414 bool use_software_cursor;
415 window->getCursorGrabState(*r_mode, *r_axis_flag, bounds_rect, use_software_cursor);
416 r_bounds[0] = bounds_rect.m_l;
417 r_bounds[1] = bounds_rect.m_t;
418 r_bounds[2] = bounds_rect.m_r;
419 r_bounds[3] = bounds_rect.m_b;
420 *r_use_software_cursor = use_software_cursor;
421}
422
423GHOST_TSuccess GHOST_GetModifierKeyState(GHOST_SystemHandle systemhandle,
425 bool *r_is_down)
426{
427 const GHOST_ISystem *system = (const GHOST_ISystem *)systemhandle;
429 bool is_down = false;
430
431 result = system->getModifierKeyState(mask, is_down);
432 *r_is_down = is_down;
433
434 return result;
435}
436
437GHOST_TSuccess GHOST_GetButtonState(GHOST_SystemHandle systemhandle,
439 bool *r_is_down)
440{
441 const GHOST_ISystem *system = (const GHOST_ISystem *)systemhandle;
443 bool is_down = false;
444
445 result = system->getButtonState(mask, is_down);
446 *r_is_down = is_down;
447
448 return result;
449}
450
451#ifdef WITH_INPUT_NDOF
452void GHOST_setNDOFDeadZone(float deadzone)
453{
455 system->setNDOFDeadZone(deadzone);
456}
457#endif
458
459void GHOST_setAcceptDragOperation(GHOST_WindowHandle windowhandle, bool can_accept)
460{
461 GHOST_IWindow *window = (GHOST_IWindow *)windowhandle;
462
463 window->setAcceptDragOperation(can_accept);
464}
465
466GHOST_TEventType GHOST_GetEventType(GHOST_EventHandle eventhandle)
467{
468 const GHOST_IEvent *event = (const GHOST_IEvent *)eventhandle;
469
470 return event->getType();
471}
472
473uint64_t GHOST_GetEventTime(GHOST_EventHandle eventhandle)
474{
475 const GHOST_IEvent *event = (const GHOST_IEvent *)eventhandle;
476
477 return event->getTime();
478}
479
480GHOST_WindowHandle GHOST_GetEventWindow(GHOST_EventHandle eventhandle)
481{
482 const GHOST_IEvent *event = (const GHOST_IEvent *)eventhandle;
483
484 return (GHOST_WindowHandle)event->getWindow();
485}
486
487GHOST_TEventDataPtr GHOST_GetEventData(GHOST_EventHandle eventhandle)
488{
489 const GHOST_IEvent *event = (const GHOST_IEvent *)eventhandle;
490
491 return event->getData();
492}
493
494GHOST_TimerProcPtr GHOST_GetTimerProc(GHOST_TimerTaskHandle timertaskhandle)
495{
496 const GHOST_ITimerTask *timertask = (const GHOST_ITimerTask *)timertaskhandle;
497
498 return timertask->getTimerProc();
499}
500
501void GHOST_SetTimerProc(GHOST_TimerTaskHandle timertaskhandle, GHOST_TimerProcPtr timerproc)
502{
503 GHOST_ITimerTask *timertask = (GHOST_ITimerTask *)timertaskhandle;
504
505 timertask->setTimerProc(timerproc);
506}
507
508GHOST_TUserDataPtr GHOST_GetTimerTaskUserData(GHOST_TimerTaskHandle timertaskhandle)
509{
510 const GHOST_ITimerTask *timertask = (const GHOST_ITimerTask *)timertaskhandle;
511
512 return timertask->getUserData();
513}
514
515void GHOST_SetTimerTaskUserData(GHOST_TimerTaskHandle timertaskhandle,
516 GHOST_TUserDataPtr user_data)
517{
518 GHOST_ITimerTask *timertask = (GHOST_ITimerTask *)timertaskhandle;
519
520 timertask->setUserData(user_data);
521}
522
523bool GHOST_GetValid(GHOST_WindowHandle windowhandle)
524{
525 const GHOST_IWindow *window = (const GHOST_IWindow *)windowhandle;
526
527 return window->getValid();
528}
529
531{
532 GHOST_IWindow *window = (GHOST_IWindow *)windowhandle;
533
534 return window->getDrawingContextType();
535}
536
537GHOST_TSuccess GHOST_SetDrawingContextType(GHOST_WindowHandle windowhandle,
539{
540 GHOST_IWindow *window = (GHOST_IWindow *)windowhandle;
541
542 return window->setDrawingContextType(type);
543}
544
545GHOST_ContextHandle GHOST_GetDrawingContext(GHOST_WindowHandle windowhandle)
546{
547 GHOST_IWindow *window = (GHOST_IWindow *)windowhandle;
548 return (GHOST_ContextHandle)window->getDrawingContext();
549}
550
551void GHOST_SetTitle(GHOST_WindowHandle windowhandle, const char *title)
552{
553 GHOST_IWindow *window = (GHOST_IWindow *)windowhandle;
554
555 window->setTitle(title);
556}
557
558char *GHOST_GetTitle(GHOST_WindowHandle windowhandle)
559{
560 const GHOST_IWindow *window = (const GHOST_IWindow *)windowhandle;
561 std::string title = window->getTitle();
562
563 const size_t ctitle_size = title.size() + 1;
564 char *ctitle = (char *)malloc(ctitle_size);
565
566 if (ctitle == nullptr) {
567 return nullptr;
568 }
569
570 memcpy(ctitle, title.c_str(), ctitle_size);
571
572 return ctitle;
573}
574
575GHOST_TSuccess GHOST_SetPath(GHOST_WindowHandle windowhandle, const char *filepath)
576{
577 GHOST_IWindow *window = (GHOST_IWindow *)windowhandle;
578
579 return window->setPath(filepath);
580}
581
583 GHOST_WindowHandle windowhandle)
584{
585 GHOST_IWindow *window = (GHOST_IWindow *)windowhandle;
586 return window->getWindowDecorationStyleFlags();
587}
588
589void GHOST_SetWindowDecorationStyleFlags(GHOST_WindowHandle windowhandle,
591{
592 GHOST_IWindow *window = (GHOST_IWindow *)windowhandle;
593 window->setWindowDecorationStyleFlags(styleFlags);
594}
595
596void GHOST_SetWindowDecorationStyleSettings(GHOST_WindowHandle windowhandle,
597 GHOST_WindowDecorationStyleSettings decorationSettings)
598{
599 GHOST_IWindow *window = (GHOST_IWindow *)windowhandle;
600 window->setWindowDecorationStyleSettings(decorationSettings);
601}
602
603GHOST_TSuccess GHOST_ApplyWindowDecorationStyle(GHOST_WindowHandle windowhandle)
604{
605 GHOST_IWindow *window = (GHOST_IWindow *)windowhandle;
606 return window->applyWindowDecorationStyle();
607}
608
609GHOST_RectangleHandle GHOST_GetWindowBounds(GHOST_WindowHandle windowhandle)
610{
611 const GHOST_IWindow *window = (const GHOST_IWindow *)windowhandle;
612 GHOST_Rect *rectangle = nullptr;
613
614 rectangle = new GHOST_Rect();
615 window->getWindowBounds(*rectangle);
616
617 return (GHOST_RectangleHandle)rectangle;
618}
619
620GHOST_RectangleHandle GHOST_GetClientBounds(GHOST_WindowHandle windowhandle)
621{
622 const GHOST_IWindow *window = (const GHOST_IWindow *)windowhandle;
623 GHOST_Rect *rectangle = nullptr;
624
625 rectangle = new GHOST_Rect();
626 window->getClientBounds(*rectangle);
627
628 return (GHOST_RectangleHandle)rectangle;
629}
630
631void GHOST_DisposeRectangle(GHOST_RectangleHandle rectanglehandle)
632{
633 delete (GHOST_Rect *)rectanglehandle;
634}
635
636GHOST_TSuccess GHOST_SetClientWidth(GHOST_WindowHandle windowhandle, uint32_t width)
637{
638 GHOST_IWindow *window = (GHOST_IWindow *)windowhandle;
639
640 return window->setClientWidth(width);
641}
642
643GHOST_TSuccess GHOST_SetClientHeight(GHOST_WindowHandle windowhandle, uint32_t height)
644{
645 GHOST_IWindow *window = (GHOST_IWindow *)windowhandle;
646
647 return window->setClientHeight(height);
648}
649
650GHOST_TSuccess GHOST_SetClientSize(GHOST_WindowHandle windowhandle,
651 uint32_t width,
652 uint32_t height)
653{
654 GHOST_IWindow *window = (GHOST_IWindow *)windowhandle;
655
656 return window->setClientSize(width, height);
657}
658
660 GHOST_WindowHandle windowhandle, int32_t inX, int32_t inY, int32_t *outX, int32_t *outY)
661{
662 const GHOST_IWindow *window = (const GHOST_IWindow *)windowhandle;
663
664 window->screenToClient(inX, inY, *outX, *outY);
665}
666
668 GHOST_WindowHandle windowhandle, int32_t inX, int32_t inY, int32_t *outX, int32_t *outY)
669{
670 const GHOST_IWindow *window = (const GHOST_IWindow *)windowhandle;
671
672 window->clientToScreen(inX, inY, *outX, *outY);
673}
674
675GHOST_TWindowState GHOST_GetWindowState(GHOST_WindowHandle windowhandle)
676{
677 const GHOST_IWindow *window = (const GHOST_IWindow *)windowhandle;
678
679 return window->getState();
680}
681
683{
684 GHOST_IWindow *window = (GHOST_IWindow *)windowhandle;
685
686 return window->setState(state);
687}
688
689GHOST_TSuccess GHOST_SetWindowModifiedState(GHOST_WindowHandle windowhandle, bool isUnsavedChanges)
690{
691 GHOST_IWindow *window = (GHOST_IWindow *)windowhandle;
692
693 return window->setModifiedState(isUnsavedChanges);
694}
695
696GHOST_TSuccess GHOST_SetWindowOrder(GHOST_WindowHandle windowhandle, GHOST_TWindowOrder order)
697{
698 GHOST_IWindow *window = (GHOST_IWindow *)windowhandle;
699
700 return window->setOrder(order);
701}
702
703GHOST_TSuccess GHOST_SwapWindowBuffers(GHOST_WindowHandle windowhandle)
704{
705 GHOST_IWindow *window = (GHOST_IWindow *)windowhandle;
706
707 return window->swapBuffers();
708}
709
710GHOST_TSuccess GHOST_SetSwapInterval(GHOST_WindowHandle windowhandle, int interval)
711{
712 GHOST_IWindow *window = (GHOST_IWindow *)windowhandle;
713
714 return window->setSwapInterval(interval);
715}
716
717GHOST_TSuccess GHOST_GetSwapInterval(GHOST_WindowHandle windowhandle, int *r_interval)
718{
719 GHOST_IWindow *window = (GHOST_IWindow *)windowhandle;
720
721 return window->getSwapInterval(*r_interval);
722}
723
725{
726 GHOST_IWindow *window = (GHOST_IWindow *)windowhandle;
727
728 return window->activateDrawingContext();
729}
730
731GHOST_TSuccess GHOST_ActivateGPUContext(GHOST_ContextHandle contexthandle)
732{
733 GHOST_IContext *context = (GHOST_IContext *)contexthandle;
734 if (context) {
735 return context->activateDrawingContext();
736 }
737 GHOST_PRINTF("%s: Context not valid\n", __func__);
738 return GHOST_kFailure;
739}
740
741GHOST_TSuccess GHOST_ReleaseGPUContext(GHOST_ContextHandle contexthandle)
742{
743 GHOST_IContext *context = (GHOST_IContext *)contexthandle;
744
745 return context->releaseDrawingContext();
746}
747
748GHOST_ContextHandle GHOST_GetActiveGPUContext()
749{
750 return (GHOST_ContextHandle)GHOST_IContext::getActiveDrawingContext();
751}
752
753uint GHOST_GetContextDefaultGPUFramebuffer(GHOST_ContextHandle contexthandle)
754{
755 GHOST_IContext *context = (GHOST_IContext *)contexthandle;
756
757 return context->getDefaultFramebuffer();
758}
759
760uint GHOST_GetDefaultGPUFramebuffer(GHOST_WindowHandle windowhandle)
761{
762 GHOST_IWindow *window = (GHOST_IWindow *)windowhandle;
763
764 return window->getDefaultFramebuffer();
765}
766
767GHOST_TSuccess GHOST_InvalidateWindow(GHOST_WindowHandle windowhandle)
768{
769 GHOST_IWindow *window = (GHOST_IWindow *)windowhandle;
770
771 return window->invalidate();
772}
773
774void GHOST_SetMultitouchGestures(GHOST_SystemHandle systemhandle, const bool use)
775{
776 GHOST_ISystem *system = (GHOST_ISystem *)systemhandle;
777 system->setMultitouchGestures(use);
778}
779
780void GHOST_SetTabletAPI(GHOST_SystemHandle systemhandle, GHOST_TTabletAPI api)
781{
782 GHOST_ISystem *system = (GHOST_ISystem *)systemhandle;
783 system->setTabletAPI(api);
784}
785
787{
788 const GHOST_ISystem *system = GHOST_ISystem::getSystem();
789 return system->getPixelAtCursor(r_color);
790}
791
792int32_t GHOST_GetWidthRectangle(GHOST_RectangleHandle rectanglehandle)
793{
794 return ((GHOST_Rect *)rectanglehandle)->getWidth();
795}
796
797int32_t GHOST_GetHeightRectangle(GHOST_RectangleHandle rectanglehandle)
798{
799 return ((GHOST_Rect *)rectanglehandle)->getHeight();
800}
801
803 GHOST_RectangleHandle rectanglehandle, int32_t *l, int32_t *t, int32_t *r, int32_t *b)
804{
805 const GHOST_Rect *rect = (GHOST_Rect *)rectanglehandle;
806
807 *l = rect->m_l;
808 *t = rect->m_t;
809 *r = rect->m_r;
810 *b = rect->m_b;
811}
812
814 GHOST_RectangleHandle rectanglehandle, int32_t l, int32_t t, int32_t r, int32_t b)
815{
816 ((GHOST_Rect *)rectanglehandle)->set(l, t, r, b);
817}
818
819GHOST_TSuccess GHOST_IsEmptyRectangle(GHOST_RectangleHandle rectanglehandle)
820{
822
823 if (((GHOST_Rect *)rectanglehandle)->isEmpty()) {
825 }
826 return result;
827}
828
829GHOST_TSuccess GHOST_IsValidRectangle(GHOST_RectangleHandle rectanglehandle)
830{
832
833 if (((GHOST_Rect *)rectanglehandle)->isValid()) {
835 }
836 return result;
837}
838
839void GHOST_InsetRectangle(GHOST_RectangleHandle rectanglehandle, int32_t i)
840{
841 ((GHOST_Rect *)rectanglehandle)->inset(i);
842}
843
844void GHOST_UnionRectangle(GHOST_RectangleHandle rectanglehandle,
845 GHOST_RectangleHandle anotherrectanglehandle)
846{
847 ((GHOST_Rect *)rectanglehandle)->unionRect(*(GHOST_Rect *)anotherrectanglehandle);
848}
849
850void GHOST_UnionPointRectangle(GHOST_RectangleHandle rectanglehandle, int32_t x, int32_t y)
851{
852 ((GHOST_Rect *)rectanglehandle)->unionPoint(x, y);
853}
854
855GHOST_TSuccess GHOST_IsInsideRectangle(GHOST_RectangleHandle rectanglehandle, int32_t x, int32_t y)
856{
858
859 if (((GHOST_Rect *)rectanglehandle)->isInside(x, y)) {
861 }
862 return result;
863}
864
865GHOST_TVisibility GHOST_GetRectangleVisibility(GHOST_RectangleHandle rectanglehandle,
866 GHOST_RectangleHandle anotherrectanglehandle)
867{
869
870 visible = ((GHOST_Rect *)rectanglehandle)->getVisibility(*(GHOST_Rect *)anotherrectanglehandle);
871
872 return visible;
873}
874
875void GHOST_SetCenterRectangle(GHOST_RectangleHandle rectanglehandle, int32_t cx, int32_t cy)
876{
877 ((GHOST_Rect *)rectanglehandle)->setCenter(cx, cy);
878}
879
881 GHOST_RectangleHandle rectanglehandle, int32_t cx, int32_t cy, int32_t w, int32_t h)
882{
883 ((GHOST_Rect *)rectanglehandle)->setCenter(cx, cy, w, h);
884}
885
886GHOST_TSuccess GHOST_ClipRectangle(GHOST_RectangleHandle rectanglehandle,
887 GHOST_RectangleHandle anotherrectanglehandle)
888{
890
891 if (((GHOST_Rect *)rectanglehandle)->clip(*(GHOST_Rect *)anotherrectanglehandle)) {
893 }
894 return result;
895}
896
897char *GHOST_getClipboard(bool selection)
898{
899 const GHOST_ISystem *system = GHOST_ISystem::getSystem();
900 return system->getClipboard(selection);
901}
902
903void GHOST_putClipboard(const char *buffer, bool selection)
904{
905 const GHOST_ISystem *system = GHOST_ISystem::getSystem();
906 system->putClipboard(buffer, selection);
907}
908
914
915uint *GHOST_getClipboardImage(int *r_width, int *r_height)
916{
917 const GHOST_ISystem *system = GHOST_ISystem::getSystem();
918 return system->getClipboardImage(r_width, r_height);
919}
920
921GHOST_TSuccess GHOST_putClipboardImage(uint *rgba, int width, int height)
922{
923 const GHOST_ISystem *system = GHOST_ISystem::getSystem();
924 return system->putClipboardImage(rgba, width, height);
925}
926
932
934{
936 return system->useNativePixel();
937}
938
944
946{
947 GHOST_ISystem::setBacktraceFn(backtrace_fn);
948}
949
950void GHOST_UseWindowFocus(bool use_focus)
951{
953 system->useWindowFocus(use_focus);
954}
955
956void GHOST_SetAutoFocus(bool auto_focus)
957{
959 system->setAutoFocus(auto_focus);
960}
961
962float GHOST_GetNativePixelSize(GHOST_WindowHandle windowhandle)
963{
964 GHOST_IWindow *window = (GHOST_IWindow *)windowhandle;
965 if (window) {
966 return window->getNativePixelSize();
967 }
968 return 1.0f;
969}
970
971uint16_t GHOST_GetDPIHint(GHOST_WindowHandle windowhandle)
972{
973 GHOST_IWindow *window = (GHOST_IWindow *)windowhandle;
974 return window->getDPIHint();
975}
976
977#ifdef WITH_INPUT_IME
978
979void GHOST_BeginIME(
980 GHOST_WindowHandle windowhandle, int32_t x, int32_t y, int32_t w, int32_t h, bool complete)
981{
982 GHOST_IWindow *window = (GHOST_IWindow *)windowhandle;
983 window->beginIME(x, y, w, h, complete);
984}
985
986void GHOST_EndIME(GHOST_WindowHandle windowhandle)
987{
988 GHOST_IWindow *window = (GHOST_IWindow *)windowhandle;
989 window->endIME();
990}
991
992#endif /* WITH_INPUT_IME */
993
994#ifdef WITH_XR_OPENXR
995
996# define GHOST_XR_CAPI_CALL(call, ctx) \
997 try { \
998 call; \
999 } \
1000 catch (GHOST_XrException & e) { \
1001 (ctx)->dispatchErrorMessage(&e); \
1002 }
1003
1004# define GHOST_XR_CAPI_CALL_RET(call, ctx) \
1005 try { \
1006 return call; \
1007 } \
1008 catch (GHOST_XrException & e) { \
1009 (ctx)->dispatchErrorMessage(&e); \
1010 }
1011
1012void GHOST_XrSessionStart(GHOST_XrContextHandle xr_contexthandle,
1013 const GHOST_XrSessionBeginInfo *begin_info)
1014{
1015 GHOST_IXrContext *xr_context = (GHOST_IXrContext *)xr_contexthandle;
1016 GHOST_XR_CAPI_CALL(xr_context->startSession(begin_info), xr_context);
1017}
1018
1019void GHOST_XrSessionEnd(GHOST_XrContextHandle xr_contexthandle)
1020{
1021 GHOST_IXrContext *xr_context = (GHOST_IXrContext *)xr_contexthandle;
1022 GHOST_XR_CAPI_CALL(xr_context->endSession(), xr_context);
1023}
1024
1025void GHOST_XrSessionDrawViews(GHOST_XrContextHandle xr_contexthandle, void *draw_customdata)
1026{
1027 GHOST_IXrContext *xr_context = (GHOST_IXrContext *)xr_contexthandle;
1028 GHOST_XR_CAPI_CALL(xr_context->drawSessionViews(draw_customdata), xr_context);
1029}
1030
1031int GHOST_XrSessionIsRunning(const GHOST_XrContextHandle xr_contexthandle)
1032{
1033 const GHOST_IXrContext *xr_context = (const GHOST_IXrContext *)xr_contexthandle;
1034 GHOST_XR_CAPI_CALL_RET(xr_context->isSessionRunning(), xr_context);
1035 return 0; /* Only reached if exception is thrown. */
1036}
1037
1038void GHOST_XrGraphicsContextBindFuncs(GHOST_XrContextHandle xr_contexthandle,
1039 GHOST_XrGraphicsContextBindFn bind_fn,
1040 GHOST_XrGraphicsContextUnbindFn unbind_fn)
1041{
1042 GHOST_IXrContext *xr_context = (GHOST_IXrContext *)xr_contexthandle;
1043 GHOST_XR_CAPI_CALL(xr_context->setGraphicsContextBindFuncs(bind_fn, unbind_fn), xr_context);
1044}
1045
1046void GHOST_XrDrawViewFunc(GHOST_XrContextHandle xr_contexthandle, GHOST_XrDrawViewFn draw_view_fn)
1047{
1048 GHOST_IXrContext *xr_context = (GHOST_IXrContext *)xr_contexthandle;
1049 GHOST_XR_CAPI_CALL(xr_context->setDrawViewFunc(draw_view_fn), xr_context);
1050}
1051
1052void GHOST_XrPassthroughEnabledFunc(GHOST_XrContextHandle xr_contexthandle,
1053 GHOST_XrPassthroughEnabledFn passthrough_enabled_fn)
1054{
1055 GHOST_IXrContext *xr_context = (GHOST_IXrContext *)xr_contexthandle;
1056 GHOST_XR_CAPI_CALL(xr_context->setPassthroughEnabledFunc(passthrough_enabled_fn), xr_context);
1057}
1058
1059void GHOST_XrDisablePassthroughFunc(GHOST_XrContextHandle xr_contexthandle,
1060 GHOST_XrDisablePassthroughFn disable_passthrough_fn)
1061{
1062 GHOST_IXrContext *xr_context = (GHOST_IXrContext *)xr_contexthandle;
1063 GHOST_XR_CAPI_CALL(xr_context->setDisablePassthroughFunc(disable_passthrough_fn), xr_context);
1064}
1065
1066int GHOST_XrSessionNeedsUpsideDownDrawing(const GHOST_XrContextHandle xr_contexthandle)
1067{
1068 const GHOST_IXrContext *xr_context = (const GHOST_IXrContext *)xr_contexthandle;
1069
1070 GHOST_XR_CAPI_CALL_RET(xr_context->needsUpsideDownDrawing(), xr_context);
1071 return 0; /* Only reached if exception is thrown. */
1072}
1073
1074int GHOST_XrCreateActionSet(GHOST_XrContextHandle xr_contexthandle,
1075 const GHOST_XrActionSetInfo *info)
1076{
1077 GHOST_IXrContext *xr_context = (GHOST_IXrContext *)xr_contexthandle;
1078 GHOST_XrSession *xr_session = xr_context->getSession();
1079 GHOST_XR_CAPI_CALL_RET(xr_session->createActionSet(*info), xr_context);
1080 return 0;
1081}
1082
1083void GHOST_XrDestroyActionSet(GHOST_XrContextHandle xr_contexthandle, const char *action_set_name)
1084{
1085 GHOST_IXrContext *xr_context = (GHOST_IXrContext *)xr_contexthandle;
1086 GHOST_XrSession *xr_session = xr_context->getSession();
1087 GHOST_XR_CAPI_CALL(xr_session->destroyActionSet(action_set_name), xr_context);
1088}
1089
1090int GHOST_XrCreateActions(GHOST_XrContextHandle xr_contexthandle,
1091 const char *action_set_name,
1092 uint32_t count,
1093 const GHOST_XrActionInfo *infos)
1094{
1095 GHOST_IXrContext *xr_context = (GHOST_IXrContext *)xr_contexthandle;
1096 GHOST_XrSession *xr_session = xr_context->getSession();
1097 GHOST_XR_CAPI_CALL_RET(xr_session->createActions(action_set_name, count, infos), xr_context);
1098 return 0;
1099}
1100
1101void GHOST_XrDestroyActions(GHOST_XrContextHandle xr_contexthandle,
1102 const char *action_set_name,
1103 uint32_t count,
1104 const char *const *action_names)
1105{
1106 GHOST_IXrContext *xr_context = (GHOST_IXrContext *)xr_contexthandle;
1107 GHOST_XrSession *xr_session = xr_context->getSession();
1108 GHOST_XR_CAPI_CALL(xr_session->destroyActions(action_set_name, count, action_names), xr_context);
1109}
1110
1111int GHOST_XrCreateActionBindings(GHOST_XrContextHandle xr_contexthandle,
1112 const char *action_set_name,
1113 uint32_t count,
1114 const GHOST_XrActionProfileInfo *infos)
1115{
1116 GHOST_IXrContext *xr_context = (GHOST_IXrContext *)xr_contexthandle;
1117 GHOST_XrSession *xr_session = xr_context->getSession();
1118 GHOST_XR_CAPI_CALL_RET(xr_session->createActionBindings(action_set_name, count, infos),
1119 xr_context);
1120 return 0;
1121}
1122
1123void GHOST_XrDestroyActionBindings(GHOST_XrContextHandle xr_contexthandle,
1124 const char *action_set_name,
1125 uint32_t count,
1126 const char *const *action_names,
1127 const char *const *profile_paths)
1128{
1129 GHOST_IXrContext *xr_context = (GHOST_IXrContext *)xr_contexthandle;
1130 GHOST_XrSession *xr_session = xr_context->getSession();
1131 GHOST_XR_CAPI_CALL(
1132 xr_session->destroyActionBindings(action_set_name, count, action_names, profile_paths),
1133 xr_context);
1134}
1135
1136int GHOST_XrAttachActionSets(GHOST_XrContextHandle xr_contexthandle)
1137{
1138 GHOST_IXrContext *xr_context = (GHOST_IXrContext *)xr_contexthandle;
1139 GHOST_XrSession *xr_session = xr_context->getSession();
1140 GHOST_XR_CAPI_CALL_RET(xr_session->attachActionSets(), xr_context);
1141 return 0;
1142}
1143
1144int GHOST_XrSyncActions(GHOST_XrContextHandle xr_contexthandle, const char *action_set_name)
1145{
1146 GHOST_IXrContext *xr_context = (GHOST_IXrContext *)xr_contexthandle;
1147 GHOST_XrSession *xr_session = xr_context->getSession();
1148 GHOST_XR_CAPI_CALL_RET(xr_session->syncActions(action_set_name), xr_context);
1149 return 0;
1150}
1151
1152int GHOST_XrApplyHapticAction(GHOST_XrContextHandle xr_contexthandle,
1153 const char *action_set_name,
1154 const char *action_name,
1155 const char *subaction_path,
1156 const int64_t *duration,
1157 const float *frequency,
1158 const float *amplitude)
1159{
1160 GHOST_IXrContext *xr_context = (GHOST_IXrContext *)xr_contexthandle;
1161 GHOST_XrSession *xr_session = xr_context->getSession();
1162 GHOST_XR_CAPI_CALL_RET(
1163 xr_session->applyHapticAction(
1164 action_set_name, action_name, subaction_path, *duration, *frequency, *amplitude),
1165 xr_context);
1166 return 0;
1167}
1168
1169void GHOST_XrStopHapticAction(GHOST_XrContextHandle xr_contexthandle,
1170 const char *action_set_name,
1171 const char *action_name,
1172 const char *subaction_path)
1173{
1174 GHOST_IXrContext *xr_context = (GHOST_IXrContext *)xr_contexthandle;
1175 GHOST_XrSession *xr_session = xr_context->getSession();
1176 GHOST_XR_CAPI_CALL(xr_session->stopHapticAction(action_set_name, action_name, subaction_path),
1177 xr_context);
1178}
1179
1180void *GHOST_XrGetActionSetCustomdata(GHOST_XrContextHandle xr_contexthandle,
1181 const char *action_set_name)
1182{
1183 GHOST_IXrContext *xr_context = (GHOST_IXrContext *)xr_contexthandle;
1184 GHOST_XrSession *xr_session = xr_context->getSession();
1185 GHOST_XR_CAPI_CALL_RET(xr_session->getActionSetCustomdata(action_set_name), xr_context);
1186 return nullptr;
1187}
1188
1189void *GHOST_XrGetActionCustomdata(GHOST_XrContextHandle xr_contexthandle,
1190 const char *action_set_name,
1191 const char *action_name)
1192{
1193 GHOST_IXrContext *xr_context = (GHOST_IXrContext *)xr_contexthandle;
1194 GHOST_XrSession *xr_session = xr_context->getSession();
1195 GHOST_XR_CAPI_CALL_RET(xr_session->getActionCustomdata(action_set_name, action_name),
1196 xr_context);
1197 return nullptr;
1198}
1199
1200uint GHOST_XrGetActionCount(GHOST_XrContextHandle xr_contexthandle, const char *action_set_name)
1201{
1202 GHOST_IXrContext *xr_context = (GHOST_IXrContext *)xr_contexthandle;
1203 GHOST_XrSession *xr_session = xr_context->getSession();
1204 GHOST_XR_CAPI_CALL_RET(xr_session->getActionCount(action_set_name), xr_context);
1205 return 0;
1206}
1207
1208void GHOST_XrGetActionCustomdataArray(GHOST_XrContextHandle xr_contexthandle,
1209 const char *action_set_name,
1210 void **r_customdata_array)
1211{
1212 GHOST_IXrContext *xr_context = (GHOST_IXrContext *)xr_contexthandle;
1213 GHOST_XrSession *xr_session = xr_context->getSession();
1214 GHOST_XR_CAPI_CALL(xr_session->getActionCustomdataArray(action_set_name, r_customdata_array),
1215 xr_context);
1216}
1217
1218int GHOST_XrLoadControllerModel(GHOST_XrContextHandle xr_contexthandle, const char *subaction_path)
1219{
1220 GHOST_IXrContext *xr_context = (GHOST_IXrContext *)xr_contexthandle;
1221 GHOST_XrSession *xr_session = xr_context->getSession();
1222 GHOST_XR_CAPI_CALL_RET(xr_session->loadControllerModel(subaction_path), xr_context);
1223 return 0;
1224}
1225
1226void GHOST_XrUnloadControllerModel(GHOST_XrContextHandle xr_contexthandle,
1227 const char *subaction_path)
1228{
1229 GHOST_IXrContext *xr_context = (GHOST_IXrContext *)xr_contexthandle;
1230 GHOST_XrSession *xr_session = xr_context->getSession();
1231 GHOST_XR_CAPI_CALL(xr_session->unloadControllerModel(subaction_path), xr_context);
1232}
1233
1234int GHOST_XrUpdateControllerModelComponents(GHOST_XrContextHandle xr_contexthandle,
1235 const char *subaction_path)
1236{
1237 GHOST_IXrContext *xr_context = (GHOST_IXrContext *)xr_contexthandle;
1238 GHOST_XrSession *xr_session = xr_context->getSession();
1239 GHOST_XR_CAPI_CALL_RET(xr_session->updateControllerModelComponents(subaction_path), xr_context);
1240 return 0;
1241}
1242
1243int GHOST_XrGetControllerModelData(GHOST_XrContextHandle xr_contexthandle,
1244 const char *subaction_path,
1245 GHOST_XrControllerModelData *r_data)
1246{
1247 GHOST_IXrContext *xr_context = (GHOST_IXrContext *)xr_contexthandle;
1248 GHOST_XrSession *xr_session = xr_context->getSession();
1249 GHOST_XR_CAPI_CALL_RET(xr_session->getControllerModelData(subaction_path, *r_data), xr_context);
1250 return 0;
1251}
1252
1253#endif /* WITH_XR_OPENXR */
1254
1255#ifdef WITH_VULKAN_BACKEND
1256
1257void GHOST_GetVulkanHandles(GHOST_ContextHandle contexthandle, GHOST_VulkanHandles *r_handles)
1258{
1259 GHOST_IContext *context = (GHOST_IContext *)contexthandle;
1260 context->getVulkanHandles(*r_handles);
1261}
1262
1263void GHOST_SetVulkanSwapBuffersCallbacks(
1264 GHOST_ContextHandle contexthandle,
1265 void (*swap_buffers_pre_callback)(const GHOST_VulkanSwapChainData *),
1266 void (*swap_buffers_post_callback)(void),
1267 void (*openxr_acquire_image_callback)(GHOST_VulkanOpenXRData *),
1268 void (*openxr_release_image_callback)(GHOST_VulkanOpenXRData *))
1269{
1270 GHOST_IContext *context = (GHOST_IContext *)contexthandle;
1271 context->setVulkanSwapBuffersCallbacks(swap_buffers_pre_callback,
1272 swap_buffers_post_callback,
1273 openxr_acquire_image_callback,
1274 openxr_release_image_callback);
1275}
1276
1277void GHOST_GetVulkanSwapChainFormat(GHOST_WindowHandle windowhandle,
1278 GHOST_VulkanSwapChainData *r_swap_chain_data)
1279{
1280 GHOST_IWindow *window = (GHOST_IWindow *)windowhandle;
1281 window->getVulkanSwapChainFormat(r_swap_chain_data);
1282}
1283
1284#endif /* WITH_VULKAN_BACKEND */
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)
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_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_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)
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)
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_TSuccess GHOST_SetWindowModifiedState(GHOST_WindowHandle windowhandle, bool isUnsavedChanges)
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_RemoveTimer(GHOST_SystemHandle systemhandle, GHOST_TimerTaskHandle timertaskhandle)
int32_t GHOST_GetHeightRectangle(GHOST_RectangleHandle rectanglehandle)
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)
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_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)
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
Definition GHOST_C-api.h:22
void GHOST_EndIME(GHOST_WindowHandle windowhandle)
#define GHOST_PRINTF(x,...)
GHOST_TWindowState
void * GHOST_TUserDataPtr
Definition GHOST_Types.h:78
GHOST_TStandardCursor
GHOST_TEventType
GHOST_TCapabilityFlag
Definition GHOST_Types.h:89
GHOST_TVisibility
@ GHOST_kNotVisible
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
@ GHOST_kFailure
Definition GHOST_Types.h:80
@ GHOST_kSuccess
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
float progress
Definition WM_types.hh:1019
ATTR_WARN_UNUSED_RESULT const BMLoop * l
virtual bool isInside(const btVector3 &pt, btScalar tolerance) const
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
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_ITimerTask * installTimer(uint64_t delay, uint64_t interval, GHOST_TimerProcPtr timerProc, GHOST_TUserDataPtr userData=nullptr)=0
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 void getAllDisplayDimensions(uint32_t &width, uint32_t &height) const =0
virtual uint * getClipboardImage(int *r_width, int *r_height) const =0
virtual GHOST_TSuccess addEventConsumer(GHOST_IEventConsumer *consumer)=0
virtual GHOST_IContext * createOffscreenContext(GHOST_GPUSettings gpuSettings)=0
virtual GHOST_TSuccess getModifierKeyState(GHOST_TModifierKey mask, bool &isDown) const =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_IWindow * createWindow(const char *title, int32_t left, int32_t top, uint32_t width, uint32_t height, GHOST_TWindowState state, GHOST_GPUSettings gpuSettings, const bool exclusive=false, const bool is_dialog=false, const GHOST_IWindow *parentWindow=nullptr)=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 GHOST_TSuccess getButtonState(GHOST_TButton mask, bool &isDown) 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 setTimerProc(const GHOST_TimerProcPtr timerProc)=0
virtual GHOST_TimerProcPtr getTimerProc() const =0
virtual void setUserData(const GHOST_TUserDataPtr userData)=0
virtual void setTitle(const char *title)=0
virtual void getClientBounds(GHOST_Rect &bounds) const =0
virtual void setAcceptDragOperation(bool canAccept)=0
virtual GHOST_TSuccess activateDrawingContext()=0
virtual GHOST_TSuccess getCursorBitmap(GHOST_CursorBitmapRef *bitmap)=0
virtual GHOST_TSuccess endProgressBar()=0
virtual GHOST_TSuccess setOrder(GHOST_TWindowOrder order)=0
virtual void setWindowDecorationStyleFlags(GHOST_TWindowDecorationStyleFlags styleFlags)=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 bool isDialog() const =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 getSwapInterval(int &intervalOut)=0
virtual GHOST_TSuccess setCursorShape(GHOST_TStandardCursor cursorShape)=0
virtual GHOST_TSuccess setClientWidth(uint32_t width)=0
virtual GHOST_TSuccess setModifiedState(bool isUnsavedChanges)=0
virtual float getNativePixelSize()=0
virtual GHOST_IContext * getDrawingContext()=0
virtual GHOST_TSuccess setCursorVisibility(bool visible)=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 void getWindowBounds(GHOST_Rect &bounds) const =0
virtual GHOST_TSuccess hasCursorShape(GHOST_TStandardCursor cursorShape)=0
virtual bool getCursorVisibility() const =0
virtual GHOST_TSuccess setPath(const char *filepath)=0
virtual GHOST_TWindowDecorationStyleFlags getWindowDecorationStyleFlags()=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 GHOST_TSuccess invalidate()=0
virtual void setUserData(const GHOST_TUserDataPtr userData)=0
virtual GHOST_TDrawingContextType getDrawingContextType()=0
virtual GHOST_TSuccess swapBuffers()=0
virtual void setWindowDecorationStyleSettings(GHOST_WindowDecorationStyleSettings decorationSettings)=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 setCustomCursorShape(uint8_t *bitmap, uint8_t *mask, int sizex, int sizey, int hotX, int hotY, bool canInvertColor)=0
virtual unsigned int getDefaultFramebuffer()=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
int32_t m_l
int32_t m_r
int32_t m_b
int32_t m_t
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 &amplitude)
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)
uint top
int count
ccl_device_inline float2 mask(const MaskType mask, const float2 a)
static ulong state[N]
static int left
int context(const bContext *C, const char *member, bContextDataResult *result)
i
Definition text_draw.cc:230