Blender  V3.3
GHOST_C-api.cpp
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2001-2002 NaN Holding BV. All rights reserved. */
3 
10 #include <cstdlib>
11 #include <cstring>
12 
13 #include "GHOST_C-api.h"
14 #include "GHOST_IEvent.h"
15 #include "GHOST_IEventConsumer.h"
16 #include "GHOST_ISystem.h"
17 #include "intern/GHOST_Debug.h"
18 #ifdef WITH_XR_OPENXR
19 # include "GHOST_IXrContext.h"
20 # include "intern/GHOST_XrSession.h"
21 #endif
24 
25 GHOST_SystemHandle GHOST_CreateSystem(void)
26 {
29 
30  return (GHOST_SystemHandle)system;
31 }
32 
33 void GHOST_SystemInitDebug(GHOST_SystemHandle systemhandle, GHOST_Debug debug)
34 {
35  GHOST_ISystem *system = (GHOST_ISystem *)systemhandle;
36 
37  system->initDebug(debug);
38 }
39 
40 GHOST_TSuccess GHOST_DisposeSystem(GHOST_SystemHandle systemhandle)
41 {
42  GHOST_ISystem *system = (GHOST_ISystem *)systemhandle;
43 
44  return system->disposeSystem();
45 }
46 
47 void GHOST_ShowMessageBox(GHOST_SystemHandle systemhandle,
48  const char *title,
49  const char *message,
50  const char *help_label,
51  const char *continue_label,
52  const char *link,
53  GHOST_DialogOptions dialog_options)
54 {
55  GHOST_ISystem *system = (GHOST_ISystem *)systemhandle;
56  system->showMessageBox(title, message, help_label, continue_label, link, dialog_options);
57 }
58 
59 GHOST_EventConsumerHandle GHOST_CreateEventConsumer(GHOST_EventCallbackProcPtr eventCallback,
60  GHOST_TUserDataPtr userdata)
61 {
62  return (GHOST_EventConsumerHandle) new GHOST_CallbackEventConsumer(eventCallback, userdata);
63 }
64 
65 GHOST_TSuccess GHOST_DisposeEventConsumer(GHOST_EventConsumerHandle consumerhandle)
66 {
67  delete ((GHOST_CallbackEventConsumer *)consumerhandle);
68  return GHOST_kSuccess;
69 }
70 
71 uint64_t GHOST_GetMilliSeconds(GHOST_SystemHandle systemhandle)
72 {
73  GHOST_ISystem *system = (GHOST_ISystem *)systemhandle;
74 
75  return system->getMilliSeconds();
76 }
77 
78 GHOST_TimerTaskHandle GHOST_InstallTimer(GHOST_SystemHandle systemhandle,
79  uint64_t delay,
80  uint64_t interval,
81  GHOST_TimerProcPtr timerproc,
82  GHOST_TUserDataPtr userdata)
83 {
84  GHOST_ISystem *system = (GHOST_ISystem *)systemhandle;
85 
86  return (GHOST_TimerTaskHandle)system->installTimer(delay, interval, timerproc, userdata);
87 }
88 
89 GHOST_TSuccess GHOST_RemoveTimer(GHOST_SystemHandle systemhandle,
90  GHOST_TimerTaskHandle timertaskhandle)
91 {
92  GHOST_ISystem *system = (GHOST_ISystem *)systemhandle;
93  GHOST_ITimerTask *timertask = (GHOST_ITimerTask *)timertaskhandle;
94 
95  return system->removeTimer(timertask);
96 }
97 
98 uint8_t GHOST_GetNumDisplays(GHOST_SystemHandle systemhandle)
99 {
100  GHOST_ISystem *system = (GHOST_ISystem *)systemhandle;
101 
102  return system->getNumDisplays();
103 }
104 
105 void GHOST_GetMainDisplayDimensions(GHOST_SystemHandle systemhandle,
106  uint32_t *width,
107  uint32_t *height)
108 {
109  GHOST_ISystem *system = (GHOST_ISystem *)systemhandle;
110 
112 }
113 
114 void GHOST_GetAllDisplayDimensions(GHOST_SystemHandle systemhandle,
115  uint32_t *width,
116  uint32_t *height)
117 {
118  GHOST_ISystem *system = (GHOST_ISystem *)systemhandle;
119 
121 }
122 
123 GHOST_ContextHandle GHOST_CreateOpenGLContext(GHOST_SystemHandle systemhandle,
124  GHOST_GLSettings glSettings)
125 {
126  GHOST_ISystem *system = (GHOST_ISystem *)systemhandle;
127 
128  return (GHOST_ContextHandle)system->createOffscreenContext(glSettings);
129 }
130 
131 GHOST_TSuccess GHOST_DisposeOpenGLContext(GHOST_SystemHandle systemhandle,
132  GHOST_ContextHandle contexthandle)
133 {
134  GHOST_ISystem *system = (GHOST_ISystem *)systemhandle;
135  GHOST_IContext *context = (GHOST_IContext *)contexthandle;
136 
137  return system->disposeContext(context);
138 }
139 
140 GHOST_WindowHandle GHOST_CreateWindow(GHOST_SystemHandle systemhandle,
141  GHOST_WindowHandle parent_windowhandle,
142  const char *title,
143  int32_t left,
144  int32_t top,
145  uint32_t width,
148  bool is_dialog,
150  GHOST_GLSettings glSettings)
151 {
152  GHOST_ISystem *system = (GHOST_ISystem *)systemhandle;
153 
154  return (GHOST_WindowHandle)system->createWindow(title,
155  left,
156  top,
157  width,
158  height,
159  state,
160  type,
161  glSettings,
162  false,
163  is_dialog,
164  (GHOST_IWindow *)parent_windowhandle);
165 }
166 
167 GHOST_TUserDataPtr GHOST_GetWindowUserData(GHOST_WindowHandle windowhandle)
168 {
169  GHOST_IWindow *window = (GHOST_IWindow *)windowhandle;
170 
171  return window->getUserData();
172 }
173 void GHOST_SetWindowUserData(GHOST_WindowHandle windowhandle, GHOST_TUserDataPtr userdata)
174 {
175  GHOST_IWindow *window = (GHOST_IWindow *)windowhandle;
176 
177  window->setUserData(userdata);
178 }
179 
180 bool GHOST_IsDialogWindow(GHOST_WindowHandle windowhandle)
181 {
182  GHOST_IWindow *window = (GHOST_IWindow *)windowhandle;
183 
184  return window->isDialog();
185 }
186 
187 GHOST_TSuccess GHOST_DisposeWindow(GHOST_SystemHandle systemhandle,
188  GHOST_WindowHandle windowhandle)
189 {
190  GHOST_ISystem *system = (GHOST_ISystem *)systemhandle;
191  GHOST_IWindow *window = (GHOST_IWindow *)windowhandle;
192 
193  return system->disposeWindow(window);
194 }
195 
196 bool GHOST_ValidWindow(GHOST_SystemHandle systemhandle, GHOST_WindowHandle windowhandle)
197 {
198  GHOST_ISystem *system = (GHOST_ISystem *)systemhandle;
199  GHOST_IWindow *window = (GHOST_IWindow *)windowhandle;
200 
201  return system->validWindow(window);
202 }
203 
204 GHOST_WindowHandle GHOST_BeginFullScreen(GHOST_SystemHandle systemhandle,
205  GHOST_DisplaySetting *setting,
206  const bool stereoVisual)
207 {
208  GHOST_ISystem *system = (GHOST_ISystem *)systemhandle;
209  GHOST_IWindow *window = nullptr;
210  bool bstereoVisual;
211 
212  if (stereoVisual) {
213  bstereoVisual = true;
214  }
215  else {
216  bstereoVisual = false;
217  }
218 
219  system->beginFullScreen(*setting, &window, bstereoVisual);
220 
221  return (GHOST_WindowHandle)window;
222 }
223 
224 GHOST_TSuccess GHOST_EndFullScreen(GHOST_SystemHandle systemhandle)
225 {
226  GHOST_ISystem *system = (GHOST_ISystem *)systemhandle;
227 
228  return system->endFullScreen();
229 }
230 
231 bool GHOST_GetFullScreen(GHOST_SystemHandle systemhandle)
232 {
233  GHOST_ISystem *system = (GHOST_ISystem *)systemhandle;
234 
235  return system->getFullScreen();
236 }
237 
238 GHOST_WindowHandle GHOST_GetWindowUnderCursor(GHOST_SystemHandle systemhandle,
239  int32_t x,
240  int32_t y)
241 {
242  GHOST_ISystem *system = (GHOST_ISystem *)systemhandle;
243  GHOST_IWindow *window = system->getWindowUnderCursor(x, y);
244 
245  return (GHOST_WindowHandle)window;
246 }
247 
248 bool GHOST_ProcessEvents(GHOST_SystemHandle systemhandle, bool waitForEvent)
249 {
250  GHOST_ISystem *system = (GHOST_ISystem *)systemhandle;
251 
252  return system->processEvents(waitForEvent);
253 }
254 
255 void GHOST_DispatchEvents(GHOST_SystemHandle systemhandle)
256 {
257  GHOST_ISystem *system = (GHOST_ISystem *)systemhandle;
258 
259  system->dispatchEvents();
260 }
261 
262 GHOST_TSuccess GHOST_AddEventConsumer(GHOST_SystemHandle systemhandle,
263  GHOST_EventConsumerHandle consumerhandle)
264 {
265  GHOST_ISystem *system = (GHOST_ISystem *)systemhandle;
266 
267  return system->addEventConsumer((GHOST_CallbackEventConsumer *)consumerhandle);
268 }
269 
270 GHOST_TSuccess GHOST_RemoveEventConsumer(GHOST_SystemHandle systemhandle,
271  GHOST_EventConsumerHandle consumerhandle)
272 {
273  GHOST_ISystem *system = (GHOST_ISystem *)systemhandle;
274 
275  return system->removeEventConsumer((GHOST_CallbackEventConsumer *)consumerhandle);
276 }
277 
278 GHOST_TSuccess GHOST_SetProgressBar(GHOST_WindowHandle windowhandle, float progress)
279 {
280  GHOST_IWindow *window = (GHOST_IWindow *)windowhandle;
281 
282  return window->setProgressBar(progress);
283 }
284 
285 GHOST_TSuccess GHOST_EndProgressBar(GHOST_WindowHandle windowhandle)
286 {
287  GHOST_IWindow *window = (GHOST_IWindow *)windowhandle;
288 
289  return window->endProgressBar();
290 }
291 
292 GHOST_TStandardCursor GHOST_GetCursorShape(GHOST_WindowHandle windowhandle)
293 {
294  GHOST_IWindow *window = (GHOST_IWindow *)windowhandle;
295 
296  return window->getCursorShape();
297 }
298 
299 GHOST_TSuccess GHOST_SetCursorShape(GHOST_WindowHandle windowhandle,
300  GHOST_TStandardCursor cursorshape)
301 {
302  GHOST_IWindow *window = (GHOST_IWindow *)windowhandle;
303 
304  return window->setCursorShape(cursorshape);
305 }
306 
307 GHOST_TSuccess GHOST_HasCursorShape(GHOST_WindowHandle windowhandle,
308  GHOST_TStandardCursor cursorshape)
309 {
310  GHOST_IWindow *window = (GHOST_IWindow *)windowhandle;
311 
312  return window->hasCursorShape(cursorshape);
313 }
314 
315 GHOST_TSuccess GHOST_SetCustomCursorShape(GHOST_WindowHandle windowhandle,
316  uint8_t *bitmap,
317  uint8_t *mask,
318  int sizex,
319  int sizey,
320  int hotX,
321  int hotY,
322  bool canInvertColor)
323 {
324  GHOST_IWindow *window = (GHOST_IWindow *)windowhandle;
325 
326  return window->setCustomCursorShape(bitmap, mask, sizex, sizey, hotX, hotY, canInvertColor);
327 }
328 
329 GHOST_TSuccess GHOST_GetCursorBitmap(GHOST_WindowHandle windowhandle,
330  GHOST_CursorBitmapRef *bitmap)
331 {
332  GHOST_IWindow *window = (GHOST_IWindow *)windowhandle;
333 
334  return window->getCursorBitmap(bitmap);
335 }
336 
337 bool GHOST_GetCursorVisibility(GHOST_WindowHandle windowhandle)
338 {
339  GHOST_IWindow *window = (GHOST_IWindow *)windowhandle;
340 
341  return window->getCursorVisibility();
342 }
343 
344 GHOST_TSuccess GHOST_SetCursorVisibility(GHOST_WindowHandle windowhandle, bool visible)
345 {
346  GHOST_IWindow *window = (GHOST_IWindow *)windowhandle;
347 
348  return window->setCursorVisibility(visible);
349 }
350 
351 /* Unused, can expose again if needed although WAYLAND
352  * can only properly use client relative coordinates, so leave disabled if possible. */
353 #if 0
354 GHOST_TSuccess GHOST_GetCursorPositionScreenCoords(GHOST_SystemHandle systemhandle,
355  int32_t *x,
356  int32_t *y)
357 {
358  GHOST_ISystem *system = (GHOST_ISystem *)systemhandle;
359 
360  return system->getCursorPosition(*x, *y);
361 }
362 
363 GHOST_TSuccess GHOST_SetCursorPositionScreenCoords(GHOST_SystemHandle systemhandle,
364  int32_t x,
365  int32_t y)
366 {
367  GHOST_ISystem *system = (GHOST_ISystem *)systemhandle;
368 
369  return system->setCursorPosition(x, y);
370 }
371 #endif
372 
373 GHOST_TSuccess GHOST_GetCursorPosition(const GHOST_SystemHandle systemhandle,
374  const GHOST_WindowHandle windowhandle,
375  int32_t *x,
376  int32_t *y)
377 {
378  const GHOST_ISystem *system = (const GHOST_ISystem *)systemhandle;
379  const GHOST_IWindow *window = (const GHOST_IWindow *)windowhandle;
380 
381  return system->getCursorPositionClientRelative(window, *x, *y);
382 }
383 
384 GHOST_TSuccess GHOST_SetCursorPosition(GHOST_SystemHandle systemhandle,
385  GHOST_WindowHandle windowhandle,
386  int32_t x,
387  int32_t y)
388 {
389  GHOST_ISystem *system = (GHOST_ISystem *)systemhandle;
390  GHOST_IWindow *window = (GHOST_IWindow *)windowhandle;
391 
392  return system->setCursorPositionClientRelative(window, x, y);
393 }
394 
395 GHOST_TSuccess GHOST_SetCursorGrab(GHOST_WindowHandle windowhandle,
397  GHOST_TAxisFlag wrap_axis,
398  int bounds[4],
399  const int mouse_ungrab_xy[2])
400 {
401  GHOST_IWindow *window = (GHOST_IWindow *)windowhandle;
402  GHOST_Rect bounds_rect;
403  int32_t mouse_xy[2];
404 
405  if (bounds) {
406  bounds_rect = GHOST_Rect(bounds[0], bounds[1], bounds[2], bounds[3]);
407  }
408  if (mouse_ungrab_xy) {
409  mouse_xy[0] = mouse_ungrab_xy[0];
410  mouse_xy[1] = mouse_ungrab_xy[1];
411  }
412 
413  return window->setCursorGrab(
414  mode, wrap_axis, bounds ? &bounds_rect : nullptr, mouse_ungrab_xy ? mouse_xy : nullptr);
415 }
416 
417 void 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 {
423  GHOST_IWindow *window = (GHOST_IWindow *)windowhandle;
424  GHOST_Rect bounds_rect;
425  bool use_software_cursor;
426  window->getCursorGrabState(*r_mode, *r_axis_flag, bounds_rect, use_software_cursor);
427  r_bounds[0] = bounds_rect.m_l;
428  r_bounds[1] = bounds_rect.m_t;
429  r_bounds[2] = bounds_rect.m_r;
430  r_bounds[3] = bounds_rect.m_b;
431  *r_use_software_cursor = use_software_cursor;
432 }
433 
434 GHOST_TSuccess GHOST_GetModifierKeyState(GHOST_SystemHandle systemhandle,
436  bool *r_is_down)
437 {
438  GHOST_ISystem *system = (GHOST_ISystem *)systemhandle;
440  bool is_down = false;
441 
442  result = system->getModifierKeyState(mask, is_down);
443  *r_is_down = is_down;
444 
445  return result;
446 }
447 
448 GHOST_TSuccess GHOST_GetButtonState(GHOST_SystemHandle systemhandle,
450  bool *r_is_down)
451 {
452  GHOST_ISystem *system = (GHOST_ISystem *)systemhandle;
454  bool is_down = false;
455 
456  result = system->getButtonState(mask, is_down);
457  *r_is_down = is_down;
458 
459  return result;
460 }
461 
462 #ifdef WITH_INPUT_NDOF
463 void GHOST_setNDOFDeadZone(float deadzone)
464 {
466  system->setNDOFDeadZone(deadzone);
467 }
468 #endif
469 
470 void GHOST_setAcceptDragOperation(GHOST_WindowHandle windowhandle, bool can_accept)
471 {
472  GHOST_IWindow *window = (GHOST_IWindow *)windowhandle;
473 
474  window->setAcceptDragOperation(can_accept);
475 }
476 
477 GHOST_TEventType GHOST_GetEventType(GHOST_EventHandle eventhandle)
478 {
479  GHOST_IEvent *event = (GHOST_IEvent *)eventhandle;
480 
481  return event->getType();
482 }
483 
484 uint64_t GHOST_GetEventTime(GHOST_EventHandle eventhandle)
485 {
486  GHOST_IEvent *event = (GHOST_IEvent *)eventhandle;
487 
488  return event->getTime();
489 }
490 
491 GHOST_WindowHandle GHOST_GetEventWindow(GHOST_EventHandle eventhandle)
492 {
493  GHOST_IEvent *event = (GHOST_IEvent *)eventhandle;
494 
495  return (GHOST_WindowHandle)event->getWindow();
496 }
497 
498 GHOST_TEventDataPtr GHOST_GetEventData(GHOST_EventHandle eventhandle)
499 {
500  GHOST_IEvent *event = (GHOST_IEvent *)eventhandle;
501 
502  return event->getData();
503 }
504 
505 GHOST_TimerProcPtr GHOST_GetTimerProc(GHOST_TimerTaskHandle timertaskhandle)
506 {
507  GHOST_ITimerTask *timertask = (GHOST_ITimerTask *)timertaskhandle;
508 
509  return timertask->getTimerProc();
510 }
511 
512 void GHOST_SetTimerProc(GHOST_TimerTaskHandle timertaskhandle, GHOST_TimerProcPtr timerproc)
513 {
514  GHOST_ITimerTask *timertask = (GHOST_ITimerTask *)timertaskhandle;
515 
516  timertask->setTimerProc(timerproc);
517 }
518 
519 GHOST_TUserDataPtr GHOST_GetTimerTaskUserData(GHOST_TimerTaskHandle timertaskhandle)
520 {
521  GHOST_ITimerTask *timertask = (GHOST_ITimerTask *)timertaskhandle;
522 
523  return timertask->getUserData();
524 }
525 
526 void GHOST_SetTimerTaskUserData(GHOST_TimerTaskHandle timertaskhandle, GHOST_TUserDataPtr userdata)
527 {
528  GHOST_ITimerTask *timertask = (GHOST_ITimerTask *)timertaskhandle;
529 
530  timertask->setUserData(userdata);
531 }
532 
533 bool GHOST_GetValid(GHOST_WindowHandle windowhandle)
534 {
535  GHOST_IWindow *window = (GHOST_IWindow *)windowhandle;
536 
537  return window->getValid();
538 }
539 
541 {
542  GHOST_IWindow *window = (GHOST_IWindow *)windowhandle;
543 
544  return window->getDrawingContextType();
545 }
546 
547 GHOST_TSuccess GHOST_SetDrawingContextType(GHOST_WindowHandle windowhandle,
549 {
550  GHOST_IWindow *window = (GHOST_IWindow *)windowhandle;
551 
552  return window->setDrawingContextType(type);
553 }
554 
555 void GHOST_SetTitle(GHOST_WindowHandle windowhandle, const char *title)
556 {
557  GHOST_IWindow *window = (GHOST_IWindow *)windowhandle;
558 
559  window->setTitle(title);
560 }
561 
562 char *GHOST_GetTitle(GHOST_WindowHandle windowhandle)
563 {
564  GHOST_IWindow *window = (GHOST_IWindow *)windowhandle;
565  std::string title = window->getTitle();
566 
567  char *ctitle = (char *)malloc(title.size() + 1);
568 
569  if (ctitle == nullptr) {
570  return nullptr;
571  }
572 
573  strcpy(ctitle, title.c_str());
574 
575  return ctitle;
576 }
577 
578 GHOST_RectangleHandle GHOST_GetWindowBounds(GHOST_WindowHandle windowhandle)
579 {
580  GHOST_IWindow *window = (GHOST_IWindow *)windowhandle;
581  GHOST_Rect *rectangle = nullptr;
582 
583  rectangle = new GHOST_Rect();
584  window->getWindowBounds(*rectangle);
585 
586  return (GHOST_RectangleHandle)rectangle;
587 }
588 
589 GHOST_RectangleHandle GHOST_GetClientBounds(GHOST_WindowHandle windowhandle)
590 {
591  GHOST_IWindow *window = (GHOST_IWindow *)windowhandle;
592  GHOST_Rect *rectangle = nullptr;
593 
594  rectangle = new GHOST_Rect();
595  window->getClientBounds(*rectangle);
596 
597  return (GHOST_RectangleHandle)rectangle;
598 }
599 
600 void GHOST_DisposeRectangle(GHOST_RectangleHandle rectanglehandle)
601 {
602  delete (GHOST_Rect *)rectanglehandle;
603 }
604 
605 GHOST_TSuccess GHOST_SetClientWidth(GHOST_WindowHandle windowhandle, uint32_t width)
606 {
607  GHOST_IWindow *window = (GHOST_IWindow *)windowhandle;
608 
609  return window->setClientWidth(width);
610 }
611 
612 GHOST_TSuccess GHOST_SetClientHeight(GHOST_WindowHandle windowhandle, uint32_t height)
613 {
614  GHOST_IWindow *window = (GHOST_IWindow *)windowhandle;
615 
616  return window->setClientHeight(height);
617 }
618 
619 GHOST_TSuccess GHOST_SetClientSize(GHOST_WindowHandle windowhandle,
620  uint32_t width,
622 {
623  GHOST_IWindow *window = (GHOST_IWindow *)windowhandle;
624 
625  return window->setClientSize(width, height);
626 }
627 
629  GHOST_WindowHandle windowhandle, int32_t inX, int32_t inY, int32_t *outX, int32_t *outY)
630 {
631  GHOST_IWindow *window = (GHOST_IWindow *)windowhandle;
632 
633  window->screenToClient(inX, inY, *outX, *outY);
634 }
635 
637  GHOST_WindowHandle windowhandle, int32_t inX, int32_t inY, int32_t *outX, int32_t *outY)
638 {
639  GHOST_IWindow *window = (GHOST_IWindow *)windowhandle;
640 
641  window->clientToScreen(inX, inY, *outX, *outY);
642 }
643 
644 GHOST_TWindowState GHOST_GetWindowState(GHOST_WindowHandle windowhandle)
645 {
646  GHOST_IWindow *window = (GHOST_IWindow *)windowhandle;
647 
648  return window->getState();
649 }
650 
652 {
653  GHOST_IWindow *window = (GHOST_IWindow *)windowhandle;
654 
655  return window->setState(state);
656 }
657 
658 GHOST_TSuccess GHOST_SetWindowModifiedState(GHOST_WindowHandle windowhandle, bool isUnsavedChanges)
659 {
660  GHOST_IWindow *window = (GHOST_IWindow *)windowhandle;
661 
662  return window->setModifiedState(isUnsavedChanges);
663 }
664 
666 {
667  GHOST_IWindow *window = (GHOST_IWindow *)windowhandle;
668 
669  return window->setOrder(order);
670 }
671 
672 GHOST_TSuccess GHOST_SwapWindowBuffers(GHOST_WindowHandle windowhandle)
673 {
674  GHOST_IWindow *window = (GHOST_IWindow *)windowhandle;
675 
676  return window->swapBuffers();
677 }
678 
679 GHOST_TSuccess GHOST_SetSwapInterval(GHOST_WindowHandle windowhandle, int interval)
680 {
681  GHOST_IWindow *window = (GHOST_IWindow *)windowhandle;
682 
683  return window->setSwapInterval(interval);
684 }
685 
686 GHOST_TSuccess GHOST_GetSwapInterval(GHOST_WindowHandle windowhandle, int *intervalOut)
687 {
688  GHOST_IWindow *window = (GHOST_IWindow *)windowhandle;
689 
690  return window->getSwapInterval(*intervalOut);
691 }
692 
693 GHOST_TSuccess GHOST_ActivateWindowDrawingContext(GHOST_WindowHandle windowhandle)
694 {
695  GHOST_IWindow *window = (GHOST_IWindow *)windowhandle;
696 
697  return window->activateDrawingContext();
698 }
699 
700 GHOST_TSuccess GHOST_ActivateOpenGLContext(GHOST_ContextHandle contexthandle)
701 {
702  GHOST_IContext *context = (GHOST_IContext *)contexthandle;
703  if (context) {
704  return context->activateDrawingContext();
705  }
706  GHOST_PRINTF("%s: Context not valid\n", __func__);
707  return GHOST_kFailure;
708 }
709 
710 GHOST_TSuccess GHOST_ReleaseOpenGLContext(GHOST_ContextHandle contexthandle)
711 {
712  GHOST_IContext *context = (GHOST_IContext *)contexthandle;
713 
714  return context->releaseDrawingContext();
715 }
716 
717 unsigned int GHOST_GetContextDefaultOpenGLFramebuffer(GHOST_ContextHandle contexthandle)
718 {
719  GHOST_IContext *context = (GHOST_IContext *)contexthandle;
720 
721  return context->getDefaultFramebuffer();
722 }
723 
724 unsigned int GHOST_GetDefaultOpenGLFramebuffer(GHOST_WindowHandle windowhandle)
725 {
726  GHOST_IWindow *window = (GHOST_IWindow *)windowhandle;
727 
728  return window->getDefaultFramebuffer();
729 }
730 
731 GHOST_TSuccess GHOST_InvalidateWindow(GHOST_WindowHandle windowhandle)
732 {
733  GHOST_IWindow *window = (GHOST_IWindow *)windowhandle;
734 
735  return window->invalidate();
736 }
737 
738 void GHOST_SetMultitouchGestures(GHOST_SystemHandle systemhandle, const bool use)
739 {
741  return system->setMultitouchGestures(use);
742 }
743 
744 void GHOST_SetTabletAPI(GHOST_SystemHandle systemhandle, GHOST_TTabletAPI api)
745 {
746  GHOST_ISystem *system = (GHOST_ISystem *)systemhandle;
747  system->setTabletAPI(api);
748 }
749 
750 int32_t GHOST_GetWidthRectangle(GHOST_RectangleHandle rectanglehandle)
751 {
752  return ((GHOST_Rect *)rectanglehandle)->getWidth();
753 }
754 
755 int32_t GHOST_GetHeightRectangle(GHOST_RectangleHandle rectanglehandle)
756 {
757  return ((GHOST_Rect *)rectanglehandle)->getHeight();
758 }
759 
761  GHOST_RectangleHandle rectanglehandle, int32_t *l, int32_t *t, int32_t *r, int32_t *b)
762 {
763  GHOST_Rect *rect = (GHOST_Rect *)rectanglehandle;
764 
765  *l = rect->m_l;
766  *t = rect->m_t;
767  *r = rect->m_r;
768  *b = rect->m_b;
769 }
770 
772  GHOST_RectangleHandle rectanglehandle, int32_t l, int32_t t, int32_t r, int32_t b)
773 {
774  ((GHOST_Rect *)rectanglehandle)->set(l, t, r, b);
775 }
776 
777 GHOST_TSuccess GHOST_IsEmptyRectangle(GHOST_RectangleHandle rectanglehandle)
778 {
780 
781  if (((GHOST_Rect *)rectanglehandle)->isEmpty()) {
783  }
784  return result;
785 }
786 
787 GHOST_TSuccess GHOST_IsValidRectangle(GHOST_RectangleHandle rectanglehandle)
788 {
790 
791  if (((GHOST_Rect *)rectanglehandle)->isValid()) {
793  }
794  return result;
795 }
796 
797 void GHOST_InsetRectangle(GHOST_RectangleHandle rectanglehandle, int32_t i)
798 {
799  ((GHOST_Rect *)rectanglehandle)->inset(i);
800 }
801 
802 void GHOST_UnionRectangle(GHOST_RectangleHandle rectanglehandle,
803  GHOST_RectangleHandle anotherrectanglehandle)
804 {
805  ((GHOST_Rect *)rectanglehandle)->unionRect(*(GHOST_Rect *)anotherrectanglehandle);
806 }
807 
808 void GHOST_UnionPointRectangle(GHOST_RectangleHandle rectanglehandle, int32_t x, int32_t y)
809 {
810  ((GHOST_Rect *)rectanglehandle)->unionPoint(x, y);
811 }
812 
813 GHOST_TSuccess GHOST_IsInsideRectangle(GHOST_RectangleHandle rectanglehandle, int32_t x, int32_t y)
814 {
816 
817  if (((GHOST_Rect *)rectanglehandle)->isInside(x, y)) {
819  }
820  return result;
821 }
822 
823 GHOST_TVisibility GHOST_GetRectangleVisibility(GHOST_RectangleHandle rectanglehandle,
824  GHOST_RectangleHandle anotherrectanglehandle)
825 {
827 
828  visible = ((GHOST_Rect *)rectanglehandle)->getVisibility(*(GHOST_Rect *)anotherrectanglehandle);
829 
830  return visible;
831 }
832 
833 void GHOST_SetCenterRectangle(GHOST_RectangleHandle rectanglehandle, int32_t cx, int32_t cy)
834 {
835  ((GHOST_Rect *)rectanglehandle)->setCenter(cx, cy);
836 }
837 
839  GHOST_RectangleHandle rectanglehandle, int32_t cx, int32_t cy, int32_t w, int32_t h)
840 {
841  ((GHOST_Rect *)rectanglehandle)->setCenter(cx, cy, w, h);
842 }
843 
844 GHOST_TSuccess GHOST_ClipRectangle(GHOST_RectangleHandle rectanglehandle,
845  GHOST_RectangleHandle anotherrectanglehandle)
846 {
848 
849  if (((GHOST_Rect *)rectanglehandle)->clip(*(GHOST_Rect *)anotherrectanglehandle)) {
851  }
852  return result;
853 }
854 
855 char *GHOST_getClipboard(bool selection)
856 {
858  return system->getClipboard(selection);
859 }
860 
861 void GHOST_putClipboard(const char *buffer, bool selection)
862 {
864  system->putClipboard(buffer, selection);
865 }
866 
868 {
870  /* FIXME: use `bool` instead of int for this value. */
871  return (bool)system->setConsoleWindowState(action);
872 }
873 
875 {
877  return system->useNativePixel();
878 }
879 
881 {
883  return system->supportsCursorWarp();
884 }
885 
887 {
889  return system->supportsWindowPosition();
890 }
891 
893 {
894  GHOST_ISystem::setBacktraceFn(backtrace_fn);
895 }
896 
897 void GHOST_UseWindowFocus(bool use_focus)
898 {
900  return system->useWindowFocus(use_focus);
901 }
902 
903 float GHOST_GetNativePixelSize(GHOST_WindowHandle windowhandle)
904 {
905  GHOST_IWindow *window = (GHOST_IWindow *)windowhandle;
906  if (window) {
907  return window->getNativePixelSize();
908  }
909  return 1.0f;
910 }
911 
912 uint16_t GHOST_GetDPIHint(GHOST_WindowHandle windowhandle)
913 {
914  GHOST_IWindow *window = (GHOST_IWindow *)windowhandle;
915  return window->getDPIHint();
916 }
917 
918 #ifdef WITH_INPUT_IME
919 
920 void GHOST_BeginIME(
921  GHOST_WindowHandle windowhandle, int32_t x, int32_t y, int32_t w, int32_t h, bool complete)
922 {
923  GHOST_IWindow *window = (GHOST_IWindow *)windowhandle;
924  window->beginIME(x, y, w, h, complete);
925 }
926 
927 void GHOST_EndIME(GHOST_WindowHandle windowhandle)
928 {
929  GHOST_IWindow *window = (GHOST_IWindow *)windowhandle;
930  window->endIME();
931 }
932 
933 #endif /* WITH_INPUT_IME */
934 
935 #ifdef WITH_XR_OPENXR
936 
937 # define GHOST_XR_CAPI_CALL(call, ctx) \
938  try { \
939  call; \
940  } \
941  catch (GHOST_XrException & e) { \
942  (ctx)->dispatchErrorMessage(&e); \
943  }
944 
945 # define GHOST_XR_CAPI_CALL_RET(call, ctx) \
946  try { \
947  return call; \
948  } \
949  catch (GHOST_XrException & e) { \
950  (ctx)->dispatchErrorMessage(&e); \
951  }
952 
953 void GHOST_XrSessionStart(GHOST_XrContextHandle xr_contexthandle,
954  const GHOST_XrSessionBeginInfo *begin_info)
955 {
956  GHOST_IXrContext *xr_context = (GHOST_IXrContext *)xr_contexthandle;
957  GHOST_XR_CAPI_CALL(xr_context->startSession(begin_info), xr_context);
958 }
959 
960 void GHOST_XrSessionEnd(GHOST_XrContextHandle xr_contexthandle)
961 {
962  GHOST_IXrContext *xr_context = (GHOST_IXrContext *)xr_contexthandle;
963  GHOST_XR_CAPI_CALL(xr_context->endSession(), xr_context);
964 }
965 
966 void GHOST_XrSessionDrawViews(GHOST_XrContextHandle xr_contexthandle, void *draw_customdata)
967 {
968  GHOST_IXrContext *xr_context = (GHOST_IXrContext *)xr_contexthandle;
969  GHOST_XR_CAPI_CALL(xr_context->drawSessionViews(draw_customdata), xr_context);
970 }
971 
972 int GHOST_XrSessionIsRunning(const GHOST_XrContextHandle xr_contexthandle)
973 {
974  const GHOST_IXrContext *xr_context = (const GHOST_IXrContext *)xr_contexthandle;
975  GHOST_XR_CAPI_CALL_RET(xr_context->isSessionRunning(), xr_context);
976  return 0; /* Only reached if exception is thrown. */
977 }
978 
979 void GHOST_XrGraphicsContextBindFuncs(GHOST_XrContextHandle xr_contexthandle,
980  GHOST_XrGraphicsContextBindFn bind_fn,
981  GHOST_XrGraphicsContextUnbindFn unbind_fn)
982 {
983  GHOST_IXrContext *xr_context = (GHOST_IXrContext *)xr_contexthandle;
984  GHOST_XR_CAPI_CALL(xr_context->setGraphicsContextBindFuncs(bind_fn, unbind_fn), xr_context);
985 }
986 
987 void GHOST_XrDrawViewFunc(GHOST_XrContextHandle xr_contexthandle, GHOST_XrDrawViewFn draw_view_fn)
988 {
989  GHOST_IXrContext *xr_context = (GHOST_IXrContext *)xr_contexthandle;
990  GHOST_XR_CAPI_CALL(xr_context->setDrawViewFunc(draw_view_fn), xr_context);
991 }
992 
993 int GHOST_XrSessionNeedsUpsideDownDrawing(const GHOST_XrContextHandle xr_contexthandle)
994 {
995  GHOST_IXrContext *xr_context = (GHOST_IXrContext *)xr_contexthandle;
996 
997  GHOST_XR_CAPI_CALL_RET(xr_context->needsUpsideDownDrawing(), xr_context);
998  return 0; /* Only reached if exception is thrown. */
999 }
1000 
1001 int GHOST_XrCreateActionSet(GHOST_XrContextHandle xr_contexthandle,
1002  const GHOST_XrActionSetInfo *info)
1003 {
1004  GHOST_IXrContext *xr_context = (GHOST_IXrContext *)xr_contexthandle;
1005  GHOST_XrSession *xr_session = xr_context->getSession();
1006  GHOST_XR_CAPI_CALL_RET(xr_session->createActionSet(*info), xr_context);
1007  return 0;
1008 }
1009 
1010 void GHOST_XrDestroyActionSet(GHOST_XrContextHandle xr_contexthandle, const char *action_set_name)
1011 {
1012  GHOST_IXrContext *xr_context = (GHOST_IXrContext *)xr_contexthandle;
1013  GHOST_XrSession *xr_session = xr_context->getSession();
1014  GHOST_XR_CAPI_CALL(xr_session->destroyActionSet(action_set_name), xr_context);
1015 }
1016 
1017 int GHOST_XrCreateActions(GHOST_XrContextHandle xr_contexthandle,
1018  const char *action_set_name,
1019  uint32_t count,
1020  const GHOST_XrActionInfo *infos)
1021 {
1022  GHOST_IXrContext *xr_context = (GHOST_IXrContext *)xr_contexthandle;
1023  GHOST_XrSession *xr_session = xr_context->getSession();
1024  GHOST_XR_CAPI_CALL_RET(xr_session->createActions(action_set_name, count, infos), xr_context);
1025  return 0;
1026 }
1027 
1028 void GHOST_XrDestroyActions(GHOST_XrContextHandle xr_contexthandle,
1029  const char *action_set_name,
1030  uint32_t count,
1031  const char *const *action_names)
1032 {
1033  GHOST_IXrContext *xr_context = (GHOST_IXrContext *)xr_contexthandle;
1034  GHOST_XrSession *xr_session = xr_context->getSession();
1035  GHOST_XR_CAPI_CALL(xr_session->destroyActions(action_set_name, count, action_names), xr_context);
1036 }
1037 
1038 int GHOST_XrCreateActionBindings(GHOST_XrContextHandle xr_contexthandle,
1039  const char *action_set_name,
1040  uint32_t count,
1041  const GHOST_XrActionProfileInfo *infos)
1042 {
1043  GHOST_IXrContext *xr_context = (GHOST_IXrContext *)xr_contexthandle;
1044  GHOST_XrSession *xr_session = xr_context->getSession();
1045  GHOST_XR_CAPI_CALL_RET(xr_session->createActionBindings(action_set_name, count, infos),
1046  xr_context);
1047  return 0;
1048 }
1049 
1050 void GHOST_XrDestroyActionBindings(GHOST_XrContextHandle xr_contexthandle,
1051  const char *action_set_name,
1052  uint32_t count,
1053  const char *const *action_names,
1054  const char *const *profile_paths)
1055 {
1056  GHOST_IXrContext *xr_context = (GHOST_IXrContext *)xr_contexthandle;
1057  GHOST_XrSession *xr_session = xr_context->getSession();
1058  GHOST_XR_CAPI_CALL(
1059  xr_session->destroyActionBindings(action_set_name, count, action_names, profile_paths),
1060  xr_context);
1061 }
1062 
1063 int GHOST_XrAttachActionSets(GHOST_XrContextHandle xr_contexthandle)
1064 {
1065  GHOST_IXrContext *xr_context = (GHOST_IXrContext *)xr_contexthandle;
1066  GHOST_XrSession *xr_session = xr_context->getSession();
1067  GHOST_XR_CAPI_CALL_RET(xr_session->attachActionSets(), xr_context);
1068  return 0;
1069 }
1070 
1071 int GHOST_XrSyncActions(GHOST_XrContextHandle xr_contexthandle, const char *action_set_name)
1072 {
1073  GHOST_IXrContext *xr_context = (GHOST_IXrContext *)xr_contexthandle;
1074  GHOST_XrSession *xr_session = xr_context->getSession();
1075  GHOST_XR_CAPI_CALL_RET(xr_session->syncActions(action_set_name), xr_context);
1076  return 0;
1077 }
1078 
1079 int GHOST_XrApplyHapticAction(GHOST_XrContextHandle xr_contexthandle,
1080  const char *action_set_name,
1081  const char *action_name,
1082  const char *subaction_path,
1083  const int64_t *duration,
1084  const float *frequency,
1085  const float *amplitude)
1086 {
1087  GHOST_IXrContext *xr_context = (GHOST_IXrContext *)xr_contexthandle;
1088  GHOST_XrSession *xr_session = xr_context->getSession();
1089  GHOST_XR_CAPI_CALL_RET(
1090  xr_session->applyHapticAction(
1091  action_set_name, action_name, subaction_path, *duration, *frequency, *amplitude),
1092  xr_context);
1093  return 0;
1094 }
1095 
1096 void GHOST_XrStopHapticAction(GHOST_XrContextHandle xr_contexthandle,
1097  const char *action_set_name,
1098  const char *action_name,
1099  const char *subaction_path)
1100 {
1101  GHOST_IXrContext *xr_context = (GHOST_IXrContext *)xr_contexthandle;
1102  GHOST_XrSession *xr_session = xr_context->getSession();
1103  GHOST_XR_CAPI_CALL(xr_session->stopHapticAction(action_set_name, action_name, subaction_path),
1104  xr_context);
1105 }
1106 
1107 void *GHOST_XrGetActionSetCustomdata(GHOST_XrContextHandle xr_contexthandle,
1108  const char *action_set_name)
1109 {
1110  GHOST_IXrContext *xr_context = (GHOST_IXrContext *)xr_contexthandle;
1111  GHOST_XrSession *xr_session = xr_context->getSession();
1112  GHOST_XR_CAPI_CALL_RET(xr_session->getActionSetCustomdata(action_set_name), xr_context);
1113  return 0;
1114 }
1115 
1116 void *GHOST_XrGetActionCustomdata(GHOST_XrContextHandle xr_contexthandle,
1117  const char *action_set_name,
1118  const char *action_name)
1119 {
1120  GHOST_IXrContext *xr_context = (GHOST_IXrContext *)xr_contexthandle;
1121  GHOST_XrSession *xr_session = xr_context->getSession();
1122  GHOST_XR_CAPI_CALL_RET(xr_session->getActionCustomdata(action_set_name, action_name),
1123  xr_context);
1124  return 0;
1125 }
1126 
1127 unsigned int GHOST_XrGetActionCount(GHOST_XrContextHandle xr_contexthandle,
1128  const char *action_set_name)
1129 {
1130  GHOST_IXrContext *xr_context = (GHOST_IXrContext *)xr_contexthandle;
1131  GHOST_XrSession *xr_session = xr_context->getSession();
1132  GHOST_XR_CAPI_CALL_RET(xr_session->getActionCount(action_set_name), xr_context);
1133  return 0;
1134 }
1135 
1136 void GHOST_XrGetActionCustomdataArray(GHOST_XrContextHandle xr_contexthandle,
1137  const char *action_set_name,
1138  void **r_customdata_array)
1139 {
1140  GHOST_IXrContext *xr_context = (GHOST_IXrContext *)xr_contexthandle;
1141  GHOST_XrSession *xr_session = xr_context->getSession();
1142  GHOST_XR_CAPI_CALL(xr_session->getActionCustomdataArray(action_set_name, r_customdata_array),
1143  xr_context);
1144 }
1145 
1146 int GHOST_XrLoadControllerModel(GHOST_XrContextHandle xr_contexthandle, const char *subaction_path)
1147 {
1148  GHOST_IXrContext *xr_context = (GHOST_IXrContext *)xr_contexthandle;
1149  GHOST_XrSession *xr_session = xr_context->getSession();
1150  GHOST_XR_CAPI_CALL_RET(xr_session->loadControllerModel(subaction_path), xr_context);
1151  return 0;
1152 }
1153 
1154 void GHOST_XrUnloadControllerModel(GHOST_XrContextHandle xr_contexthandle,
1155  const char *subaction_path)
1156 {
1157  GHOST_IXrContext *xr_context = (GHOST_IXrContext *)xr_contexthandle;
1158  GHOST_XrSession *xr_session = xr_context->getSession();
1159  GHOST_XR_CAPI_CALL(xr_session->unloadControllerModel(subaction_path), xr_context);
1160 }
1161 
1162 int GHOST_XrUpdateControllerModelComponents(GHOST_XrContextHandle xr_contexthandle,
1163  const char *subaction_path)
1164 {
1165  GHOST_IXrContext *xr_context = (GHOST_IXrContext *)xr_contexthandle;
1166  GHOST_XrSession *xr_session = xr_context->getSession();
1167  GHOST_XR_CAPI_CALL_RET(xr_session->updateControllerModelComponents(subaction_path), xr_context);
1168  return 0;
1169 }
1170 
1171 int GHOST_XrGetControllerModelData(GHOST_XrContextHandle xr_contexthandle,
1172  const char *subaction_path,
1173  GHOST_XrControllerModelData *r_data)
1174 {
1175  GHOST_IXrContext *xr_context = (GHOST_IXrContext *)xr_contexthandle;
1176  GHOST_XrSession *xr_session = xr_context->getSession();
1177  GHOST_XR_CAPI_CALL_RET(xr_session->getControllerModelData(subaction_path, *r_data), xr_context);
1178  return 0;
1179 }
1180 
1181 #endif /* WITH_XR_OPENXR */
GHOST_TSuccess GHOST_IsInsideRectangle(GHOST_RectangleHandle rectanglehandle, int32_t x, int32_t y)
GHOST_TSuccess GHOST_SetCursorGrab(GHOST_WindowHandle windowhandle, GHOST_TGrabCursorMode mode, GHOST_TAxisFlag wrap_axis, int bounds[4], const int mouse_ungrab_xy[2])
GHOST_TWindowState GHOST_GetWindowState(GHOST_WindowHandle windowhandle)
void GHOST_GetAllDisplayDimensions(GHOST_SystemHandle systemhandle, uint32_t *width, uint32_t *height)
char * GHOST_GetTitle(GHOST_WindowHandle windowhandle)
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_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_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_WindowHandle GHOST_BeginFullScreen(GHOST_SystemHandle systemhandle, GHOST_DisplaySetting *setting, const bool stereoVisual)
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)
Definition: GHOST_C-api.cpp:47
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_SystemHandle GHOST_CreateSystem(void)
Definition: GHOST_C-api.cpp:25
GHOST_TSuccess GHOST_AddEventConsumer(GHOST_SystemHandle systemhandle, GHOST_EventConsumerHandle consumerhandle)
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)
void GHOST_SetWindowUserData(GHOST_WindowHandle windowhandle, GHOST_TUserDataPtr userdata)
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)
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_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)
Definition: GHOST_C-api.cpp:65
GHOST_TimerTaskHandle GHOST_InstallTimer(GHOST_SystemHandle systemhandle, uint64_t delay, uint64_t interval, GHOST_TimerProcPtr timerproc, GHOST_TUserDataPtr userdata)
Definition: GHOST_C-api.cpp:78
GHOST_RectangleHandle GHOST_GetWindowBounds(GHOST_WindowHandle windowhandle)
uint64_t GHOST_GetEventTime(GHOST_EventHandle eventhandle)
void GHOST_SetTimerTaskUserData(GHOST_TimerTaskHandle timertaskhandle, GHOST_TUserDataPtr userdata)
GHOST_TSuccess GHOST_SetProgressBar(GHOST_WindowHandle windowhandle, float progress)
GHOST_TUserDataPtr GHOST_GetTimerTaskUserData(GHOST_TimerTaskHandle timertaskhandle)
GHOST_TSuccess GHOST_ReleaseOpenGLContext(GHOST_ContextHandle contexthandle)
GHOST_TSuccess GHOST_EndFullScreen(GHOST_SystemHandle systemhandle)
GHOST_TSuccess GHOST_SetWindowModifiedState(GHOST_WindowHandle windowhandle, bool isUnsavedChanges)
bool GHOST_SupportsCursorWarp(void)
GHOST_TSuccess GHOST_InvalidateWindow(GHOST_WindowHandle windowhandle)
GHOST_TSuccess GHOST_DisposeWindow(GHOST_SystemHandle systemhandle, GHOST_WindowHandle windowhandle)
bool GHOST_setConsoleWindowState(GHOST_TConsoleWindowState action)
GHOST_TSuccess GHOST_GetSwapInterval(GHOST_WindowHandle windowhandle, int *intervalOut)
void GHOST_SetTimerProc(GHOST_TimerTaskHandle timertaskhandle, GHOST_TimerProcPtr timerproc)
GHOST_TSuccess GHOST_DisposeOpenGLContext(GHOST_SystemHandle systemhandle, GHOST_ContextHandle contexthandle)
unsigned int GHOST_GetContextDefaultOpenGLFramebuffer(GHOST_ContextHandle contexthandle)
GHOST_TSuccess GHOST_SetWindowState(GHOST_WindowHandle windowhandle, GHOST_TWindowState state)
void GHOST_SetBacktraceHandler(GHOST_TBacktraceFn backtrace_fn)
GHOST_TSuccess GHOST_ActivateOpenGLContext(GHOST_ContextHandle contexthandle)
GHOST_TSuccess GHOST_RemoveTimer(GHOST_SystemHandle systemhandle, GHOST_TimerTaskHandle timertaskhandle)
Definition: GHOST_C-api.cpp:89
int32_t GHOST_GetHeightRectangle(GHOST_RectangleHandle rectanglehandle)
void GHOST_GetMainDisplayDimensions(GHOST_SystemHandle systemhandle, uint32_t *width, uint32_t *height)
void GHOST_SetTabletAPI(GHOST_SystemHandle systemhandle, GHOST_TTabletAPI api)
GHOST_TSuccess GHOST_SwapWindowBuffers(GHOST_WindowHandle windowhandle)
char * GHOST_getClipboard(bool selection)
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)
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)
Definition: GHOST_C-api.cpp:33
void GHOST_setAcceptDragOperation(GHOST_WindowHandle windowhandle, bool can_accept)
void GHOST_putClipboard(const char *buffer, bool selection)
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)
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)
bool GHOST_SupportsWindowPosition(void)
GHOST_ContextHandle GHOST_CreateOpenGLContext(GHOST_SystemHandle systemhandle, GHOST_GLSettings glSettings)
void GHOST_SetRectangle(GHOST_RectangleHandle rectanglehandle, int32_t l, int32_t t, int32_t r, int32_t b)
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_TDrawingContextType type, GHOST_GLSettings glSettings)
GHOST_TSuccess GHOST_SetDrawingContextType(GHOST_WindowHandle windowhandle, GHOST_TDrawingContextType type)
GHOST_TSuccess GHOST_EndProgressBar(GHOST_WindowHandle windowhandle)
GHOST_EventConsumerHandle GHOST_CreateEventConsumer(GHOST_EventCallbackProcPtr eventCallback, GHOST_TUserDataPtr userdata)
Definition: GHOST_C-api.cpp:59
GHOST_TSuccess GHOST_SetSwapInterval(GHOST_WindowHandle windowhandle, int interval)
unsigned int GHOST_GetDefaultOpenGLFramebuffer(GHOST_WindowHandle windowhandle)
void GHOST_InsetRectangle(GHOST_RectangleHandle rectanglehandle, int32_t i)
GHOST_RectangleHandle GHOST_GetClientBounds(GHOST_WindowHandle windowhandle)
uint8_t GHOST_GetNumDisplays(GHOST_SystemHandle systemhandle)
Definition: GHOST_C-api.cpp:98
GHOST_TSuccess GHOST_DisposeSystem(GHOST_SystemHandle systemhandle)
Definition: GHOST_C-api.cpp:40
uint64_t GHOST_GetMilliSeconds(GHOST_SystemHandle systemhandle)
Definition: GHOST_C-api.cpp:71
void GHOST_UnionPointRectangle(GHOST_RectangleHandle rectanglehandle, int32_t x, int32_t y)
bool GHOST_GetValid(GHOST_WindowHandle windowhandle)
GHOST_TSuccess GHOST_GetButtonState(GHOST_SystemHandle systemhandle, GHOST_TButton mask, bool *r_is_down)
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)
void GHOST_EndIME(GHOST_WindowHandle windowhandle)
bool(* GHOST_EventCallbackProcPtr)(GHOST_EventHandle event, GHOST_TUserDataPtr userdata)
Definition: GHOST_C-api.h:23
#define GHOST_PRINTF(x,...)
Definition: GHOST_Debug.h:36
GHOST_TWindowState
Definition: GHOST_Types.h:129
void * GHOST_TUserDataPtr
Definition: GHOST_Types.h:72
GHOST_TStandardCursor
Definition: GHOST_Types.h:214
GHOST_TEventType
Definition: GHOST_Types.h:169
GHOST_TVisibility
Definition: GHOST_Types.h:110
@ GHOST_kNotVisible
Definition: GHOST_Types.h:111
GHOST_TAxisFlag
Definition: GHOST_Types.h:420
void(* GHOST_TimerProcPtr)(struct GHOST_TimerTaskHandle__ *task, uint64_t time)
Definition: GHOST_Types.h:614
void * GHOST_TEventDataPtr
Definition: GHOST_Types.h:427
GHOST_TDrawingContextType
Definition: GHOST_Types.h:148
GHOST_TWindowOrder
Definition: GHOST_Types.h:146
GHOST_TModifierKey
Definition: GHOST_Types.h:118
GHOST_TSuccess
Definition: GHOST_Types.h:74
@ GHOST_kFailure
Definition: GHOST_Types.h:74
@ GHOST_kSuccess
Definition: GHOST_Types.h:74
void(* GHOST_TBacktraceFn)(void *file_handle)
Definition: GHOST_Types.h:45
GHOST_TGrabCursorMode
Definition: GHOST_Types.h:404
GHOST_TButton
Definition: GHOST_Types.h:156
GHOST_TConsoleWindowState
Definition: GHOST_Types.h:139
GHOST_TTabletAPI
Definition: GHOST_Types.h:89
GHOST_DialogOptions
Definition: GHOST_Types.h:67
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble w _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat w _GL_VOID_RET _GL_VOID GLint GLint GLint w _GL_VOID_RET _GL_VOID GLshort GLshort GLshort w _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble y2 _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat y2 _GL_VOID_RET _GL_VOID GLint GLint GLint y2 _GL_VOID_RET _GL_VOID GLshort GLshort GLshort y2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLuint *buffer _GL_VOID_RET _GL_VOID GLdouble t _GL_VOID_RET _GL_VOID GLfloat t _GL_VOID_RET _GL_VOID GLint t _GL_VOID_RET _GL_VOID GLshort t _GL_VOID_RET _GL_VOID GLdouble GLdouble r _GL_VOID_RET _GL_VOID GLfloat GLfloat r _GL_VOID_RET _GL_VOID GLint GLint r _GL_VOID_RET _GL_VOID GLshort GLshort r _GL_VOID_RET _GL_VOID GLdouble GLdouble r
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei height
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint y
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei width
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble top
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble w _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat w _GL_VOID_RET _GL_VOID GLint GLint GLint w _GL_VOID_RET _GL_VOID GLshort GLshort GLshort w _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble y2 _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat y2 _GL_VOID_RET _GL_VOID GLint GLint GLint y2 _GL_VOID_RET _GL_VOID GLshort GLshort GLshort y2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLuint *buffer _GL_VOID_RET _GL_VOID GLdouble t _GL_VOID_RET _GL_VOID GLfloat t _GL_VOID_RET _GL_VOID GLint t _GL_VOID_RET _GL_VOID GLshort t _GL_VOID_RET _GL_VOID GLdouble t
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint order
ATTR_WARN_UNUSED_RESULT const BMLoop * l
virtual bool isInside(const btVector3 &pt, btScalar tolerance) const
Definition: btBox2dShape.h:284
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
virtual GHOST_IWindow * getWindow()=0
virtual GHOST_TEventDataPtr getData()=0
virtual GHOST_TEventType getType()=0
virtual uint64_t getTime()=0
static GHOST_ISystem * getSystem()
virtual void putClipboard(const char *buffer, bool selection) const =0
virtual int setConsoleWindowState(GHOST_TConsoleWindowState action)=0
virtual bool supportsWindowPosition()=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 bool supportsCursorWarp()=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 beginFullScreen(const GHOST_DisplaySetting &setting, GHOST_IWindow **window, const bool stereoVisual, const bool alphaBackground=0)=0
virtual GHOST_IWindow * getWindowUnderCursor(int32_t x, int32_t y)=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 GHOST_TSuccess addEventConsumer(GHOST_IEventConsumer *consumer)=0
virtual GHOST_IContext * createOffscreenContext(GHOST_GLSettings glSettings)=0
virtual GHOST_TSuccess getModifierKeyState(GHOST_TModifierKey mask, bool &isDown) const =0
virtual void useWindowFocus(const bool use_focus)=0
virtual char * getClipboard(bool selection) const =0
virtual GHOST_TSuccess disposeContext(GHOST_IContext *context)=0
virtual GHOST_TSuccess removeTimer(GHOST_ITimerTask *timerTask)=0
static GHOST_TSuccess disposeSystem()
virtual bool getFullScreen(void)=0
virtual uint8_t getNumDisplays() const =0
virtual void setMultitouchGestures(const bool use)=0
static GHOST_TSuccess createSystem()
virtual void dispatchEvents()=0
virtual GHOST_IWindow * createWindow(const char *title, int32_t left, int32_t top, uint32_t width, uint32_t height, GHOST_TWindowState state, GHOST_TDrawingContextType type, GHOST_GLSettings glSettings, const bool exclusive=false, const bool is_dialog=false, const GHOST_IWindow *parentWindow=NULL)=0
virtual GHOST_TSuccess endFullScreen(void)=0
virtual GHOST_ITimerTask * installTimer(uint64_t delay, uint64_t interval, GHOST_TimerProcPtr timerProc, GHOST_TUserDataPtr userData=NULL)=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 bool useNativePixel(void)=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 bool processEvents(bool waitForEvent)=0
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 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 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 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 setDrawingContextType(GHOST_TDrawingContextType type)=0
virtual bool getValid() const =0
virtual float getNativePixelSize(void)=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 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 void startSession(const GHOST_XrSessionBeginInfo *begin_info)=0
virtual GHOST_XrSession * getSession()=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
Definition: GHOST_Rect.h:156
int32_t m_r
Definition: GHOST_Rect.h:160
int32_t m_b
Definition: GHOST_Rect.h:162
int32_t m_t
Definition: GHOST_Rect.h:158
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)
int count
ccl_global float * buffer
const int state
ccl_device_inline float4 mask(const int4 &mask, const float4 &a)
Definition: math_float4.h:513
static int left
static const pxr::TfToken b("b", pxr::TfToken::Immortal)
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