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 //------------------------------------------------------------------------------
27 using Tizen.NUI.BaseComponents;
33 using System.Runtime.InteropServices;
36 public class ItemView : Scrollable
38 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
40 internal ItemView(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.ItemView_SWIGUpcast(cPtr), cMemoryOwn)
42 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
45 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ItemView obj)
47 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
50 protected override void Dispose(DisposeTypes type)
57 if (type == DisposeTypes.Explicit)
60 //Release your own managed resources here.
61 //You should release all of your own disposable objects here.
65 //Release your own unmanaged resources here.
66 //You should not access any managed member here except static instance.
67 //because the execution order of Finalizes is non-deterministic.
69 //Unreference this from if a static instance refer to this.
70 ViewRegistry.UnregisterView(this);
72 if (swigCPtr.Handle != global::System.IntPtr.Zero)
77 NDalicPINVOKE.delete_ItemView(swigCPtr);
79 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
85 public Tizen.NUI.PropertyArray Layout
89 Tizen.NUI.PropertyArray temp = new Tizen.NUI.PropertyArray();
90 GetProperty(ItemView.Property.LAYOUT).Get(temp);
95 SetProperty(ItemView.Property.LAYOUT, new Tizen.NUI.PropertyValue(value));
99 public class Property : global::System.IDisposable
101 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
102 protected bool swigCMemOwn;
104 internal Property(global::System.IntPtr cPtr, bool cMemoryOwn)
106 swigCMemOwn = cMemoryOwn;
107 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
110 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Property obj)
112 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
115 //A Flag to check who called Dispose(). (By User or DisposeQueue)
116 private bool isDisposeQueued = false;
117 //A Flat to check if it is already disposed.
118 protected bool disposed = false;
123 if (!isDisposeQueued)
125 isDisposeQueued = true;
126 DisposeQueue.Instance.Add(this);
130 public void Dispose()
132 //Throw excpetion if Dispose() is called in separate thread.
133 if (!Window.IsInstalled())
135 throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
140 Dispose(DisposeTypes.Implicit);
144 Dispose(DisposeTypes.Explicit);
145 System.GC.SuppressFinalize(this);
149 protected virtual void Dispose(DisposeTypes type)
156 if (type == DisposeTypes.Explicit)
159 //Release your own managed resources here.
160 //You should release all of your own disposable objects here.
164 //Release your own unmanaged resources here.
165 //You should not access any managed member here except static instance.
166 //because the execution order of Finalizes is non-deterministic.
168 if (swigCPtr.Handle != global::System.IntPtr.Zero)
173 NDalicPINVOKE.delete_ItemView_Property(swigCPtr);
175 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
181 public static readonly int LAYOUT = NDalicManualPINVOKE.ItemView_Property_LAYOUT_get();
183 public Property() : this(NDalicPINVOKE.new_ItemView_Property(), true)
185 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
188 public static readonly int MINIMUM_SWIPE_SPEED = NDalicPINVOKE.ItemView_Property_MINIMUM_SWIPE_SPEED_get();
189 public static readonly int MINIMUM_SWIPE_DISTANCE = NDalicPINVOKE.ItemView_Property_MINIMUM_SWIPE_DISTANCE_get();
190 public static readonly int WHEEL_SCROLL_DISTANCE_STEP = NDalicPINVOKE.ItemView_Property_WHEEL_SCROLL_DISTANCE_STEP_get();
191 public static readonly int SNAP_TO_ITEM_ENABLED = NDalicPINVOKE.ItemView_Property_SNAP_TO_ITEM_ENABLED_get();
192 public static readonly int REFRESH_INTERVAL = NDalicPINVOKE.ItemView_Property_REFRESH_INTERVAL_get();
193 public static readonly int LAYOUT_POSITION = NDalicPINVOKE.ItemView_Property_LAYOUT_POSITION_get();
194 public static readonly int SCROLL_SPEED = NDalicPINVOKE.ItemView_Property_SCROLL_SPEED_get();
195 public static readonly int OVERSHOOT = NDalicPINVOKE.ItemView_Property_OVERSHOOT_get();
196 public static readonly int SCROLL_DIRECTION = NDalicPINVOKE.ItemView_Property_SCROLL_DIRECTION_get();
197 public static readonly int LAYOUT_ORIENTATION = NDalicPINVOKE.ItemView_Property_LAYOUT_ORIENTATION_get();
198 public static readonly int SCROLL_CONTENT_SIZE = NDalicPINVOKE.ItemView_Property_SCROLL_CONTENT_SIZE_get();
202 public ItemView(ItemFactory factory) : this(NDalicPINVOKE.ItemView_New(ItemFactory.getCPtr(factory)), true)
204 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
207 public ItemView(ItemView itemView) : this(NDalicPINVOKE.new_ItemView__SWIG_1(ItemView.getCPtr(itemView)), true)
209 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
212 public ItemView Assign(ItemView itemView)
214 ItemView ret = new ItemView(NDalicPINVOKE.ItemView_Assign(swigCPtr, ItemView.getCPtr(itemView)), false);
215 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
219 public new static ItemView DownCast(BaseHandle handle)
221 ItemView ret = new ItemView(NDalicPINVOKE.ItemView_DownCast(BaseHandle.getCPtr(handle)), true);
222 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
226 public uint GetLayoutCount()
228 uint ret = NDalicPINVOKE.ItemView_GetLayoutCount(swigCPtr);
229 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
233 public void AddLayout(ItemLayout layout)
235 NDalicPINVOKE.ItemView_AddLayout(swigCPtr, ItemLayout.getCPtr(layout));
236 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
239 public void RemoveLayout(uint layoutIndex)
241 NDalicPINVOKE.ItemView_RemoveLayout(swigCPtr, layoutIndex);
242 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
245 public SWIGTYPE_p_Dali__IntrusivePtrT_Dali__Toolkit__ItemLayout_t GetLayout(uint layoutIndex)
247 SWIGTYPE_p_Dali__IntrusivePtrT_Dali__Toolkit__ItemLayout_t ret = new SWIGTYPE_p_Dali__IntrusivePtrT_Dali__Toolkit__ItemLayout_t(NDalicPINVOKE.ItemView_GetLayout(swigCPtr, layoutIndex), true);
248 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
252 public SWIGTYPE_p_Dali__IntrusivePtrT_Dali__Toolkit__ItemLayout_t GetActiveLayout()
254 SWIGTYPE_p_Dali__IntrusivePtrT_Dali__Toolkit__ItemLayout_t ret = new SWIGTYPE_p_Dali__IntrusivePtrT_Dali__Toolkit__ItemLayout_t(NDalicPINVOKE.ItemView_GetActiveLayout(swigCPtr), true);
255 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
259 public float GetCurrentLayoutPosition(uint itemId)
261 float ret = NDalicPINVOKE.ItemView_GetCurrentLayoutPosition(swigCPtr, itemId);
262 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
266 public void ActivateLayout(uint layoutIndex, Vector3 targetSize, float durationSeconds)
268 NDalicPINVOKE.ItemView_ActivateLayout(swigCPtr, layoutIndex, Vector3.getCPtr(targetSize), durationSeconds);
269 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
272 public void DeactivateCurrentLayout()
274 NDalicPINVOKE.ItemView_DeactivateCurrentLayout(swigCPtr);
275 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
278 public void SetMinimumSwipeSpeed(float speed)
280 NDalicPINVOKE.ItemView_SetMinimumSwipeSpeed(swigCPtr, speed);
281 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
284 public float GetMinimumSwipeSpeed()
286 float ret = NDalicPINVOKE.ItemView_GetMinimumSwipeSpeed(swigCPtr);
287 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
291 public void SetMinimumSwipeDistance(float distance)
293 NDalicPINVOKE.ItemView_SetMinimumSwipeDistance(swigCPtr, distance);
294 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
297 public float GetMinimumSwipeDistance()
299 float ret = NDalicPINVOKE.ItemView_GetMinimumSwipeDistance(swigCPtr);
300 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
304 public void SetWheelScrollDistanceStep(float step)
306 NDalicPINVOKE.ItemView_SetWheelScrollDistanceStep(swigCPtr, step);
307 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
310 public float GetWheelScrollDistanceStep()
312 float ret = NDalicPINVOKE.ItemView_GetWheelScrollDistanceStep(swigCPtr);
313 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
317 public void SetAnchoring(bool enabled)
319 NDalicPINVOKE.ItemView_SetAnchoring(swigCPtr, enabled);
320 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
323 public bool GetAnchoring()
325 bool ret = NDalicPINVOKE.ItemView_GetAnchoring(swigCPtr);
326 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
330 public void SetAnchoringDuration(float durationSeconds)
332 NDalicPINVOKE.ItemView_SetAnchoringDuration(swigCPtr, durationSeconds);
333 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
336 public float GetAnchoringDuration()
338 float ret = NDalicPINVOKE.ItemView_GetAnchoringDuration(swigCPtr);
339 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
343 public void ScrollToItem(uint itemId, float durationSeconds)
345 NDalicPINVOKE.ItemView_ScrollToItem(swigCPtr, itemId, durationSeconds);
346 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
349 public void SetRefreshInterval(float intervalLayoutPositions)
351 NDalicPINVOKE.ItemView_SetRefreshInterval(swigCPtr, intervalLayoutPositions);
352 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
355 public float GetRefreshInterval()
357 float ret = NDalicPINVOKE.ItemView_GetRefreshInterval(swigCPtr);
358 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
362 public void Refresh()
364 NDalicPINVOKE.ItemView_Refresh(swigCPtr);
365 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
368 public View GetItem(uint itemId)
370 View ret = new View(NDalicPINVOKE.ItemView_GetItem(swigCPtr, itemId), true);
371 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
375 public uint GetItemId(View view)
377 uint ret = NDalicPINVOKE.ItemView_GetItemId(swigCPtr, View.getCPtr(view));
378 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
382 public void InsertItem(Item newItem, float durationSeconds)
384 NDalicPINVOKE.ItemView_InsertItem(swigCPtr, Item.getCPtr(newItem), durationSeconds);
385 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
388 public void InsertItems(ItemContainer newItems, float durationSeconds)
390 NDalicPINVOKE.ItemView_InsertItems(swigCPtr, ItemContainer.getCPtr(newItems), durationSeconds);
391 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
394 public void RemoveItem(uint itemId, float durationSeconds)
396 NDalicPINVOKE.ItemView_RemoveItem(swigCPtr, itemId, durationSeconds);
397 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
400 public void RemoveItems(ItemIdContainer itemIds, float durationSeconds)
402 NDalicPINVOKE.ItemView_RemoveItems(swigCPtr, ItemIdContainer.getCPtr(itemIds), durationSeconds);
403 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
406 public void ReplaceItem(Item replacementItem, float durationSeconds)
408 NDalicPINVOKE.ItemView_ReplaceItem(swigCPtr, Item.getCPtr(replacementItem), durationSeconds);
409 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
412 public void ReplaceItems(ItemContainer replacementItems, float durationSeconds)
414 NDalicPINVOKE.ItemView_ReplaceItems(swigCPtr, ItemContainer.getCPtr(replacementItems), durationSeconds);
415 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
418 public void SetItemsParentOrigin(Vector3 parentOrigin)
420 NDalicPINVOKE.ItemView_SetItemsParentOrigin(swigCPtr, Vector3.getCPtr(parentOrigin));
421 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
424 public Vector3 GetItemsParentOrigin()
426 Vector3 ret = new Vector3(NDalicPINVOKE.ItemView_GetItemsParentOrigin(swigCPtr), true);
427 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
431 public void SetItemsAnchorPoint(Vector3 anchorPoint)
433 NDalicPINVOKE.ItemView_SetItemsAnchorPoint(swigCPtr, Vector3.getCPtr(anchorPoint));
434 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
437 public Vector3 GetItemsAnchorPoint()
439 Vector3 ret = new Vector3(NDalicPINVOKE.ItemView_GetItemsAnchorPoint(swigCPtr), true);
440 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
444 public void GetItemsRange(ItemRange range)
446 NDalicPINVOKE.ItemView_GetItemsRange(swigCPtr, ItemRange.getCPtr(range));
447 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
450 public VoidSignal LayoutActivatedSignal()
452 VoidSignal ret = new VoidSignal(NDalicPINVOKE.ItemView_LayoutActivatedSignal(swigCPtr), false);
453 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
457 public enum PropertyRange
459 PROPERTY_START_INDEX = PropertyRanges.PROPERTY_REGISTRATION_START_INDEX,
460 PROPERTY_END_INDEX = View.PropertyRange.PROPERTY_START_INDEX + 1000,
461 ANIMATABLE_PROPERTY_START_INDEX = PropertyRanges.ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX,
462 ANIMATABLE_PROPERTY_END_INDEX = PropertyRanges.ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX + 1000
465 public float MinimumSwipeSpeed
470 GetProperty(ItemView.Property.MINIMUM_SWIPE_SPEED).Get(ref temp);
475 SetProperty(ItemView.Property.MINIMUM_SWIPE_SPEED, new Tizen.NUI.PropertyValue(value));
478 public float MinimumSwipeDistance
483 GetProperty(ItemView.Property.MINIMUM_SWIPE_DISTANCE).Get(ref temp);
488 SetProperty(ItemView.Property.MINIMUM_SWIPE_DISTANCE, new Tizen.NUI.PropertyValue(value));
491 public float WheelScrollDistanceStep
496 GetProperty(ItemView.Property.WHEEL_SCROLL_DISTANCE_STEP).Get(ref temp);
501 SetProperty(ItemView.Property.WHEEL_SCROLL_DISTANCE_STEP, new Tizen.NUI.PropertyValue(value));
504 public bool SnapToItemEnabled
509 GetProperty(ItemView.Property.SNAP_TO_ITEM_ENABLED).Get(ref temp);
514 SetProperty(ItemView.Property.SNAP_TO_ITEM_ENABLED, new Tizen.NUI.PropertyValue(value));
517 public float RefreshInterval
522 GetProperty(ItemView.Property.REFRESH_INTERVAL).Get(ref temp);
527 SetProperty(ItemView.Property.REFRESH_INTERVAL, new Tizen.NUI.PropertyValue(value));
530 public float LayoutPosition
535 GetProperty(ItemView.Property.LAYOUT_POSITION).Get(ref temp);
540 SetProperty(ItemView.Property.LAYOUT_POSITION, new Tizen.NUI.PropertyValue(value));
543 public float ScrollSpeed
548 GetProperty(ItemView.Property.SCROLL_SPEED).Get(ref temp);
553 SetProperty(ItemView.Property.SCROLL_SPEED, new Tizen.NUI.PropertyValue(value));
556 public float Overshoot
561 GetProperty(ItemView.Property.OVERSHOOT).Get(ref temp);
566 SetProperty(ItemView.Property.OVERSHOOT, new Tizen.NUI.PropertyValue(value));
569 public Vector2 ScrollDirection
573 Vector2 temp = new Vector2(0.0f, 0.0f);
574 GetProperty(ItemView.Property.SCROLL_DIRECTION).Get(temp);
579 SetProperty(ItemView.Property.SCROLL_DIRECTION, new Tizen.NUI.PropertyValue(value));
582 public int LayoutOrientation
587 GetProperty(ItemView.Property.LAYOUT_ORIENTATION).Get(ref temp);
592 SetProperty(ItemView.Property.LAYOUT_ORIENTATION, new Tizen.NUI.PropertyValue(value));
595 public float ScrollContentSize
600 GetProperty(ItemView.Property.SCROLL_CONTENT_SIZE).Get(ref temp);
605 SetProperty(ItemView.Property.SCROLL_CONTENT_SIZE, new Tizen.NUI.PropertyValue(value));