2 * Copyright (c) 2018 Samsung Electronics Co., Ltd.
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
18 using Tizen.NUI.BaseComponents;
22 internal class LayoutItemPtr : global::System.IDisposable
24 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
25 protected bool swigCMemOwn;
27 internal LayoutItemPtr(global::System.IntPtr cPtr, bool cMemoryOwn)
29 swigCMemOwn = cMemoryOwn;
30 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
33 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(LayoutItemPtr obj)
35 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
43 public virtual void Dispose()
46 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
49 Interop.LayoutItemPtr.delete_LayoutItemPtr(swigCPtr);
51 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
53 global::System.GC.SuppressFinalize(this);
57 public LayoutItemPtr() : this(Interop.LayoutItemPtr.new_LayoutItemPtr__SWIG_0(), true)
59 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
62 internal LayoutItemPtr(LayoutItemWrapperImpl p) : this(Interop.LayoutItemPtr.new_LayoutItemPtr__SWIG_1(LayoutItemWrapperImpl.getCPtr(p)), true)
64 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
67 public LayoutItemPtr(LayoutItemPtr rhs) : this(Interop.LayoutItemPtr.new_LayoutItemPtr__SWIG_2(LayoutItemPtr.getCPtr(rhs)), true)
69 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
72 internal LayoutItemWrapperImpl Get()
74 global::System.IntPtr cPtr = Interop.LayoutItemPtr.LayoutItemPtr_Get(swigCPtr);
75 LayoutItemWrapperImpl ret = (cPtr == global::System.IntPtr.Zero) ? null : new LayoutItemWrapperImpl(cPtr, false);
76 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
80 internal LayoutItemWrapperImpl __deref__()
82 global::System.IntPtr cPtr = Interop.LayoutItemPtr.LayoutItemPtr___deref__(swigCPtr);
83 LayoutItemWrapperImpl ret = (cPtr == global::System.IntPtr.Zero) ? null : new LayoutItemWrapperImpl(cPtr, false);
84 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
88 internal LayoutItemWrapperImpl __ref__()
90 LayoutItemWrapperImpl ret = new LayoutItemWrapperImpl(Interop.LayoutItemPtr.LayoutItemPtr___ref__(swigCPtr), false);
91 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
97 Interop.LayoutItemPtr.LayoutItemPtr_Reset__SWIG_0(swigCPtr);
98 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
101 internal void Reset(LayoutItemWrapperImpl rhs)
103 Interop.LayoutItemPtr.LayoutItemPtr_Reset__SWIG_1(swigCPtr, LayoutItemWrapperImpl.getCPtr(rhs));
104 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
107 internal LayoutItemWrapperImpl Detach()
109 global::System.IntPtr cPtr = Interop.LayoutItemPtr.LayoutItemPtr_Detach(swigCPtr);
110 LayoutItemWrapperImpl ret = (cPtr == global::System.IntPtr.Zero) ? null : new LayoutItemWrapperImpl(cPtr, false);
111 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
115 /*public LayoutItemPtr New(Handle owner)
117 LayoutItemPtr ret = new LayoutItemPtr(Interop.LayoutItemPtr.LayoutItemPtr_New(swigCPtr, Handle.getCPtr(owner)), true);
118 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
122 public void Initialize(Handle owner, string containerType)
124 Interop.LayoutItemPtr.LayoutItemPtr_Initialize(swigCPtr, Handle.getCPtr(owner), containerType);
125 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
128 public void Unparent()
130 Interop.LayoutItemPtr.LayoutItemPtr_Unparent(swigCPtr);
131 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
134 public void SetAnimateLayout(bool animateLayout)
136 Interop.LayoutItemPtr.LayoutItemPtr_SetAnimateLayout(swigCPtr, animateLayout);
137 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
140 public bool IsLayoutAnimated()
142 bool ret = Interop.LayoutItemPtr.LayoutItemPtr_IsLayoutAnimated(swigCPtr);
143 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
147 public void Measure(LayoutMeasureSpec widthMeasureSpec, LayoutMeasureSpec heightMeasureSpec)
149 Interop.LayoutItemPtr.LayoutItemPtr_Measure(swigCPtr, LayoutMeasureSpec.getCPtr(widthMeasureSpec), LayoutMeasureSpec.getCPtr(heightMeasureSpec));
150 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
153 public void Layout(LayoutLength left, LayoutLength top, LayoutLength right, LayoutLength bottom)
155 Interop.LayoutItemPtr.LayoutItemPtr_Layout(swigCPtr, LayoutLength.getCPtr(left), LayoutLength.getCPtr(top), LayoutLength.getCPtr(right), LayoutLength.getCPtr(bottom));
156 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
159 public LayoutLength GetDefaultSize(LayoutLength size, LayoutMeasureSpec measureSpec)
161 LayoutLength ret = new LayoutLength(Interop.LayoutItemPtr.LayoutItemPtr_GetDefaultSize(swigCPtr, LayoutLength.getCPtr(size), LayoutMeasureSpec.getCPtr(measureSpec)), true);
162 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
166 /*public LayoutParent GetParent()
168 global::System.IntPtr cPtr = (SwigDerivedClassHasMethod("GetParent", swigMethodTypes0) ? Interop.LayoutItemPtr.LayoutItemPtr_GetParentSwigExplicitLayoutItemWrapperImpl(swigCPtr) : Interop.LayoutItemPtr.LayoutItemPtr_GetParent(swigCPtr));
169 LayoutParent ret = (cPtr == global::System.IntPtr.Zero) ? null : new LayoutParent(cPtr, false);
170 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
174 public void RequestLayout()
176 Interop.LayoutItemPtr.LayoutItemPtr_RequestLayout(swigCPtr);
177 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
180 public bool IsLayoutRequested()
182 bool ret = Interop.LayoutItemPtr.LayoutItemPtr_IsLayoutRequested(swigCPtr);
183 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
187 public LayoutLength GetMeasuredWidth()
189 LayoutLength ret = new LayoutLength(Interop.LayoutItemPtr.LayoutItemPtr_GetMeasuredWidth(swigCPtr), true);
190 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
194 public LayoutLength GetMeasuredHeight()
196 LayoutLength ret = new LayoutLength(Interop.LayoutItemPtr.LayoutItemPtr_GetMeasuredHeight(swigCPtr), true);
197 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
201 public MeasuredSize GetMeasuredWidthAndState()
203 MeasuredSize ret = new MeasuredSize(Interop.LayoutItemPtr.LayoutItemPtr_GetMeasuredWidthAndState(swigCPtr), true);
204 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
208 public MeasuredSize GetMeasuredHeightAndState()
210 MeasuredSize ret = new MeasuredSize(Interop.LayoutItemPtr.LayoutItemPtr_GetMeasuredHeightAndState(swigCPtr), true);
211 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
215 public LayoutLength GetSuggestedMinimumWidth()
217 LayoutLength ret = new LayoutLength(Interop.LayoutItemPtr.LayoutItemPtr_GetSuggestedMinimumWidth(swigCPtr), true);
218 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
222 public LayoutLength GetSuggestedMinimumHeight()
224 LayoutLength ret = new LayoutLength(Interop.LayoutItemPtr.LayoutItemPtr_GetSuggestedMinimumHeight(swigCPtr), true);
225 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
229 public void SetMinimumWidth(LayoutLength minWidth)
231 Interop.LayoutItemPtr.LayoutItemPtr_SetMinimumWidth(swigCPtr, LayoutLength.getCPtr(minWidth));
232 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
235 public void SetMinimumHeight(LayoutLength minHeight)
237 Interop.LayoutItemPtr.LayoutItemPtr_SetMinimumHeight(swigCPtr, LayoutLength.getCPtr(minHeight));
238 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
241 public LayoutLength GetMinimumWidth()
243 LayoutLength ret = new LayoutLength(Interop.LayoutItemPtr.LayoutItemPtr_GetMinimumWidth(swigCPtr), true);
244 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
248 public LayoutLength GetMinimumHeight()
250 LayoutLength ret = new LayoutLength(Interop.LayoutItemPtr.LayoutItemPtr_GetMinimumHeight(swigCPtr), true);
251 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
255 public Extents GetPadding()
257 Extents ret = new Extents(Interop.LayoutItemPtr.LayoutItemPtr_GetPadding(swigCPtr), true);
258 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
262 public void SetMeasuredDimensions(MeasuredSize measuredWidth, MeasuredSize measuredHeight)
264 Interop.LayoutItemPtr.LayoutItemPtr_SetMeasuredDimensions(swigCPtr, MeasuredSize.getCPtr(measuredWidth), MeasuredSize.getCPtr(measuredHeight));
265 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
268 public bool DoAction(string actionName, PropertyMap attributes)
270 bool ret = Interop.LayoutItemPtr.LayoutItemPtr_DoAction(swigCPtr, actionName, PropertyMap.getCPtr(attributes));
271 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
275 public string GetTypeName()
277 string ret = Interop.LayoutItemPtr.LayoutItemPtr_GetTypeName(swigCPtr);
278 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
282 public bool GetTypeInfo(TypeInfo info)
284 bool ret = Interop.LayoutItemPtr.LayoutItemPtr_GetTypeInfo(swigCPtr, TypeInfo.getCPtr(info));
285 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
289 public void Reference()
291 Interop.LayoutItemPtr.LayoutItemPtr_Reference(swigCPtr);
292 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
295 public void Unreference()
297 Interop.LayoutItemPtr.LayoutItemPtr_Unreference(swigCPtr);
298 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
301 public int ReferenceCount()
303 int ret = Interop.LayoutItemPtr.LayoutItemPtr_ReferenceCount(swigCPtr);
304 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();