New directory structure for C#
[platform/core/uifw/dali-toolkit.git] / plugins / dali-sharp / sharp / internal / Layer.cs
1 /** Copyright (c) 2017 Samsung Electronics Co., Ltd.
2 *
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
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
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.
14 *
15 */
16 // This File has been auto-generated by SWIG and then modified using DALi Ruby Scripts
17 //------------------------------------------------------------------------------
18 // <auto-generated />
19 //
20 // This file was automatically generated by SWIG (http://www.swig.org).
21 // Version 3.0.10
22 //
23 // Do not make changes to this file unless you know what you are doing--modify
24 // the SWIG interface file instead.
25 //------------------------------------------------------------------------------
26
27 namespace Dali {
28
29 public class Layer : Actor {
30   private global::System.Runtime.InteropServices.HandleRef swigCPtr;
31
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);
34   }
35
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;
38   }
39
40   ~Layer() {
41     DisposeQueue.Instance.Add(this);
42   }
43
44   public override void Dispose() {
45     if (!Stage.IsInstalled()) {
46       DisposeQueue.Instance.Add(this);
47       return;
48     }
49
50     lock(this) {
51       if (swigCPtr.Handle != global::System.IntPtr.Zero) {
52         if (swigCMemOwn) {
53           swigCMemOwn = false;
54           NDalicPINVOKE.delete_Layer(swigCPtr);
55         }
56         swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
57       }
58       global::System.GC.SuppressFinalize(this);
59       base.Dispose();
60     }
61   }
62
63
64   public class Property : global::System.IDisposable {
65     private global::System.Runtime.InteropServices.HandleRef swigCPtr;
66     protected bool swigCMemOwn;
67   
68     internal Property(global::System.IntPtr cPtr, bool cMemoryOwn) {
69       swigCMemOwn = cMemoryOwn;
70       swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
71     }
72   
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;
75     }
76   
77     ~Property() {
78       Dispose();
79     }
80   
81     public virtual void Dispose() {
82       lock(this) {
83         if (swigCPtr.Handle != global::System.IntPtr.Zero) {
84           if (swigCMemOwn) {
85             swigCMemOwn = false;
86             NDalicPINVOKE.delete_Layer_Property(swigCPtr);
87           }
88           swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
89         }
90         global::System.GC.SuppressFinalize(this);
91       }
92     }
93   
94     public Property() : this(NDalicPINVOKE.new_Layer_Property(), true) {
95       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
96     }
97   
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();
101   
102   }
103
104   public Layer () : this (NDalicPINVOKE.Layer_New(), true) {
105       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
106
107   }
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();
111     return ret;
112   }
113
114   public Layer(Layer copy) : this(NDalicPINVOKE.new_Layer__SWIG_1(Layer.getCPtr(copy)), true) {
115     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
116   }
117
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();
121     return ret;
122   }
123
124   public uint GetDepth() {
125     uint ret = NDalicPINVOKE.Layer_GetDepth(swigCPtr);
126     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
127     return ret;
128   }
129
130   public void Raise() {
131     NDalicPINVOKE.Layer_Raise(swigCPtr);
132     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
133   }
134
135   public void Lower() {
136     NDalicPINVOKE.Layer_Lower(swigCPtr);
137     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
138   }
139
140   public void RaiseAbove(Layer target) {
141     NDalicPINVOKE.Layer_RaiseAbove(swigCPtr, Layer.getCPtr(target));
142     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
143   }
144
145   public void LowerBelow(Layer target) {
146     NDalicPINVOKE.Layer_LowerBelow(swigCPtr, Layer.getCPtr(target));
147     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
148   }
149
150   public void RaiseToTop() {
151     NDalicPINVOKE.Layer_RaiseToTop(swigCPtr);
152     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
153   }
154
155   public void LowerToBottom() {
156     NDalicPINVOKE.Layer_LowerToBottom(swigCPtr);
157     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
158   }
159
160   public void MoveAbove(Layer target) {
161     NDalicPINVOKE.Layer_MoveAbove(swigCPtr, Layer.getCPtr(target));
162     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
163   }
164
165   public void MoveBelow(Layer target) {
166     NDalicPINVOKE.Layer_MoveBelow(swigCPtr, Layer.getCPtr(target));
167     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
168   }
169
170   public void SetBehavior(Layer.LayerBehavior behavior) {
171     NDalicPINVOKE.Layer_SetBehavior(swigCPtr, (int)behavior);
172     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
173   }
174
175   public Layer.LayerBehavior GetBehavior() {
176     Layer.LayerBehavior ret = (Layer.LayerBehavior)NDalicPINVOKE.Layer_GetBehavior(swigCPtr);
177     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
178     return ret;
179   }
180
181   public void SetClipping(bool enabled) {
182     NDalicPINVOKE.Layer_SetClipping(swigCPtr, enabled);
183     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
184   }
185
186   public bool IsClipping() {
187     bool ret = NDalicPINVOKE.Layer_IsClipping(swigCPtr);
188     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
189     return ret;
190   }
191
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();
195   }
196
197   public void SetClippingBox(Rectangle box) {
198     NDalicPINVOKE.Layer_SetClippingBox__SWIG_1(swigCPtr, Rectangle.getCPtr(box));
199     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
200   }
201
202   public Rectangle GetClippingBox() {
203     Rectangle ret = new Rectangle(NDalicPINVOKE.Layer_GetClippingBox(swigCPtr), true);
204     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
205     return ret;
206   }
207
208   public void SetDepthTestDisabled(bool disable) {
209     NDalicPINVOKE.Layer_SetDepthTestDisabled(swigCPtr, disable);
210     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
211   }
212
213   public bool IsDepthTestDisabled() {
214     bool ret = NDalicPINVOKE.Layer_IsDepthTestDisabled(swigCPtr);
215     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
216     return ret;
217   }
218
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();
222   }
223
224   public void SetTouchConsumed(bool consume) {
225     NDalicPINVOKE.Layer_SetTouchConsumed(swigCPtr, consume);
226     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
227   }
228
229   public bool IsTouchConsumed() {
230     bool ret = NDalicPINVOKE.Layer_IsTouchConsumed(swigCPtr);
231     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
232     return ret;
233   }
234
235   public void SetHoverConsumed(bool consume) {
236     NDalicPINVOKE.Layer_SetHoverConsumed(swigCPtr, consume);
237     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
238   }
239
240   public bool IsHoverConsumed() {
241     bool ret = NDalicPINVOKE.Layer_IsHoverConsumed(swigCPtr);
242     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
243     return ret;
244   }
245
246   public enum LayerBehavior {
247     LAYER_2D,
248     LAYER_UI = LAYER_2D,
249     LAYER_3D
250   }
251
252   public enum TreeDepthMultiplier {
253     TREE_DEPTH_MULTIPLIER = 10000
254   }
255
256   public bool ClippingEnable
257   {
258     get
259     {
260       bool temp = false;
261       GetProperty( Layer.Property.CLIPPING_ENABLE).Get( ref temp );
262       return temp;
263     }
264     set
265     {
266       SetProperty( Layer.Property.CLIPPING_ENABLE, new Dali.Property.Value( value ) );
267     }
268   }
269   public Rectangle ClippingBox
270   {
271     get
272     {
273       Rectangle temp = new Rectangle(0,0,0,0);
274       GetProperty( Layer.Property.CLIPPING_BOX).Get(  temp );
275       return temp;
276     }
277     set
278     {
279       SetProperty( Layer.Property.CLIPPING_BOX, new Dali.Property.Value( value ) );
280     }
281   }
282   public Layer.LayerBehavior Behavior 
283   { 
284     get 
285     {
286       return GetBehavior();
287     }
288     set 
289     { 
290       SetBehavior( value );
291     }
292   }
293
294 }
295
296 }