New directory structure for C#
[platform/core/uifw/dali-toolkit.git] / plugins / dali-sharp / sharp / internal / Alignment.cs
1 /** Copyright (c) 2017 Samsung Electronics Co., Ltd.
2 *
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 *
15 */
16 // This File has been auto-generated by SWIG and then modified using DALi Ruby Scripts
17 //------------------------------------------------------------------------------
18 // <auto-generated />
19 //
20 // This file was automatically generated by SWIG (http://www.swig.org).
21 // Version 3.0.10
22 //
23 // Do not make changes to this file unless you know what you are doing--modify
24 // the SWIG interface file instead.
25 //------------------------------------------------------------------------------
26
27 namespace Dali {
28
29 internal class Alignment : View {
30   private global::System.Runtime.InteropServices.HandleRef swigCPtr;
31
32   internal Alignment(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.Alignment_SWIGUpcast(cPtr), cMemoryOwn) {
33     swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
34   }
35
36   internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Alignment obj) {
37     return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
38   }
39
40   ~Alignment() {
41     DisposeQueue.Instance.Add(this);
42   }
43
44   public override void Dispose() {
45     if (!Stage.IsInstalled()) {
46       DisposeQueue.Instance.Add(this);
47       return;
48     }
49
50     lock(this) {
51       if (swigCPtr.Handle != global::System.IntPtr.Zero) {
52         if (swigCMemOwn) {
53           swigCMemOwn = false;
54           NDalicPINVOKE.delete_Alignment(swigCPtr);
55         }
56         swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
57       }
58       global::System.GC.SuppressFinalize(this);
59       base.Dispose();
60     }
61   }
62
63
64   public class Padding : global::System.IDisposable {
65     private global::System.Runtime.InteropServices.HandleRef swigCPtr;
66     protected bool swigCMemOwn;
67   
68     internal Padding(global::System.IntPtr cPtr, bool cMemoryOwn) {
69       swigCMemOwn = cMemoryOwn;
70       swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
71     }
72   
73     internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Padding obj) {
74       return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
75     }
76   
77     ~Padding() {
78       Dispose();
79     }
80   
81     public virtual void Dispose() {
82       lock(this) {
83         if (swigCPtr.Handle != global::System.IntPtr.Zero) {
84           if (swigCMemOwn) {
85             swigCMemOwn = false;
86             NDalicPINVOKE.delete_Alignment_Padding(swigCPtr);
87           }
88           swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
89         }
90         global::System.GC.SuppressFinalize(this);
91       }
92     }
93   
94     public Padding() : this(NDalicPINVOKE.new_Alignment_Padding__SWIG_0(), true) {
95       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
96     }
97   
98     public Padding(float l, float r, float t, float b) : this(NDalicPINVOKE.new_Alignment_Padding__SWIG_1(l, r, t, b), true) {
99       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
100     }
101   
102     public float left {
103       set {
104         NDalicPINVOKE.Alignment_Padding_left_set(swigCPtr, value);
105         if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
106       } 
107       get {
108         float ret = NDalicPINVOKE.Alignment_Padding_left_get(swigCPtr);
109         if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
110         return ret;
111       } 
112     }
113   
114     public float right {
115       set {
116         NDalicPINVOKE.Alignment_Padding_right_set(swigCPtr, value);
117         if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
118       } 
119       get {
120         float ret = NDalicPINVOKE.Alignment_Padding_right_get(swigCPtr);
121         if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
122         return ret;
123       } 
124     }
125   
126     public float top {
127       set {
128         NDalicPINVOKE.Alignment_Padding_top_set(swigCPtr, value);
129         if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
130       } 
131       get {
132         float ret = NDalicPINVOKE.Alignment_Padding_top_get(swigCPtr);
133         if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
134         return ret;
135       } 
136     }
137   
138     public float bottom {
139       set {
140         NDalicPINVOKE.Alignment_Padding_bottom_set(swigCPtr, value);
141         if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
142       } 
143       get {
144         float ret = NDalicPINVOKE.Alignment_Padding_bottom_get(swigCPtr);
145         if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
146         return ret;
147       } 
148     }
149   
150   }
151
152   public Alignment (Alignment.Type horizontal, Alignment.Type vertical) : this (NDalicPINVOKE.Alignment_New__SWIG_0((int)horizontal, (int)vertical), true) {
153       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
154
155   }
156   public Alignment (Alignment.Type horizontal) : this (NDalicPINVOKE.Alignment_New__SWIG_1((int)horizontal), true) {
157       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
158
159   }
160   public Alignment () : this (NDalicPINVOKE.Alignment_New__SWIG_2(), true) {
161       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
162
163   }
164   public Alignment(Alignment alignment) : this(NDalicPINVOKE.new_Alignment__SWIG_1(Alignment.getCPtr(alignment)), true) {
165     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
166   }
167
168   public new static Alignment DownCast(BaseHandle handle) {
169     Alignment ret = new Alignment(NDalicPINVOKE.Alignment_DownCast(BaseHandle.getCPtr(handle)), true);
170     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
171     return ret;
172   }
173
174   public void SetAlignmentType(Alignment.Type type) {
175     NDalicPINVOKE.Alignment_SetAlignmentType(swigCPtr, (int)type);
176     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
177   }
178
179   public Alignment.Type GetAlignmentType() {
180     Alignment.Type ret = (Alignment.Type)NDalicPINVOKE.Alignment_GetAlignmentType(swigCPtr);
181     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
182     return ret;
183   }
184
185   public void SetScaling(Alignment.Scaling scaling) {
186     NDalicPINVOKE.Alignment_SetScaling(swigCPtr, (int)scaling);
187     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
188   }
189
190   public Alignment.Scaling GetScaling() {
191     Alignment.Scaling ret = (Alignment.Scaling)NDalicPINVOKE.Alignment_GetScaling(swigCPtr);
192     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
193     return ret;
194   }
195
196   public void SetPadding(Alignment.Padding padding) {
197     NDalicPINVOKE.Alignment_SetPadding(swigCPtr, Alignment.Padding.getCPtr(padding));
198     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
199   }
200
201   public Alignment.Padding GetPadding() {
202     Alignment.Padding ret = new Alignment.Padding(NDalicPINVOKE.Alignment_GetPadding(swigCPtr), false);
203     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
204     return ret;
205   }
206
207   public Alignment Assign(Alignment alignment) {
208     Alignment ret = new Alignment(NDalicPINVOKE.Alignment_Assign(swigCPtr, Alignment.getCPtr(alignment)), false);
209     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
210     return ret;
211   }
212
213   public enum Type {
214     HorizontalLeft = 1,
215     HorizontalCenter = 2,
216     HorizontalRight = 4,
217     VerticalTop = 8,
218     VerticalCenter = 16,
219     VerticalBottom = 32
220   }
221
222   public enum Scaling {
223     ScaleNone,
224     ScaleToFill,
225     ScaleToFitKeepAspect,
226     ScaleToFillKeepAspect,
227     ShrinkToFit,
228     ShrinkToFitKeepAspect
229   }
230
231 }
232
233 }