1 /** Copyright (c) 2017 Samsung Electronics Co., Ltd.
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
7 * http://www.apache.org/licenses/LICENSE-2.0
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.
16 // This File has been auto-generated by SWIG and then modified using DALi Ruby Scripts
17 //------------------------------------------------------------------------------
20 // This file was automatically generated by SWIG (http://www.swig.org).
23 // Do not make changes to this file unless you know what you are doing--modify
24 // the SWIG interface file instead.
25 //------------------------------------------------------------------------------
27 using Tizen.NUI.BaseComponents;
32 internal class Alignment : View
34 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
36 internal Alignment(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.Alignment_SWIGUpcast(cPtr), cMemoryOwn)
38 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
41 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Alignment obj)
43 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
46 protected override void Dispose(DisposeTypes type)
53 if (type == DisposeTypes.Explicit)
56 //Release your own managed resources here.
57 //You should release all of your own disposable objects here.
61 //Release your own unmanaged resources here.
62 //You should not access any managed member here except static instance.
63 //because the execution order of Finalizes is non-deterministic.
65 if (swigCPtr.Handle != global::System.IntPtr.Zero)
70 NDalicPINVOKE.delete_Alignment(swigCPtr);
72 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
80 public class Padding : global::System.IDisposable
82 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
83 protected bool swigCMemOwn;
85 internal Padding(global::System.IntPtr cPtr, bool cMemoryOwn)
87 swigCMemOwn = cMemoryOwn;
88 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
91 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Padding obj)
93 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
96 //A Flag to check who called Dispose(). (By User or DisposeQueue)
97 private bool isDisposeQueued = false;
98 //A Flat to check if it is already disposed.
99 protected bool disposed = false;
103 if (!isDisposeQueued)
105 isDisposeQueued = true;
106 DisposeQueue.Instance.Add(this);
110 public void Dispose()
112 //Throw excpetion if Dispose() is called in separate thread.
113 if (!Window.IsInstalled())
115 throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
120 Dispose(DisposeTypes.Implicit);
124 Dispose(DisposeTypes.Explicit);
125 System.GC.SuppressFinalize(this);
129 protected virtual void Dispose(DisposeTypes type)
136 if (type == DisposeTypes.Explicit)
139 //Release your own managed resources here.
140 //You should release all of your own disposable objects here.
144 //Release your own unmanaged resources here.
145 //You should not access any managed member here except static instance.
146 //because the execution order of Finalizes is non-deterministic.
148 if (swigCPtr.Handle != global::System.IntPtr.Zero)
153 NDalicPINVOKE.delete_Alignment_Padding(swigCPtr);
155 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
161 public Padding() : this(NDalicPINVOKE.new_Alignment_Padding__SWIG_0(), true)
163 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
166 public Padding(float l, float r, float t, float b) : this(NDalicPINVOKE.new_Alignment_Padding__SWIG_1(l, r, t, b), true)
168 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
175 NDalicPINVOKE.Alignment_Padding_left_set(swigCPtr, value);
176 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
180 float ret = NDalicPINVOKE.Alignment_Padding_left_get(swigCPtr);
181 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
190 NDalicPINVOKE.Alignment_Padding_right_set(swigCPtr, value);
191 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
195 float ret = NDalicPINVOKE.Alignment_Padding_right_get(swigCPtr);
196 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
205 NDalicPINVOKE.Alignment_Padding_top_set(swigCPtr, value);
206 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
210 float ret = NDalicPINVOKE.Alignment_Padding_top_get(swigCPtr);
211 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
220 NDalicPINVOKE.Alignment_Padding_bottom_set(swigCPtr, value);
221 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
225 float ret = NDalicPINVOKE.Alignment_Padding_bottom_get(swigCPtr);
226 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
233 public Alignment(Alignment.Type horizontal, Alignment.Type vertical) : this(NDalicPINVOKE.Alignment_New__SWIG_0((int)horizontal, (int)vertical), true)
235 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
238 public Alignment(Alignment.Type horizontal) : this(NDalicPINVOKE.Alignment_New__SWIG_1((int)horizontal), true)
240 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
243 public Alignment() : this(NDalicPINVOKE.Alignment_New__SWIG_2(), true)
245 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
248 public Alignment(Alignment alignment) : this(NDalicPINVOKE.new_Alignment__SWIG_1(Alignment.getCPtr(alignment)), true)
250 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
253 public new static Alignment DownCast(BaseHandle handle)
255 Alignment ret = new Alignment(NDalicPINVOKE.Alignment_DownCast(BaseHandle.getCPtr(handle)), true);
256 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
260 public void SetAlignmentType(Alignment.Type type)
262 NDalicPINVOKE.Alignment_SetAlignmentType(swigCPtr, (int)type);
263 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
266 public Alignment.Type GetAlignmentType()
268 Alignment.Type ret = (Alignment.Type)NDalicPINVOKE.Alignment_GetAlignmentType(swigCPtr);
269 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
273 public void SetScaling(Alignment.Scaling scaling)
275 NDalicPINVOKE.Alignment_SetScaling(swigCPtr, (int)scaling);
276 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
279 public Alignment.Scaling GetScaling()
281 Alignment.Scaling ret = (Alignment.Scaling)NDalicPINVOKE.Alignment_GetScaling(swigCPtr);
282 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
286 public void SetPadding(Alignment.Padding padding)
288 NDalicPINVOKE.Alignment_SetPadding(swigCPtr, Alignment.Padding.getCPtr(padding));
289 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
292 public Alignment.Padding GetPadding()
294 Alignment.Padding ret = new Alignment.Padding(NDalicPINVOKE.Alignment_GetPadding(swigCPtr), false);
295 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
299 public Alignment Assign(Alignment alignment)
301 Alignment ret = new Alignment(NDalicPINVOKE.Alignment_Assign(swigCPtr, Alignment.getCPtr(alignment)), false);
302 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
309 HorizontalCenter = 2,
320 ScaleToFitKeepAspect,
321 ScaleToFillKeepAspect,
323 ShrinkToFitKeepAspect