| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610 |
- // WARNING - AUTOGENERATED - DO NOT EDIT
- //
- // Generated using `sharpie urho`
- //
- // Animation.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>
- /// Skeletal animation resource.
- /// </summary>
- public unsafe partial class Animation : ResourceWithMetadata
- {
- unsafe partial void OnAnimationCreated ();
- [Preserve]
- public Animation (IntPtr handle) : base (handle)
- {
- OnAnimationCreated ();
- }
- [Preserve]
- protected Animation (UrhoObjectFlag emptyFlag) : base (emptyFlag)
- {
- OnAnimationCreated ();
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern int Animation_GetType (IntPtr handle);
- private StringHash UrhoGetType ()
- {
- Runtime.ValidateRefCounted (this);
- return new StringHash (Animation_GetType (handle));
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr Animation_GetTypeName (IntPtr handle);
- private string GetTypeName ()
- {
- Runtime.ValidateRefCounted (this);
- return Marshal.PtrToStringAnsi (Animation_GetTypeName (handle));
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern int Animation_GetTypeStatic ();
- private static StringHash GetTypeStatic ()
- {
- Runtime.Validate (typeof(Animation));
- return new StringHash (Animation_GetTypeStatic ());
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr Animation_GetTypeNameStatic ();
- private static string GetTypeNameStatic ()
- {
- Runtime.Validate (typeof(Animation));
- return Marshal.PtrToStringAnsi (Animation_GetTypeNameStatic ());
- }
- [Preserve]
- public Animation () : this (Application.CurrentContext)
- {
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr Animation_Animation (IntPtr context);
- [Preserve]
- public Animation (Context context) : base (UrhoObjectFlag.Empty)
- {
- Runtime.Validate (typeof(Animation));
- handle = Animation_Animation ((object)context == null ? IntPtr.Zero : context.Handle);
- Runtime.RegisterObject (this);
- OnAnimationCreated ();
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Animation_RegisterObject (IntPtr context);
- /// <summary>
- /// Register object factory.
- /// </summary>
- public static void RegisterObject (Context context)
- {
- Runtime.Validate (typeof(Animation));
- Animation_RegisterObject ((object)context == null ? IntPtr.Zero : context.Handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern bool Animation_BeginLoad_File (IntPtr handle, IntPtr source);
- /// <summary>
- /// Load resource from stream. May be called from a worker thread. Return true if successful.
- /// </summary>
- public override bool BeginLoad (File source)
- {
- Runtime.ValidateRefCounted (this);
- return Animation_BeginLoad_File (handle, (object)source == null ? IntPtr.Zero : source.Handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern bool Animation_BeginLoad_MemoryBuffer (IntPtr handle, IntPtr source);
- /// <summary>
- /// Load resource from stream. May be called from a worker thread. Return true if successful.
- /// </summary>
- public override bool BeginLoad (MemoryBuffer source)
- {
- Runtime.ValidateRefCounted (this);
- return Animation_BeginLoad_MemoryBuffer (handle, (object)source == null ? IntPtr.Zero : source.Handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern bool Animation_Save_File (IntPtr handle, IntPtr dest);
- /// <summary>
- /// Save resource. Return true if successful.
- /// </summary>
- public override bool Save (File dest)
- {
- Runtime.ValidateRefCounted (this);
- return Animation_Save_File (handle, (object)dest == null ? IntPtr.Zero : dest.Handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern bool Animation_Save_MemoryBuffer (IntPtr handle, IntPtr dest);
- /// <summary>
- /// Save resource. Return true if successful.
- /// </summary>
- public override bool Save (MemoryBuffer dest)
- {
- Runtime.ValidateRefCounted (this);
- return Animation_Save_MemoryBuffer (handle, (object)dest == null ? IntPtr.Zero : dest.Handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Animation_SetAnimationName (IntPtr handle, string name);
- /// <summary>
- /// Set animation name.
- /// </summary>
- private void SetAnimationName (string name)
- {
- Runtime.ValidateRefCounted (this);
- Animation_SetAnimationName (handle, name);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Animation_SetLength (IntPtr handle, float length);
- /// <summary>
- /// Set animation length.
- /// </summary>
- private void SetLength (float length)
- {
- Runtime.ValidateRefCounted (this);
- Animation_SetLength (handle, length);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern AnimationTrack* Animation_CreateTrack (IntPtr handle, string name);
- /// <summary>
- /// Create and return a track by name. If track by same name already exists, returns the existing.
- /// </summary>
- public AnimationTrack* CreateTrack (string name)
- {
- Runtime.ValidateRefCounted (this);
- return Animation_CreateTrack (handle, name);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern bool Animation_RemoveTrack (IntPtr handle, string name);
- /// <summary>
- /// Remove a track by name. Return true if was found and removed successfully. This is unsafe if the animation is currently used in playback.
- /// </summary>
- public bool RemoveTrack (string name)
- {
- Runtime.ValidateRefCounted (this);
- return Animation_RemoveTrack (handle, name);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Animation_RemoveAllTracks (IntPtr handle);
- /// <summary>
- /// Remove all tracks. This is unsafe if the animation is currently used in playback.
- /// </summary>
- public void RemoveAllTracks ()
- {
- Runtime.ValidateRefCounted (this);
- Animation_RemoveAllTracks (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Animation_AddTrigger_0 (IntPtr handle, float time, bool timeIsNormalized, ref Vector3 data);
- /// <summary>
- /// Add a trigger point.
- /// </summary>
- public void AddTrigger (float time, bool timeIsNormalized, Vector3 data)
- {
- Runtime.ValidateRefCounted (this);
- Animation_AddTrigger_0 (handle, time, timeIsNormalized, ref data);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Animation_AddTrigger_1 (IntPtr handle, float time, bool timeIsNormalized, ref IntRect data);
- /// <summary>
- /// Add a trigger point.
- /// </summary>
- public void AddTrigger (float time, bool timeIsNormalized, IntRect data)
- {
- Runtime.ValidateRefCounted (this);
- Animation_AddTrigger_1 (handle, time, timeIsNormalized, ref data);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Animation_AddTrigger_2 (IntPtr handle, float time, bool timeIsNormalized, ref Color data);
- /// <summary>
- /// Add a trigger point.
- /// </summary>
- public void AddTrigger (float time, bool timeIsNormalized, Color data)
- {
- Runtime.ValidateRefCounted (this);
- Animation_AddTrigger_2 (handle, time, timeIsNormalized, ref data);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Animation_AddTrigger_3 (IntPtr handle, float time, bool timeIsNormalized, ref Vector2 data);
- /// <summary>
- /// Add a trigger point.
- /// </summary>
- public void AddTrigger (float time, bool timeIsNormalized, Vector2 data)
- {
- Runtime.ValidateRefCounted (this);
- Animation_AddTrigger_3 (handle, time, timeIsNormalized, ref data);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Animation_AddTrigger_4 (IntPtr handle, float time, bool timeIsNormalized, ref Vector4 data);
- /// <summary>
- /// Add a trigger point.
- /// </summary>
- public void AddTrigger (float time, bool timeIsNormalized, Vector4 data)
- {
- Runtime.ValidateRefCounted (this);
- Animation_AddTrigger_4 (handle, time, timeIsNormalized, ref data);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Animation_AddTrigger_5 (IntPtr handle, float time, bool timeIsNormalized, ref IntVector2 data);
- /// <summary>
- /// Add a trigger point.
- /// </summary>
- public void AddTrigger (float time, bool timeIsNormalized, IntVector2 data)
- {
- Runtime.ValidateRefCounted (this);
- Animation_AddTrigger_5 (handle, time, timeIsNormalized, ref data);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Animation_AddTrigger_6 (IntPtr handle, float time, bool timeIsNormalized, ref Quaternion data);
- /// <summary>
- /// Add a trigger point.
- /// </summary>
- public void AddTrigger (float time, bool timeIsNormalized, Quaternion data)
- {
- Runtime.ValidateRefCounted (this);
- Animation_AddTrigger_6 (handle, time, timeIsNormalized, ref data);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Animation_AddTrigger_7 (IntPtr handle, float time, bool timeIsNormalized, ref Matrix4 data);
- /// <summary>
- /// Add a trigger point.
- /// </summary>
- public void AddTrigger (float time, bool timeIsNormalized, Matrix4 data)
- {
- Runtime.ValidateRefCounted (this);
- Animation_AddTrigger_7 (handle, time, timeIsNormalized, ref data);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Animation_AddTrigger_8 (IntPtr handle, float time, bool timeIsNormalized, ref Matrix3x4 data);
- /// <summary>
- /// Add a trigger point.
- /// </summary>
- public void AddTrigger (float time, bool timeIsNormalized, Matrix3x4 data)
- {
- Runtime.ValidateRefCounted (this);
- Animation_AddTrigger_8 (handle, time, timeIsNormalized, ref data);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Animation_AddTrigger_9 (IntPtr handle, float time, bool timeIsNormalized, int data);
- /// <summary>
- /// Add a trigger point.
- /// </summary>
- public void AddTrigger (float time, bool timeIsNormalized, int data)
- {
- Runtime.ValidateRefCounted (this);
- Animation_AddTrigger_9 (handle, time, timeIsNormalized, data);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Animation_AddTrigger_10 (IntPtr handle, float time, bool timeIsNormalized, float data);
- /// <summary>
- /// Add a trigger point.
- /// </summary>
- public void AddTrigger (float time, bool timeIsNormalized, float data)
- {
- Runtime.ValidateRefCounted (this);
- Animation_AddTrigger_10 (handle, time, timeIsNormalized, data);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Animation_AddTrigger_11 (IntPtr handle, float time, bool timeIsNormalized, string data);
- /// <summary>
- /// Add a trigger point.
- /// </summary>
- public void AddTrigger (float time, bool timeIsNormalized, string data)
- {
- Runtime.ValidateRefCounted (this);
- Animation_AddTrigger_11 (handle, time, timeIsNormalized, data);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Animation_AddTrigger_12 (IntPtr handle, float time, bool timeIsNormalized, bool data);
- /// <summary>
- /// Add a trigger point.
- /// </summary>
- public void AddTrigger (float time, bool timeIsNormalized, bool data)
- {
- Runtime.ValidateRefCounted (this);
- Animation_AddTrigger_12 (handle, time, timeIsNormalized, data);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Animation_RemoveTrigger (IntPtr handle, uint index);
- /// <summary>
- /// Remove a trigger point by index.
- /// </summary>
- public void RemoveTrigger (uint index)
- {
- Runtime.ValidateRefCounted (this);
- Animation_RemoveTrigger (handle, index);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Animation_RemoveAllTriggers (IntPtr handle);
- /// <summary>
- /// Remove all trigger points.
- /// </summary>
- public void RemoveAllTriggers ()
- {
- Runtime.ValidateRefCounted (this);
- Animation_RemoveAllTriggers (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Animation_SetNumTriggers (IntPtr handle, uint num);
- /// <summary>
- /// Resize trigger point vector.
- /// </summary>
- private void SetNumTriggers (uint num)
- {
- Runtime.ValidateRefCounted (this);
- Animation_SetNumTriggers (handle, num);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr Animation_Clone (IntPtr handle, string cloneName);
- /// <summary>
- /// Clone the animation.
- /// </summary>
- public Animation Clone (string cloneName = "")
- {
- Runtime.ValidateRefCounted (this);
- return Runtime.LookupRefCounted<Animation> (Animation_Clone (handle, cloneName));
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr Animation_GetAnimationName (IntPtr handle);
- /// <summary>
- /// Return animation name.
- /// </summary>
- private string GetAnimationName ()
- {
- Runtime.ValidateRefCounted (this);
- return Marshal.PtrToStringAnsi (Animation_GetAnimationName (handle));
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern int Animation_GetAnimationNameHash (IntPtr handle);
- /// <summary>
- /// Return animation name hash.
- /// </summary>
- private StringHash GetAnimationNameHash ()
- {
- Runtime.ValidateRefCounted (this);
- return new StringHash (Animation_GetAnimationNameHash (handle));
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern float Animation_GetLength (IntPtr handle);
- /// <summary>
- /// Return animation length.
- /// </summary>
- private float GetLength ()
- {
- Runtime.ValidateRefCounted (this);
- return Animation_GetLength (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern uint Animation_GetNumTracks (IntPtr handle);
- /// <summary>
- /// Return number of animation tracks.
- /// </summary>
- private uint GetNumTracks ()
- {
- Runtime.ValidateRefCounted (this);
- return Animation_GetNumTracks (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern AnimationTrack* Animation_GetTrack (IntPtr handle, uint index);
- /// <summary>
- /// Return animation track by index.
- /// </summary>
- public AnimationTrack* GetTrack (uint index)
- {
- Runtime.ValidateRefCounted (this);
- return Animation_GetTrack (handle, index);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern AnimationTrack* Animation_GetTrack0 (IntPtr handle, string name);
- /// <summary>
- /// Return animation track by name.
- /// </summary>
- public AnimationTrack* GetTrack (string name)
- {
- Runtime.ValidateRefCounted (this);
- return Animation_GetTrack0 (handle, name);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern AnimationTrack* Animation_GetTrack1 (IntPtr handle, int nameHash);
- /// <summary>
- /// Return animation track by name hash.
- /// </summary>
- public AnimationTrack* GetTrack (StringHash nameHash)
- {
- Runtime.ValidateRefCounted (this);
- return Animation_GetTrack1 (handle, nameHash.Code);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern uint Animation_GetNumTriggers (IntPtr handle);
- /// <summary>
- /// Return number of animation trigger points.
- /// </summary>
- private uint GetNumTriggers ()
- {
- Runtime.ValidateRefCounted (this);
- return Animation_GetNumTriggers (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern AnimationTriggerPoint* Animation_GetTrigger (IntPtr handle, uint index);
- /// <summary>
- /// Return a trigger point by index.
- /// </summary>
- public AnimationTriggerPoint* GetTrigger (uint index)
- {
- Runtime.ValidateRefCounted (this);
- return Animation_GetTrigger (handle, index);
- }
- 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 name.
- /// Or
- /// Set animation name.
- /// </summary>
- public string AnimationName {
- get {
- return GetAnimationName ();
- }
- set {
- SetAnimationName (value);
- }
- }
- /// <summary>
- /// Return animation length.
- /// Or
- /// Set animation length.
- /// </summary>
- public float Length {
- get {
- return GetLength ();
- }
- set {
- SetLength (value);
- }
- }
- /// <summary>
- /// Return number of animation trigger points.
- /// Or
- /// Resize trigger point vector.
- /// </summary>
- public uint NumTriggers {
- get {
- return GetNumTriggers ();
- }
- set {
- SetNumTriggers (value);
- }
- }
- /// <summary>
- /// Return animation name hash.
- /// </summary>
- public StringHash AnimationNameHash {
- get {
- return GetAnimationNameHash ();
- }
- }
- /// <summary>
- /// Return number of animation tracks.
- /// </summary>
- public uint NumTracks {
- get {
- return GetNumTracks ();
- }
- }
- }
- }
|