[NUI] Add GLView
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / internal / Interop / Interop.GLView.cs
1 /*
2  * Copyright(c) 2021 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17
18 using System.Runtime.InteropServices;
19
20 namespace Tizen.NUI
21 {
22     internal static partial class Interop
23     {
24         internal static partial class GLView
25         {
26             [DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_GlView_New_SWIG")]
27             public static extern global::System.IntPtr New(int nuiColorFormat);
28
29             [DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_new_GlView_SWIG_0")]
30             public static extern global::System.IntPtr NewGlView();
31
32             [DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_new_GlView_SWIG_1")]
33             public static extern global::System.IntPtr NewGlView(HandleRef nuiGlView);
34
35             [DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_delete_GlView")]
36             public static extern void DeleteGlView(HandleRef nuiGlView);
37
38             [DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_GlView_Assign")]
39             public static extern global::System.IntPtr GlViewAssign(HandleRef nuiGlView1, HandleRef nuiGlView2);
40
41             [DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_GlView_RegisterGlCallbacks")]
42             public static extern void GlViewRegisterGlCallbacks(HandleRef nuiGlView, HandleRef nuiInitCB, HandleRef nuiRenderFrameCB, HandleRef nuiTerminateCB);
43
44             [DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_GlView_SetResizeCallback")]
45             public static extern void GlViewSetResizeCallback(HandleRef nuiGlView, HandleRef nuiResizeCB);
46
47             [DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_GlView_SetGraphicsConfig")]
48             [return: global::System.Runtime.InteropServices.MarshalAs(global::System.Runtime.InteropServices.UnmanagedType.U1)]
49             public static extern bool GlViewSetGraphicsConfig(HandleRef nuiGlView, bool nuiDepth, bool nuiStencil, int nuiMsaa, int nuiVersion);
50
51             [DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_GlView_SetRenderingMode")]
52             public static extern void GlViewSetRenderingMode(HandleRef nuiGlView, int nuiRenderingMode);
53
54             [DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_GlView_GetRenderingMode")]
55             public static extern global::System.IntPtr GlViewGetRenderingMode(HandleRef nuiGlView);
56
57             [DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_GlView_RenderOnce")]
58             public static extern void GlViewRenderOnce(HandleRef nuiGlView);
59         }
60     }
61 }