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 //------------------------------------------------------------------------------
30 using System.Runtime.InteropServices;
33 internal class ItemView : Scrollable {
34 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
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);
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;
45 DisposeQueue.Instance.Add(this);
48 public override void Dispose() {
49 if (!Stage.IsInstalled()) {
50 DisposeQueue.Instance.Add(this);
55 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
58 NDalicPINVOKE.delete_ItemView(swigCPtr);
60 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
62 global::System.GC.SuppressFinalize(this);
68 public Tizen.NUI.PropertyArray Layout
72 Tizen.NUI.PropertyArray temp = new Tizen.NUI.PropertyArray();
73 GetProperty( ItemView.Property.LAYOUT).Get( temp );
78 SetProperty( ItemView.Property.LAYOUT, new Tizen.NUI.PropertyValue( value ) );
82 public class Property : global::System.IDisposable {
83 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
84 protected bool swigCMemOwn;
86 internal Property(global::System.IntPtr cPtr, bool cMemoryOwn) {
87 swigCMemOwn = cMemoryOwn;
88 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
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;
99 public virtual void Dispose() {
101 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
104 NDalicPINVOKE.delete_ItemView_Property(swigCPtr);
106 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
108 global::System.GC.SuppressFinalize(this);
112 public static readonly int LAYOUT = NDalicManualPINVOKE.ItemView_Property_LAYOUT_get();
114 public Property() : this(NDalicPINVOKE.new_ItemView_Property(), true) {
115 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
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();
132 public ItemView (ItemFactory factory) : this (NDalicPINVOKE.ItemView_New(ItemFactory.getCPtr(factory)), true) {
133 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
136 public ItemView(ItemView itemView) : this(NDalicPINVOKE.new_ItemView__SWIG_1(ItemView.getCPtr(itemView)), true) {
137 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
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();
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();
152 public uint GetLayoutCount() {
153 uint ret = NDalicPINVOKE.ItemView_GetLayoutCount(swigCPtr);
154 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
158 public void AddLayout(ItemLayout layout) {
159 NDalicPINVOKE.ItemView_AddLayout(swigCPtr, ItemLayout.getCPtr(layout));
160 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
163 public void RemoveLayout(uint layoutIndex) {
164 NDalicPINVOKE.ItemView_RemoveLayout(swigCPtr, layoutIndex);
165 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
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();
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();
180 public float GetCurrentLayoutPosition(uint itemId) {
181 float ret = NDalicPINVOKE.ItemView_GetCurrentLayoutPosition(swigCPtr, itemId);
182 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
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();
191 public void DeactivateCurrentLayout() {
192 NDalicPINVOKE.ItemView_DeactivateCurrentLayout(swigCPtr);
193 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
196 public void SetMinimumSwipeSpeed(float speed) {
197 NDalicPINVOKE.ItemView_SetMinimumSwipeSpeed(swigCPtr, speed);
198 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
201 public float GetMinimumSwipeSpeed() {
202 float ret = NDalicPINVOKE.ItemView_GetMinimumSwipeSpeed(swigCPtr);
203 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
207 public void SetMinimumSwipeDistance(float distance) {
208 NDalicPINVOKE.ItemView_SetMinimumSwipeDistance(swigCPtr, distance);
209 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
212 public float GetMinimumSwipeDistance() {
213 float ret = NDalicPINVOKE.ItemView_GetMinimumSwipeDistance(swigCPtr);
214 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
218 public void SetWheelScrollDistanceStep(float step) {
219 NDalicPINVOKE.ItemView_SetWheelScrollDistanceStep(swigCPtr, step);
220 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
223 public float GetWheelScrollDistanceStep() {
224 float ret = NDalicPINVOKE.ItemView_GetWheelScrollDistanceStep(swigCPtr);
225 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
229 public void SetAnchoring(bool enabled) {
230 NDalicPINVOKE.ItemView_SetAnchoring(swigCPtr, enabled);
231 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
234 public bool GetAnchoring() {
235 bool ret = NDalicPINVOKE.ItemView_GetAnchoring(swigCPtr);
236 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
240 public void SetAnchoringDuration(float durationSeconds) {
241 NDalicPINVOKE.ItemView_SetAnchoringDuration(swigCPtr, durationSeconds);
242 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
245 public float GetAnchoringDuration() {
246 float ret = NDalicPINVOKE.ItemView_GetAnchoringDuration(swigCPtr);
247 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
251 public void ScrollToItem(uint itemId, float durationSeconds) {
252 NDalicPINVOKE.ItemView_ScrollToItem(swigCPtr, itemId, durationSeconds);
253 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
256 public void SetRefreshInterval(float intervalLayoutPositions) {
257 NDalicPINVOKE.ItemView_SetRefreshInterval(swigCPtr, intervalLayoutPositions);
258 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
261 public float GetRefreshInterval() {
262 float ret = NDalicPINVOKE.ItemView_GetRefreshInterval(swigCPtr);
263 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
267 public void Refresh() {
268 NDalicPINVOKE.ItemView_Refresh(swigCPtr);
269 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
272 public Actor GetItem(uint itemId) {
273 Actor ret = new Actor(NDalicPINVOKE.ItemView_GetItem(swigCPtr, itemId), true);
274 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
278 public uint GetItemId(Actor actor) {
279 uint ret = NDalicPINVOKE.ItemView_GetItemId(swigCPtr, Actor.getCPtr(actor));
280 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
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();
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();
294 public void RemoveItem(uint itemId, float durationSeconds) {
295 NDalicPINVOKE.ItemView_RemoveItem(swigCPtr, itemId, durationSeconds);
296 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
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();
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();
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();
314 public void SetItemsParentOrigin(Vector3 parentOrigin) {
315 NDalicPINVOKE.ItemView_SetItemsParentOrigin(swigCPtr, Vector3.getCPtr(parentOrigin));
316 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
319 public Vector3 GetItemsParentOrigin() {
320 Vector3 ret = new Vector3(NDalicPINVOKE.ItemView_GetItemsParentOrigin(swigCPtr), true);
321 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
325 public void SetItemsAnchorPoint(Vector3 anchorPoint) {
326 NDalicPINVOKE.ItemView_SetItemsAnchorPoint(swigCPtr, Vector3.getCPtr(anchorPoint));
327 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
330 public Vector3 GetItemsAnchorPoint() {
331 Vector3 ret = new Vector3(NDalicPINVOKE.ItemView_GetItemsAnchorPoint(swigCPtr), true);
332 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
336 public void GetItemsRange(ItemRange range) {
337 NDalicPINVOKE.ItemView_GetItemsRange(swigCPtr, ItemRange.getCPtr(range));
338 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
341 public VoidSignal LayoutActivatedSignal() {
342 VoidSignal ret = new VoidSignal(NDalicPINVOKE.ItemView_LayoutActivatedSignal(swigCPtr), false);
343 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
347 public enum PropertyRange {
348 PROPERTY_START_INDEX = PropertyRanges.PROPERTY_REGISTRATION_START_INDEX,
349 PROPERTY_END_INDEX = View.PropertyRange.PROPERTY_START_INDEX+1000,
350 ANIMATABLE_PROPERTY_START_INDEX = PropertyRanges.ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX,
351 ANIMATABLE_PROPERTY_END_INDEX = PropertyRanges.ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX+1000
354 public float MinimumSwipeSpeed
359 GetProperty( ItemView.Property.MINIMUM_SWIPE_SPEED).Get( ref temp );
364 SetProperty( ItemView.Property.MINIMUM_SWIPE_SPEED, new Tizen.NUI.PropertyValue( value ) );
367 public float MinimumSwipeDistance
372 GetProperty( ItemView.Property.MINIMUM_SWIPE_DISTANCE).Get( ref temp );
377 SetProperty( ItemView.Property.MINIMUM_SWIPE_DISTANCE, new Tizen.NUI.PropertyValue( value ) );
380 public float WheelScrollDistanceStep
385 GetProperty( ItemView.Property.WHEEL_SCROLL_DISTANCE_STEP).Get( ref temp );
390 SetProperty( ItemView.Property.WHEEL_SCROLL_DISTANCE_STEP, new Tizen.NUI.PropertyValue( value ) );
393 public bool SnapToItemEnabled
398 GetProperty( ItemView.Property.SNAP_TO_ITEM_ENABLED).Get( ref temp );
403 SetProperty( ItemView.Property.SNAP_TO_ITEM_ENABLED, new Tizen.NUI.PropertyValue( value ) );
406 public float RefreshInterval
411 GetProperty( ItemView.Property.REFRESH_INTERVAL).Get( ref temp );
416 SetProperty( ItemView.Property.REFRESH_INTERVAL, new Tizen.NUI.PropertyValue( value ) );
419 public float LayoutPosition
424 GetProperty( ItemView.Property.LAYOUT_POSITION).Get( ref temp );
429 SetProperty( ItemView.Property.LAYOUT_POSITION, new Tizen.NUI.PropertyValue( value ) );
432 public float ScrollSpeed
437 GetProperty( ItemView.Property.SCROLL_SPEED).Get( ref temp );
442 SetProperty( ItemView.Property.SCROLL_SPEED, new Tizen.NUI.PropertyValue( value ) );
445 public float Overshoot
450 GetProperty( ItemView.Property.OVERSHOOT).Get( ref temp );
455 SetProperty( ItemView.Property.OVERSHOOT, new Tizen.NUI.PropertyValue( value ) );
458 public Vector2 ScrollDirection
462 Vector2 temp = new Vector2(0.0f,0.0f);
463 GetProperty( ItemView.Property.SCROLL_DIRECTION).Get( temp );
468 SetProperty( ItemView.Property.SCROLL_DIRECTION, new Tizen.NUI.PropertyValue( value ) );
471 public int LayoutOrientation
476 GetProperty( ItemView.Property.LAYOUT_ORIENTATION).Get( ref temp );
481 SetProperty( ItemView.Property.LAYOUT_ORIENTATION, new Tizen.NUI.PropertyValue( value ) );
484 public float ScrollContentSize
489 GetProperty( ItemView.Property.SCROLL_CONTENT_SIZE).Get( ref temp );
494 SetProperty( ItemView.Property.SCROLL_CONTENT_SIZE, new Tizen.NUI.PropertyValue( value ) );