summaryrefslogtreecommitdiffstats
path: root/src/VBox/HostServices/SharedOpenGL/render/renderspu_cocoa_helper.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/VBox/HostServices/SharedOpenGL/render/renderspu_cocoa_helper.h')
-rw-r--r--src/VBox/HostServices/SharedOpenGL/render/renderspu_cocoa_helper.h65
1 files changed, 65 insertions, 0 deletions
diff --git a/src/VBox/HostServices/SharedOpenGL/render/renderspu_cocoa_helper.h b/src/VBox/HostServices/SharedOpenGL/render/renderspu_cocoa_helper.h
new file mode 100644
index 00000000..11333083
--- /dev/null
+++ b/src/VBox/HostServices/SharedOpenGL/render/renderspu_cocoa_helper.h
@@ -0,0 +1,65 @@
+/* $Id: renderspu_cocoa_helper.h $ */
+/** @file
+ * VirtualBox OpenGL Cocoa Window System Helper definition
+ */
+
+/*
+ * Copyright (C) 2009-2019 Oracle Corporation
+ *
+ * This file is part of VirtualBox Open Source Edition (OSE), as
+ * available from http://www.virtualbox.org. This file is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU
+ * General Public License (GPL) as published by the Free Software
+ * Foundation, in version 2 as it comes in the "COPYING" file of the
+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+ */
+
+#ifndef ___renderspu_cocoa_helper_h
+#define ___renderspu_cocoa_helper_h
+
+#include <iprt/cdefs.h>
+#include <VBox/VBoxCocoa.h>
+#include <OpenGL/OpenGL.h>
+#ifdef IN_VMSVGA3D
+# include "../../../GuestHost/OpenGL/include/cr_vreg.h"
+# include "../../../GuestHost/OpenGL/include/cr_compositor.h"
+#else
+# include <cr_vreg.h>
+# include <cr_compositor.h>
+#endif
+
+
+RT_C_DECLS_BEGIN
+
+struct WindowInfo;
+
+ADD_COCOA_NATIVE_REF(NSView);
+ADD_COCOA_NATIVE_REF(NSOpenGLContext);
+
+/** @name OpenGL context management
+ * @{ */
+void cocoaGLCtxCreate(NativeNSOpenGLContextRef *ppCtx, GLbitfield fVisParams, NativeNSOpenGLContextRef pSharedCtx);
+void cocoaGLCtxDestroy(NativeNSOpenGLContextRef pCtx);
+/** @} */
+
+/** @name View management
+ * @{ */
+void cocoaViewCreate(NativeNSViewRef *ppView, struct WindowInfo *pWinInfo, NativeNSViewRef pParentView, GLbitfield fVisParams);
+void cocoaViewReparent(NativeNSViewRef pView, NativeNSViewRef pParentView);
+void cocoaViewDestroy(NativeNSViewRef pView);
+void cocoaViewDisplay(NativeNSViewRef pView);
+void cocoaViewShow(NativeNSViewRef pView, GLboolean fShowIt);
+void cocoaViewSetPosition(NativeNSViewRef pView, NativeNSViewRef pParentView, int x, int y);
+void cocoaViewSetSize(NativeNSViewRef pView, int cx, int cy);
+void cocoaViewGetGeometry(NativeNSViewRef pView, int *px, int *py, int *pcx, int *pcy);
+void cocoaViewMakeCurrentContext(NativeNSViewRef pView, NativeNSOpenGLContextRef pCtx);
+void cocoaViewSetVisibleRegion(NativeNSViewRef pView, GLint cRects, const GLint *paRects);
+GLboolean cocoaViewNeedsEmptyPresent(NativeNSViewRef pView);
+void cocoaViewPresentComposition(NativeNSViewRef pView, const struct VBOXVR_SCR_COMPOSITOR_ENTRY *pChangedEntry);
+/** @} */
+
+RT_C_DECLS_END
+
+#endif /* !___renderspu_cocoa_helper_h */
+