Merge "change Dispose pattern" into tizen
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / internal / ItemLayout.cs
1 //------------------------------------------------------------------------------
2 // <auto-generated />
3 //
4 // This file was automatically generated by SWIG (http://www.swig.org).
5 // Version 3.0.9
6 //
7 // Do not make changes to this file unless you know what you are doing--modify
8 // the SWIG interface file instead.
9 //------------------------------------------------------------------------------
10
11 using Tizen.NUI.BaseComponents;
12
13 namespace Tizen.NUI {
14
15     internal class ItemLayout : RefObject {
16   private global::System.Runtime.InteropServices.HandleRef swigCPtr;
17
18   internal ItemLayout(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.ItemLayout_SWIGUpcast(cPtr), cMemoryOwn) {
19     swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
20   }
21
22   internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ItemLayout obj) {
23     return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
24   }
25
26   public override void Dispose() {
27     if (!Stage.IsInstalled()) {
28       DisposeQueue.Instance.Add(this);
29       return;
30     }
31
32     lock(this) {
33       if (swigCPtr.Handle != global::System.IntPtr.Zero) {
34         if (swigCMemOwn) {
35           swigCMemOwn = false;
36           NDalicPINVOKE.delete_ItemLayout(swigCPtr);
37         }
38         swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
39       }
40       global::System.GC.SuppressFinalize(this);
41       base.Dispose();
42     }
43   }
44
45
46   public void SetOrientation(ControlOrientationType orientation) {
47     NDalicPINVOKE.ItemLayout_SetOrientation(swigCPtr, (int)orientation);
48     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
49   }
50
51   public ControlOrientationType GetOrientation() {
52     ControlOrientationType ret = (ControlOrientationType)NDalicPINVOKE.ItemLayout_GetOrientation(swigCPtr);
53     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
54     return ret;
55   }
56
57   public void SetLayoutProperties(PropertyMap properties) {
58     NDalicPINVOKE.ItemLayout_SetLayoutProperties(swigCPtr, PropertyMap.getCPtr(properties));
59     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
60   }
61
62   public PropertyMap GetLayoutProperties() {
63     PropertyMap ret = new PropertyMap(NDalicPINVOKE.ItemLayout_GetLayoutProperties(swigCPtr), true);
64     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
65     return ret;
66   }
67
68   public void GetItemSize(uint itemId, Vector3 layoutSize, Vector3 itemSize) {
69     NDalicPINVOKE.ItemLayout_GetItemSize(swigCPtr, itemId, Vector3.getCPtr(layoutSize), Vector3.getCPtr(itemSize));
70     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
71   }
72
73   public void SetItemSize(Vector3 itemSize) {
74     NDalicPINVOKE.ItemLayout_SetItemSize(swigCPtr, Vector3.getCPtr(itemSize));
75     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
76   }
77
78   public virtual float GetMinimumLayoutPosition(uint numberOfItems, Vector3 layoutSize) {
79     float ret = NDalicPINVOKE.ItemLayout_GetMinimumLayoutPosition(swigCPtr, numberOfItems, Vector3.getCPtr(layoutSize));
80     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
81     return ret;
82   }
83
84   public virtual float GetClosestAnchorPosition(float layoutPosition) {
85     float ret = NDalicPINVOKE.ItemLayout_GetClosestAnchorPosition(swigCPtr, layoutPosition);
86     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
87     return ret;
88   }
89
90   public virtual float GetItemScrollToPosition(uint itemId) {
91     float ret = NDalicPINVOKE.ItemLayout_GetItemScrollToPosition(swigCPtr, itemId);
92     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
93     return ret;
94   }
95
96   public virtual ItemRange GetItemsWithinArea(float firstItemPosition, Vector3 layoutSize) {
97     ItemRange ret = new ItemRange(NDalicPINVOKE.ItemLayout_GetItemsWithinArea(swigCPtr, firstItemPosition, Vector3.getCPtr(layoutSize)), true);
98     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
99     return ret;
100   }
101
102   public virtual float GetClosestOnScreenLayoutPosition(int itemID, float currentLayoutPosition, Vector3 layoutSize) {
103     float ret = NDalicPINVOKE.ItemLayout_GetClosestOnScreenLayoutPosition(swigCPtr, itemID, currentLayoutPosition, Vector3.getCPtr(layoutSize));
104     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
105     return ret;
106   }
107
108   public virtual uint GetReserveItemCount(Vector3 layoutSize) {
109     uint ret = NDalicPINVOKE.ItemLayout_GetReserveItemCount(swigCPtr, Vector3.getCPtr(layoutSize));
110     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
111     return ret;
112   }
113
114   public virtual void GetDefaultItemSize(uint itemId, Vector3 layoutSize, Vector3 itemSize) {
115     NDalicPINVOKE.ItemLayout_GetDefaultItemSize(swigCPtr, itemId, Vector3.getCPtr(layoutSize), Vector3.getCPtr(itemSize));
116     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
117   }
118
119   public virtual Degree GetScrollDirection() {
120     Degree ret = new Degree(NDalicPINVOKE.ItemLayout_GetScrollDirection(swigCPtr), true);
121     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
122     return ret;
123   }
124
125   public virtual float GetScrollSpeedFactor() {
126     float ret = NDalicPINVOKE.ItemLayout_GetScrollSpeedFactor(swigCPtr);
127     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
128     return ret;
129   }
130
131   public virtual float GetMaximumSwipeSpeed() {
132     float ret = NDalicPINVOKE.ItemLayout_GetMaximumSwipeSpeed(swigCPtr);
133     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
134     return ret;
135   }
136
137   public virtual float GetItemFlickAnimationDuration() {
138     float ret = NDalicPINVOKE.ItemLayout_GetItemFlickAnimationDuration(swigCPtr);
139     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
140     return ret;
141   }
142
143   public virtual int GetNextFocusItemID(int itemID, int maxItems, View.FocusDirection direction, bool loopEnabled) {
144     int ret = NDalicPINVOKE.ItemLayout_GetNextFocusItemID(swigCPtr, itemID, maxItems, (int)direction, loopEnabled);
145     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
146     return ret;
147   }
148
149   public virtual float GetFlickSpeedFactor() {
150     float ret = NDalicPINVOKE.ItemLayout_GetFlickSpeedFactor(swigCPtr);
151     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
152     return ret;
153   }
154
155   public virtual void ApplyConstraints(Actor actor, int itemId, Vector3 layoutSize, Actor itemViewActor) {
156     NDalicPINVOKE.ItemLayout_ApplyConstraints(swigCPtr, Actor.getCPtr(actor), itemId, Vector3.getCPtr(layoutSize), Actor.getCPtr(itemViewActor));
157     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
158   }
159
160   public virtual Vector3 GetItemPosition(int itemID, float currentLayoutPosition, Vector3 layoutSize) {
161     Vector3 ret = new Vector3(NDalicPINVOKE.ItemLayout_GetItemPosition(swigCPtr, itemID, currentLayoutPosition, Vector3.getCPtr(layoutSize)), true);
162     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
163     return ret;
164   }
165
166 }
167
168 }