[NUI] TCSACR-226 code change (#1032)
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / internal / LinearConstrainer.cs
1 /*
2  * Copyright(c) 2017 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 namespace Tizen.NUI
19 {
20     internal class LinearConstrainer : BaseHandle
21     {
22         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
23
24         internal LinearConstrainer(global::System.IntPtr cPtr, bool cMemoryOwn) : base(Interop.LinearConstrainer.LinearConstrainer_SWIGUpcast(cPtr), cMemoryOwn)
25         {
26             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
27         }
28
29         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(LinearConstrainer 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 Dispose(DisposeTypes type)
35         {
36             if (disposed)
37             {
38                 return;
39             }
40
41             //Release your own unmanaged resources here.
42             //You should not access any managed member here except static instance.
43             //because the execution order of Finalizes is non-deterministic.
44
45             if (swigCPtr.Handle != global::System.IntPtr.Zero)
46             {
47                 if (swigCMemOwn)
48                 {
49                     swigCMemOwn = false;
50                     Interop.LinearConstrainer.delete_LinearConstrainer(swigCPtr);
51                 }
52                 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
53             }
54
55             base.Dispose(type);
56         }
57
58         internal class Property
59         {
60             internal static readonly int VALUE = Interop.LinearConstrainer.LinearConstrainer_Property_VALUE_get();
61             internal static readonly int PROGRESS = Interop.LinearConstrainer.LinearConstrainer_Property_PROGRESS_get();
62         }
63
64         public LinearConstrainer() : this(Interop.LinearConstrainer.LinearConstrainer_New(), true)
65         {
66             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
67         }
68
69         internal static LinearConstrainer DownCast(BaseHandle handle)
70         {
71             LinearConstrainer ret =  Registry.GetManagedBaseHandleFromNativePtr(handle) as LinearConstrainer;
72             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
73             return ret;
74         }
75
76         internal LinearConstrainer(LinearConstrainer handle) : this(Interop.LinearConstrainer.new_LinearConstrainer__SWIG_1(LinearConstrainer.getCPtr(handle)), true)
77         {
78             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
79         }
80
81         internal LinearConstrainer Assign(LinearConstrainer rhs)
82         {
83             LinearConstrainer ret = new LinearConstrainer(Interop.LinearConstrainer.LinearConstrainer_Assign(swigCPtr, LinearConstrainer.getCPtr(rhs)), false);
84             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
85             return ret;
86         }
87
88         public void Apply(Tizen.NUI.Property target, Tizen.NUI.Property source, Vector2 range, Vector2 wrap)
89         {
90             Interop.LinearConstrainer.LinearConstrainer_Apply__SWIG_0(swigCPtr, Tizen.NUI.Property.getCPtr(target), Tizen.NUI.Property.getCPtr(source), Vector2.getCPtr(range), Vector2.getCPtr(wrap));
91             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
92         }
93
94         public void Apply(Tizen.NUI.Property target, Tizen.NUI.Property source, Vector2 range)
95         {
96             Interop.LinearConstrainer.LinearConstrainer_Apply__SWIG_1(swigCPtr, Tizen.NUI.Property.getCPtr(target), Tizen.NUI.Property.getCPtr(source), Vector2.getCPtr(range));
97             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
98         }
99
100         internal void Remove(Animatable target)
101         {
102             Interop.LinearConstrainer.LinearConstrainer_Remove(swigCPtr, Animatable.getCPtr(target));
103             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
104         }
105
106         public PropertyArray Value
107         {
108             get
109             {
110                 Tizen.NUI.PropertyArray temp = new Tizen.NUI.PropertyArray();
111                 Tizen.NUI.Object.GetProperty(swigCPtr, LinearConstrainer.Property.VALUE).Get(temp);
112                 return temp;
113             }
114             set
115             {
116                 Tizen.NUI.Object.SetProperty(swigCPtr, LinearConstrainer.Property.VALUE, new Tizen.NUI.PropertyValue(value));
117             }
118         }
119
120         public PropertyArray Progress
121         {
122             get
123             {
124                 Tizen.NUI.PropertyArray temp = new Tizen.NUI.PropertyArray();
125                 Tizen.NUI.Object.GetProperty(swigCPtr, LinearConstrainer.Property.PROGRESS).Get(temp);
126                 return temp;
127             }
128             set
129             {
130                 Tizen.NUI.Object.SetProperty(swigCPtr, LinearConstrainer.Property.PROGRESS, new Tizen.NUI.PropertyValue(value));
131             }
132         }
133     }
134 }