nui 0.2.32 manual merge, mapping to dali 1.2.32
[platform/core/csapi/tizenfx.git] / NUISamples / Tizen.NUI / src / public / Wheel.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 namespace Tizen.NUI
12 {
13
14     /// <summary>
15     /// The wheel event structure is used to store a wheel rolling, it facilitates
16     /// processing of the wheel rolling and passing to other libraries like Toolkit.
17     /// 
18     /// There is a key modifier which relates to keys like alt, shift and control functions are
19     /// supplied to check if they have been pressed when the wheel is being rolled.
20     /// 
21     /// We support a mouse device and there may be another custom device that support the wheel event. The device type is specified as \e type.
22     /// The mouse wheel event can be sent to the specific actor but the custom wheel event will be sent to the stage.
23     /// </summary>
24     public class Wheel : global::System.IDisposable
25     {
26         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
27         protected bool swigCMemOwn;
28
29         internal Wheel(global::System.IntPtr cPtr, bool cMemoryOwn)
30         {
31             swigCMemOwn = cMemoryOwn;
32             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
33         }
34
35         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Wheel obj)
36         {
37             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
38         }
39
40         ~Wheel()
41         {
42             DisposeQueue.Instance.Add(this);
43         }
44
45         public virtual void Dispose()
46         {
47             if (!Stage.IsInstalled())
48             {
49                 DisposeQueue.Instance.Add(this);
50                 return;
51             }
52
53             lock (this)
54             {
55                 if (swigCPtr.Handle != global::System.IntPtr.Zero)
56                 {
57                     if (swigCMemOwn)
58                     {
59                         swigCMemOwn = false;
60                         NDalicPINVOKE.delete_Wheel(swigCPtr);
61                     }
62                     swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
63                 }
64                 global::System.GC.SuppressFinalize(this);
65             }
66         }
67
68
69         internal static Wheel GetWheelFromPtr(global::System.IntPtr cPtr)
70         {
71             Wheel ret = new Wheel(cPtr, false);
72             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
73             return ret;
74         }
75
76         /// <summary>
77         /// The type of the wheel event
78         /// </summary>
79         public Wheel.WheelType Type
80         {
81             get
82             {
83                 return type;
84             }
85         }
86
87         /// <summary>
88         /// he direction of wheel rolling (0 = default vertical wheel, 1 = horizontal wheel)
89         /// </summary>
90         public int Direction
91         {
92             get
93             {
94                 return direction;
95             }
96         }
97
98         /// <summary>
99         /// Modifier keys pressed during the event (such as shift, alt and control)
100         /// </summary>
101         public uint Modifiers
102         {
103             get
104             {
105                 return modifiers;
106             }
107         }
108
109         /// <summary>
110         /// The co-ordinates of the cursor relative to the top-left of the screen
111         /// </summary>
112         public Vector2 Point
113         {
114             get
115             {
116                 return point;
117             }
118         }
119
120         /// <summary>
121         /// The offset of rolling (positive value means roll down or clockwise, and negative value means roll up or counter-clockwise)
122         /// </summary>
123         public int Z
124         {
125             get
126             {
127                 return z;
128             }
129         }
130
131         /// <summary>
132         /// The time the wheel is being rolled
133         /// </summary>
134         public uint TimeStamp
135         {
136             get
137             {
138                 return timeStamp;
139             }
140         }
141
142         /// <summary>
143         /// Default constructor.
144         /// </summary>
145         public Wheel() : this(NDalicPINVOKE.new_Wheel__SWIG_0(), true)
146         {
147             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
148         }
149
150         /// <summary>
151         /// Constructor.
152         /// </summary>
153         /// <param name="type">The type of the wheel event</param>
154         /// <param name="direction">The direction of wheel rolling (0 = default vertical wheel, 1 = horizontal wheel)</param>
155         /// <param name="modifiers">Modifier keys pressed during the event (such as shift, alt and control)</param>
156         /// <param name="point">The co-ordinates of the cursor relative to the top-left of the screen</param>
157         /// <param name="z">The offset of rolling (positive value means roll down or clockwise, and negative value means roll up or counter-clockwise)</param>
158         /// <param name="timeStamp">The time the wheel is being rolled</param>
159         public Wheel(Wheel.WheelType type, int direction, uint modifiers, Vector2 point, int z, uint timeStamp) : this(NDalicPINVOKE.new_Wheel__SWIG_1((int)type, direction, modifiers, Vector2.getCPtr(point), z, timeStamp), true)
160         {
161             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
162         }
163
164         /// <summary>
165         /// Checks to see if Shift key modifier has been supplied.
166         /// </summary>
167         /// <returns>True if shift modifier</returns>
168         public bool IsShiftModifier()
169         {
170             bool ret = NDalicPINVOKE.Wheel_IsShiftModifier(swigCPtr);
171             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
172             return ret;
173         }
174
175         /// <summary>
176         /// Checks to see if Ctrl (control) key modifier has been supplied.
177         /// </summary>
178         /// <returns>True if ctrl modifier</returns>
179         public bool IsCtrlModifier()
180         {
181             bool ret = NDalicPINVOKE.Wheel_IsCtrlModifier(swigCPtr);
182             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
183             return ret;
184         }
185
186         /// <summary>
187         /// Checks to see if Alt key modifier has been supplied.
188         /// </summary>
189         /// <returns>True if alt modifier</returns>
190         public bool IsAltModifier()
191         {
192             bool ret = NDalicPINVOKE.Wheel_IsAltModifier(swigCPtr);
193             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
194             return ret;
195         }
196
197         private Wheel.WheelType type
198         {
199             set
200             {
201                 NDalicPINVOKE.Wheel_type_set(swigCPtr, (int)value);
202                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
203             }
204             get
205             {
206                 Wheel.WheelType ret = (Wheel.WheelType)NDalicPINVOKE.Wheel_type_get(swigCPtr);
207                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
208                 return ret;
209             }
210         }
211
212         private int direction
213         {
214             set
215             {
216                 NDalicPINVOKE.Wheel_direction_set(swigCPtr, value);
217                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
218             }
219             get
220             {
221                 int ret = NDalicPINVOKE.Wheel_direction_get(swigCPtr);
222                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
223                 return ret;
224             }
225         }
226
227         private uint modifiers
228         {
229             set
230             {
231                 NDalicPINVOKE.Wheel_modifiers_set(swigCPtr, value);
232                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
233             }
234             get
235             {
236                 uint ret = NDalicPINVOKE.Wheel_modifiers_get(swigCPtr);
237                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
238                 return ret;
239             }
240         }
241
242         private Vector2 point
243         {
244             set
245             {
246                 NDalicPINVOKE.Wheel_point_set(swigCPtr, Vector2.getCPtr(value));
247                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
248             }
249             get
250             {
251                 global::System.IntPtr cPtr = NDalicPINVOKE.Wheel_point_get(swigCPtr);
252                 Vector2 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector2(cPtr, false);
253                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
254                 return ret;
255             }
256         }
257
258         private int z
259         {
260             set
261             {
262                 NDalicPINVOKE.Wheel_z_set(swigCPtr, value);
263                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
264             }
265             get
266             {
267                 int ret = NDalicPINVOKE.Wheel_z_get(swigCPtr);
268                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
269                 return ret;
270             }
271         }
272
273         private uint timeStamp
274         {
275             set
276             {
277                 NDalicPINVOKE.Wheel_timeStamp_set(swigCPtr, value);
278                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
279             }
280             get
281             {
282                 uint ret = NDalicPINVOKE.Wheel_timeStamp_get(swigCPtr);
283                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
284                 return ret;
285             }
286         }
287
288         /// <summary>
289         /// The type of the wheel event
290         /// </summary>
291         public enum WheelType
292         {
293             MouseWheel,
294             CustomWheel
295         }
296
297     }
298
299 }