ValueAnimationInfo.cs 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232
  1. // WARNING - AUTOGENERATED - DO NOT EDIT
  2. //
  3. // Generated using `sharpie urho`
  4. //
  5. // ValueAnimationInfo.cs
  6. //
  7. // Copyright 2015 Xamarin Inc. All rights reserved.
  8. using System;
  9. using System.Runtime.InteropServices;
  10. using System.Collections.Generic;
  11. using Urho.Urho2D;
  12. using Urho.Gui;
  13. using Urho.Resources;
  14. using Urho.IO;
  15. using Urho.Navigation;
  16. using Urho.Network;
  17. namespace Urho
  18. {
  19. /// <summary>
  20. /// Base class for a value animation instance, which includes animation runtime information and updates the target object's value automatically.
  21. /// </summary>
  22. public unsafe partial class ValueAnimationInfo : RefCounted
  23. {
  24. unsafe partial void OnValueAnimationInfoCreated ();
  25. [Preserve]
  26. public ValueAnimationInfo (IntPtr handle) : base (handle)
  27. {
  28. OnValueAnimationInfoCreated ();
  29. }
  30. [Preserve]
  31. protected ValueAnimationInfo (UrhoObjectFlag emptyFlag) : base (emptyFlag)
  32. {
  33. OnValueAnimationInfoCreated ();
  34. }
  35. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  36. internal static extern IntPtr ValueAnimationInfo_ValueAnimationInfo (IntPtr animation, WrapMode wrapMode, float speed);
  37. [Preserve]
  38. public ValueAnimationInfo (ValueAnimation animation, WrapMode wrapMode, float speed) : base (UrhoObjectFlag.Empty)
  39. {
  40. Runtime.Validate (typeof(ValueAnimationInfo));
  41. handle = ValueAnimationInfo_ValueAnimationInfo ((object)animation == null ? IntPtr.Zero : animation.Handle, wrapMode, speed);
  42. Runtime.RegisterObject (this);
  43. OnValueAnimationInfoCreated ();
  44. }
  45. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  46. internal static extern IntPtr ValueAnimationInfo_ValueAnimationInfo0 (IntPtr target, IntPtr animation, WrapMode wrapMode, float speed);
  47. [Preserve]
  48. public ValueAnimationInfo (Urho.UrhoObject target, ValueAnimation animation, WrapMode wrapMode, float speed) : base (UrhoObjectFlag.Empty)
  49. {
  50. Runtime.Validate (typeof(ValueAnimationInfo));
  51. handle = ValueAnimationInfo_ValueAnimationInfo0 ((object)target == null ? IntPtr.Zero : target.Handle, (object)animation == null ? IntPtr.Zero : animation.Handle, wrapMode, speed);
  52. Runtime.RegisterObject (this);
  53. OnValueAnimationInfoCreated ();
  54. }
  55. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  56. internal static extern bool ValueAnimationInfo_Update (IntPtr handle, float timeStep);
  57. /// <summary>
  58. /// Advance time position and apply. Return true when the animation is finished. No-op when the target object is not defined.
  59. /// </summary>
  60. public bool Update (float timeStep)
  61. {
  62. Runtime.ValidateRefCounted (this);
  63. return ValueAnimationInfo_Update (handle, timeStep);
  64. }
  65. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  66. internal static extern bool ValueAnimationInfo_SetTime (IntPtr handle, float time);
  67. /// <summary>
  68. /// Set time position and apply. Return true when the animation is finished. No-op when the target object is not defined.
  69. /// </summary>
  70. public bool SetTime (float time)
  71. {
  72. Runtime.ValidateRefCounted (this);
  73. return ValueAnimationInfo_SetTime (handle, time);
  74. }
  75. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  76. internal static extern void ValueAnimationInfo_SetWrapMode (IntPtr handle, WrapMode wrapMode);
  77. /// <summary>
  78. /// Set wrap mode.
  79. /// </summary>
  80. private void SetWrapMode (WrapMode wrapMode)
  81. {
  82. Runtime.ValidateRefCounted (this);
  83. ValueAnimationInfo_SetWrapMode (handle, wrapMode);
  84. }
  85. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  86. internal static extern void ValueAnimationInfo_SetSpeed (IntPtr handle, float speed);
  87. /// <summary>
  88. /// Set speed.
  89. /// </summary>
  90. private void SetSpeed (float speed)
  91. {
  92. Runtime.ValidateRefCounted (this);
  93. ValueAnimationInfo_SetSpeed (handle, speed);
  94. }
  95. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  96. internal static extern IntPtr ValueAnimationInfo_GetTarget (IntPtr handle);
  97. /// <summary>
  98. /// Return target object.
  99. /// </summary>
  100. private Urho.UrhoObject GetTarget ()
  101. {
  102. Runtime.ValidateRefCounted (this);
  103. return Runtime.LookupRefCounted<Urho.UrhoObject> (ValueAnimationInfo_GetTarget (handle));
  104. }
  105. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  106. internal static extern IntPtr ValueAnimationInfo_GetAnimation (IntPtr handle);
  107. /// <summary>
  108. /// Return animation.
  109. /// </summary>
  110. private ValueAnimation GetAnimation ()
  111. {
  112. Runtime.ValidateRefCounted (this);
  113. return Runtime.LookupObject<ValueAnimation> (ValueAnimationInfo_GetAnimation (handle));
  114. }
  115. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  116. internal static extern WrapMode ValueAnimationInfo_GetWrapMode (IntPtr handle);
  117. /// <summary>
  118. /// Return wrap mode.
  119. /// </summary>
  120. private WrapMode GetWrapMode ()
  121. {
  122. Runtime.ValidateRefCounted (this);
  123. return ValueAnimationInfo_GetWrapMode (handle);
  124. }
  125. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  126. internal static extern float ValueAnimationInfo_GetTime (IntPtr handle);
  127. /// <summary>
  128. /// Return time position.
  129. /// </summary>
  130. private float GetTime ()
  131. {
  132. Runtime.ValidateRefCounted (this);
  133. return ValueAnimationInfo_GetTime (handle);
  134. }
  135. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  136. internal static extern float ValueAnimationInfo_GetSpeed (IntPtr handle);
  137. /// <summary>
  138. /// Return speed.
  139. /// </summary>
  140. private float GetSpeed ()
  141. {
  142. Runtime.ValidateRefCounted (this);
  143. return ValueAnimationInfo_GetSpeed (handle);
  144. }
  145. /// <summary>
  146. /// Return time position.
  147. /// Or
  148. /// Set time position and apply. Return true when the animation is finished. No-op when the target object is not defined.
  149. /// </summary>
  150. public float Time {
  151. get {
  152. return GetTime ();
  153. }
  154. set {
  155. SetTime (value);
  156. }
  157. }
  158. /// <summary>
  159. /// Return wrap mode.
  160. /// Or
  161. /// Set wrap mode.
  162. /// </summary>
  163. public WrapMode WrapMode {
  164. get {
  165. return GetWrapMode ();
  166. }
  167. set {
  168. SetWrapMode (value);
  169. }
  170. }
  171. /// <summary>
  172. /// Return speed.
  173. /// Or
  174. /// Set speed.
  175. /// </summary>
  176. public float Speed {
  177. get {
  178. return GetSpeed ();
  179. }
  180. set {
  181. SetSpeed (value);
  182. }
  183. }
  184. /// <summary>
  185. /// Return target object.
  186. /// </summary>
  187. public Urho.UrhoObject Target {
  188. get {
  189. return GetTarget ();
  190. }
  191. }
  192. /// <summary>
  193. /// Return animation.
  194. /// </summary>
  195. public ValueAnimation Animation {
  196. get {
  197. return GetAnimation ();
  198. }
  199. }
  200. }
  201. }