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 //------------------------------------------------------------------------------
29 internal class Alignment : View {
30 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
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);
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;
41 DisposeQueue.Instance.Add(this);
44 public override void Dispose() {
45 if (!Stage.IsInstalled()) {
46 DisposeQueue.Instance.Add(this);
51 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
54 NDalicPINVOKE.delete_Alignment(swigCPtr);
56 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
58 global::System.GC.SuppressFinalize(this);
64 public class Padding : global::System.IDisposable {
65 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
66 protected bool swigCMemOwn;
68 internal Padding(global::System.IntPtr cPtr, bool cMemoryOwn) {
69 swigCMemOwn = cMemoryOwn;
70 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
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;
81 public virtual void Dispose() {
83 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
86 NDalicPINVOKE.delete_Alignment_Padding(swigCPtr);
88 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
90 global::System.GC.SuppressFinalize(this);
94 public Padding() : this(NDalicPINVOKE.new_Alignment_Padding__SWIG_0(), true) {
95 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
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();
104 NDalicPINVOKE.Alignment_Padding_left_set(swigCPtr, value);
105 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
108 float ret = NDalicPINVOKE.Alignment_Padding_left_get(swigCPtr);
109 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
116 NDalicPINVOKE.Alignment_Padding_right_set(swigCPtr, value);
117 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
120 float ret = NDalicPINVOKE.Alignment_Padding_right_get(swigCPtr);
121 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
128 NDalicPINVOKE.Alignment_Padding_top_set(swigCPtr, value);
129 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
132 float ret = NDalicPINVOKE.Alignment_Padding_top_get(swigCPtr);
133 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
138 public float bottom {
140 NDalicPINVOKE.Alignment_Padding_bottom_set(swigCPtr, value);
141 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
144 float ret = NDalicPINVOKE.Alignment_Padding_bottom_get(swigCPtr);
145 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
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();
156 public Alignment (Alignment.Type horizontal) : this (NDalicPINVOKE.Alignment_New__SWIG_1((int)horizontal), true) {
157 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
160 public Alignment () : this (NDalicPINVOKE.Alignment_New__SWIG_2(), true) {
161 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
164 public Alignment(Alignment alignment) : this(NDalicPINVOKE.new_Alignment__SWIG_1(Alignment.getCPtr(alignment)), true) {
165 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
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();
174 public void SetAlignmentType(Alignment.Type type) {
175 NDalicPINVOKE.Alignment_SetAlignmentType(swigCPtr, (int)type);
176 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
179 public Alignment.Type GetAlignmentType() {
180 Alignment.Type ret = (Alignment.Type)NDalicPINVOKE.Alignment_GetAlignmentType(swigCPtr);
181 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
185 public void SetScaling(Alignment.Scaling scaling) {
186 NDalicPINVOKE.Alignment_SetScaling(swigCPtr, (int)scaling);
187 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
190 public Alignment.Scaling GetScaling() {
191 Alignment.Scaling ret = (Alignment.Scaling)NDalicPINVOKE.Alignment_GetScaling(swigCPtr);
192 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
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();
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();
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();
215 HorizontalCenter = 2,
222 public enum Scaling {
225 ScaleToFitKeepAspect,
226 ScaleToFillKeepAspect,
228 ShrinkToFitKeepAspect