[NUI] Add license, delete unnecessary code (#2679)
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / internal / Common / NativeImageInterface.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.ComponentModel;
19
20 namespace Tizen.NUI
21 {
22     [EditorBrowsable(EditorBrowsableState.Never)]
23     public class NativeImageInterface : RefObject
24     {
25         internal NativeImageInterface(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
26         {
27         }
28
29         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(NativeImageInterface obj)
30         {
31             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.SwigCPtr;
32         }
33
34         protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
35         {
36             throw new global::System.MethodAccessException("C++ destructor does not have public access");
37         }
38
39         public virtual bool GlExtensionCreate()
40         {
41             bool ret = Interop.NativeImageInterface.GlExtensionCreate(SwigCPtr);
42             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
43             return ret;
44         }
45
46         public virtual void GlExtensionDestroy()
47         {
48             Interop.NativeImageInterface.GlExtensionDestroy(SwigCPtr);
49             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
50         }
51
52         public virtual uint TargetTexture()
53         {
54             uint ret = Interop.NativeImageInterface.TargetTexture(SwigCPtr);
55             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
56             return ret;
57         }
58
59         public virtual void PrepareTexture()
60         {
61             Interop.NativeImageInterface.PrepareTexture(SwigCPtr);
62             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
63         }
64
65         public virtual uint GetWidth()
66         {
67             uint ret = Interop.NativeImageInterface.GetWidth(SwigCPtr);
68             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
69             return ret;
70         }
71
72         public virtual uint GetHeight()
73         {
74             uint ret = Interop.NativeImageInterface.GetHeight(SwigCPtr);
75             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
76             return ret;
77         }
78
79         public virtual bool RequiresBlending()
80         {
81             bool ret = Interop.NativeImageInterface.RequiresBlending(SwigCPtr);
82             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
83             return ret;
84         }
85     }
86 }