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 public class Layer : Actor {
30 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
32 internal Layer(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.Layer_SWIGUpcast(cPtr), cMemoryOwn) {
33 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
36 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Layer 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_Layer(swigCPtr);
56 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
58 global::System.GC.SuppressFinalize(this);
64 public class Property : global::System.IDisposable {
65 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
66 protected bool swigCMemOwn;
68 internal Property(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(Property 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_Layer_Property(swigCPtr);
88 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
90 global::System.GC.SuppressFinalize(this);
94 public Property() : this(NDalicPINVOKE.new_Layer_Property(), true) {
95 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
98 public static readonly int CLIPPING_ENABLE = NDalicPINVOKE.Layer_Property_CLIPPING_ENABLE_get();
99 public static readonly int CLIPPING_BOX = NDalicPINVOKE.Layer_Property_CLIPPING_BOX_get();
100 public static readonly int BEHAVIOR = NDalicPINVOKE.Layer_Property_BEHAVIOR_get();
104 public Layer () : this (NDalicPINVOKE.Layer_New(), true) {
105 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
108 public new static Layer DownCast(BaseHandle handle) {
109 Layer ret = new Layer(NDalicPINVOKE.Layer_DownCast(BaseHandle.getCPtr(handle)), true);
110 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
114 public Layer(Layer copy) : this(NDalicPINVOKE.new_Layer__SWIG_1(Layer.getCPtr(copy)), true) {
115 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
118 public Layer Assign(Layer rhs) {
119 Layer ret = new Layer(NDalicPINVOKE.Layer_Assign(swigCPtr, Layer.getCPtr(rhs)), false);
120 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
124 public uint GetDepth() {
125 uint ret = NDalicPINVOKE.Layer_GetDepth(swigCPtr);
126 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
130 public void Raise() {
131 NDalicPINVOKE.Layer_Raise(swigCPtr);
132 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
135 public void Lower() {
136 NDalicPINVOKE.Layer_Lower(swigCPtr);
137 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
140 public void RaiseAbove(Layer target) {
141 NDalicPINVOKE.Layer_RaiseAbove(swigCPtr, Layer.getCPtr(target));
142 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
145 public void LowerBelow(Layer target) {
146 NDalicPINVOKE.Layer_LowerBelow(swigCPtr, Layer.getCPtr(target));
147 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
150 public void RaiseToTop() {
151 NDalicPINVOKE.Layer_RaiseToTop(swigCPtr);
152 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
155 public void LowerToBottom() {
156 NDalicPINVOKE.Layer_LowerToBottom(swigCPtr);
157 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
160 public void MoveAbove(Layer target) {
161 NDalicPINVOKE.Layer_MoveAbove(swigCPtr, Layer.getCPtr(target));
162 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
165 public void MoveBelow(Layer target) {
166 NDalicPINVOKE.Layer_MoveBelow(swigCPtr, Layer.getCPtr(target));
167 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
170 public void SetBehavior(Layer.LayerBehavior behavior) {
171 NDalicPINVOKE.Layer_SetBehavior(swigCPtr, (int)behavior);
172 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
175 public Layer.LayerBehavior GetBehavior() {
176 Layer.LayerBehavior ret = (Layer.LayerBehavior)NDalicPINVOKE.Layer_GetBehavior(swigCPtr);
177 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
181 public void SetClipping(bool enabled) {
182 NDalicPINVOKE.Layer_SetClipping(swigCPtr, enabled);
183 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
186 public bool IsClipping() {
187 bool ret = NDalicPINVOKE.Layer_IsClipping(swigCPtr);
188 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
192 public void SetClippingBox(int x, int y, int width, int height) {
193 NDalicPINVOKE.Layer_SetClippingBox__SWIG_0(swigCPtr, x, y, width, height);
194 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
197 public void SetClippingBox(RectInteger box) {
198 NDalicPINVOKE.Layer_SetClippingBox__SWIG_1(swigCPtr, RectInteger.getCPtr(box));
199 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
202 public RectInteger GetClippingBox() {
203 RectInteger ret = new RectInteger(NDalicPINVOKE.Layer_GetClippingBox(swigCPtr), true);
204 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
208 public void SetDepthTestDisabled(bool disable) {
209 NDalicPINVOKE.Layer_SetDepthTestDisabled(swigCPtr, disable);
210 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
213 public bool IsDepthTestDisabled() {
214 bool ret = NDalicPINVOKE.Layer_IsDepthTestDisabled(swigCPtr);
215 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
219 public void SetSortFunction(SWIGTYPE_p_f_r_q_const__Dali__Vector3__float function) {
220 NDalicPINVOKE.Layer_SetSortFunction(swigCPtr, SWIGTYPE_p_f_r_q_const__Dali__Vector3__float.getCPtr(function));
221 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
224 public void SetTouchConsumed(bool consume) {
225 NDalicPINVOKE.Layer_SetTouchConsumed(swigCPtr, consume);
226 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
229 public bool IsTouchConsumed() {
230 bool ret = NDalicPINVOKE.Layer_IsTouchConsumed(swigCPtr);
231 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
235 public void SetHoverConsumed(bool consume) {
236 NDalicPINVOKE.Layer_SetHoverConsumed(swigCPtr, consume);
237 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
240 public bool IsHoverConsumed() {
241 bool ret = NDalicPINVOKE.Layer_IsHoverConsumed(swigCPtr);
242 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
246 public enum LayerBehavior {
252 public enum TreeDepthMultiplier {
253 TREE_DEPTH_MULTIPLIER = 10000
256 public bool ClippingEnable
261 GetProperty( Layer.Property.CLIPPING_ENABLE).Get( ref temp );
266 SetProperty( Layer.Property.CLIPPING_ENABLE, new NUI.Property.Value( value ) );
269 public RectInteger ClippingBox
273 RectInteger temp = new RectInteger(0,0,0,0);
274 GetProperty( Layer.Property.CLIPPING_BOX).Get( temp );
279 SetProperty( Layer.Property.CLIPPING_BOX, new NUI.Property.Value( value ) );
282 public Layer.LayerBehavior Behavior
286 return GetBehavior();
290 SetBehavior( value );