1 //------------------------------------------------------------------------------
4 // This file was automatically generated by SWIG (http://www.swig.org).
7 // Do not make changes to this file unless you know what you are doing--modify
8 // the SWIG interface file instead.
9 //------------------------------------------------------------------------------
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.<br>
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.<br>
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.<br>
22 /// The mouse wheel event can be sent to the specific actor but the custom wheel event will be sent to the stage.<br>
24 public class Wheel : global::System.IDisposable
26 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
27 protected bool swigCMemOwn;
29 internal Wheel(global::System.IntPtr cPtr, bool cMemoryOwn)
31 swigCMemOwn = cMemoryOwn;
32 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
35 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Wheel obj)
37 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
42 DisposeQueue.Instance.Add(this);
45 public virtual void Dispose()
47 if (!Stage.IsInstalled())
49 DisposeQueue.Instance.Add(this);
55 if (swigCPtr.Handle != global::System.IntPtr.Zero)
60 NDalicPINVOKE.delete_Wheel(swigCPtr);
62 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
64 global::System.GC.SuppressFinalize(this);
69 internal static Wheel GetWheelFromPtr(global::System.IntPtr cPtr)
71 Wheel ret = new Wheel(cPtr, false);
72 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
77 /// The type of the wheel event
79 public Wheel.WheelType Type
88 /// he direction of wheel rolling (0 = default vertical wheel, 1 = horizontal wheel)
99 /// Modifier keys pressed during the event (such as shift, alt and control)
101 public uint Modifiers
110 /// The co-ordinates of the cursor relative to the top-left of the screen
121 /// The offset of rolling (positive value means roll down or clockwise, and negative value means roll up or counter-clockwise)
132 /// The time the wheel is being rolled
134 public uint TimeStamp
143 /// Default constructor.
145 public Wheel() : this(NDalicPINVOKE.new_Wheel__SWIG_0(), true)
147 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
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)
161 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
165 /// Checks to see if Shift key modifier has been supplied.
167 /// <returns>True if shift modifier</returns>
168 public bool IsShiftModifier()
170 bool ret = NDalicPINVOKE.Wheel_IsShiftModifier(swigCPtr);
171 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
176 /// Checks to see if Ctrl (control) key modifier has been supplied.
178 /// <returns>True if ctrl modifier</returns>
179 public bool IsCtrlModifier()
181 bool ret = NDalicPINVOKE.Wheel_IsCtrlModifier(swigCPtr);
182 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
187 /// Checks to see if Alt key modifier has been supplied.
189 /// <returns>True if alt modifier</returns>
190 public bool IsAltModifier()
192 bool ret = NDalicPINVOKE.Wheel_IsAltModifier(swigCPtr);
193 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
197 private Wheel.WheelType type
201 NDalicPINVOKE.Wheel_type_set(swigCPtr, (int)value);
202 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
206 Wheel.WheelType ret = (Wheel.WheelType)NDalicPINVOKE.Wheel_type_get(swigCPtr);
207 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
212 private int direction
216 NDalicPINVOKE.Wheel_direction_set(swigCPtr, value);
217 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
221 int ret = NDalicPINVOKE.Wheel_direction_get(swigCPtr);
222 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
227 private uint modifiers
231 NDalicPINVOKE.Wheel_modifiers_set(swigCPtr, value);
232 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
236 uint ret = NDalicPINVOKE.Wheel_modifiers_get(swigCPtr);
237 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
242 private Vector2 point
246 NDalicPINVOKE.Wheel_point_set(swigCPtr, Vector2.getCPtr(value));
247 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
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();
262 NDalicPINVOKE.Wheel_z_set(swigCPtr, value);
263 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
267 int ret = NDalicPINVOKE.Wheel_z_get(swigCPtr);
268 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
273 private uint timeStamp
277 NDalicPINVOKE.Wheel_timeStamp_set(swigCPtr, value);
278 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
282 uint ret = NDalicPINVOKE.Wheel_timeStamp_get(swigCPtr);
283 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
289 /// The type of the wheel event
291 public enum WheelType