Fixed resource package install error
[platform/core/uifw/dali-toolkit.git] / plugins / dali-sharp / sharp / internal / ItemView.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 using System;
30 using System.Runtime.InteropServices;
31
32
33 internal class ItemView : Scrollable {
34   private global::System.Runtime.InteropServices.HandleRef swigCPtr;
35
36   internal ItemView(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.ItemView_SWIGUpcast(cPtr), cMemoryOwn) {
37     swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
38   }
39
40   internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ItemView obj) {
41     return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
42   }
43
44   ~ItemView() {
45     DisposeQueue.Instance.Add(this);
46   }
47
48   public override void Dispose() {
49     if (!Window.IsInstalled()) {
50       DisposeQueue.Instance.Add(this);
51       return;
52     }
53
54     lock(this) {
55       if (swigCPtr.Handle != global::System.IntPtr.Zero) {
56         if (swigCMemOwn) {
57           swigCMemOwn = false;
58           NDalicPINVOKE.delete_ItemView(swigCPtr);
59         }
60         swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
61       }
62       global::System.GC.SuppressFinalize(this);
63       base.Dispose();
64     }
65   }
66
67
68   public Dali.Property.Array Layout
69   {
70     get
71     {
72       Dali.Property.Array temp = new Dali.Property.Array();
73       GetProperty( ItemView.Property.LAYOUT).Get( temp );
74       return temp;
75     }
76     set
77     {
78       SetProperty( ItemView.Property.LAYOUT, new Dali.Property.Value( value ) );
79     }
80   }
81
82   public class Property : global::System.IDisposable {
83     private global::System.Runtime.InteropServices.HandleRef swigCPtr;
84     protected bool swigCMemOwn;
85   
86     internal Property(global::System.IntPtr cPtr, bool cMemoryOwn) {
87       swigCMemOwn = cMemoryOwn;
88       swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
89     }
90   
91     internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Property obj) {
92       return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
93     }
94   
95     ~Property() {
96       Dispose();
97     }
98   
99     public virtual void Dispose() {
100       lock(this) {
101         if (swigCPtr.Handle != global::System.IntPtr.Zero) {
102           if (swigCMemOwn) {
103             swigCMemOwn = false;
104             NDalicPINVOKE.delete_ItemView_Property(swigCPtr);
105           }
106           swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
107         }
108         global::System.GC.SuppressFinalize(this);
109       }
110     }
111   
112     public static readonly int LAYOUT = NDalicManualPINVOKE.ItemView_Property_LAYOUT_get();
113   
114     public Property() : this(NDalicPINVOKE.new_ItemView_Property(), true) {
115       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
116     }
117   
118     public static readonly int MINIMUM_SWIPE_SPEED = NDalicPINVOKE.ItemView_Property_MINIMUM_SWIPE_SPEED_get();
119     public static readonly int MINIMUM_SWIPE_DISTANCE = NDalicPINVOKE.ItemView_Property_MINIMUM_SWIPE_DISTANCE_get();
120     public static readonly int WHEEL_SCROLL_DISTANCE_STEP = NDalicPINVOKE.ItemView_Property_WHEEL_SCROLL_DISTANCE_STEP_get();
121     public static readonly int SNAP_TO_ITEM_ENABLED = NDalicPINVOKE.ItemView_Property_SNAP_TO_ITEM_ENABLED_get();
122     public static readonly int REFRESH_INTERVAL = NDalicPINVOKE.ItemView_Property_REFRESH_INTERVAL_get();
123     public static readonly int LAYOUT_POSITION = NDalicPINVOKE.ItemView_Property_LAYOUT_POSITION_get();
124     public static readonly int SCROLL_SPEED = NDalicPINVOKE.ItemView_Property_SCROLL_SPEED_get();
125     public static readonly int OVERSHOOT = NDalicPINVOKE.ItemView_Property_OVERSHOOT_get();
126     public static readonly int SCROLL_DIRECTION = NDalicPINVOKE.ItemView_Property_SCROLL_DIRECTION_get();
127     public static readonly int LAYOUT_ORIENTATION = NDalicPINVOKE.ItemView_Property_LAYOUT_ORIENTATION_get();
128     public static readonly int SCROLL_CONTENT_SIZE = NDalicPINVOKE.ItemView_Property_SCROLL_CONTENT_SIZE_get();
129   
130   }
131
132   public ItemView (ItemFactory factory) : this (NDalicPINVOKE.ItemView_New(ItemFactory.getCPtr(factory)), true) {
133       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
134
135   }
136   public ItemView(ItemView itemView) : this(NDalicPINVOKE.new_ItemView__SWIG_1(ItemView.getCPtr(itemView)), true) {
137     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
138   }
139
140   public ItemView Assign(ItemView itemView) {
141     ItemView ret = new ItemView(NDalicPINVOKE.ItemView_Assign(swigCPtr, ItemView.getCPtr(itemView)), false);
142     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
143     return ret;
144   }
145
146   public new static ItemView DownCast(BaseHandle handle) {
147     ItemView ret = new ItemView(NDalicPINVOKE.ItemView_DownCast(BaseHandle.getCPtr(handle)), true);
148     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
149     return ret;
150   }
151
152   public uint GetLayoutCount() {
153     uint ret = NDalicPINVOKE.ItemView_GetLayoutCount(swigCPtr);
154     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
155     return ret;
156   }
157
158   public void AddLayout(ItemLayout layout) {
159     NDalicPINVOKE.ItemView_AddLayout(swigCPtr, ItemLayout.getCPtr(layout));
160     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
161   }
162
163   public void RemoveLayout(uint layoutIndex) {
164     NDalicPINVOKE.ItemView_RemoveLayout(swigCPtr, layoutIndex);
165     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
166   }
167
168   public SWIGTYPE_p_Dali__IntrusivePtrT_Dali__Toolkit__ItemLayout_t GetLayout(uint layoutIndex) {
169     SWIGTYPE_p_Dali__IntrusivePtrT_Dali__Toolkit__ItemLayout_t ret = new SWIGTYPE_p_Dali__IntrusivePtrT_Dali__Toolkit__ItemLayout_t(NDalicPINVOKE.ItemView_GetLayout(swigCPtr, layoutIndex), true);
170     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
171     return ret;
172   }
173
174   public SWIGTYPE_p_Dali__IntrusivePtrT_Dali__Toolkit__ItemLayout_t GetActiveLayout() {
175     SWIGTYPE_p_Dali__IntrusivePtrT_Dali__Toolkit__ItemLayout_t ret = new SWIGTYPE_p_Dali__IntrusivePtrT_Dali__Toolkit__ItemLayout_t(NDalicPINVOKE.ItemView_GetActiveLayout(swigCPtr), true);
176     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
177     return ret;
178   }
179
180   public float GetCurrentLayoutPosition(uint itemId) {
181     float ret = NDalicPINVOKE.ItemView_GetCurrentLayoutPosition(swigCPtr, itemId);
182     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
183     return ret;
184   }
185
186   public void ActivateLayout(uint layoutIndex, Vector3 targetSize, float durationSeconds) {
187     NDalicPINVOKE.ItemView_ActivateLayout(swigCPtr, layoutIndex, Vector3.getCPtr(targetSize), durationSeconds);
188     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
189   }
190
191   public void DeactivateCurrentLayout() {
192     NDalicPINVOKE.ItemView_DeactivateCurrentLayout(swigCPtr);
193     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
194   }
195
196   public void SetMinimumSwipeSpeed(float speed) {
197     NDalicPINVOKE.ItemView_SetMinimumSwipeSpeed(swigCPtr, speed);
198     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
199   }
200
201   public float GetMinimumSwipeSpeed() {
202     float ret = NDalicPINVOKE.ItemView_GetMinimumSwipeSpeed(swigCPtr);
203     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
204     return ret;
205   }
206
207   public void SetMinimumSwipeDistance(float distance) {
208     NDalicPINVOKE.ItemView_SetMinimumSwipeDistance(swigCPtr, distance);
209     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
210   }
211
212   public float GetMinimumSwipeDistance() {
213     float ret = NDalicPINVOKE.ItemView_GetMinimumSwipeDistance(swigCPtr);
214     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
215     return ret;
216   }
217
218   public void SetWheelScrollDistanceStep(float step) {
219     NDalicPINVOKE.ItemView_SetWheelScrollDistanceStep(swigCPtr, step);
220     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
221   }
222
223   public float GetWheelScrollDistanceStep() {
224     float ret = NDalicPINVOKE.ItemView_GetWheelScrollDistanceStep(swigCPtr);
225     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
226     return ret;
227   }
228
229   public void SetAnchoring(bool enabled) {
230     NDalicPINVOKE.ItemView_SetAnchoring(swigCPtr, enabled);
231     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
232   }
233
234   public bool GetAnchoring() {
235     bool ret = NDalicPINVOKE.ItemView_GetAnchoring(swigCPtr);
236     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
237     return ret;
238   }
239
240   public void SetAnchoringDuration(float durationSeconds) {
241     NDalicPINVOKE.ItemView_SetAnchoringDuration(swigCPtr, durationSeconds);
242     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
243   }
244
245   public float GetAnchoringDuration() {
246     float ret = NDalicPINVOKE.ItemView_GetAnchoringDuration(swigCPtr);
247     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
248     return ret;
249   }
250
251   public void ScrollToItem(uint itemId, float durationSeconds) {
252     NDalicPINVOKE.ItemView_ScrollToItem(swigCPtr, itemId, durationSeconds);
253     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
254   }
255
256   public void SetRefreshInterval(float intervalLayoutPositions) {
257     NDalicPINVOKE.ItemView_SetRefreshInterval(swigCPtr, intervalLayoutPositions);
258     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
259   }
260
261   public float GetRefreshInterval() {
262     float ret = NDalicPINVOKE.ItemView_GetRefreshInterval(swigCPtr);
263     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
264     return ret;
265   }
266
267   public void Refresh() {
268     NDalicPINVOKE.ItemView_Refresh(swigCPtr);
269     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
270   }
271
272   public View GetItem(uint itemId) {
273     View ret = new View(NDalicPINVOKE.ItemView_GetItem(swigCPtr, itemId), true);
274     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
275     return ret;
276   }
277
278   public uint GetItemId(View view) {
279     uint ret = NDalicPINVOKE.ItemView_GetItemId(swigCPtr, View.getCPtr(view));
280     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
281     return ret;
282   }
283
284   public void InsertItem(Item newItem, float durationSeconds) {
285     NDalicPINVOKE.ItemView_InsertItem(swigCPtr, Item.getCPtr(newItem), durationSeconds);
286     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
287   }
288
289   public void InsertItems(ItemContainer newItems, float durationSeconds) {
290     NDalicPINVOKE.ItemView_InsertItems(swigCPtr, ItemContainer.getCPtr(newItems), durationSeconds);
291     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
292   }
293
294   public void RemoveItem(uint itemId, float durationSeconds) {
295     NDalicPINVOKE.ItemView_RemoveItem(swigCPtr, itemId, durationSeconds);
296     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
297   }
298
299   public void RemoveItems(ItemIdContainer itemIds, float durationSeconds) {
300     NDalicPINVOKE.ItemView_RemoveItems(swigCPtr, ItemIdContainer.getCPtr(itemIds), durationSeconds);
301     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
302   }
303
304   public void ReplaceItem(Item replacementItem, float durationSeconds) {
305     NDalicPINVOKE.ItemView_ReplaceItem(swigCPtr, Item.getCPtr(replacementItem), durationSeconds);
306     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
307   }
308
309   public void ReplaceItems(ItemContainer replacementItems, float durationSeconds) {
310     NDalicPINVOKE.ItemView_ReplaceItems(swigCPtr, ItemContainer.getCPtr(replacementItems), durationSeconds);
311     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
312   }
313
314   public void SetItemsParentOrigin(Vector3 parentOrigin) {
315     NDalicPINVOKE.ItemView_SetItemsParentOrigin(swigCPtr, Vector3.getCPtr(parentOrigin));
316     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
317   }
318
319   public Vector3 GetItemsParentOrigin() {
320     Vector3 ret = new Vector3(NDalicPINVOKE.ItemView_GetItemsParentOrigin(swigCPtr), true);
321     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
322     return ret;
323   }
324
325   public void SetItemsAnchorPoint(Vector3 anchorPoint) {
326     NDalicPINVOKE.ItemView_SetItemsAnchorPoint(swigCPtr, Vector3.getCPtr(anchorPoint));
327     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
328   }
329
330   public Vector3 GetItemsAnchorPoint() {
331     Vector3 ret = new Vector3(NDalicPINVOKE.ItemView_GetItemsAnchorPoint(swigCPtr), true);
332     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
333     return ret;
334   }
335
336   public void GetItemsRange(ItemRange range) {
337     NDalicPINVOKE.ItemView_GetItemsRange(swigCPtr, ItemRange.getCPtr(range));
338     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
339   }
340
341   public VoidSignal LayoutActivatedSignal() {
342     VoidSignal ret = new VoidSignal(NDalicPINVOKE.ItemView_LayoutActivatedSignal(swigCPtr), false);
343     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
344     return ret;
345   }
346
347   public float MinimumSwipeSpeed
348   {
349     get
350     {
351       float temp = 0.0f;
352       GetProperty( ItemView.Property.MINIMUM_SWIPE_SPEED).Get( out temp );
353       return temp;
354     }
355     set
356     {
357       SetProperty( ItemView.Property.MINIMUM_SWIPE_SPEED, new Dali.Property.Value( value ) );
358     }
359   }
360   public float MinimumSwipeDistance
361   {
362     get
363     {
364       float temp = 0.0f;
365       GetProperty( ItemView.Property.MINIMUM_SWIPE_DISTANCE).Get( out temp );
366       return temp;
367     }
368     set
369     {
370       SetProperty( ItemView.Property.MINIMUM_SWIPE_DISTANCE, new Dali.Property.Value( value ) );
371     }
372   }
373   public float WheelScrollDistanceStep
374   {
375     get
376     {
377       float temp = 0.0f;
378       GetProperty( ItemView.Property.WHEEL_SCROLL_DISTANCE_STEP).Get( out temp );
379       return temp;
380     }
381     set
382     {
383       SetProperty( ItemView.Property.WHEEL_SCROLL_DISTANCE_STEP, new Dali.Property.Value( value ) );
384     }
385   }
386   public bool SnapToItemEnabled
387   {
388     get
389     {
390       bool temp = false;
391       GetProperty( ItemView.Property.SNAP_TO_ITEM_ENABLED).Get( out temp );
392       return temp;
393     }
394     set
395     {
396       SetProperty( ItemView.Property.SNAP_TO_ITEM_ENABLED, new Dali.Property.Value( value ) );
397     }
398   }
399   public float RefreshInterval
400   {
401     get
402     {
403       float temp = 0.0f;
404       GetProperty( ItemView.Property.REFRESH_INTERVAL).Get( out temp );
405       return temp;
406     }
407     set
408     {
409       SetProperty( ItemView.Property.REFRESH_INTERVAL, new Dali.Property.Value( value ) );
410     }
411   }
412   public float LayoutPosition
413   {
414     get
415     {
416       float temp = 0.0f;
417       GetProperty( ItemView.Property.LAYOUT_POSITION).Get( out temp );
418       return temp;
419     }
420     set
421     {
422       SetProperty( ItemView.Property.LAYOUT_POSITION, new Dali.Property.Value( value ) );
423     }
424   }
425   public float ScrollSpeed
426   {
427     get
428     {
429       float temp = 0.0f;
430       GetProperty( ItemView.Property.SCROLL_SPEED).Get( out temp );
431       return temp;
432     }
433     set
434     {
435       SetProperty( ItemView.Property.SCROLL_SPEED, new Dali.Property.Value( value ) );
436     }
437   }
438   public float Overshoot
439   {
440     get
441     {
442       float temp = 0.0f;
443       GetProperty( ItemView.Property.OVERSHOOT).Get( out temp );
444       return temp;
445     }
446     set
447     {
448       SetProperty( ItemView.Property.OVERSHOOT, new Dali.Property.Value( value ) );
449     }
450   }
451   public Vector2 ScrollDirection
452   {
453     get
454     {
455       Vector2 temp = new Vector2(0.0f,0.0f);
456       GetProperty( ItemView.Property.SCROLL_DIRECTION).Get(  temp );
457       return temp;
458     }
459     set
460     {
461       SetProperty( ItemView.Property.SCROLL_DIRECTION, new Dali.Property.Value( value ) );
462     }
463   }
464   public int LayoutOrientation
465   {
466     get
467     {
468       int temp = 0;
469       GetProperty( ItemView.Property.LAYOUT_ORIENTATION).Get( out temp );
470       return temp;
471     }
472     set
473     {
474       SetProperty( ItemView.Property.LAYOUT_ORIENTATION, new Dali.Property.Value( value ) );
475     }
476   }
477   public float ScrollContentSize
478   {
479     get
480     {
481       float temp = 0.0f;
482       GetProperty( ItemView.Property.SCROLL_CONTENT_SIZE).Get( out temp );
483       return temp;
484     }
485     set
486     {
487       SetProperty( ItemView.Property.SCROLL_CONTENT_SIZE, new Dali.Property.Value( value ) );
488     }
489   }
490
491 }
492
493 }