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);
39 // By default, we do not want the position to use the anchor point
40 PositionUsesAnchorPoint = false;
43 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Alignment obj)
45 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
48 protected override void Dispose(DisposeTypes type)
55 if (type == DisposeTypes.Explicit)
58 //Release your own managed resources here.
59 //You should release all of your own disposable objects here.
63 //Release your own unmanaged resources here.
64 //You should not access any managed member here except static instance.
65 //because the execution order of Finalizes is non-deterministic.
67 if (swigCPtr.Handle != global::System.IntPtr.Zero)
72 NDalicPINVOKE.delete_Alignment(swigCPtr);
74 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
82 public class Padding : global::System.IDisposable
84 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
85 protected bool swigCMemOwn;
87 internal Padding(global::System.IntPtr cPtr, bool cMemoryOwn)
89 swigCMemOwn = cMemoryOwn;
90 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
93 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Padding obj)
95 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
98 //A Flag to check who called Dispose(). (By User or DisposeQueue)
99 private bool isDisposeQueued = false;
100 //A Flat to check if it is already disposed.
101 protected bool disposed = false;
105 if (!isDisposeQueued)
107 isDisposeQueued = true;
108 DisposeQueue.Instance.Add(this);
112 public void Dispose()
114 //Throw excpetion if Dispose() is called in separate thread.
115 if (!Window.IsInstalled())
117 throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
122 Dispose(DisposeTypes.Implicit);
126 Dispose(DisposeTypes.Explicit);
127 System.GC.SuppressFinalize(this);
131 protected virtual void Dispose(DisposeTypes type)
138 if (type == DisposeTypes.Explicit)
141 //Release your own managed resources here.
142 //You should release all of your own disposable objects here.
146 //Release your own unmanaged resources here.
147 //You should not access any managed member here except static instance.
148 //because the execution order of Finalizes is non-deterministic.
150 if (swigCPtr.Handle != global::System.IntPtr.Zero)
155 NDalicPINVOKE.delete_Alignment_Padding(swigCPtr);
157 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
163 public Padding() : this(NDalicPINVOKE.new_Alignment_Padding__SWIG_0(), true)
165 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
168 public Padding(float l, float r, float t, float b) : this(NDalicPINVOKE.new_Alignment_Padding__SWIG_1(l, r, t, b), true)
170 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
177 NDalicPINVOKE.Alignment_Padding_left_set(swigCPtr, value);
178 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
182 float ret = NDalicPINVOKE.Alignment_Padding_left_get(swigCPtr);
183 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
192 NDalicPINVOKE.Alignment_Padding_right_set(swigCPtr, value);
193 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
197 float ret = NDalicPINVOKE.Alignment_Padding_right_get(swigCPtr);
198 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
207 NDalicPINVOKE.Alignment_Padding_top_set(swigCPtr, value);
208 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
212 float ret = NDalicPINVOKE.Alignment_Padding_top_get(swigCPtr);
213 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
222 NDalicPINVOKE.Alignment_Padding_bottom_set(swigCPtr, value);
223 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
227 float ret = NDalicPINVOKE.Alignment_Padding_bottom_get(swigCPtr);
228 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
235 public Alignment(Alignment.Type horizontal, Alignment.Type vertical) : this(NDalicPINVOKE.Alignment_New__SWIG_0((int)horizontal, (int)vertical), true)
237 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
240 public Alignment(Alignment.Type horizontal) : this(NDalicPINVOKE.Alignment_New__SWIG_1((int)horizontal), true)
242 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
245 public Alignment() : this(NDalicPINVOKE.Alignment_New__SWIG_2(), true)
247 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
250 public Alignment(Alignment alignment) : this(NDalicPINVOKE.new_Alignment__SWIG_1(Alignment.getCPtr(alignment)), true)
252 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
255 public new static Alignment DownCast(BaseHandle handle)
257 Alignment ret = new Alignment(NDalicPINVOKE.Alignment_DownCast(BaseHandle.getCPtr(handle)), true);
258 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
262 public void SetAlignmentType(Alignment.Type type)
264 NDalicPINVOKE.Alignment_SetAlignmentType(swigCPtr, (int)type);
265 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
268 public Alignment.Type GetAlignmentType()
270 Alignment.Type ret = (Alignment.Type)NDalicPINVOKE.Alignment_GetAlignmentType(swigCPtr);
271 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
275 public void SetScaling(Alignment.Scaling scaling)
277 NDalicPINVOKE.Alignment_SetScaling(swigCPtr, (int)scaling);
278 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
281 public Alignment.Scaling GetScaling()
283 Alignment.Scaling ret = (Alignment.Scaling)NDalicPINVOKE.Alignment_GetScaling(swigCPtr);
284 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
288 public void SetPadding(Alignment.Padding padding)
290 NDalicPINVOKE.Alignment_SetPadding(swigCPtr, Alignment.Padding.getCPtr(padding));
291 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
294 public Alignment.Padding GetPadding()
296 Alignment.Padding ret = new Alignment.Padding(NDalicPINVOKE.Alignment_GetPadding(swigCPtr), false);
297 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
301 public Alignment Assign(Alignment alignment)
303 Alignment ret = new Alignment(NDalicPINVOKE.Alignment_Assign(swigCPtr, Alignment.getCPtr(alignment)), false);
304 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
311 HorizontalCenter = 2,
322 ScaleToFitKeepAspect,
323 ScaleToFillKeepAspect,
325 ShrinkToFitKeepAspect