| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366 |
- // WARNING - AUTOGENERATED - DO NOT EDIT
- //
- // Generated using `sharpie urho`
- //
- // Animatable.cs
- //
- // Copyright 2015 Xamarin Inc. All rights reserved.
- using System;
- using System.Runtime.InteropServices;
- using System.Collections.Generic;
- using Urho.Urho2D;
- using Urho.Gui;
- using Urho.Resources;
- using Urho.IO;
- using Urho.Navigation;
- using Urho.Network;
- namespace Urho
- {
- /// <summary>
- /// Base class for animatable object, an animatable object can be set animation on it's attributes, or can be set an object animation to it.
- /// </summary>
- public unsafe partial class Animatable : Serializable
- {
- unsafe partial void OnAnimatableCreated ();
- [Preserve]
- public Animatable (IntPtr handle) : base (handle)
- {
- OnAnimatableCreated ();
- }
- [Preserve]
- protected Animatable (UrhoObjectFlag emptyFlag) : base (emptyFlag)
- {
- OnAnimatableCreated ();
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern int Animatable_GetType (IntPtr handle);
- private StringHash UrhoGetType ()
- {
- Runtime.ValidateRefCounted (this);
- return new StringHash (Animatable_GetType (handle));
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr Animatable_GetTypeName (IntPtr handle);
- private string GetTypeName ()
- {
- Runtime.ValidateRefCounted (this);
- return Marshal.PtrToStringAnsi (Animatable_GetTypeName (handle));
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern int Animatable_GetTypeStatic ();
- private static StringHash GetTypeStatic ()
- {
- Runtime.Validate (typeof(Animatable));
- return new StringHash (Animatable_GetTypeStatic ());
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr Animatable_GetTypeNameStatic ();
- private static string GetTypeNameStatic ()
- {
- Runtime.Validate (typeof(Animatable));
- return Marshal.PtrToStringAnsi (Animatable_GetTypeNameStatic ());
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Animatable_RegisterObject (IntPtr context);
- /// <summary>
- /// Register object factory.
- /// </summary>
- public static void RegisterObject (Context context)
- {
- Runtime.Validate (typeof(Animatable));
- Animatable_RegisterObject ((object)context == null ? IntPtr.Zero : context.Handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern bool Animatable_LoadXML (IntPtr handle, IntPtr source, bool setInstanceDefault);
- /// <summary>
- /// Load from XML data. When setInstanceDefault is set to true, after setting the attribute value, store the value as instance's default value. Return true if successful.
- /// </summary>
- public override bool LoadXml (XmlElement source, bool setInstanceDefault = false)
- {
- Runtime.ValidateRefCounted (this);
- return Animatable_LoadXML (handle, (object)source == null ? IntPtr.Zero : source.Handle, setInstanceDefault);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern bool Animatable_SaveXML (IntPtr handle, IntPtr dest);
- /// <summary>
- /// Save as XML data. Return true if successful.
- /// </summary>
- public override bool SaveXml (XmlElement dest)
- {
- Runtime.ValidateRefCounted (this);
- return Animatable_SaveXML (handle, (object)dest == null ? IntPtr.Zero : dest.Handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Animatable_SetAnimationEnabled (IntPtr handle, bool enable);
- /// <summary>
- /// Set automatic update of animation, default true.
- /// </summary>
- private void SetAnimationEnabled (bool enable)
- {
- Runtime.ValidateRefCounted (this);
- Animatable_SetAnimationEnabled (handle, enable);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Animatable_SetAnimationTime (IntPtr handle, float time);
- /// <summary>
- /// Set time position of all attribute animations or an object animation manually. Automatic update should be disabled in this case.
- /// </summary>
- public void SetAnimationTime (float time)
- {
- Runtime.ValidateRefCounted (this);
- Animatable_SetAnimationTime (handle, time);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Animatable_SetObjectAnimation (IntPtr handle, IntPtr objectAnimation);
- /// <summary>
- /// Set object animation.
- /// </summary>
- private void SetObjectAnimation (ObjectAnimation objectAnimation)
- {
- Runtime.ValidateRefCounted (this);
- Animatable_SetObjectAnimation (handle, (object)objectAnimation == null ? IntPtr.Zero : objectAnimation.Handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Animatable_SetAttributeAnimation (IntPtr handle, string name, IntPtr attributeAnimation, WrapMode wrapMode, float speed);
- /// <summary>
- /// Set attribute animation.
- /// </summary>
- public void SetAttributeAnimation (string name, ValueAnimation attributeAnimation, WrapMode wrapMode = WrapMode.Loop, float speed = 1f)
- {
- Runtime.ValidateRefCounted (this);
- Animatable_SetAttributeAnimation (handle, name, (object)attributeAnimation == null ? IntPtr.Zero : attributeAnimation.Handle, wrapMode, speed);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Animatable_SetAttributeAnimationWrapMode (IntPtr handle, string name, WrapMode wrapMode);
- /// <summary>
- /// Set attribute animation wrap mode.
- /// </summary>
- public void SetAttributeAnimationWrapMode (string name, WrapMode wrapMode)
- {
- Runtime.ValidateRefCounted (this);
- Animatable_SetAttributeAnimationWrapMode (handle, name, wrapMode);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Animatable_SetAttributeAnimationSpeed (IntPtr handle, string name, float speed);
- /// <summary>
- /// Set attribute animation speed.
- /// </summary>
- public void SetAttributeAnimationSpeed (string name, float speed)
- {
- Runtime.ValidateRefCounted (this);
- Animatable_SetAttributeAnimationSpeed (handle, name, speed);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Animatable_SetAttributeAnimationTime (IntPtr handle, string name, float time);
- /// <summary>
- /// Set attribute animation time position manually. Automatic update should be disabled in this case.
- /// </summary>
- public void SetAttributeAnimationTime (string name, float time)
- {
- Runtime.ValidateRefCounted (this);
- Animatable_SetAttributeAnimationTime (handle, name, time);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Animatable_RemoveObjectAnimation (IntPtr handle);
- /// <summary>
- /// Remove object animation. Same as calling SetObjectAnimation with a null pointer.
- /// </summary>
- public void RemoveObjectAnimation ()
- {
- Runtime.ValidateRefCounted (this);
- Animatable_RemoveObjectAnimation (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Animatable_RemoveAttributeAnimation (IntPtr handle, string name);
- /// <summary>
- /// Remove attribute animation. Same as calling SetAttributeAnimation with a null pointer.
- /// </summary>
- public void RemoveAttributeAnimation (string name)
- {
- Runtime.ValidateRefCounted (this);
- Animatable_RemoveAttributeAnimation (handle, name);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern bool Animatable_GetAnimationEnabled (IntPtr handle);
- /// <summary>
- /// Return animation enabled.
- /// </summary>
- private bool GetAnimationEnabled ()
- {
- Runtime.ValidateRefCounted (this);
- return Animatable_GetAnimationEnabled (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr Animatable_GetObjectAnimation (IntPtr handle);
- /// <summary>
- /// Return object animation.
- /// </summary>
- private ObjectAnimation GetObjectAnimation ()
- {
- Runtime.ValidateRefCounted (this);
- return Runtime.LookupObject<ObjectAnimation> (Animatable_GetObjectAnimation (handle));
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr Animatable_GetAttributeAnimation (IntPtr handle, string name);
- /// <summary>
- /// Return attribute animation.
- /// </summary>
- public ValueAnimation GetAttributeAnimation (string name)
- {
- Runtime.ValidateRefCounted (this);
- return Runtime.LookupObject<ValueAnimation> (Animatable_GetAttributeAnimation (handle, name));
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern WrapMode Animatable_GetAttributeAnimationWrapMode (IntPtr handle, string name);
- /// <summary>
- /// Return attribute animation wrap mode.
- /// </summary>
- public WrapMode GetAttributeAnimationWrapMode (string name)
- {
- Runtime.ValidateRefCounted (this);
- return Animatable_GetAttributeAnimationWrapMode (handle, name);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern float Animatable_GetAttributeAnimationSpeed (IntPtr handle, string name);
- /// <summary>
- /// Return attribute animation speed.
- /// </summary>
- public float GetAttributeAnimationSpeed (string name)
- {
- Runtime.ValidateRefCounted (this);
- return Animatable_GetAttributeAnimationSpeed (handle, name);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern float Animatable_GetAttributeAnimationTime (IntPtr handle, string name);
- /// <summary>
- /// Return attribute animation time position.
- /// </summary>
- public float GetAttributeAnimationTime (string name)
- {
- Runtime.ValidateRefCounted (this);
- return Animatable_GetAttributeAnimationTime (handle, name);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern ResourceRef Animatable_GetObjectAnimationAttr (IntPtr handle);
- /// <summary>
- /// Return object animation attribute.
- /// </summary>
- private ResourceRef GetObjectAnimationAttr ()
- {
- Runtime.ValidateRefCounted (this);
- return Animatable_GetObjectAnimationAttr (handle);
- }
- public override StringHash Type {
- get {
- return UrhoGetType ();
- }
- }
- public override string TypeName {
- get {
- return GetTypeName ();
- }
- }
- [Preserve]
- public new static StringHash TypeStatic {
- get {
- return GetTypeStatic ();
- }
- }
- public new static string TypeNameStatic {
- get {
- return GetTypeNameStatic ();
- }
- }
- /// <summary>
- /// Return animation enabled.
- /// Or
- /// Set automatic update of animation, default true.
- /// </summary>
- public bool AnimationEnabled {
- get {
- return GetAnimationEnabled ();
- }
- set {
- SetAnimationEnabled (value);
- }
- }
- /// <summary>
- /// Return object animation.
- /// Or
- /// Set object animation.
- /// </summary>
- public ObjectAnimation ObjectAnimation {
- get {
- return GetObjectAnimation ();
- }
- set {
- SetObjectAnimation (value);
- }
- }
- /// <summary>
- /// Return object animation attribute.
- /// </summary>
- public ResourceRef ObjectAnimationAttr {
- get {
- return GetObjectAnimationAttr ();
- }
- }
- }
- }
|