d89e88e680e8b7235e2532d0b60268667b77c5c1
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / internal / Utility / ItemLayout.cs
1 /*
2  * Copyright(c) 2017 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17
18 using Tizen.NUI.BaseComponents;
19 using System.ComponentModel;
20
21 namespace Tizen.NUI
22 {
23     /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
24     [EditorBrowsable(EditorBrowsableState.Never)]
25     public class ItemLayout : RefObject
26     {
27
28         internal ItemLayout(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
29         {
30         }
31
32         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ItemLayout obj)
33         {
34             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.SwigCPtr;
35         }
36
37         /// This will be public opened.
38         [EditorBrowsable(EditorBrowsableState.Never)]
39         protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
40         {
41             Interop.ItemLayout.DeleteItemLayout(swigCPtr);
42         }
43
44         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
45         [EditorBrowsable(EditorBrowsableState.Never)]
46         public void SetLayoutProperties(PropertyMap properties)
47         {
48             Interop.ItemLayout.SetLayoutProperties(SwigCPtr, PropertyMap.getCPtr(properties));
49             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
50         }
51
52         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
53         [EditorBrowsable(EditorBrowsableState.Never)]
54         public PropertyMap GetLayoutProperties()
55         {
56             PropertyMap ret = new PropertyMap(Interop.ItemLayout.GetLayoutProperties(SwigCPtr), true);
57             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
58             return ret;
59         }
60
61         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
62         [EditorBrowsable(EditorBrowsableState.Never)]
63         public void GetItemSize(uint itemId, Vector3 layoutSize, Vector3 itemSize)
64         {
65             Interop.ItemLayout.GetItemSize(SwigCPtr, itemId, Vector3.getCPtr(layoutSize), Vector3.getCPtr(itemSize));
66             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
67         }
68
69         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
70         [EditorBrowsable(EditorBrowsableState.Never)]
71         public void SetItemSize(Vector3 itemSize)
72         {
73             Interop.ItemLayout.SetItemSize(SwigCPtr, Vector3.getCPtr(itemSize));
74             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
75         }
76
77         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
78         [EditorBrowsable(EditorBrowsableState.Never)]
79         public virtual float GetMinimumLayoutPosition(uint numberOfItems, Vector3 layoutSize)
80         {
81             float ret = Interop.ItemLayout.GetMinimumLayoutPosition(SwigCPtr, numberOfItems, Vector3.getCPtr(layoutSize));
82             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
83             return ret;
84         }
85
86         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
87         [EditorBrowsable(EditorBrowsableState.Never)]
88         public virtual float GetClosestAnchorPosition(float layoutPosition)
89         {
90             float ret = Interop.ItemLayout.GetClosestAnchorPosition(SwigCPtr, layoutPosition);
91             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
92             return ret;
93         }
94
95         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
96         [EditorBrowsable(EditorBrowsableState.Never)]
97         public virtual float GetItemScrollToPosition(uint itemId)
98         {
99             float ret = Interop.ItemLayout.GetItemScrollToPosition(SwigCPtr, itemId);
100             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
101             return ret;
102         }
103
104         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
105         [EditorBrowsable(EditorBrowsableState.Never)]
106         public virtual ItemRange GetItemsWithinArea(float firstItemPosition, Vector3 layoutSize)
107         {
108             ItemRange ret = new ItemRange(Interop.ItemLayout.GetItemsWithinArea(SwigCPtr, firstItemPosition, Vector3.getCPtr(layoutSize)), true);
109             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
110             return ret;
111         }
112
113         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
114         [EditorBrowsable(EditorBrowsableState.Never)]
115         public virtual float GetClosestOnScreenLayoutPosition(int itemID, float currentLayoutPosition, Vector3 layoutSize)
116         {
117             float ret = Interop.ItemLayout.GetClosestOnScreenLayoutPosition(SwigCPtr, itemID, currentLayoutPosition, Vector3.getCPtr(layoutSize));
118             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
119             return ret;
120         }
121
122         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
123         [EditorBrowsable(EditorBrowsableState.Never)]
124         public virtual uint GetReserveItemCount(Vector3 layoutSize)
125         {
126             uint ret = Interop.ItemLayout.GetReserveItemCount(SwigCPtr, Vector3.getCPtr(layoutSize));
127             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
128             return ret;
129         }
130
131         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
132         [EditorBrowsable(EditorBrowsableState.Never)]
133         public virtual void GetDefaultItemSize(uint itemId, Vector3 layoutSize, Vector3 itemSize)
134         {
135             Interop.ItemLayout.GetDefaultItemSize(SwigCPtr, itemId, Vector3.getCPtr(layoutSize), Vector3.getCPtr(itemSize));
136             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
137         }
138
139         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
140         [EditorBrowsable(EditorBrowsableState.Never)]
141         public virtual Degree GetScrollDirection()
142         {
143             Degree ret = new Degree(Interop.ItemLayout.GetScrollDirection(SwigCPtr), true);
144             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
145             return ret;
146         }
147
148         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
149         [EditorBrowsable(EditorBrowsableState.Never)]
150         public virtual float GetScrollSpeedFactor()
151         {
152             float ret = Interop.ItemLayout.GetScrollSpeedFactor(SwigCPtr);
153             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
154             return ret;
155         }
156
157         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
158         [EditorBrowsable(EditorBrowsableState.Never)]
159         public virtual float GetMaximumSwipeSpeed()
160         {
161             float ret = Interop.ItemLayout.GetMaximumSwipeSpeed(SwigCPtr);
162             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
163             return ret;
164         }
165
166         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
167         [EditorBrowsable(EditorBrowsableState.Never)]
168         public virtual float GetItemFlickAnimationDuration()
169         {
170             float ret = Interop.ItemLayout.GetItemFlickAnimationDuration(SwigCPtr);
171             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
172             return ret;
173         }
174
175         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
176         [EditorBrowsable(EditorBrowsableState.Never)]
177         public virtual int GetNextFocusItemID(int itemID, int maxItems, View.FocusDirection direction, bool loopEnabled)
178         {
179             int ret = Interop.ItemLayout.GetNextFocusItemID(SwigCPtr, itemID, maxItems, (int)direction, loopEnabled);
180             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
181             return ret;
182         }
183
184         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
185         [EditorBrowsable(EditorBrowsableState.Never)]
186         public virtual float GetFlickSpeedFactor()
187         {
188             float ret = Interop.ItemLayout.GetFlickSpeedFactor(SwigCPtr);
189             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
190             return ret;
191         }
192
193         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
194         [EditorBrowsable(EditorBrowsableState.Never)]
195         public virtual void ApplyConstraints(View view, int itemId, Vector3 layoutSize, View itemView)
196         {
197             Interop.ItemLayout.ApplyConstraints(SwigCPtr, View.getCPtr(view), itemId, Vector3.getCPtr(layoutSize), View.getCPtr(itemView));
198             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
199         }
200
201         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
202         [EditorBrowsable(EditorBrowsableState.Never)]
203         public virtual Vector3 GetItemPosition(int itemID, float currentLayoutPosition, Vector3 layoutSize)
204         {
205             Vector3 ret = new Vector3(Interop.ItemLayout.GetItemPosition(SwigCPtr, itemID, currentLayoutPosition, Vector3.getCPtr(layoutSize)), true);
206             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
207             return ret;
208         }
209     }
210 }