70d9167cd79c13fe6d855a1dd243d509b0166157
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / internal / PathConstrainer.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 PathConstrainer : BaseHandle
21     {
22         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
23
24         internal PathConstrainer(global::System.IntPtr cPtr, bool cMemoryOwn) : base(Interop.PathConstrainer.PathConstrainer_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(PathConstrainer 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
46             if (swigCPtr.Handle != global::System.IntPtr.Zero)
47             {
48                 if (swigCMemOwn)
49                 {
50                     swigCMemOwn = false;
51                     Interop.PathConstrainer.delete_PathConstrainer(swigCPtr);
52                 }
53                 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
54             }
55
56             base.Dispose(type);
57         }
58
59         internal class Property
60         {
61             internal static readonly int FORWARD = Interop.PathConstrainer.PathConstrainer_Property_FORWARD_get();
62             internal static readonly int POINTS = Interop.PathConstrainer.PathConstrainer_Property_POINTS_get();
63             internal static readonly int CONTROL_POINTS = Interop.PathConstrainer.PathConstrainer_Property_CONTROL_POINTS_get();
64         }
65
66         public PathConstrainer() : this(Interop.PathConstrainer.PathConstrainer_New(), true)
67         {
68             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
69
70         }
71         public static PathConstrainer DownCast(BaseHandle handle)
72         {
73             PathConstrainer ret =  Registry.GetManagedBaseHandleFromNativePtr(handle) as PathConstrainer;
74             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
75             return ret;
76         }
77
78         internal PathConstrainer(PathConstrainer handle) : this(Interop.PathConstrainer.new_PathConstrainer__SWIG_1(PathConstrainer.getCPtr(handle)), true)
79         {
80             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
81         }
82
83         internal PathConstrainer Assign(PathConstrainer rhs)
84         {
85             PathConstrainer ret = new PathConstrainer(Interop.PathConstrainer.PathConstrainer_Assign(swigCPtr, PathConstrainer.getCPtr(rhs)), false);
86             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
87             return ret;
88         }
89
90         public void Apply(Tizen.NUI.Property target, Tizen.NUI.Property source, Vector2 range, Vector2 wrap)
91         {
92             Interop.PathConstrainer.PathConstrainer_Apply__SWIG_0(swigCPtr, Tizen.NUI.Property.getCPtr(target), Tizen.NUI.Property.getCPtr(source), Vector2.getCPtr(range), Vector2.getCPtr(wrap));
93             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
94         }
95
96         public void Apply(Tizen.NUI.Property target, Tizen.NUI.Property source, Vector2 range)
97         {
98             Interop.PathConstrainer.PathConstrainer_Apply__SWIG_1(swigCPtr, Tizen.NUI.Property.getCPtr(target), Tizen.NUI.Property.getCPtr(source), Vector2.getCPtr(range));
99             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
100         }
101
102         internal void Remove(Animatable target)
103         {
104             Interop.PathConstrainer.PathConstrainer_Remove(swigCPtr, Animatable.getCPtr(target));
105             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
106         }
107
108         public Vector3 Forward
109         {
110             get
111             {
112                 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
113                 Tizen.NUI.Object.GetProperty(swigCPtr, PathConstrainer.Property.FORWARD).Get(temp);
114                 return temp;
115             }
116             set
117             {
118                 Tizen.NUI.Object.SetProperty(swigCPtr, PathConstrainer.Property.FORWARD, new Tizen.NUI.PropertyValue(value));
119             }
120         }
121
122         public PropertyArray Points
123         {
124             get
125             {
126                 Tizen.NUI.PropertyArray temp = new Tizen.NUI.PropertyArray();
127                 Tizen.NUI.Object.GetProperty(swigCPtr, PathConstrainer.Property.POINTS).Get(temp);
128                 return temp;
129             }
130             set
131             {
132                 Tizen.NUI.Object.SetProperty(swigCPtr, PathConstrainer.Property.POINTS, new Tizen.NUI.PropertyValue(value));
133             }
134         }
135
136         public PropertyArray ControlPoints
137         {
138             get
139             {
140                 Tizen.NUI.PropertyArray temp = new Tizen.NUI.PropertyArray();
141                 Tizen.NUI.Object.GetProperty(swigCPtr, PathConstrainer.Property.CONTROL_POINTS).Get(temp);
142                 return temp;
143             }
144             set
145             {
146                 Tizen.NUI.Object.SetProperty(swigCPtr, PathConstrainer.Property.CONTROL_POINTS, new Tizen.NUI.PropertyValue(value));
147             }
148         }
149     }
150 }