Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'intern/ghost/intern/GHOST_C-api.cpp')
-rw-r--r--intern/ghost/intern/GHOST_C-api.cpp48
1 files changed, 36 insertions, 12 deletions
diff --git a/intern/ghost/intern/GHOST_C-api.cpp b/intern/ghost/intern/GHOST_C-api.cpp
index eaa59f096aa..af992bf5a3c 100644
--- a/intern/ghost/intern/GHOST_C-api.cpp
+++ b/intern/ghost/intern/GHOST_C-api.cpp
@@ -140,20 +140,12 @@ GHOST_WindowHandle GHOST_CreateWindow(GHOST_SystemHandle systemhandle,
GHOST_TUns32 height,
GHOST_TWindowState state,
GHOST_TDrawingContextType type,
- const int stereoVisual,
- const GHOST_TUns16 numOfAASamples)
+ GHOST_GLSettings glSettings)
{
GHOST_ISystem *system = (GHOST_ISystem *) systemhandle;
- bool bstereoVisual;
-
- if (stereoVisual)
- bstereoVisual = true;
- else
- bstereoVisual = false;
return (GHOST_WindowHandle) system->createWindow(title, left, top, width, height,
- state, type, bstereoVisual, false,
- numOfAASamples);
+ state, type, glSettings, false);
}
GHOST_TUserDataPtr GHOST_GetWindowUserData(GHOST_WindowHandle windowhandle)
@@ -421,6 +413,13 @@ GHOST_TSuccess GHOST_GetButtonState(GHOST_SystemHandle systemhandle,
}
+void GHOST_setNDOFDeadZone(float deadzone)
+{
+ GHOST_ISystem *system = GHOST_ISystem::getSystem();
+ system->setNDOFDeadZone(deadzone);
+}
+
+
void GHOST_setAcceptDragOperation(GHOST_WindowHandle windowhandle, GHOST_TInt8 canAccept)
{
GHOST_IWindow *window = (GHOST_IWindow *) windowhandle;
@@ -698,14 +697,21 @@ GHOST_TSuccess GHOST_SetSwapInterval(GHOST_WindowHandle windowhandle, int interv
return window->setSwapInterval(interval);
}
-int GHOST_GetSwapInterval(GHOST_WindowHandle windowhandle)
+GHOST_TSuccess GHOST_GetSwapInterval(GHOST_WindowHandle windowhandle, int* intervalOut)
{
GHOST_IWindow *window = (GHOST_IWindow *) windowhandle;
- return window->getSwapInterval();
+ return window->getSwapInterval(*intervalOut);
}
+GHOST_TUns16 GHOST_GetNumOfAASamples(GHOST_WindowHandle windowhandle)
+{
+ GHOST_IWindow *window = (GHOST_IWindow *) windowhandle;
+
+ return window->getNumOfAASamples();
+}
+
GHOST_TSuccess GHOST_ActivateWindowDrawingContext(GHOST_WindowHandle windowhandle)
{
GHOST_IWindow *window = (GHOST_IWindow *) windowhandle;
@@ -914,3 +920,21 @@ float GHOST_GetNativePixelSize(GHOST_WindowHandle windowhandle)
return 1.0f;
}
+#ifdef WITH_INPUT_IME
+
+void GHOST_BeginIME(GHOST_WindowHandle windowhandle,
+ GHOST_TInt32 x, GHOST_TInt32 y,
+ GHOST_TInt32 w, GHOST_TInt32 h,
+ int complete)
+{
+ GHOST_IWindow *window = (GHOST_IWindow *) windowhandle;
+ window->beginIME(x, y, w, h, complete);
+}
+
+void GHOST_EndIME(GHOST_WindowHandle windowhandle)
+{
+ GHOST_IWindow *window = (GHOST_IWindow *) windowhandle;
+ window->endIME();
+}
+
+#endif /* WITH_INPUT_IME */