diff --git a/ChromaSDK/ChromaAnimationAPI.cs b/ChromaSDK/ChromaAnimationAPI.cs index c0b3a7f..0df2ec4 100644 --- a/ChromaSDK/ChromaAnimationAPI.cs +++ b/ChromaSDK/ChromaAnimationAPI.cs @@ -144,25 +144,25 @@ }; } - [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] - public struct APPINFOTYPE - { - [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] - public string Title; //TCHAR Title[256]; + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] + public struct APPINFOTYPE + { + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] + public string Title; //TCHAR Title[256]; - [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 1024)] - public string Description; //TCHAR Description[1024]; + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 1024)] + public string Description; //TCHAR Description[1024]; - [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] - public string Author_Name; //TCHAR Name[256]; + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] + public string Author_Name; //TCHAR Name[256]; - [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] - public string Author_Contact; //TCHAR Contact[256]; + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] + public string Author_Contact; //TCHAR Contact[256]; - public UInt32 SupportedDevice; //DWORD SupportedDevice; + public UInt32 SupportedDevice; //DWORD SupportedDevice; - public UInt32 Category; //DWORD Category; - } + public UInt32 Category; //DWORD Category; + } [StructLayout(LayoutKind.Sequential)] public struct FChromaSDKGuid @@ -237,7 +237,7 @@ const string DLL_NAME = "CChromaEditorLibrary"; #endif -#region Data Structures + #region Data Structures public enum DeviceType { @@ -279,58 +279,58 @@ MAX = 4, } - public class FChromaSDKDeviceFrameIndex - { - // Index corresponds to EChromaSDKDeviceEnum; - public int[] _mFrameIndex = new int[(int)Device.MAX]; + public class FChromaSDKDeviceFrameIndex + { + // Index corresponds to EChromaSDKDeviceEnum; + public int[] _mFrameIndex = new int[(int)Device.MAX]; - public FChromaSDKDeviceFrameIndex() - { - _mFrameIndex[(int)Device.ChromaLink] = 0; - _mFrameIndex[(int)Device.Headset] = 0; - _mFrameIndex[(int)Device.Keyboard] = 0; - _mFrameIndex[(int)Device.Keypad] = 0; - _mFrameIndex[(int)Device.Mouse] = 0; - _mFrameIndex[(int)Device.Mousepad] = 0; - _mFrameIndex[(int)Device.KeyboardExtended] = 0; - } - } + public FChromaSDKDeviceFrameIndex() + { + _mFrameIndex[(int)Device.ChromaLink] = 0; + _mFrameIndex[(int)Device.Headset] = 0; + _mFrameIndex[(int)Device.Keyboard] = 0; + _mFrameIndex[(int)Device.Keypad] = 0; + _mFrameIndex[(int)Device.Mouse] = 0; + _mFrameIndex[(int)Device.Mousepad] = 0; + _mFrameIndex[(int)Device.KeyboardExtended] = 0; + } + } - public enum EChromaSDKSceneBlend - { - SB_None, - SB_Invert, - SB_Threshold, - SB_Lerp, - }; + public enum EChromaSDKSceneBlend + { + SB_None, + SB_Invert, + SB_Threshold, + SB_Lerp, + }; - public enum EChromaSDKSceneMode - { - SM_Replace, - SM_Max, - SM_Min, - SM_Average, - SM_Multiply, - SM_Add, - SM_Subtract, - }; + public enum EChromaSDKSceneMode + { + SM_Replace, + SM_Max, + SM_Min, + SM_Average, + SM_Multiply, + SM_Add, + SM_Subtract, + }; - public class FChromaSDKSceneEffect - { - public string _mAnimation = ""; - public bool _mState = false; - public int _mPrimaryColor = 0; - public int _mSecondaryColor = 0; - public int _mSpeed = 1; - public EChromaSDKSceneBlend _mBlend = EChromaSDKSceneBlend.SB_None; - public EChromaSDKSceneMode _mMode = EChromaSDKSceneMode.SM_Replace; + public class FChromaSDKSceneEffect + { + public string _mAnimation = ""; + public bool _mState = false; + public int _mPrimaryColor = 0; + public int _mSecondaryColor = 0; + public int _mSpeed = 1; + public EChromaSDKSceneBlend _mBlend = EChromaSDKSceneBlend.SB_None; + public EChromaSDKSceneMode _mMode = EChromaSDKSceneMode.SM_Replace; - public FChromaSDKDeviceFrameIndex _mFrameIndex = new FChromaSDKDeviceFrameIndex(); - } + public FChromaSDKDeviceFrameIndex _mFrameIndex = new FChromaSDKDeviceFrameIndex(); + } - public class FChromaSDKScene - { - public List _mEffects = new List(); + public class FChromaSDKScene + { + public List _mEffects = new List(); public bool GetState(int effect) { if (effect >= 0 && effect < _mEffects.Count) @@ -349,9723 +349,9723 @@ _mEffects[effect]._mState = !_mEffects[effect]._mState; } } - } - - -#endregion - -#region Helpers (handle path conversions) - - /// - /// Helper to convert path string to IntPtr - /// - /// - /// - private static IntPtr GetPathIntPtr(string path) - { - if (string.IsNullOrEmpty(path)) - { - return IntPtr.Zero; } - FileInfo fi = new FileInfo(path); - byte[] array = ASCIIEncoding.ASCII.GetBytes(fi.FullName + "\0"); - IntPtr lpData = Marshal.AllocHGlobal(array.Length); - Marshal.Copy(array, 0, lpData, array.Length); - return lpData; - } - /// - /// Helper to Ascii path string to IntPtr - /// - /// - /// - private static IntPtr GetAsciiIntPtr(string str) - { - if (string.IsNullOrEmpty(str)) + + #endregion + + #region Helpers (handle path conversions) + + /// + /// Helper to convert path string to IntPtr + /// + /// + /// + private static IntPtr GetPathIntPtr(string path) { - return IntPtr.Zero; + if (string.IsNullOrEmpty(path)) + { + return IntPtr.Zero; + } + FileInfo fi = new FileInfo(path); + byte[] array = ASCIIEncoding.ASCII.GetBytes(fi.FullName + "\0"); + IntPtr lpData = Marshal.AllocHGlobal(array.Length); + Marshal.Copy(array, 0, lpData, array.Length); + return lpData; } - byte[] array = ASCIIEncoding.ASCII.GetBytes(str + "\0"); - IntPtr lpData = Marshal.AllocHGlobal(array.Length); - Marshal.Copy(array, 0, lpData, array.Length); - return lpData; - } - /// - /// Helper to Unicode path string to IntPtr - /// - /// - /// - private static IntPtr GetUnicodeIntPtr(string str) - { - if (string.IsNullOrEmpty(str)) + /// + /// Helper to Ascii path string to IntPtr + /// + /// + /// + private static IntPtr GetAsciiIntPtr(string str) { - return IntPtr.Zero; + if (string.IsNullOrEmpty(str)) + { + return IntPtr.Zero; + } + byte[] array = ASCIIEncoding.ASCII.GetBytes(str + "\0"); + IntPtr lpData = Marshal.AllocHGlobal(array.Length); + Marshal.Copy(array, 0, lpData, array.Length); + return lpData; } - byte[] array = UnicodeEncoding.Unicode.GetBytes(str + "\0"); - IntPtr lpData = Marshal.AllocHGlobal(array.Length); - Marshal.Copy(array, 0, lpData, array.Length); - return lpData; - } - /// - /// Helper to recycle the IntPtr - /// - /// - private static void FreeIntPtr(IntPtr lpData) - { - if (lpData != IntPtr.Zero) + /// + /// Helper to Unicode path string to IntPtr + /// + /// + /// + private static IntPtr GetUnicodeIntPtr(string str) { - Marshal.FreeHGlobal(lpData); + if (string.IsNullOrEmpty(str)) + { + return IntPtr.Zero; + } + byte[] array = UnicodeEncoding.Unicode.GetBytes(str + "\0"); + IntPtr lpData = Marshal.AllocHGlobal(array.Length); + Marshal.Copy(array, 0, lpData, array.Length); + return lpData; } + + /// + /// Helper to recycle the IntPtr + /// + /// + private static void FreeIntPtr(IntPtr lpData) + { + if (lpData != IntPtr.Zero) + { + Marshal.FreeHGlobal(lpData); + } + } + + public static int UninitAPI() + { + UnloadLibrarySDK(); + UnloadLibraryStreamingPlugin(); + + return 0; + } + + #endregion + + + #region Public API Methods + /// + /// Return the sum of colors + /// + public static int AddColor(int color1, int color2) + { + int result = PluginAddColor(color1, color2); + return result; + } + /// + /// Adds a frame to the `Chroma` animation and sets the `duration` (in seconds). + /// The `color` is expected to be an array of the dimensions for the `deviceType/device`. + /// The `length` parameter is the size of the `color` array. For `EChromaSDKDevice1DEnum` + /// the array size should be `MAX LEDS`. For `EChromaSDKDevice2DEnum` the array + /// size should be `MAX ROW` times `MAX COLUMN`. Returns the animation id upon + /// success. Returns negative one upon failure. + /// + public static int AddFrame(int animationId, float duration, int[] colors, int length) + { + int result = PluginAddFrame(animationId, duration, colors, length); + return result; + } + /// + /// Add source color to target where color is not black for frame id, reference + /// source and target by id. + /// + public static void AddNonZeroAllKeys(int sourceAnimationId, int targetAnimationId, int frameId) + { + PluginAddNonZeroAllKeys(sourceAnimationId, targetAnimationId, frameId); + } + /// + /// Add source color to target where color is not black for all frames, reference + /// source and target by id. + /// + public static void AddNonZeroAllKeysAllFrames(int sourceAnimationId, int targetAnimationId) + { + PluginAddNonZeroAllKeysAllFrames(sourceAnimationId, targetAnimationId); + } + /// + /// Add source color to target where color is not black for all frames, reference + /// source and target by name. + /// + public static void AddNonZeroAllKeysAllFramesName(string sourceAnimation, string targetAnimation) + { + string str_SourceAnimation = sourceAnimation; + IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); + string str_TargetAnimation = targetAnimation; + IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); + PluginAddNonZeroAllKeysAllFramesName(lp_SourceAnimation, lp_TargetAnimation); + FreeIntPtr(lp_SourceAnimation); + FreeIntPtr(lp_TargetAnimation); + } + /// + /// D suffix for limited data types. + /// + public static double AddNonZeroAllKeysAllFramesNameD(string sourceAnimation, string targetAnimation) + { + string str_SourceAnimation = sourceAnimation; + IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); + string str_TargetAnimation = targetAnimation; + IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); + double result = PluginAddNonZeroAllKeysAllFramesNameD(lp_SourceAnimation, lp_TargetAnimation); + FreeIntPtr(lp_SourceAnimation); + FreeIntPtr(lp_TargetAnimation); + return result; + } + /// + /// Add source color to target where color is not black for all frames starting + /// at offset for the length of the source, reference source and target by + /// id. + /// + public static void AddNonZeroAllKeysAllFramesOffset(int sourceAnimationId, int targetAnimationId, int offset) + { + PluginAddNonZeroAllKeysAllFramesOffset(sourceAnimationId, targetAnimationId, offset); + } + /// + /// Add source color to target where color is not black for all frames starting + /// at offset for the length of the source, reference source and target by + /// name. + /// + public static void AddNonZeroAllKeysAllFramesOffsetName(string sourceAnimation, string targetAnimation, int offset) + { + string str_SourceAnimation = sourceAnimation; + IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); + string str_TargetAnimation = targetAnimation; + IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); + PluginAddNonZeroAllKeysAllFramesOffsetName(lp_SourceAnimation, lp_TargetAnimation, offset); + FreeIntPtr(lp_SourceAnimation); + FreeIntPtr(lp_TargetAnimation); + } + /// + /// D suffix for limited data types. + /// + public static double AddNonZeroAllKeysAllFramesOffsetNameD(string sourceAnimation, string targetAnimation, double offset) + { + string str_SourceAnimation = sourceAnimation; + IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); + string str_TargetAnimation = targetAnimation; + IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); + double result = PluginAddNonZeroAllKeysAllFramesOffsetNameD(lp_SourceAnimation, lp_TargetAnimation, offset); + FreeIntPtr(lp_SourceAnimation); + FreeIntPtr(lp_TargetAnimation); + return result; + } + /// + /// Add source color to target where color is not black for frame id, reference + /// source and target by name. + /// + public static void AddNonZeroAllKeysName(string sourceAnimation, string targetAnimation, int frameId) + { + string str_SourceAnimation = sourceAnimation; + IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); + string str_TargetAnimation = targetAnimation; + IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); + PluginAddNonZeroAllKeysName(lp_SourceAnimation, lp_TargetAnimation, frameId); + FreeIntPtr(lp_SourceAnimation); + FreeIntPtr(lp_TargetAnimation); + } + /// + /// Add source color to target where color is not black for the source frame + /// and target offset frame, reference source and target by id. + /// + public static void AddNonZeroAllKeysOffset(int sourceAnimationId, int targetAnimationId, int frameId, int offset) + { + PluginAddNonZeroAllKeysOffset(sourceAnimationId, targetAnimationId, frameId, offset); + } + /// + /// Add source color to target where color is not black for the source frame + /// and target offset frame, reference source and target by name. + /// + public static void AddNonZeroAllKeysOffsetName(string sourceAnimation, string targetAnimation, int frameId, int offset) + { + string str_SourceAnimation = sourceAnimation; + IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); + string str_TargetAnimation = targetAnimation; + IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); + PluginAddNonZeroAllKeysOffsetName(lp_SourceAnimation, lp_TargetAnimation, frameId, offset); + FreeIntPtr(lp_SourceAnimation); + FreeIntPtr(lp_TargetAnimation); + } + /// + /// D suffix for limited data types. + /// + public static double AddNonZeroAllKeysOffsetNameD(string sourceAnimation, string targetAnimation, double frameId, double offset) + { + string str_SourceAnimation = sourceAnimation; + IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); + string str_TargetAnimation = targetAnimation; + IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); + double result = PluginAddNonZeroAllKeysOffsetNameD(lp_SourceAnimation, lp_TargetAnimation, frameId, offset); + FreeIntPtr(lp_SourceAnimation); + FreeIntPtr(lp_TargetAnimation); + return result; + } + /// + /// Add source color to target where the target color is not black for all frames, + /// reference source and target by id. + /// + public static void AddNonZeroTargetAllKeysAllFrames(int sourceAnimationId, int targetAnimationId) + { + PluginAddNonZeroTargetAllKeysAllFrames(sourceAnimationId, targetAnimationId); + } + /// + /// Add source color to target where the target color is not black for all frames, + /// reference source and target by name. + /// + public static void AddNonZeroTargetAllKeysAllFramesName(string sourceAnimation, string targetAnimation) + { + string str_SourceAnimation = sourceAnimation; + IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); + string str_TargetAnimation = targetAnimation; + IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); + PluginAddNonZeroTargetAllKeysAllFramesName(lp_SourceAnimation, lp_TargetAnimation); + FreeIntPtr(lp_SourceAnimation); + FreeIntPtr(lp_TargetAnimation); + } + /// + /// D suffix for limited data types. + /// + public static double AddNonZeroTargetAllKeysAllFramesNameD(string sourceAnimation, string targetAnimation) + { + string str_SourceAnimation = sourceAnimation; + IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); + string str_TargetAnimation = targetAnimation; + IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); + double result = PluginAddNonZeroTargetAllKeysAllFramesNameD(lp_SourceAnimation, lp_TargetAnimation); + FreeIntPtr(lp_SourceAnimation); + FreeIntPtr(lp_TargetAnimation); + return result; + } + /// + /// Add source color to target where the target color is not black for all frames + /// starting at offset for the length of the source, reference source and target + /// by id. + /// + public static void AddNonZeroTargetAllKeysAllFramesOffset(int sourceAnimationId, int targetAnimationId, int offset) + { + PluginAddNonZeroTargetAllKeysAllFramesOffset(sourceAnimationId, targetAnimationId, offset); + } + /// + /// Add source color to target where the target color is not black for all frames + /// starting at offset for the length of the source, reference source and target + /// by name. + /// + public static void AddNonZeroTargetAllKeysAllFramesOffsetName(string sourceAnimation, string targetAnimation, int offset) + { + string str_SourceAnimation = sourceAnimation; + IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); + string str_TargetAnimation = targetAnimation; + IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); + PluginAddNonZeroTargetAllKeysAllFramesOffsetName(lp_SourceAnimation, lp_TargetAnimation, offset); + FreeIntPtr(lp_SourceAnimation); + FreeIntPtr(lp_TargetAnimation); + } + /// + /// D suffix for limited data types. + /// + public static double AddNonZeroTargetAllKeysAllFramesOffsetNameD(string sourceAnimation, string targetAnimation, double offset) + { + string str_SourceAnimation = sourceAnimation; + IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); + string str_TargetAnimation = targetAnimation; + IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); + double result = PluginAddNonZeroTargetAllKeysAllFramesOffsetNameD(lp_SourceAnimation, lp_TargetAnimation, offset); + FreeIntPtr(lp_SourceAnimation); + FreeIntPtr(lp_TargetAnimation); + return result; + } + /// + /// Add source color to target where target color is not blank from the source + /// frame to the target offset frame, reference source and target by id. + /// + public static void AddNonZeroTargetAllKeysOffset(int sourceAnimationId, int targetAnimationId, int frameId, int offset) + { + PluginAddNonZeroTargetAllKeysOffset(sourceAnimationId, targetAnimationId, frameId, offset); + } + /// + /// Add source color to target where target color is not blank from the source + /// frame to the target offset frame, reference source and target by name. + /// + /// + public static void AddNonZeroTargetAllKeysOffsetName(string sourceAnimation, string targetAnimation, int frameId, int offset) + { + string str_SourceAnimation = sourceAnimation; + IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); + string str_TargetAnimation = targetAnimation; + IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); + PluginAddNonZeroTargetAllKeysOffsetName(lp_SourceAnimation, lp_TargetAnimation, frameId, offset); + FreeIntPtr(lp_SourceAnimation); + FreeIntPtr(lp_TargetAnimation); + } + /// + /// D suffix for limited data types. + /// + public static double AddNonZeroTargetAllKeysOffsetNameD(string sourceAnimation, string targetAnimation, double frameId, double offset) + { + string str_SourceAnimation = sourceAnimation; + IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); + string str_TargetAnimation = targetAnimation; + IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); + double result = PluginAddNonZeroTargetAllKeysOffsetNameD(lp_SourceAnimation, lp_TargetAnimation, frameId, offset); + FreeIntPtr(lp_SourceAnimation); + FreeIntPtr(lp_TargetAnimation); + return result; + } + /// + /// Append all source frames to the target animation, reference source and target + /// by id. + /// + public static void AppendAllFrames(int sourceAnimationId, int targetAnimationId) + { + PluginAppendAllFrames(sourceAnimationId, targetAnimationId); + } + /// + /// Append all source frames to the target animation, reference source and target + /// by name. + /// + public static void AppendAllFramesName(string sourceAnimation, string targetAnimation) + { + string str_SourceAnimation = sourceAnimation; + IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); + string str_TargetAnimation = targetAnimation; + IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); + PluginAppendAllFramesName(lp_SourceAnimation, lp_TargetAnimation); + FreeIntPtr(lp_SourceAnimation); + FreeIntPtr(lp_TargetAnimation); + } + /// + /// D suffix for limited data types. + /// + public static double AppendAllFramesNameD(string sourceAnimation, string targetAnimation) + { + string str_SourceAnimation = sourceAnimation; + IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); + string str_TargetAnimation = targetAnimation; + IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); + double result = PluginAppendAllFramesNameD(lp_SourceAnimation, lp_TargetAnimation); + FreeIntPtr(lp_SourceAnimation); + FreeIntPtr(lp_TargetAnimation); + return result; + } + /// + /// `PluginClearAll` will issue a `CLEAR` effect for all devices. + /// + public static void ClearAll() + { + PluginClearAll(); + } + /// + /// `PluginClearAnimationType` will issue a `CLEAR` effect for the given device. + /// + /// + public static void ClearAnimationType(int deviceType, int device) + { + PluginClearAnimationType(deviceType, device); + } + /// + /// `PluginCloseAll` closes all open animations so they can be reloaded from + /// disk. The set of animations will be stopped if playing. + /// + public static void CloseAll() + { + PluginCloseAll(); + } + /// + /// Closes the `Chroma` animation to free up resources referenced by id. Returns + /// the animation id upon success. Returns negative one upon failure. This + /// might be used while authoring effects if there was a change necessitating + /// re-opening the animation. The animation id can no longer be used once closed. + /// + /// + public static int CloseAnimation(int animationId) + { + int result = PluginCloseAnimation(animationId); + return result; + } + /// + /// D suffix for limited data types. + /// + public static double CloseAnimationD(double animationId) + { + double result = PluginCloseAnimationD(animationId); + return result; + } + /// + /// Closes the `Chroma` animation referenced by name so that the animation can + /// be reloaded from disk. + /// + public static void CloseAnimationName(string path) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginCloseAnimationName(lp_Path); + FreeIntPtr(lp_Path); + } + /// + /// D suffix for limited data types. + /// + public static double CloseAnimationNameD(string path) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + double result = PluginCloseAnimationNameD(lp_Path); + FreeIntPtr(lp_Path); + return result; + } + /// + /// `PluginCloseComposite` closes a set of animations so they can be reloaded + /// from disk. The set of animations will be stopped if playing. + /// + public static void CloseComposite(string name) + { + string str_Name = name; + IntPtr lp_Name = GetPathIntPtr(str_Name); + PluginCloseComposite(lp_Name); + FreeIntPtr(lp_Name); + } + /// + /// D suffix for limited data types. + /// + public static double CloseCompositeD(string name) + { + string str_Name = name; + IntPtr lp_Name = GetPathIntPtr(str_Name); + double result = PluginCloseCompositeD(lp_Name); + FreeIntPtr(lp_Name); + return result; + } + /// + /// Copy source animation to target animation for the given frame. Source and + /// target are referenced by id. + /// + public static void CopyAllKeys(int sourceAnimationId, int targetAnimationId, int frameId) + { + PluginCopyAllKeys(sourceAnimationId, targetAnimationId, frameId); + } + /// + /// Copy source animation to target animation for the given frame. Source and + /// target are referenced by id. + /// + public static void CopyAllKeysName(string sourceAnimation, string targetAnimation, int frameId) + { + string str_SourceAnimation = sourceAnimation; + IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); + string str_TargetAnimation = targetAnimation; + IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); + PluginCopyAllKeysName(lp_SourceAnimation, lp_TargetAnimation, frameId); + FreeIntPtr(lp_SourceAnimation); + FreeIntPtr(lp_TargetAnimation); + } + /// + /// Copy animation to named target animation in memory. If target animation + /// exists, close first. Source is referenced by id. + /// + public static int CopyAnimation(int sourceAnimationId, string targetAnimation) + { + string str_TargetAnimation = targetAnimation; + IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); + int result = PluginCopyAnimation(sourceAnimationId, lp_TargetAnimation); + FreeIntPtr(lp_TargetAnimation); + return result; + } + /// + /// Copy animation to named target animation in memory. If target animation + /// exists, close first. Source is referenced by name. + /// + public static void CopyAnimationName(string sourceAnimation, string targetAnimation) + { + string str_SourceAnimation = sourceAnimation; + IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); + string str_TargetAnimation = targetAnimation; + IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); + PluginCopyAnimationName(lp_SourceAnimation, lp_TargetAnimation); + FreeIntPtr(lp_SourceAnimation); + FreeIntPtr(lp_TargetAnimation); + } + /// + /// D suffix for limited data types. + /// + public static double CopyAnimationNameD(string sourceAnimation, string targetAnimation) + { + string str_SourceAnimation = sourceAnimation; + IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); + string str_TargetAnimation = targetAnimation; + IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); + double result = PluginCopyAnimationNameD(lp_SourceAnimation, lp_TargetAnimation); + FreeIntPtr(lp_SourceAnimation); + FreeIntPtr(lp_TargetAnimation); + return result; + } + /// + /// Copy blue channel to other channels for all frames. Intensity range is 0.0 + /// to 1.0. Reference the animation by id. + /// + public static void CopyBlueChannelAllFrames(int animationId, float redIntensity, float greenIntensity) + { + PluginCopyBlueChannelAllFrames(animationId, redIntensity, greenIntensity); + } + /// + /// Copy blue channel to other channels for all frames. Intensity range is 0.0 + /// to 1.0. Reference the animation by name. + /// + public static void CopyBlueChannelAllFramesName(string path, float redIntensity, float greenIntensity) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginCopyBlueChannelAllFramesName(lp_Path, redIntensity, greenIntensity); + FreeIntPtr(lp_Path); + } + /// + /// D suffix for limited data types. + /// + public static double CopyBlueChannelAllFramesNameD(string path, double redIntensity, double greenIntensity) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + double result = PluginCopyBlueChannelAllFramesNameD(lp_Path, redIntensity, greenIntensity); + FreeIntPtr(lp_Path); + return result; + } + /// + /// Copy green channel to other channels for all frames. Intensity range is + /// 0.0 to 1.0. Reference the animation by id. + /// + public static void CopyGreenChannelAllFrames(int animationId, float redIntensity, float blueIntensity) + { + PluginCopyGreenChannelAllFrames(animationId, redIntensity, blueIntensity); + } + /// + /// Copy green channel to other channels for all frames. Intensity range is + /// 0.0 to 1.0. Reference the animation by name. + /// + public static void CopyGreenChannelAllFramesName(string path, float redIntensity, float blueIntensity) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginCopyGreenChannelAllFramesName(lp_Path, redIntensity, blueIntensity); + FreeIntPtr(lp_Path); + } + /// + /// D suffix for limited data types. + /// + public static double CopyGreenChannelAllFramesNameD(string path, double redIntensity, double blueIntensity) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + double result = PluginCopyGreenChannelAllFramesNameD(lp_Path, redIntensity, blueIntensity); + FreeIntPtr(lp_Path); + return result; + } + /// + /// Copy animation key color from the source animation to the target animation + /// for the given frame. Reference the source and target by id. + /// + public static void CopyKeyColor(int sourceAnimationId, int targetAnimationId, int frameId, int rzkey) + { + PluginCopyKeyColor(sourceAnimationId, targetAnimationId, frameId, rzkey); + } + /// + /// Copy animation key color from the source animation to the target animation + /// for all frames. Reference the source and target by id. + /// + public static void CopyKeyColorAllFrames(int sourceAnimationId, int targetAnimationId, int rzkey) + { + PluginCopyKeyColorAllFrames(sourceAnimationId, targetAnimationId, rzkey); + } + /// + /// Copy animation key color from the source animation to the target animation + /// for all frames. Reference the source and target by name. + /// + public static void CopyKeyColorAllFramesName(string sourceAnimation, string targetAnimation, int rzkey) + { + string str_SourceAnimation = sourceAnimation; + IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); + string str_TargetAnimation = targetAnimation; + IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); + PluginCopyKeyColorAllFramesName(lp_SourceAnimation, lp_TargetAnimation, rzkey); + FreeIntPtr(lp_SourceAnimation); + FreeIntPtr(lp_TargetAnimation); + } + /// + /// D suffix for limited data types. + /// + public static double CopyKeyColorAllFramesNameD(string sourceAnimation, string targetAnimation, double rzkey) + { + string str_SourceAnimation = sourceAnimation; + IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); + string str_TargetAnimation = targetAnimation; + IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); + double result = PluginCopyKeyColorAllFramesNameD(lp_SourceAnimation, lp_TargetAnimation, rzkey); + FreeIntPtr(lp_SourceAnimation); + FreeIntPtr(lp_TargetAnimation); + return result; + } + /// + /// Copy animation key color from the source animation to the target animation + /// for all frames, starting at the offset for the length of the source animation. + /// Source and target are referenced by id. + /// + public static void CopyKeyColorAllFramesOffset(int sourceAnimationId, int targetAnimationId, int rzkey, int offset) + { + PluginCopyKeyColorAllFramesOffset(sourceAnimationId, targetAnimationId, rzkey, offset); + } + /// + /// Copy animation key color from the source animation to the target animation + /// for all frames, starting at the offset for the length of the source animation. + /// Source and target are referenced by name. + /// + public static void CopyKeyColorAllFramesOffsetName(string sourceAnimation, string targetAnimation, int rzkey, int offset) + { + string str_SourceAnimation = sourceAnimation; + IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); + string str_TargetAnimation = targetAnimation; + IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); + PluginCopyKeyColorAllFramesOffsetName(lp_SourceAnimation, lp_TargetAnimation, rzkey, offset); + FreeIntPtr(lp_SourceAnimation); + FreeIntPtr(lp_TargetAnimation); + } + /// + /// D suffix for limited data types. + /// + public static double CopyKeyColorAllFramesOffsetNameD(string sourceAnimation, string targetAnimation, double rzkey, double offset) + { + string str_SourceAnimation = sourceAnimation; + IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); + string str_TargetAnimation = targetAnimation; + IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); + double result = PluginCopyKeyColorAllFramesOffsetNameD(lp_SourceAnimation, lp_TargetAnimation, rzkey, offset); + FreeIntPtr(lp_SourceAnimation); + FreeIntPtr(lp_TargetAnimation); + return result; + } + /// + /// Copy animation key color from the source animation to the target animation + /// for the given frame. + /// + public static void CopyKeyColorName(string sourceAnimation, string targetAnimation, int frameId, int rzkey) + { + string str_SourceAnimation = sourceAnimation; + IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); + string str_TargetAnimation = targetAnimation; + IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); + PluginCopyKeyColorName(lp_SourceAnimation, lp_TargetAnimation, frameId, rzkey); + FreeIntPtr(lp_SourceAnimation); + FreeIntPtr(lp_TargetAnimation); + } + /// + /// D suffix for limited data types. + /// + public static double CopyKeyColorNameD(string sourceAnimation, string targetAnimation, double frameId, double rzkey) + { + string str_SourceAnimation = sourceAnimation; + IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); + string str_TargetAnimation = targetAnimation; + IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); + double result = PluginCopyKeyColorNameD(lp_SourceAnimation, lp_TargetAnimation, frameId, rzkey); + FreeIntPtr(lp_SourceAnimation); + FreeIntPtr(lp_TargetAnimation); + return result; + } + /// + /// Copy animation color for a set of keys from the source animation to the + /// target animation for the given frame. Reference the source and target by + /// id. + /// + public static void CopyKeysColor(int sourceAnimationId, int targetAnimationId, int frameId, int[] keys, int size) + { + PluginCopyKeysColor(sourceAnimationId, targetAnimationId, frameId, keys, size); + } + /// + /// Copy animation color for a set of keys from the source animation to the + /// target animation for all frames. Reference the source and target by id. + /// + /// + public static void CopyKeysColorAllFrames(int sourceAnimationId, int targetAnimationId, int[] keys, int size) + { + PluginCopyKeysColorAllFrames(sourceAnimationId, targetAnimationId, keys, size); + } + /// + /// Copy animation color for a set of keys from the source animation to the + /// target animation for all frames. Reference the source and target by name. + /// + /// + public static void CopyKeysColorAllFramesName(string sourceAnimation, string targetAnimation, int[] keys, int size) + { + string str_SourceAnimation = sourceAnimation; + IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); + string str_TargetAnimation = targetAnimation; + IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); + PluginCopyKeysColorAllFramesName(lp_SourceAnimation, lp_TargetAnimation, keys, size); + FreeIntPtr(lp_SourceAnimation); + FreeIntPtr(lp_TargetAnimation); + } + /// + /// Copy animation color for a set of keys from the source animation to the + /// target animation for the given frame. Reference the source and target by + /// name. + /// + public static void CopyKeysColorName(string sourceAnimation, string targetAnimation, int frameId, int[] keys, int size) + { + string str_SourceAnimation = sourceAnimation; + IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); + string str_TargetAnimation = targetAnimation; + IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); + PluginCopyKeysColorName(lp_SourceAnimation, lp_TargetAnimation, frameId, keys, size); + FreeIntPtr(lp_SourceAnimation); + FreeIntPtr(lp_TargetAnimation); + } + /// + /// Copy animation color for a set of keys from the source animation to the + /// target animation from the source frame to the target frame. Reference the + /// source and target by id. + /// + public static void CopyKeysColorOffset(int sourceAnimationId, int targetAnimationId, int sourceFrameId, int targetFrameId, int[] keys, int size) + { + PluginCopyKeysColorOffset(sourceAnimationId, targetAnimationId, sourceFrameId, targetFrameId, keys, size); + } + /// + /// Copy animation color for a set of keys from the source animation to the + /// target animation from the source frame to the target frame. Reference the + /// source and target by name. + /// + public static void CopyKeysColorOffsetName(string sourceAnimation, string targetAnimation, int sourceFrameId, int targetFrameId, int[] keys, int size) + { + string str_SourceAnimation = sourceAnimation; + IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); + string str_TargetAnimation = targetAnimation; + IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); + PluginCopyKeysColorOffsetName(lp_SourceAnimation, lp_TargetAnimation, sourceFrameId, targetFrameId, keys, size); + FreeIntPtr(lp_SourceAnimation); + FreeIntPtr(lp_TargetAnimation); + } + /// + /// Copy source animation to target animation for the given frame. Source and + /// target are referenced by id. + /// + public static void CopyNonZeroAllKeys(int sourceAnimationId, int targetAnimationId, int frameId) + { + PluginCopyNonZeroAllKeys(sourceAnimationId, targetAnimationId, frameId); + } + /// + /// Copy nonzero colors from a source animation to a target animation for all + /// frames. Reference source and target by id. + /// + public static void CopyNonZeroAllKeysAllFrames(int sourceAnimationId, int targetAnimationId) + { + PluginCopyNonZeroAllKeysAllFrames(sourceAnimationId, targetAnimationId); + } + /// + /// Copy nonzero colors from a source animation to a target animation for all + /// frames. Reference source and target by name. + /// + public static void CopyNonZeroAllKeysAllFramesName(string sourceAnimation, string targetAnimation) + { + string str_SourceAnimation = sourceAnimation; + IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); + string str_TargetAnimation = targetAnimation; + IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); + PluginCopyNonZeroAllKeysAllFramesName(lp_SourceAnimation, lp_TargetAnimation); + FreeIntPtr(lp_SourceAnimation); + FreeIntPtr(lp_TargetAnimation); + } + /// + /// D suffix for limited data types. + /// + public static double CopyNonZeroAllKeysAllFramesNameD(string sourceAnimation, string targetAnimation) + { + string str_SourceAnimation = sourceAnimation; + IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); + string str_TargetAnimation = targetAnimation; + IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); + double result = PluginCopyNonZeroAllKeysAllFramesNameD(lp_SourceAnimation, lp_TargetAnimation); + FreeIntPtr(lp_SourceAnimation); + FreeIntPtr(lp_TargetAnimation); + return result; + } + /// + /// Copy nonzero colors from a source animation to a target animation for all + /// frames starting at the offset for the length of the source animation. The + /// source and target are referenced by id. + /// + public static void CopyNonZeroAllKeysAllFramesOffset(int sourceAnimationId, int targetAnimationId, int offset) + { + PluginCopyNonZeroAllKeysAllFramesOffset(sourceAnimationId, targetAnimationId, offset); + } + /// + /// Copy nonzero colors from a source animation to a target animation for all + /// frames starting at the offset for the length of the source animation. The + /// source and target are referenced by name. + /// + public static void CopyNonZeroAllKeysAllFramesOffsetName(string sourceAnimation, string targetAnimation, int offset) + { + string str_SourceAnimation = sourceAnimation; + IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); + string str_TargetAnimation = targetAnimation; + IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); + PluginCopyNonZeroAllKeysAllFramesOffsetName(lp_SourceAnimation, lp_TargetAnimation, offset); + FreeIntPtr(lp_SourceAnimation); + FreeIntPtr(lp_TargetAnimation); + } + /// + /// D suffix for limited data types. + /// + public static double CopyNonZeroAllKeysAllFramesOffsetNameD(string sourceAnimation, string targetAnimation, double offset) + { + string str_SourceAnimation = sourceAnimation; + IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); + string str_TargetAnimation = targetAnimation; + IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); + double result = PluginCopyNonZeroAllKeysAllFramesOffsetNameD(lp_SourceAnimation, lp_TargetAnimation, offset); + FreeIntPtr(lp_SourceAnimation); + FreeIntPtr(lp_TargetAnimation); + return result; + } + /// + /// Copy nonzero colors from source animation to target animation for the specified + /// frame. Source and target are referenced by id. + /// + public static void CopyNonZeroAllKeysName(string sourceAnimation, string targetAnimation, int frameId) + { + string str_SourceAnimation = sourceAnimation; + IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); + string str_TargetAnimation = targetAnimation; + IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); + PluginCopyNonZeroAllKeysName(lp_SourceAnimation, lp_TargetAnimation, frameId); + FreeIntPtr(lp_SourceAnimation); + FreeIntPtr(lp_TargetAnimation); + } + /// + /// D suffix for limited data types. + /// + public static double CopyNonZeroAllKeysNameD(string sourceAnimation, string targetAnimation, double frameId) + { + string str_SourceAnimation = sourceAnimation; + IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); + string str_TargetAnimation = targetAnimation; + IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); + double result = PluginCopyNonZeroAllKeysNameD(lp_SourceAnimation, lp_TargetAnimation, frameId); + FreeIntPtr(lp_SourceAnimation); + FreeIntPtr(lp_TargetAnimation); + return result; + } + /// + /// Copy nonzero colors from the source animation to the target animation from + /// the source frame to the target offset frame. Source and target are referenced + /// by id. + /// + public static void CopyNonZeroAllKeysOffset(int sourceAnimationId, int targetAnimationId, int frameId, int offset) + { + PluginCopyNonZeroAllKeysOffset(sourceAnimationId, targetAnimationId, frameId, offset); + } + /// + /// Copy nonzero colors from the source animation to the target animation from + /// the source frame to the target offset frame. Source and target are referenced + /// by name. + /// + public static void CopyNonZeroAllKeysOffsetName(string sourceAnimation, string targetAnimation, int frameId, int offset) + { + string str_SourceAnimation = sourceAnimation; + IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); + string str_TargetAnimation = targetAnimation; + IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); + PluginCopyNonZeroAllKeysOffsetName(lp_SourceAnimation, lp_TargetAnimation, frameId, offset); + FreeIntPtr(lp_SourceAnimation); + FreeIntPtr(lp_TargetAnimation); + } + /// + /// D suffix for limited data types. + /// + public static double CopyNonZeroAllKeysOffsetNameD(string sourceAnimation, string targetAnimation, double frameId, double offset) + { + string str_SourceAnimation = sourceAnimation; + IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); + string str_TargetAnimation = targetAnimation; + IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); + double result = PluginCopyNonZeroAllKeysOffsetNameD(lp_SourceAnimation, lp_TargetAnimation, frameId, offset); + FreeIntPtr(lp_SourceAnimation); + FreeIntPtr(lp_TargetAnimation); + return result; + } + /// + /// Copy animation key color from the source animation to the target animation + /// for the given frame where color is not zero. + /// + public static void CopyNonZeroKeyColor(int sourceAnimationId, int targetAnimationId, int frameId, int rzkey) + { + PluginCopyNonZeroKeyColor(sourceAnimationId, targetAnimationId, frameId, rzkey); + } + /// + /// Copy animation key color from the source animation to the target animation + /// for the given frame where color is not zero. + /// + public static void CopyNonZeroKeyColorName(string sourceAnimation, string targetAnimation, int frameId, int rzkey) + { + string str_SourceAnimation = sourceAnimation; + IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); + string str_TargetAnimation = targetAnimation; + IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); + PluginCopyNonZeroKeyColorName(lp_SourceAnimation, lp_TargetAnimation, frameId, rzkey); + FreeIntPtr(lp_SourceAnimation); + FreeIntPtr(lp_TargetAnimation); + } + /// + /// D suffix for limited data types. + /// + public static double CopyNonZeroKeyColorNameD(string sourceAnimation, string targetAnimation, double frameId, double rzkey) + { + string str_SourceAnimation = sourceAnimation; + IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); + string str_TargetAnimation = targetAnimation; + IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); + double result = PluginCopyNonZeroKeyColorNameD(lp_SourceAnimation, lp_TargetAnimation, frameId, rzkey); + FreeIntPtr(lp_SourceAnimation); + FreeIntPtr(lp_TargetAnimation); + return result; + } + /// + /// Copy nonzero colors from the source animation to the target animation where + /// the target color is nonzero for the specified frame. Source and target + /// are referenced by id. + /// + public static void CopyNonZeroTargetAllKeys(int sourceAnimationId, int targetAnimationId, int frameId) + { + PluginCopyNonZeroTargetAllKeys(sourceAnimationId, targetAnimationId, frameId); + } + /// + /// Copy nonzero colors from the source animation to the target animation where + /// the target color is nonzero for all frames. Source and target are referenced + /// by id. + /// + public static void CopyNonZeroTargetAllKeysAllFrames(int sourceAnimationId, int targetAnimationId) + { + PluginCopyNonZeroTargetAllKeysAllFrames(sourceAnimationId, targetAnimationId); + } + /// + /// Copy nonzero colors from the source animation to the target animation where + /// the target color is nonzero for all frames. Source and target are referenced + /// by name. + /// + public static void CopyNonZeroTargetAllKeysAllFramesName(string sourceAnimation, string targetAnimation) + { + string str_SourceAnimation = sourceAnimation; + IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); + string str_TargetAnimation = targetAnimation; + IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); + PluginCopyNonZeroTargetAllKeysAllFramesName(lp_SourceAnimation, lp_TargetAnimation); + FreeIntPtr(lp_SourceAnimation); + FreeIntPtr(lp_TargetAnimation); + } + /// + /// D suffix for limited data types. + /// + public static double CopyNonZeroTargetAllKeysAllFramesNameD(string sourceAnimation, string targetAnimation) + { + string str_SourceAnimation = sourceAnimation; + IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); + string str_TargetAnimation = targetAnimation; + IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); + double result = PluginCopyNonZeroTargetAllKeysAllFramesNameD(lp_SourceAnimation, lp_TargetAnimation); + FreeIntPtr(lp_SourceAnimation); + FreeIntPtr(lp_TargetAnimation); + return result; + } + /// + /// Copy nonzero colors from the source animation to the target animation where + /// the target color is nonzero for all frames. Source and target are referenced + /// by name. + /// + public static void CopyNonZeroTargetAllKeysAllFramesOffset(int sourceAnimationId, int targetAnimationId, int offset) + { + PluginCopyNonZeroTargetAllKeysAllFramesOffset(sourceAnimationId, targetAnimationId, offset); + } + /// + /// Copy nonzero colors from the source animation to the target animation where + /// the target color is nonzero for all frames starting at the target offset + /// for the length of the source animation. Source and target animations are + /// referenced by name. + /// + public static void CopyNonZeroTargetAllKeysAllFramesOffsetName(string sourceAnimation, string targetAnimation, int offset) + { + string str_SourceAnimation = sourceAnimation; + IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); + string str_TargetAnimation = targetAnimation; + IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); + PluginCopyNonZeroTargetAllKeysAllFramesOffsetName(lp_SourceAnimation, lp_TargetAnimation, offset); + FreeIntPtr(lp_SourceAnimation); + FreeIntPtr(lp_TargetAnimation); + } + /// + /// D suffix for limited data types. + /// + public static double CopyNonZeroTargetAllKeysAllFramesOffsetNameD(string sourceAnimation, string targetAnimation, double offset) + { + string str_SourceAnimation = sourceAnimation; + IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); + string str_TargetAnimation = targetAnimation; + IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); + double result = PluginCopyNonZeroTargetAllKeysAllFramesOffsetNameD(lp_SourceAnimation, lp_TargetAnimation, offset); + FreeIntPtr(lp_SourceAnimation); + FreeIntPtr(lp_TargetAnimation); + return result; + } + /// + /// Copy nonzero colors from the source animation to the target animation where + /// the target color is nonzero for the specified frame. The source and target + /// are referenced by name. + /// + public static void CopyNonZeroTargetAllKeysName(string sourceAnimation, string targetAnimation, int frameId) + { + string str_SourceAnimation = sourceAnimation; + IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); + string str_TargetAnimation = targetAnimation; + IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); + PluginCopyNonZeroTargetAllKeysName(lp_SourceAnimation, lp_TargetAnimation, frameId); + FreeIntPtr(lp_SourceAnimation); + FreeIntPtr(lp_TargetAnimation); + } + /// + /// D suffix for limited data types. + /// + public static double CopyNonZeroTargetAllKeysNameD(string sourceAnimation, string targetAnimation, double frameId) + { + string str_SourceAnimation = sourceAnimation; + IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); + string str_TargetAnimation = targetAnimation; + IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); + double result = PluginCopyNonZeroTargetAllKeysNameD(lp_SourceAnimation, lp_TargetAnimation, frameId); + FreeIntPtr(lp_SourceAnimation); + FreeIntPtr(lp_TargetAnimation); + return result; + } + /// + /// Copy nonzero colors from the source animation to the target animation where + /// the target color is nonzero for the specified source frame and target offset + /// frame. The source and target are referenced by id. + /// + public static void CopyNonZeroTargetAllKeysOffset(int sourceAnimationId, int targetAnimationId, int frameId, int offset) + { + PluginCopyNonZeroTargetAllKeysOffset(sourceAnimationId, targetAnimationId, frameId, offset); + } + /// + /// Copy nonzero colors from the source animation to the target animation where + /// the target color is nonzero for the specified source frame and target offset + /// frame. The source and target are referenced by name. + /// + public static void CopyNonZeroTargetAllKeysOffsetName(string sourceAnimation, string targetAnimation, int frameId, int offset) + { + string str_SourceAnimation = sourceAnimation; + IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); + string str_TargetAnimation = targetAnimation; + IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); + PluginCopyNonZeroTargetAllKeysOffsetName(lp_SourceAnimation, lp_TargetAnimation, frameId, offset); + FreeIntPtr(lp_SourceAnimation); + FreeIntPtr(lp_TargetAnimation); + } + /// + /// D suffix for limited data types. + /// + public static double CopyNonZeroTargetAllKeysOffsetNameD(string sourceAnimation, string targetAnimation, double frameId, double offset) + { + string str_SourceAnimation = sourceAnimation; + IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); + string str_TargetAnimation = targetAnimation; + IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); + double result = PluginCopyNonZeroTargetAllKeysOffsetNameD(lp_SourceAnimation, lp_TargetAnimation, frameId, offset); + FreeIntPtr(lp_SourceAnimation); + FreeIntPtr(lp_TargetAnimation); + return result; + } + /// + /// Copy nonzero colors from the source animation to the target animation where + /// the target color is zero for all frames. Source and target are referenced + /// by id. + /// + public static void CopyNonZeroTargetZeroAllKeysAllFrames(int sourceAnimationId, int targetAnimationId) + { + PluginCopyNonZeroTargetZeroAllKeysAllFrames(sourceAnimationId, targetAnimationId); + } + /// + /// Copy nonzero colors from the source animation to the target animation where + /// the target color is zero for all frames. Source and target are referenced + /// by name. + /// + public static void CopyNonZeroTargetZeroAllKeysAllFramesName(string sourceAnimation, string targetAnimation) + { + string str_SourceAnimation = sourceAnimation; + IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); + string str_TargetAnimation = targetAnimation; + IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); + PluginCopyNonZeroTargetZeroAllKeysAllFramesName(lp_SourceAnimation, lp_TargetAnimation); + FreeIntPtr(lp_SourceAnimation); + FreeIntPtr(lp_TargetAnimation); + } + /// + /// D suffix for limited data types. + /// + public static double CopyNonZeroTargetZeroAllKeysAllFramesNameD(string sourceAnimation, string targetAnimation) + { + string str_SourceAnimation = sourceAnimation; + IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); + string str_TargetAnimation = targetAnimation; + IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); + double result = PluginCopyNonZeroTargetZeroAllKeysAllFramesNameD(lp_SourceAnimation, lp_TargetAnimation); + FreeIntPtr(lp_SourceAnimation); + FreeIntPtr(lp_TargetAnimation); + return result; + } + /// + /// Copy red channel to other channels for all frames. Intensity range is 0.0 + /// to 1.0. Reference the animation by id. + /// + public static void CopyRedChannelAllFrames(int animationId, float greenIntensity, float blueIntensity) + { + PluginCopyRedChannelAllFrames(animationId, greenIntensity, blueIntensity); + } + /// + /// Copy green channel to other channels for all frames. Intensity range is + /// 0.0 to 1.0. Reference the animation by name. + /// + public static void CopyRedChannelAllFramesName(string path, float greenIntensity, float blueIntensity) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginCopyRedChannelAllFramesName(lp_Path, greenIntensity, blueIntensity); + FreeIntPtr(lp_Path); + } + /// + /// D suffix for limited data types. + /// + public static double CopyRedChannelAllFramesNameD(string path, double greenIntensity, double blueIntensity) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + double result = PluginCopyRedChannelAllFramesNameD(lp_Path, greenIntensity, blueIntensity); + FreeIntPtr(lp_Path); + return result; + } + /// + /// Copy zero colors from source animation to target animation for the frame. + /// Source and target are referenced by id. + /// + public static void CopyZeroAllKeys(int sourceAnimationId, int targetAnimationId, int frameId) + { + PluginCopyZeroAllKeys(sourceAnimationId, targetAnimationId, frameId); + } + /// + /// Copy zero colors from source animation to target animation for all frames. + /// Source and target are referenced by id. + /// + public static void CopyZeroAllKeysAllFrames(int sourceAnimationId, int targetAnimationId) + { + PluginCopyZeroAllKeysAllFrames(sourceAnimationId, targetAnimationId); + } + /// + /// Copy zero colors from source animation to target animation for all frames. + /// Source and target are referenced by name. + /// + public static void CopyZeroAllKeysAllFramesName(string sourceAnimation, string targetAnimation) + { + string str_SourceAnimation = sourceAnimation; + IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); + string str_TargetAnimation = targetAnimation; + IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); + PluginCopyZeroAllKeysAllFramesName(lp_SourceAnimation, lp_TargetAnimation); + FreeIntPtr(lp_SourceAnimation); + FreeIntPtr(lp_TargetAnimation); + } + /// + /// D suffix for limited data types. + /// + public static double CopyZeroAllKeysAllFramesNameD(string sourceAnimation, string targetAnimation) + { + string str_SourceAnimation = sourceAnimation; + IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); + string str_TargetAnimation = targetAnimation; + IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); + double result = PluginCopyZeroAllKeysAllFramesNameD(lp_SourceAnimation, lp_TargetAnimation); + FreeIntPtr(lp_SourceAnimation); + FreeIntPtr(lp_TargetAnimation); + return result; + } + /// + /// Copy zero colors from source animation to target animation for all frames + /// starting at the target offset for the length of the source animation. Source + /// and target are referenced by id. + /// + public static void CopyZeroAllKeysAllFramesOffset(int sourceAnimationId, int targetAnimationId, int offset) + { + PluginCopyZeroAllKeysAllFramesOffset(sourceAnimationId, targetAnimationId, offset); + } + /// + /// Copy zero colors from source animation to target animation for all frames + /// starting at the target offset for the length of the source animation. Source + /// and target are referenced by name. + /// + public static void CopyZeroAllKeysAllFramesOffsetName(string sourceAnimation, string targetAnimation, int offset) + { + string str_SourceAnimation = sourceAnimation; + IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); + string str_TargetAnimation = targetAnimation; + IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); + PluginCopyZeroAllKeysAllFramesOffsetName(lp_SourceAnimation, lp_TargetAnimation, offset); + FreeIntPtr(lp_SourceAnimation); + FreeIntPtr(lp_TargetAnimation); + } + /// + /// D suffix for limited data types. + /// + public static double CopyZeroAllKeysAllFramesOffsetNameD(string sourceAnimation, string targetAnimation, double offset) + { + string str_SourceAnimation = sourceAnimation; + IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); + string str_TargetAnimation = targetAnimation; + IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); + double result = PluginCopyZeroAllKeysAllFramesOffsetNameD(lp_SourceAnimation, lp_TargetAnimation, offset); + FreeIntPtr(lp_SourceAnimation); + FreeIntPtr(lp_TargetAnimation); + return result; + } + /// + /// Copy zero colors from source animation to target animation for the frame. + /// Source and target are referenced by name. + /// + public static void CopyZeroAllKeysName(string sourceAnimation, string targetAnimation, int frameId) + { + string str_SourceAnimation = sourceAnimation; + IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); + string str_TargetAnimation = targetAnimation; + IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); + PluginCopyZeroAllKeysName(lp_SourceAnimation, lp_TargetAnimation, frameId); + FreeIntPtr(lp_SourceAnimation); + FreeIntPtr(lp_TargetAnimation); + } + /// + /// Copy zero colors from source animation to target animation for the frame + /// id starting at the target offset for the length of the source animation. + /// Source and target are referenced by id. + /// + public static void CopyZeroAllKeysOffset(int sourceAnimationId, int targetAnimationId, int frameId, int offset) + { + PluginCopyZeroAllKeysOffset(sourceAnimationId, targetAnimationId, frameId, offset); + } + /// + /// Copy zero colors from source animation to target animation for the frame + /// id starting at the target offset for the length of the source animation. + /// Source and target are referenced by name. + /// + public static void CopyZeroAllKeysOffsetName(string sourceAnimation, string targetAnimation, int frameId, int offset) + { + string str_SourceAnimation = sourceAnimation; + IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); + string str_TargetAnimation = targetAnimation; + IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); + PluginCopyZeroAllKeysOffsetName(lp_SourceAnimation, lp_TargetAnimation, frameId, offset); + FreeIntPtr(lp_SourceAnimation); + FreeIntPtr(lp_TargetAnimation); + } + /// + /// Copy zero key color from source animation to target animation for the specified + /// frame. Source and target are referenced by id. + /// + public static void CopyZeroKeyColor(int sourceAnimationId, int targetAnimationId, int frameId, int rzkey) + { + PluginCopyZeroKeyColor(sourceAnimationId, targetAnimationId, frameId, rzkey); + } + /// + /// Copy zero key color from source animation to target animation for the specified + /// frame. Source and target are referenced by name. + /// + public static void CopyZeroKeyColorName(string sourceAnimation, string targetAnimation, int frameId, int rzkey) + { + string str_SourceAnimation = sourceAnimation; + IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); + string str_TargetAnimation = targetAnimation; + IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); + PluginCopyZeroKeyColorName(lp_SourceAnimation, lp_TargetAnimation, frameId, rzkey); + FreeIntPtr(lp_SourceAnimation); + FreeIntPtr(lp_TargetAnimation); + } + /// + /// D suffix for limited data types. + /// + public static double CopyZeroKeyColorNameD(string sourceAnimation, string targetAnimation, double frameId, double rzkey) + { + string str_SourceAnimation = sourceAnimation; + IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); + string str_TargetAnimation = targetAnimation; + IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); + double result = PluginCopyZeroKeyColorNameD(lp_SourceAnimation, lp_TargetAnimation, frameId, rzkey); + FreeIntPtr(lp_SourceAnimation); + FreeIntPtr(lp_TargetAnimation); + return result; + } + /// + /// Copy nonzero color from source animation to target animation where target + /// is zero for the frame. Source and target are referenced by id. + /// + public static void CopyZeroTargetAllKeys(int sourceAnimationId, int targetAnimationId, int frameId) + { + PluginCopyZeroTargetAllKeys(sourceAnimationId, targetAnimationId, frameId); + } + /// + /// Copy nonzero color from source animation to target animation where target + /// is zero for all frames. Source and target are referenced by id. + /// + public static void CopyZeroTargetAllKeysAllFrames(int sourceAnimationId, int targetAnimationId) + { + PluginCopyZeroTargetAllKeysAllFrames(sourceAnimationId, targetAnimationId); + } + /// + /// Copy nonzero color from source animation to target animation where target + /// is zero for all frames. Source and target are referenced by name. + /// + public static void CopyZeroTargetAllKeysAllFramesName(string sourceAnimation, string targetAnimation) + { + string str_SourceAnimation = sourceAnimation; + IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); + string str_TargetAnimation = targetAnimation; + IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); + PluginCopyZeroTargetAllKeysAllFramesName(lp_SourceAnimation, lp_TargetAnimation); + FreeIntPtr(lp_SourceAnimation); + FreeIntPtr(lp_TargetAnimation); + } + /// + /// D suffix for limited data types. + /// + public static double CopyZeroTargetAllKeysAllFramesNameD(string sourceAnimation, string targetAnimation) + { + string str_SourceAnimation = sourceAnimation; + IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); + string str_TargetAnimation = targetAnimation; + IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); + double result = PluginCopyZeroTargetAllKeysAllFramesNameD(lp_SourceAnimation, lp_TargetAnimation); + FreeIntPtr(lp_SourceAnimation); + FreeIntPtr(lp_TargetAnimation); + return result; + } + /// + /// Copy nonzero color from source animation to target animation where target + /// is zero for the frame. Source and target are referenced by name. + /// + public static void CopyZeroTargetAllKeysName(string sourceAnimation, string targetAnimation, int frameId) + { + string str_SourceAnimation = sourceAnimation; + IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); + string str_TargetAnimation = targetAnimation; + IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); + PluginCopyZeroTargetAllKeysName(lp_SourceAnimation, lp_TargetAnimation, frameId); + FreeIntPtr(lp_SourceAnimation); + FreeIntPtr(lp_TargetAnimation); + } + /// + /// Direct access to low level API. + /// + public static int CoreCreateChromaLinkEffect(int effect, IntPtr pParam, out Guid pEffectId) + { + int result = PluginCoreCreateChromaLinkEffect(effect, pParam, out pEffectId); + return result; + } + /// + /// Direct access to low level API. + /// + public static int CoreCreateEffect(Guid deviceId, EFFECT_TYPE effect, IntPtr pParam, out Guid pEffectId) + { + int result = PluginCoreCreateEffect(deviceId, (int)effect, pParam, out pEffectId); + return result; + } + /// + /// Direct access to low level API. + /// + public static int CoreCreateHeadsetEffect(int effect, IntPtr pParam, out Guid pEffectId) + { + int result = PluginCoreCreateHeadsetEffect(effect, pParam, out pEffectId); + return result; + } + /// + /// Direct access to low level API. + /// + public static int CoreCreateKeyboardEffect(int effect, IntPtr pParam, out Guid pEffectId) + { + int result = PluginCoreCreateKeyboardEffect(effect, pParam, out pEffectId); + return result; + } + /// + /// Direct access to low level API. + /// + public static int CoreCreateKeypadEffect(int effect, IntPtr pParam, out Guid pEffectId) + { + int result = PluginCoreCreateKeypadEffect(effect, pParam, out pEffectId); + return result; + } + /// + /// Direct access to low level API. + /// + public static int CoreCreateMouseEffect(int effect, IntPtr pParam, out Guid pEffectId) + { + int result = PluginCoreCreateMouseEffect(effect, pParam, out pEffectId); + return result; + } + /// + /// Direct access to low level API. + /// + public static int CoreCreateMousepadEffect(int effect, IntPtr pParam, out Guid pEffectId) + { + int result = PluginCoreCreateMousepadEffect(effect, pParam, out pEffectId); + return result; + } + /// + /// Direct access to low level API. + /// + public static int CoreDeleteEffect(Guid effectId) + { + int result = PluginCoreDeleteEffect(effectId); + return result; + } + /// + /// Direct access to low level API. + /// + public static int CoreInit() + { + int result = PluginCoreInit(); + return result; + } + /// + /// Direct access to low level API. + /// + public static int CoreInitSDK(ref ChromaSDK.APPINFOTYPE appInfo) + { + int result = PluginCoreInitSDK(ref appInfo); + return result; + } + /// + /// Direct access to low level API. + /// + public static int CoreQueryDevice(Guid deviceId, out DEVICE_INFO_TYPE deviceInfo) + { + int result = PluginCoreQueryDevice(deviceId, out deviceInfo); + return result; + } + /// + /// Direct access to low level API. + /// + public static int CoreSetEffect(Guid effectId) + { + int result = PluginCoreSetEffect(effectId); + return result; + } + /// + /// Begin broadcasting Chroma RGB data using the stored stream key as the endpoint. + /// Intended for Cloud Gaming Platforms, restore the streaming key when the + /// game instance is launched to continue streaming. streamId is a null terminated + /// string streamKey is a null terminated string StreamGetStatus() should return + /// the READY status to use this method. + /// + public static bool CoreStreamBroadcast(string streamId, string streamKey) + { + string str_StreamId = streamId; + IntPtr lp_StreamId = GetAsciiIntPtr(str_StreamId); + string str_StreamKey = streamKey; + IntPtr lp_StreamKey = GetAsciiIntPtr(str_StreamKey); + bool result = PluginCoreStreamBroadcast(lp_StreamId, lp_StreamKey); + FreeIntPtr(lp_StreamId); + FreeIntPtr(lp_StreamKey); + return result; + } + /// + /// End broadcasting Chroma RGB data. StreamGetStatus() should return the BROADCASTING + /// status to use this method. + /// + public static bool CoreStreamBroadcastEnd() + { + bool result = PluginCoreStreamBroadcastEnd(); + return result; + } + /// + /// shortcode: Pass the address of a preallocated character buffer to get the + /// streaming auth code. The buffer should have a minimum length of 6. length: + /// Length will return as zero if the streaming auth code could not be obtained. + /// If length is greater than zero, it will be the length of the returned streaming + /// auth code. Once you have the shortcode, it should be shown to the user + /// so they can associate the stream with their Razer ID StreamGetStatus() + /// should return the READY status before invoking this method. platform: is + /// the null terminated string that identifies the source of the stream: { + /// GEFORCE_NOW, LUNA, STADIA, GAME_PASS } title: is the null terminated string + /// that identifies the application or game. + /// + public static void CoreStreamGetAuthShortcode(ref string shortcode, out byte length, string platform, string title) + { + string str_Shortcode = shortcode; + IntPtr lp_Shortcode = GetAsciiIntPtr(str_Shortcode); + string str_Platform = platform; + IntPtr lp_Platform = GetUnicodeIntPtr(str_Platform); + string str_Title = title; + IntPtr lp_Title = GetUnicodeIntPtr(str_Title); + PluginCoreStreamGetAuthShortcode(lp_Shortcode, out length, lp_Platform, lp_Title); + if (lp_Shortcode != IntPtr.Zero) + { + shortcode = Marshal.PtrToStringAnsi(lp_Shortcode); + } + FreeIntPtr(lp_Shortcode); + FreeIntPtr(lp_Platform); + FreeIntPtr(lp_Title); + } + /// + /// focus: Pass the address of a preallocated character buffer to get the stream + /// focus. The buffer should have a length of 48 length: Length will return + /// as zero if the stream focus could not be obtained. If length is greater + /// than zero, it will be the length of the returned stream focus. + /// + public static bool CoreStreamGetFocus(ref string focus, out byte length) + { + string str_Focus = focus; + IntPtr lp_Focus = GetAsciiIntPtr(str_Focus); + bool result = PluginCoreStreamGetFocus(lp_Focus, out length); + if (lp_Focus != IntPtr.Zero) + { + focus = Marshal.PtrToStringAnsi(lp_Focus); + } + FreeIntPtr(lp_Focus); + return result; + } + /// + /// Intended for Cloud Gaming Platforms, store the stream id to persist in user + /// preferences to continue streaming if the game is suspended or closed. shortcode: + /// The shortcode is a null terminated string. Use the shortcode that authorized + /// the stream to obtain the stream id. streamId should be a preallocated buffer + /// to get the stream key. The buffer should have a length of 48. length: Length + /// will return zero if the key could not be obtained. If the length is greater + /// than zero, it will be the length of the returned streaming id. Retrieve + /// the stream id after authorizing the shortcode. The authorization window + /// will expire in 5 minutes. Be sure to save the stream key before the window + /// expires. StreamGetStatus() should return the READY status to use this method. + /// + /// + public static void CoreStreamGetId(string shortcode, ref string streamId, out byte length) + { + string str_Shortcode = shortcode; + IntPtr lp_Shortcode = GetAsciiIntPtr(str_Shortcode); + string str_StreamId = streamId; + IntPtr lp_StreamId = GetAsciiIntPtr(str_StreamId); + PluginCoreStreamGetId(lp_Shortcode, lp_StreamId, out length); + FreeIntPtr(lp_Shortcode); + if (lp_StreamId != IntPtr.Zero) + { + streamId = Marshal.PtrToStringAnsi(lp_StreamId); + } + FreeIntPtr(lp_StreamId); + } + /// + /// Intended for Cloud Gaming Platforms, store the streaming key to persist + /// in user preferences to continue streaming if the game is suspended or closed. + /// shortcode: The shortcode is a null terminated string. Use the shortcode + /// that authorized the stream to obtain the stream key. If the status is in + /// the BROADCASTING or WATCHING state, passing a NULL shortcode will return + /// the active streamId. streamKey should be a preallocated buffer to get the + /// stream key. The buffer should have a length of 48. length: Length will + /// return zero if the key could not be obtained. If the length is greater + /// than zero, it will be the length of the returned streaming key. Retrieve + /// the stream key after authorizing the shortcode. The authorization window + /// will expire in 5 minutes. Be sure to save the stream key before the window + /// expires. StreamGetStatus() should return the READY status to use this method. + /// + /// + public static void CoreStreamGetKey(string shortcode, ref string streamKey, out byte length) + { + string str_Shortcode = shortcode; + IntPtr lp_Shortcode = GetAsciiIntPtr(str_Shortcode); + string str_StreamKey = streamKey; + IntPtr lp_StreamKey = GetAsciiIntPtr(str_StreamKey); + PluginCoreStreamGetKey(lp_Shortcode, lp_StreamKey, out length); + FreeIntPtr(lp_Shortcode); + if (lp_StreamKey != IntPtr.Zero) + { + streamKey = Marshal.PtrToStringAnsi(lp_StreamKey); + } + FreeIntPtr(lp_StreamKey); + } + /// + /// Returns StreamStatus, the current status of the service + /// + public static ChromaSDK.Stream.StreamStatusType CoreStreamGetStatus() + { + ChromaSDK.Stream.StreamStatusType result = PluginCoreStreamGetStatus(); + return result; + } + /// + /// Convert StreamStatusType to a printable string + /// + public static string CoreStreamGetStatusString(ChromaSDK.Stream.StreamStatusType status) + { + string result = Marshal.PtrToStringAnsi(PluginCoreStreamGetStatusString(status)); + return result; + } + /// + /// This prevents the stream id and stream key from being obtained through the + /// shortcode. This closes the auth window. shortcode is a null terminated + /// string. StreamGetStatus() should return the READY status to use this method. + /// returns success when shortcode has been released + /// + public static bool CoreStreamReleaseShortcode(string shortcode) + { + string str_Shortcode = shortcode; + IntPtr lp_Shortcode = GetAsciiIntPtr(str_Shortcode); + bool result = PluginCoreStreamReleaseShortcode(lp_Shortcode); + FreeIntPtr(lp_Shortcode); + return result; + } + /// + /// The focus is a null terminated string. Set the focus identifer for the application + /// designated to automatically change the streaming state. Returns true on + /// success. + /// + public static bool CoreStreamSetFocus(string focus) + { + string str_Focus = focus; + IntPtr lp_Focus = GetAsciiIntPtr(str_Focus); + bool result = PluginCoreStreamSetFocus(lp_Focus); + FreeIntPtr(lp_Focus); + return result; + } + /// + /// Returns true if the Chroma streaming is supported. If false is returned, + /// avoid calling stream methods. + /// + public static bool CoreStreamSupportsStreaming() + { + bool result = PluginCoreStreamSupportsStreaming(); + return result; + } + /// + /// Begin watching the Chroma RGB data using streamID parameter. streamId is + /// a null terminated string. StreamGetStatus() should return the READY status + /// to use this method. + /// + public static bool CoreStreamWatch(string streamId, ulong timestamp) + { + string str_StreamId = streamId; + IntPtr lp_StreamId = GetAsciiIntPtr(str_StreamId); + bool result = PluginCoreStreamWatch(lp_StreamId, timestamp); + FreeIntPtr(lp_StreamId); + return result; + } + /// + /// End watching Chroma RGB data stream. StreamGetStatus() should return the + /// WATCHING status to use this method. + /// + public static bool CoreStreamWatchEnd() + { + bool result = PluginCoreStreamWatchEnd(); + return result; + } + /// + /// Direct access to low level API. + /// + public static int CoreUnInit() + { + int result = PluginCoreUnInit(); + return result; + } + /// + /// Creates a `Chroma` animation at the given path. The `deviceType` parameter + /// uses `EChromaSDKDeviceTypeEnum` as an integer. The `device` parameter uses + /// `EChromaSDKDevice1DEnum` or `EChromaSDKDevice2DEnum` as an integer, respective + /// to the `deviceType`. Returns the animation id upon success. Returns negative + /// one upon failure. Saves a `Chroma` animation file with the `.chroma` extension + /// at the given path. Returns the animation id upon success. Returns negative + /// one upon failure. + /// + public static int CreateAnimation(string path, int deviceType, int device) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + int result = PluginCreateAnimation(lp_Path, deviceType, device); + FreeIntPtr(lp_Path); + return result; + } + /// + /// Creates a `Chroma` animation in memory without creating a file. The `deviceType` + /// parameter uses `EChromaSDKDeviceTypeEnum` as an integer. The `device` parameter + /// uses `EChromaSDKDevice1DEnum` or `EChromaSDKDevice2DEnum` as an integer, + /// respective to the `deviceType`. Returns the animation id upon success. + /// Returns negative one upon failure. Returns the animation id upon success. + /// Returns negative one upon failure. + /// + public static int CreateAnimationInMemory(int deviceType, int device) + { + int result = PluginCreateAnimationInMemory(deviceType, device); + return result; + } + /// + /// Create a device specific effect. + /// + public static int CreateEffect(Guid deviceId, EFFECT_TYPE effect, int[] colors, int size, out FChromaSDKGuid effectId) + { + int result = PluginCreateEffect(deviceId, (int)effect, colors, size, out effectId); + return result; + } + /// + /// Delete an effect given the effect id. + /// + public static int DeleteEffect(Guid effectId) + { + int result = PluginDeleteEffect(effectId); + return result; + } + /// + /// Duplicate the first animation frame so that the animation length matches + /// the frame count. Animation is referenced by id. + /// + public static void DuplicateFirstFrame(int animationId, int frameCount) + { + PluginDuplicateFirstFrame(animationId, frameCount); + } + /// + /// Duplicate the first animation frame so that the animation length matches + /// the frame count. Animation is referenced by name. + /// + public static void DuplicateFirstFrameName(string path, int frameCount) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginDuplicateFirstFrameName(lp_Path, frameCount); + FreeIntPtr(lp_Path); + } + /// + /// D suffix for limited data types. + /// + public static double DuplicateFirstFrameNameD(string path, double frameCount) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + double result = PluginDuplicateFirstFrameNameD(lp_Path, frameCount); + FreeIntPtr(lp_Path); + return result; + } + /// + /// Duplicate all the frames of the animation to double the animation length. + /// Frame 1 becomes frame 1 and 2. Frame 2 becomes frame 3 and 4. And so on. + /// The animation is referenced by id. + /// + public static void DuplicateFrames(int animationId) + { + PluginDuplicateFrames(animationId); + } + /// + /// Duplicate all the frames of the animation to double the animation length. + /// Frame 1 becomes frame 1 and 2. Frame 2 becomes frame 3 and 4. And so on. + /// The animation is referenced by name. + /// + public static void DuplicateFramesName(string path) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginDuplicateFramesName(lp_Path); + FreeIntPtr(lp_Path); + } + /// + /// D suffix for limited data types. + /// + public static double DuplicateFramesNameD(string path) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + double result = PluginDuplicateFramesNameD(lp_Path); + FreeIntPtr(lp_Path); + return result; + } + /// + /// Duplicate all the animation frames in reverse so that the animation plays + /// forwards and backwards. Animation is referenced by id. + /// + public static void DuplicateMirrorFrames(int animationId) + { + PluginDuplicateMirrorFrames(animationId); + } + /// + /// Duplicate all the animation frames in reverse so that the animation plays + /// forwards and backwards. Animation is referenced by name. + /// + public static void DuplicateMirrorFramesName(string path) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginDuplicateMirrorFramesName(lp_Path); + FreeIntPtr(lp_Path); + } + /// + /// D suffix for limited data types. + /// + public static double DuplicateMirrorFramesNameD(string path) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + double result = PluginDuplicateMirrorFramesNameD(lp_Path); + FreeIntPtr(lp_Path); + return result; + } + /// + /// Fade the animation to black starting at the fade frame index to the end + /// of the animation. Animation is referenced by id. + /// + public static void FadeEndFrames(int animationId, int fade) + { + PluginFadeEndFrames(animationId, fade); + } + /// + /// Fade the animation to black starting at the fade frame index to the end + /// of the animation. Animation is referenced by name. + /// + public static void FadeEndFramesName(string path, int fade) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginFadeEndFramesName(lp_Path, fade); + FreeIntPtr(lp_Path); + } + /// + /// D suffix for limited data types. + /// + public static double FadeEndFramesNameD(string path, double fade) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + double result = PluginFadeEndFramesNameD(lp_Path, fade); + FreeIntPtr(lp_Path); + return result; + } + /// + /// Fade the animation from black to full color starting at 0 to the fade frame + /// index. Animation is referenced by id. + /// + public static void FadeStartFrames(int animationId, int fade) + { + PluginFadeStartFrames(animationId, fade); + } + /// + /// Fade the animation from black to full color starting at 0 to the fade frame + /// index. Animation is referenced by name. + /// + public static void FadeStartFramesName(string path, int fade) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginFadeStartFramesName(lp_Path, fade); + FreeIntPtr(lp_Path); + } + /// + /// D suffix for limited data types. + /// + public static double FadeStartFramesNameD(string path, double fade) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + double result = PluginFadeStartFramesNameD(lp_Path, fade); + FreeIntPtr(lp_Path); + return result; + } + /// + /// Set the RGB value for all colors in the specified frame. Animation is referenced + /// by id. + /// + public static void FillColor(int animationId, int frameId, int color) + { + PluginFillColor(animationId, frameId, color); + } + /// + /// Set the RGB value for all colors for all frames. Animation is referenced + /// by id. + /// + public static void FillColorAllFrames(int animationId, int color) + { + PluginFillColorAllFrames(animationId, color); + } + /// + /// Set the RGB value for all colors for all frames. Animation is referenced + /// by name. + /// + public static void FillColorAllFramesName(string path, int color) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginFillColorAllFramesName(lp_Path, color); + FreeIntPtr(lp_Path); + } + /// + /// D suffix for limited data types. + /// + public static double FillColorAllFramesNameD(string path, double color) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + double result = PluginFillColorAllFramesNameD(lp_Path, color); + FreeIntPtr(lp_Path); + return result; + } + /// + /// Set the RGB value for all colors for all frames. Use the range of 0 to 255 + /// for red, green, and blue parameters. Animation is referenced by id. + /// + public static void FillColorAllFramesRGB(int animationId, int red, int green, int blue) + { + PluginFillColorAllFramesRGB(animationId, red, green, blue); + } + /// + /// Set the RGB value for all colors for all frames. Use the range of 0 to 255 + /// for red, green, and blue parameters. Animation is referenced by name. + /// + public static void FillColorAllFramesRGBName(string path, int red, int green, int blue) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginFillColorAllFramesRGBName(lp_Path, red, green, blue); + FreeIntPtr(lp_Path); + } + /// + /// D suffix for limited data types. + /// + public static double FillColorAllFramesRGBNameD(string path, double red, double green, double blue) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + double result = PluginFillColorAllFramesRGBNameD(lp_Path, red, green, blue); + FreeIntPtr(lp_Path); + return result; + } + /// + /// Set the RGB value for all colors in the specified frame. Animation is referenced + /// by name. + /// + public static void FillColorName(string path, int frameId, int color) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginFillColorName(lp_Path, frameId, color); + FreeIntPtr(lp_Path); + } + /// + /// D suffix for limited data types. + /// + public static double FillColorNameD(string path, double frameId, double color) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + double result = PluginFillColorNameD(lp_Path, frameId, color); + FreeIntPtr(lp_Path); + return result; + } + /// + /// Set the RGB value for all colors in the specified frame. Animation is referenced + /// by id. + /// + public static void FillColorRGB(int animationId, int frameId, int red, int green, int blue) + { + PluginFillColorRGB(animationId, frameId, red, green, blue); + } + /// + /// Set the RGB value for all colors in the specified frame. Animation is referenced + /// by name. + /// + public static void FillColorRGBName(string path, int frameId, int red, int green, int blue) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginFillColorRGBName(lp_Path, frameId, red, green, blue); + FreeIntPtr(lp_Path); + } + /// + /// D suffix for limited data types. + /// + public static double FillColorRGBNameD(string path, double frameId, double red, double green, double blue) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + double result = PluginFillColorRGBNameD(lp_Path, frameId, red, green, blue); + FreeIntPtr(lp_Path); + return result; + } + /// + /// This method will only update colors in the animation that are not already + /// set to black. Set the RGB value for a subset of colors in the specified + /// frame. Animation is referenced by id. + /// + public static void FillNonZeroColor(int animationId, int frameId, int color) + { + PluginFillNonZeroColor(animationId, frameId, color); + } + /// + /// This method will only update colors in the animation that are not already + /// set to black. Set the RGB value for a subset of colors for all frames. + /// Animation is referenced by id. + /// + public static void FillNonZeroColorAllFrames(int animationId, int color) + { + PluginFillNonZeroColorAllFrames(animationId, color); + } + /// + /// This method will only update colors in the animation that are not already + /// set to black. Set the RGB value for a subset of colors for all frames. + /// Animation is referenced by name. + /// + public static void FillNonZeroColorAllFramesName(string path, int color) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginFillNonZeroColorAllFramesName(lp_Path, color); + FreeIntPtr(lp_Path); + } + /// + /// D suffix for limited data types. + /// + public static double FillNonZeroColorAllFramesNameD(string path, double color) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + double result = PluginFillNonZeroColorAllFramesNameD(lp_Path, color); + FreeIntPtr(lp_Path); + return result; + } + /// + /// This method will only update colors in the animation that are not already + /// set to black. Set the RGB value for a subset of colors for all frames. + /// Use the range of 0 to 255 for red, green, and blue parameters. Animation + /// is referenced by id. + /// + public static void FillNonZeroColorAllFramesRGB(int animationId, int red, int green, int blue) + { + PluginFillNonZeroColorAllFramesRGB(animationId, red, green, blue); + } + /// + /// This method will only update colors in the animation that are not already + /// set to black. Set the RGB value for a subset of colors for all frames. + /// Use the range of 0 to 255 for red, green, and blue parameters. Animation + /// is referenced by name. + /// + public static void FillNonZeroColorAllFramesRGBName(string path, int red, int green, int blue) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginFillNonZeroColorAllFramesRGBName(lp_Path, red, green, blue); + FreeIntPtr(lp_Path); + } + /// + /// D suffix for limited data types. + /// + public static double FillNonZeroColorAllFramesRGBNameD(string path, double red, double green, double blue) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + double result = PluginFillNonZeroColorAllFramesRGBNameD(lp_Path, red, green, blue); + FreeIntPtr(lp_Path); + return result; + } + /// + /// This method will only update colors in the animation that are not already + /// set to black. Set the RGB value for a subset of colors in the specified + /// frame. Animation is referenced by name. + /// + public static void FillNonZeroColorName(string path, int frameId, int color) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginFillNonZeroColorName(lp_Path, frameId, color); + FreeIntPtr(lp_Path); + } + /// + /// D suffix for limited data types. + /// + public static double FillNonZeroColorNameD(string path, double frameId, double color) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + double result = PluginFillNonZeroColorNameD(lp_Path, frameId, color); + FreeIntPtr(lp_Path); + return result; + } + /// + /// This method will only update colors in the animation that are not already + /// set to black. Set the RGB value for a subset of colors in the specified + /// frame. Use the range of 0 to 255 for red, green, and blue parameters. Animation + /// is referenced by id. + /// + public static void FillNonZeroColorRGB(int animationId, int frameId, int red, int green, int blue) + { + PluginFillNonZeroColorRGB(animationId, frameId, red, green, blue); + } + /// + /// This method will only update colors in the animation that are not already + /// set to black. Set the RGB value for a subset of colors in the specified + /// frame. Use the range of 0 to 255 for red, green, and blue parameters. Animation + /// is referenced by name. + /// + public static void FillNonZeroColorRGBName(string path, int frameId, int red, int green, int blue) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginFillNonZeroColorRGBName(lp_Path, frameId, red, green, blue); + FreeIntPtr(lp_Path); + } + /// + /// D suffix for limited data types. + /// + public static double FillNonZeroColorRGBNameD(string path, double frameId, double red, double green, double blue) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + double result = PluginFillNonZeroColorRGBNameD(lp_Path, frameId, red, green, blue); + FreeIntPtr(lp_Path); + return result; + } + /// + /// Fill the frame with random RGB values for the given frame. Animation is + /// referenced by id. + /// + public static void FillRandomColors(int animationId, int frameId) + { + PluginFillRandomColors(animationId, frameId); + } + /// + /// Fill the frame with random RGB values for all frames. Animation is referenced + /// by id. + /// + public static void FillRandomColorsAllFrames(int animationId) + { + PluginFillRandomColorsAllFrames(animationId); + } + /// + /// Fill the frame with random RGB values for all frames. Animation is referenced + /// by name. + /// + public static void FillRandomColorsAllFramesName(string path) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginFillRandomColorsAllFramesName(lp_Path); + FreeIntPtr(lp_Path); + } + /// + /// D suffix for limited data types. + /// + public static double FillRandomColorsAllFramesNameD(string path) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + double result = PluginFillRandomColorsAllFramesNameD(lp_Path); + FreeIntPtr(lp_Path); + return result; + } + /// + /// Fill the frame with random black and white values for the specified frame. + /// Animation is referenced by id. + /// + public static void FillRandomColorsBlackAndWhite(int animationId, int frameId) + { + PluginFillRandomColorsBlackAndWhite(animationId, frameId); + } + /// + /// Fill the frame with random black and white values for all frames. Animation + /// is referenced by id. + /// + public static void FillRandomColorsBlackAndWhiteAllFrames(int animationId) + { + PluginFillRandomColorsBlackAndWhiteAllFrames(animationId); + } + /// + /// Fill the frame with random black and white values for all frames. Animation + /// is referenced by name. + /// + public static void FillRandomColorsBlackAndWhiteAllFramesName(string path) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginFillRandomColorsBlackAndWhiteAllFramesName(lp_Path); + FreeIntPtr(lp_Path); + } + /// + /// D suffix for limited data types. + /// + public static double FillRandomColorsBlackAndWhiteAllFramesNameD(string path) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + double result = PluginFillRandomColorsBlackAndWhiteAllFramesNameD(lp_Path); + FreeIntPtr(lp_Path); + return result; + } + /// + /// Fill the frame with random black and white values for the specified frame. + /// Animation is referenced by name. + /// + public static void FillRandomColorsBlackAndWhiteName(string path, int frameId) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginFillRandomColorsBlackAndWhiteName(lp_Path, frameId); + FreeIntPtr(lp_Path); + } + /// + /// D suffix for limited data types. + /// + public static double FillRandomColorsBlackAndWhiteNameD(string path, double frameId) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + double result = PluginFillRandomColorsBlackAndWhiteNameD(lp_Path, frameId); + FreeIntPtr(lp_Path); + return result; + } + /// + /// Fill the frame with random RGB values for the given frame. Animation is + /// referenced by name. + /// + public static void FillRandomColorsName(string path, int frameId) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginFillRandomColorsName(lp_Path, frameId); + FreeIntPtr(lp_Path); + } + /// + /// D suffix for limited data types. + /// + public static double FillRandomColorsNameD(string path, double frameId) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + double result = PluginFillRandomColorsNameD(lp_Path, frameId); + FreeIntPtr(lp_Path); + return result; + } + /// + /// Fill the specified frame with RGB color where the animation color is less + /// than the RGB threshold. Animation is referenced by id. + /// + public static void FillThresholdColors(int animationId, int frameId, int threshold, int color) + { + PluginFillThresholdColors(animationId, frameId, threshold, color); + } + /// + /// Fill all frames with RGB color where the animation color is less than the + /// RGB threshold. Animation is referenced by id. + /// + public static void FillThresholdColorsAllFrames(int animationId, int threshold, int color) + { + PluginFillThresholdColorsAllFrames(animationId, threshold, color); + } + /// + /// Fill all frames with RGB color where the animation color is less than the + /// RGB threshold. Animation is referenced by name. + /// + public static void FillThresholdColorsAllFramesName(string path, int threshold, int color) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginFillThresholdColorsAllFramesName(lp_Path, threshold, color); + FreeIntPtr(lp_Path); + } + /// + /// D suffix for limited data types. + /// + public static double FillThresholdColorsAllFramesNameD(string path, double threshold, double color) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + double result = PluginFillThresholdColorsAllFramesNameD(lp_Path, threshold, color); + FreeIntPtr(lp_Path); + return result; + } + /// + /// Fill all frames with RGB color where the animation color is less than the + /// threshold. Animation is referenced by id. + /// + public static void FillThresholdColorsAllFramesRGB(int animationId, int threshold, int red, int green, int blue) + { + PluginFillThresholdColorsAllFramesRGB(animationId, threshold, red, green, blue); + } + /// + /// Fill all frames with RGB color where the animation color is less than the + /// threshold. Animation is referenced by name. + /// + public static void FillThresholdColorsAllFramesRGBName(string path, int threshold, int red, int green, int blue) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginFillThresholdColorsAllFramesRGBName(lp_Path, threshold, red, green, blue); + FreeIntPtr(lp_Path); + } + /// + /// D suffix for limited data types. + /// + public static double FillThresholdColorsAllFramesRGBNameD(string path, double threshold, double red, double green, double blue) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + double result = PluginFillThresholdColorsAllFramesRGBNameD(lp_Path, threshold, red, green, blue); + FreeIntPtr(lp_Path); + return result; + } + /// + /// Fill all frames with the min RGB color where the animation color is less + /// than the min threshold AND with the max RGB color where the animation is + /// more than the max threshold. Animation is referenced by id. + /// + public static void FillThresholdColorsMinMaxAllFramesRGB(int animationId, int minThreshold, int minRed, int minGreen, int minBlue, int maxThreshold, int maxRed, int maxGreen, int maxBlue) + { + PluginFillThresholdColorsMinMaxAllFramesRGB(animationId, minThreshold, minRed, minGreen, minBlue, maxThreshold, maxRed, maxGreen, maxBlue); + } + /// + /// Fill all frames with the min RGB color where the animation color is less + /// than the min threshold AND with the max RGB color where the animation is + /// more than the max threshold. Animation is referenced by name. + /// + public static void FillThresholdColorsMinMaxAllFramesRGBName(string path, int minThreshold, int minRed, int minGreen, int minBlue, int maxThreshold, int maxRed, int maxGreen, int maxBlue) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginFillThresholdColorsMinMaxAllFramesRGBName(lp_Path, minThreshold, minRed, minGreen, minBlue, maxThreshold, maxRed, maxGreen, maxBlue); + FreeIntPtr(lp_Path); + } + /// + /// D suffix for limited data types. + /// + public static double FillThresholdColorsMinMaxAllFramesRGBNameD(string path, double minThreshold, double minRed, double minGreen, double minBlue, double maxThreshold, double maxRed, double maxGreen, double maxBlue) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + double result = PluginFillThresholdColorsMinMaxAllFramesRGBNameD(lp_Path, minThreshold, minRed, minGreen, minBlue, maxThreshold, maxRed, maxGreen, maxBlue); + FreeIntPtr(lp_Path); + return result; + } + /// + /// Fill the specified frame with the min RGB color where the animation color + /// is less than the min threshold AND with the max RGB color where the animation + /// is more than the max threshold. Animation is referenced by id. + /// + public static void FillThresholdColorsMinMaxRGB(int animationId, int frameId, int minThreshold, int minRed, int minGreen, int minBlue, int maxThreshold, int maxRed, int maxGreen, int maxBlue) + { + PluginFillThresholdColorsMinMaxRGB(animationId, frameId, minThreshold, minRed, minGreen, minBlue, maxThreshold, maxRed, maxGreen, maxBlue); + } + /// + /// Fill the specified frame with the min RGB color where the animation color + /// is less than the min threshold AND with the max RGB color where the animation + /// is more than the max threshold. Animation is referenced by name. + /// + public static void FillThresholdColorsMinMaxRGBName(string path, int frameId, int minThreshold, int minRed, int minGreen, int minBlue, int maxThreshold, int maxRed, int maxGreen, int maxBlue) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginFillThresholdColorsMinMaxRGBName(lp_Path, frameId, minThreshold, minRed, minGreen, minBlue, maxThreshold, maxRed, maxGreen, maxBlue); + FreeIntPtr(lp_Path); + } + /// + /// D suffix for limited data types. + /// + public static double FillThresholdColorsMinMaxRGBNameD(string path, double frameId, double minThreshold, double minRed, double minGreen, double minBlue, double maxThreshold, double maxRed, double maxGreen, double maxBlue) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + double result = PluginFillThresholdColorsMinMaxRGBNameD(lp_Path, frameId, minThreshold, minRed, minGreen, minBlue, maxThreshold, maxRed, maxGreen, maxBlue); + FreeIntPtr(lp_Path); + return result; + } + /// + /// Fill the specified frame with RGB color where the animation color is less + /// than the RGB threshold. Animation is referenced by name. + /// + public static void FillThresholdColorsName(string path, int frameId, int threshold, int color) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginFillThresholdColorsName(lp_Path, frameId, threshold, color); + FreeIntPtr(lp_Path); + } + /// + /// D suffix for limited data types. + /// + public static double FillThresholdColorsNameD(string path, double frameId, double threshold, double color) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + double result = PluginFillThresholdColorsNameD(lp_Path, frameId, threshold, color); + FreeIntPtr(lp_Path); + return result; + } + /// + /// Fill the specified frame with RGB color where the animation color is less + /// than the RGB threshold. Animation is referenced by id. + /// + public static void FillThresholdColorsRGB(int animationId, int frameId, int threshold, int red, int green, int blue) + { + PluginFillThresholdColorsRGB(animationId, frameId, threshold, red, green, blue); + } + /// + /// Fill the specified frame with RGB color where the animation color is less + /// than the RGB threshold. Animation is referenced by name. + /// + public static void FillThresholdColorsRGBName(string path, int frameId, int threshold, int red, int green, int blue) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginFillThresholdColorsRGBName(lp_Path, frameId, threshold, red, green, blue); + FreeIntPtr(lp_Path); + } + /// + /// D suffix for limited data types. + /// + public static double FillThresholdColorsRGBNameD(string path, double frameId, double threshold, double red, double green, double blue) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + double result = PluginFillThresholdColorsRGBNameD(lp_Path, frameId, threshold, red, green, blue); + FreeIntPtr(lp_Path); + return result; + } + /// + /// Fill all frames with RGB color where the animation color is less than the + /// RGB threshold. Animation is referenced by id. + /// + public static void FillThresholdRGBColorsAllFramesRGB(int animationId, int redThreshold, int greenThreshold, int blueThreshold, int red, int green, int blue) + { + PluginFillThresholdRGBColorsAllFramesRGB(animationId, redThreshold, greenThreshold, blueThreshold, red, green, blue); + } + /// + /// Fill all frames with RGB color where the animation color is less than the + /// RGB threshold. Animation is referenced by name. + /// + public static void FillThresholdRGBColorsAllFramesRGBName(string path, int redThreshold, int greenThreshold, int blueThreshold, int red, int green, int blue) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginFillThresholdRGBColorsAllFramesRGBName(lp_Path, redThreshold, greenThreshold, blueThreshold, red, green, blue); + FreeIntPtr(lp_Path); + } + /// + /// D suffix for limited data types. + /// + public static double FillThresholdRGBColorsAllFramesRGBNameD(string path, double redThreshold, double greenThreshold, double blueThreshold, double red, double green, double blue) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + double result = PluginFillThresholdRGBColorsAllFramesRGBNameD(lp_Path, redThreshold, greenThreshold, blueThreshold, red, green, blue); + FreeIntPtr(lp_Path); + return result; + } + /// + /// Fill the specified frame with RGB color where the animation color is less + /// than the RGB threshold. Animation is referenced by id. + /// + public static void FillThresholdRGBColorsRGB(int animationId, int frameId, int redThreshold, int greenThreshold, int blueThreshold, int red, int green, int blue) + { + PluginFillThresholdRGBColorsRGB(animationId, frameId, redThreshold, greenThreshold, blueThreshold, red, green, blue); + } + /// + /// Fill the specified frame with RGB color where the animation color is less + /// than the RGB threshold. Animation is referenced by name. + /// + public static void FillThresholdRGBColorsRGBName(string path, int frameId, int redThreshold, int greenThreshold, int blueThreshold, int red, int green, int blue) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginFillThresholdRGBColorsRGBName(lp_Path, frameId, redThreshold, greenThreshold, blueThreshold, red, green, blue); + FreeIntPtr(lp_Path); + } + /// + /// D suffix for limited data types. + /// + public static double FillThresholdRGBColorsRGBNameD(string path, double frameId, double redThreshold, double greenThreshold, double blueThreshold, double red, double green, double blue) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + double result = PluginFillThresholdRGBColorsRGBNameD(lp_Path, frameId, redThreshold, greenThreshold, blueThreshold, red, green, blue); + FreeIntPtr(lp_Path); + return result; + } + /// + /// Fill the specified frame with RGB color where the animation color is zero. + /// Animation is referenced by id. + /// + public static void FillZeroColor(int animationId, int frameId, int color) + { + PluginFillZeroColor(animationId, frameId, color); + } + /// + /// Fill all frames with RGB color where the animation color is zero. Animation + /// is referenced by id. + /// + public static void FillZeroColorAllFrames(int animationId, int color) + { + PluginFillZeroColorAllFrames(animationId, color); + } + /// + /// Fill all frames with RGB color where the animation color is zero. Animation + /// is referenced by name. + /// + public static void FillZeroColorAllFramesName(string path, int color) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginFillZeroColorAllFramesName(lp_Path, color); + FreeIntPtr(lp_Path); + } + /// + /// D suffix for limited data types. + /// + public static double FillZeroColorAllFramesNameD(string path, double color) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + double result = PluginFillZeroColorAllFramesNameD(lp_Path, color); + FreeIntPtr(lp_Path); + return result; + } + /// + /// Fill all frames with RGB color where the animation color is zero. Animation + /// is referenced by id. + /// + public static void FillZeroColorAllFramesRGB(int animationId, int red, int green, int blue) + { + PluginFillZeroColorAllFramesRGB(animationId, red, green, blue); + } + /// + /// Fill all frames with RGB color where the animation color is zero. Animation + /// is referenced by name. + /// + public static void FillZeroColorAllFramesRGBName(string path, int red, int green, int blue) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginFillZeroColorAllFramesRGBName(lp_Path, red, green, blue); + FreeIntPtr(lp_Path); + } + /// + /// D suffix for limited data types. + /// + public static double FillZeroColorAllFramesRGBNameD(string path, double red, double green, double blue) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + double result = PluginFillZeroColorAllFramesRGBNameD(lp_Path, red, green, blue); + FreeIntPtr(lp_Path); + return result; + } + /// + /// Fill the specified frame with RGB color where the animation color is zero. + /// Animation is referenced by name. + /// + public static void FillZeroColorName(string path, int frameId, int color) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginFillZeroColorName(lp_Path, frameId, color); + FreeIntPtr(lp_Path); + } + /// + /// D suffix for limited data types. + /// + public static double FillZeroColorNameD(string path, double frameId, double color) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + double result = PluginFillZeroColorNameD(lp_Path, frameId, color); + FreeIntPtr(lp_Path); + return result; + } + /// + /// Fill the specified frame with RGB color where the animation color is zero. + /// Animation is referenced by id. + /// + public static void FillZeroColorRGB(int animationId, int frameId, int red, int green, int blue) + { + PluginFillZeroColorRGB(animationId, frameId, red, green, blue); + } + /// + /// Fill the specified frame with RGB color where the animation color is zero. + /// Animation is referenced by name. + /// + public static void FillZeroColorRGBName(string path, int frameId, int red, int green, int blue) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginFillZeroColorRGBName(lp_Path, frameId, red, green, blue); + FreeIntPtr(lp_Path); + } + /// + /// D suffix for limited data types. + /// + public static double FillZeroColorRGBNameD(string path, double frameId, double red, double green, double blue) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + double result = PluginFillZeroColorRGBNameD(lp_Path, frameId, red, green, blue); + FreeIntPtr(lp_Path); + return result; + } + /// + /// Get the animation color for a frame given the `1D` `led`. The `led` should + /// be greater than or equal to 0 and less than the `MaxLeds`. Animation is + /// referenced by id. + /// + public static int Get1DColor(int animationId, int frameId, int led) + { + int result = PluginGet1DColor(animationId, frameId, led); + return result; + } + /// + /// Get the animation color for a frame given the `1D` `led`. The `led` should + /// be greater than or equal to 0 and less than the `MaxLeds`. Animation is + /// referenced by name. + /// + public static int Get1DColorName(string path, int frameId, int led) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + int result = PluginGet1DColorName(lp_Path, frameId, led); + FreeIntPtr(lp_Path); + return result; + } + /// + /// D suffix for limited data types. + /// + public static double Get1DColorNameD(string path, double frameId, double led) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + double result = PluginGet1DColorNameD(lp_Path, frameId, led); + FreeIntPtr(lp_Path); + return result; + } + /// + /// Get the animation color for a frame given the `2D` `row` and `column`. The + /// `row` should be greater than or equal to 0 and less than the `MaxRow`. + /// The `column` should be greater than or equal to 0 and less than the `MaxColumn`. + /// Animation is referenced by id. + /// + public static int Get2DColor(int animationId, int frameId, int row, int column) + { + int result = PluginGet2DColor(animationId, frameId, row, column); + return result; + } + /// + /// Get the animation color for a frame given the `2D` `row` and `column`. The + /// `row` should be greater than or equal to 0 and less than the `MaxRow`. + /// The `column` should be greater than or equal to 0 and less than the `MaxColumn`. + /// Animation is referenced by name. + /// + public static int Get2DColorName(string path, int frameId, int row, int column) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + int result = PluginGet2DColorName(lp_Path, frameId, row, column); + FreeIntPtr(lp_Path); + return result; + } + /// + /// D suffix for limited data types. + /// + public static double Get2DColorNameD(string path, double frameId, double row, double column) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + double result = PluginGet2DColorNameD(lp_Path, frameId, row, column); + FreeIntPtr(lp_Path); + return result; + } + /// + /// Get the animation id for the named animation. + /// + public static int GetAnimation(string name) + { + string str_Name = name; + IntPtr lp_Name = GetPathIntPtr(str_Name); + int result = PluginGetAnimation(lp_Name); + FreeIntPtr(lp_Name); + return result; + } + /// + /// `PluginGetAnimationCount` will return the number of loaded animations. + /// + public static int GetAnimationCount() + { + int result = PluginGetAnimationCount(); + return result; + } + /// + /// D suffix for limited data types. + /// + public static double GetAnimationD(string name) + { + string str_Name = name; + IntPtr lp_Name = GetPathIntPtr(str_Name); + double result = PluginGetAnimationD(lp_Name); + FreeIntPtr(lp_Name); + return result; + } + /// + /// `PluginGetAnimationId` will return the `animationId` given the `index` of + /// the loaded animation. The `index` is zero-based and less than the number + /// returned by `PluginGetAnimationCount`. Use `PluginGetAnimationName` to + /// get the name of the animation. + /// + public static int GetAnimationId(int index) + { + int result = PluginGetAnimationId(index); + return result; + } + /// + /// `PluginGetAnimationName` takes an `animationId` and returns the name of + /// the animation of the `.chroma` animation file. If a name is not available + /// then an empty string will be returned. + /// + public static string GetAnimationName(int animationId) + { + string result = Marshal.PtrToStringAnsi(PluginGetAnimationName(animationId)); + return result; + } + /// + /// Get the current frame of the animation referenced by id. + /// + public static int GetCurrentFrame(int animationId) + { + int result = PluginGetCurrentFrame(animationId); + return result; + } + /// + /// Get the current frame of the animation referenced by name. + /// + public static int GetCurrentFrameName(string path) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + int result = PluginGetCurrentFrameName(lp_Path); + FreeIntPtr(lp_Path); + return result; + } + /// + /// D suffix for limited data types. + /// + public static double GetCurrentFrameNameD(string path) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + double result = PluginGetCurrentFrameNameD(lp_Path); + FreeIntPtr(lp_Path); + return result; + } + /// + /// Returns the `EChromaSDKDevice1DEnum` or `EChromaSDKDevice2DEnum` of a `Chroma` + /// animation respective to the `deviceType`, as an integer upon success. Returns + /// negative one upon failure. + /// + public static int GetDevice(int animationId) + { + int result = PluginGetDevice(animationId); + return result; + } + /// + /// Returns the `EChromaSDKDevice1DEnum` or `EChromaSDKDevice2DEnum` of a `Chroma` + /// animation respective to the `deviceType`, as an integer upon success. Returns + /// negative one upon failure. + /// + public static int GetDeviceName(string path) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + int result = PluginGetDeviceName(lp_Path); + FreeIntPtr(lp_Path); + return result; + } + /// + /// D suffix for limited data types. + /// + public static double GetDeviceNameD(string path) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + double result = PluginGetDeviceNameD(lp_Path); + FreeIntPtr(lp_Path); + return result; + } + /// + /// Returns the `EChromaSDKDeviceTypeEnum` of a `Chroma` animation as an integer + /// upon success. Returns negative one upon failure. + /// + public static int GetDeviceType(int animationId) + { + int result = PluginGetDeviceType(animationId); + return result; + } + /// + /// Returns the `EChromaSDKDeviceTypeEnum` of a `Chroma` animation as an integer + /// upon success. Returns negative one upon failure. + /// + public static int GetDeviceTypeName(string path) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + int result = PluginGetDeviceTypeName(lp_Path); + FreeIntPtr(lp_Path); + return result; + } + /// + /// D suffix for limited data types. + /// + public static double GetDeviceTypeNameD(string path) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + double result = PluginGetDeviceTypeNameD(lp_Path); + FreeIntPtr(lp_Path); + return result; + } + /// + /// Get the frame colors and duration (in seconds) for a `Chroma` animation + /// referenced by id. The `color` is expected to be an array of the expected + /// dimensions for the `deviceType/device`. The `length` parameter is the size + /// of the `color` array. For `EChromaSDKDevice1DEnum` the array size should + /// be `MAX LEDS`. For `EChromaSDKDevice2DEnum` the array size should be `MAX + /// ROW` times `MAX COLUMN`. Keys are populated only for EChromaSDKDevice2DEnum::DE_Keyboard + /// and EChromaSDKDevice2DEnum::DE_KeyboardExtended. Keys will only use the + /// EChromaSDKDevice2DEnum::DE_Keyboard `MAX_ROW` times `MAX_COLUMN` keysLength. + /// Returns the animation id upon success. Returns negative one upon failure. + /// + /// + public static int GetFrame(int animationId, int frameIndex, out float duration, int[] colors, int length, int[] keys, int keysLength) + { + int result = PluginGetFrame(animationId, frameIndex, out duration, colors, length, keys, keysLength); + return result; + } + /// + /// Returns the frame count of a `Chroma` animation upon success. Returns negative + /// one upon failure. + /// + public static int GetFrameCount(int animationId) + { + int result = PluginGetFrameCount(animationId); + return result; + } + /// + /// Returns the frame count of a `Chroma` animation upon success. Returns negative + /// one upon failure. + /// + public static int GetFrameCountName(string path) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + int result = PluginGetFrameCountName(lp_Path); + FreeIntPtr(lp_Path); + return result; + } + /// + /// D suffix for limited data types. + /// + public static double GetFrameCountNameD(string path) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + double result = PluginGetFrameCountNameD(lp_Path); + FreeIntPtr(lp_Path); + return result; + } + /// + /// Get the frame colors and duration (in seconds) for a `Chroma` animation + /// referenced by name. The `color` is expected to be an array of the expected + /// dimensions for the `deviceType/device`. The `length` parameter is the size + /// of the `color` array. For `EChromaSDKDevice1DEnum` the array size should + /// be `MAX LEDS`. For `EChromaSDKDevice2DEnum` the array size should be `MAX + /// ROW` times `MAX COLUMN`. Keys are populated only for EChromaSDKDevice2DEnum::DE_Keyboard + /// and EChromaSDKDevice2DEnum::DE_KeyboardExtended. Keys will only use the + /// EChromaSDKDevice2DEnum::DE_Keyboard `MAX_ROW` times `MAX_COLUMN` keysLength. + /// Returns the animation id upon success. Returns negative one upon failure. + /// + /// + public static int GetFrameName(string path, int frameIndex, out float duration, int[] colors, int length, int[] keys, int keysLength) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + int result = PluginGetFrameName(lp_Path, frameIndex, out duration, colors, length, keys, keysLength); + FreeIntPtr(lp_Path); + return result; + } + /// + /// Get the color of an animation key for the given frame referenced by id. + /// + /// + public static int GetKeyColor(int animationId, int frameId, int rzkey) + { + int result = PluginGetKeyColor(animationId, frameId, rzkey); + return result; + } + /// + /// D suffix for limited data types. + /// + public static double GetKeyColorD(string path, double frameId, double rzkey) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + double result = PluginGetKeyColorD(lp_Path, frameId, rzkey); + FreeIntPtr(lp_Path); + return result; + } + /// + /// Get the color of an animation key for the given frame referenced by name. + /// + /// + public static int GetKeyColorName(string path, int frameId, int rzkey) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + int result = PluginGetKeyColorName(lp_Path, frameId, rzkey); + FreeIntPtr(lp_Path); + return result; + } + /// + /// Returns `RZRESULT_SUCCESS` if the plugin has been initialized successfully. + /// Returns `RZRESULT_DLL_NOT_FOUND` if core Chroma library is not found. Returns + /// `RZRESULT_DLL_INVALID_SIGNATURE` if core Chroma library has an invalid + /// signature. + /// + public static int GetLibraryLoadedState() + { + int result = PluginGetLibraryLoadedState(); + return result; + } + /// + /// D suffix for limited data types. + /// + public static double GetLibraryLoadedStateD() + { + double result = PluginGetLibraryLoadedStateD(); + return result; + } + /// + /// Returns the `MAX COLUMN` given the `EChromaSDKDevice2DEnum` device as an + /// integer upon success. Returns negative one upon failure. + /// + public static int GetMaxColumn(Device2D device) + { + int result = PluginGetMaxColumn((int)device); + return result; + } + /// + /// D suffix for limited data types. + /// + public static double GetMaxColumnD(double device) + { + double result = PluginGetMaxColumnD(device); + return result; + } + /// + /// Returns the MAX LEDS given the `EChromaSDKDevice1DEnum` device as an integer + /// upon success. Returns negative one upon failure. + /// + public static int GetMaxLeds(Device1D device) + { + int result = PluginGetMaxLeds((int)device); + return result; + } + /// + /// D suffix for limited data types. + /// + public static double GetMaxLedsD(double device) + { + double result = PluginGetMaxLedsD(device); + return result; + } + /// + /// Returns the `MAX ROW` given the `EChromaSDKDevice2DEnum` device as an integer + /// upon success. Returns negative one upon failure. + /// + public static int GetMaxRow(Device2D device) + { + int result = PluginGetMaxRow((int)device); + return result; + } + /// + /// D suffix for limited data types. + /// + public static double GetMaxRowD(double device) + { + double result = PluginGetMaxRowD(device); + return result; + } + /// + /// `PluginGetPlayingAnimationCount` will return the number of playing animations. + /// + /// + public static int GetPlayingAnimationCount() + { + int result = PluginGetPlayingAnimationCount(); + return result; + } + /// + /// `PluginGetPlayingAnimationId` will return the `animationId` given the `index` + /// of the playing animation. The `index` is zero-based and less than the number + /// returned by `PluginGetPlayingAnimationCount`. Use `PluginGetAnimationName` + /// to get the name of the animation. + /// + public static int GetPlayingAnimationId(int index) + { + int result = PluginGetPlayingAnimationId(index); + return result; + } + /// + /// Get the RGB color given red, green, and blue. + /// + public static int GetRGB(int red, int green, int blue) + { + int result = PluginGetRGB(red, green, blue); + return result; + } + /// + /// D suffix for limited data types. + /// + public static double GetRGBD(double red, double green, double blue) + { + double result = PluginGetRGBD(red, green, blue); + return result; + } + /// + /// Check if the animation has loop enabled referenced by id. + /// + public static bool HasAnimationLoop(int animationId) + { + bool result = PluginHasAnimationLoop(animationId); + return result; + } + /// + /// Check if the animation has loop enabled referenced by name. + /// + public static bool HasAnimationLoopName(string path) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + bool result = PluginHasAnimationLoopName(lp_Path); + FreeIntPtr(lp_Path); + return result; + } + /// + /// D suffix for limited data types. + /// + public static double HasAnimationLoopNameD(string path) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + double result = PluginHasAnimationLoopNameD(lp_Path); + FreeIntPtr(lp_Path); + return result; + } + /// + /// Initialize the ChromaSDK. Zero indicates success, otherwise failure. Many + /// API methods auto initialize the ChromaSDK if not already initialized. + /// + public static int Init() + { + int result = PluginInit(); + return result; + } + /// + /// D suffix for limited data types. + /// + public static double InitD() + { + double result = PluginInitD(); + return result; + } + /// + /// Initialize the ChromaSDK. AppInfo populates the details in Synapse. Zero + /// indicates success, otherwise failure. Many API methods auto initialize + /// the ChromaSDK if not already initialized. + /// + public static int InitSDK(ref ChromaSDK.APPINFOTYPE appInfo) + { + int result = PluginInitSDK(ref appInfo); + return result; + } + /// + /// Insert an animation delay by duplicating the frame by the delay number of + /// times. Animation is referenced by id. + /// + public static void InsertDelay(int animationId, int frameId, int delay) + { + PluginInsertDelay(animationId, frameId, delay); + } + /// + /// Insert an animation delay by duplicating the frame by the delay number of + /// times. Animation is referenced by name. + /// + public static void InsertDelayName(string path, int frameId, int delay) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginInsertDelayName(lp_Path, frameId, delay); + FreeIntPtr(lp_Path); + } + /// + /// D suffix for limited data types. + /// + public static double InsertDelayNameD(string path, double frameId, double delay) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + double result = PluginInsertDelayNameD(lp_Path, frameId, delay); + FreeIntPtr(lp_Path); + return result; + } + /// + /// Duplicate the source frame index at the target frame index. Animation is + /// referenced by id. + /// + public static void InsertFrame(int animationId, int sourceFrame, int targetFrame) + { + PluginInsertFrame(animationId, sourceFrame, targetFrame); + } + /// + /// Duplicate the source frame index at the target frame index. Animation is + /// referenced by name. + /// + public static void InsertFrameName(string path, int sourceFrame, int targetFrame) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginInsertFrameName(lp_Path, sourceFrame, targetFrame); + FreeIntPtr(lp_Path); + } + /// + /// D suffix for limited data types. + /// + public static double InsertFrameNameD(string path, double sourceFrame, double targetFrame) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + double result = PluginInsertFrameNameD(lp_Path, sourceFrame, targetFrame); + FreeIntPtr(lp_Path); + return result; + } + /// + /// Invert all the colors at the specified frame. Animation is referenced by + /// id. + /// + public static void InvertColors(int animationId, int frameId) + { + PluginInvertColors(animationId, frameId); + } + /// + /// Invert all the colors for all frames. Animation is referenced by id. + /// + public static void InvertColorsAllFrames(int animationId) + { + PluginInvertColorsAllFrames(animationId); + } + /// + /// Invert all the colors for all frames. Animation is referenced by name. + /// + public static void InvertColorsAllFramesName(string path) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginInvertColorsAllFramesName(lp_Path); + FreeIntPtr(lp_Path); + } + /// + /// D suffix for limited data types. + /// + public static double InvertColorsAllFramesNameD(string path) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + double result = PluginInvertColorsAllFramesNameD(lp_Path); + FreeIntPtr(lp_Path); + return result; + } + /// + /// Invert all the colors at the specified frame. Animation is referenced by + /// name. + /// + public static void InvertColorsName(string path, int frameId) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginInvertColorsName(lp_Path, frameId); + FreeIntPtr(lp_Path); + } + /// + /// D suffix for limited data types. + /// + public static double InvertColorsNameD(string path, double frameId) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + double result = PluginInvertColorsNameD(lp_Path, frameId); + FreeIntPtr(lp_Path); + return result; + } + /// + /// Check if the animation is paused referenced by id. + /// + public static bool IsAnimationPaused(int animationId) + { + bool result = PluginIsAnimationPaused(animationId); + return result; + } + /// + /// Check if the animation is paused referenced by name. + /// + public static bool IsAnimationPausedName(string path) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + bool result = PluginIsAnimationPausedName(lp_Path); + FreeIntPtr(lp_Path); + return result; + } + /// + /// D suffix for limited data types. + /// + public static double IsAnimationPausedNameD(string path) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + double result = PluginIsAnimationPausedNameD(lp_Path); + FreeIntPtr(lp_Path); + return result; + } + /// + /// The editor dialog is a non-blocking modal window, this method returns true + /// if the modal window is open, otherwise false. + /// + public static bool IsDialogOpen() + { + bool result = PluginIsDialogOpen(); + return result; + } + /// + /// D suffix for limited data types. + /// + public static double IsDialogOpenD() + { + double result = PluginIsDialogOpenD(); + return result; + } + /// + /// Returns true if the plugin has been initialized. Returns false if the plugin + /// is uninitialized. + /// + public static bool IsInitialized() + { + bool result = PluginIsInitialized(); + return result; + } + /// + /// D suffix for limited data types. + /// + public static double IsInitializedD() + { + double result = PluginIsInitializedD(); + return result; + } + /// + /// If the method can be invoked the method returns true. + /// + public static bool IsPlatformSupported() + { + bool result = PluginIsPlatformSupported(); + return result; + } + /// + /// D suffix for limited data types. + /// + public static double IsPlatformSupportedD() + { + double result = PluginIsPlatformSupportedD(); + return result; + } + /// + /// `PluginIsPlayingName` automatically handles initializing the `ChromaSDK`. + /// The named `.chroma` animation file will be automatically opened. The method + /// will return whether the animation is playing or not. Animation is referenced + /// by id. + /// + public static bool IsPlaying(int animationId) + { + bool result = PluginIsPlaying(animationId); + return result; + } + /// + /// D suffix for limited data types. + /// + public static double IsPlayingD(double animationId) + { + double result = PluginIsPlayingD(animationId); + return result; + } + /// + /// `PluginIsPlayingName` automatically handles initializing the `ChromaSDK`. + /// The named `.chroma` animation file will be automatically opened. The method + /// will return whether the animation is playing or not. Animation is referenced + /// by name. + /// + public static bool IsPlayingName(string path) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + bool result = PluginIsPlayingName(lp_Path); + FreeIntPtr(lp_Path); + return result; + } + /// + /// D suffix for limited data types. + /// + public static double IsPlayingNameD(string path) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + double result = PluginIsPlayingNameD(lp_Path); + FreeIntPtr(lp_Path); + return result; + } + /// + /// `PluginIsPlayingType` automatically handles initializing the `ChromaSDK`. + /// If any animation is playing for the `deviceType` and `device` combination, + /// the method will return true, otherwise false. + /// + public static bool IsPlayingType(int deviceType, int device) + { + bool result = PluginIsPlayingType(deviceType, device); + return result; + } + /// + /// D suffix for limited data types. + /// + public static double IsPlayingTypeD(double deviceType, double device) + { + double result = PluginIsPlayingTypeD(deviceType, device); + return result; + } + /// + /// Do a lerp math operation on a float. + /// + public static float Lerp(float start, float end, float amt) + { + float result = PluginLerp(start, end, amt); + return result; + } + /// + /// Lerp from one color to another given t in the range 0.0 to 1.0. + /// + public static int LerpColor(int from, int to, float t) + { + int result = PluginLerpColor(from, to, t); + return result; + } + /// + /// Loads `Chroma` effects so that the animation can be played immediately. + /// Returns the animation id upon success. Returns negative one upon failure. + /// + /// + public static int LoadAnimation(int animationId) + { + int result = PluginLoadAnimation(animationId); + return result; + } + /// + /// D suffix for limited data types. + /// + public static double LoadAnimationD(double animationId) + { + double result = PluginLoadAnimationD(animationId); + return result; + } + /// + /// Load the named animation. + /// + public static void LoadAnimationName(string path) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginLoadAnimationName(lp_Path); + FreeIntPtr(lp_Path); + } + /// + /// Load a composite set of animations. + /// + public static void LoadComposite(string name) + { + string str_Name = name; + IntPtr lp_Name = GetPathIntPtr(str_Name); + PluginLoadComposite(lp_Name); + FreeIntPtr(lp_Name); + } + /// + /// Make a blank animation for the length of the frame count. Frame duration + /// defaults to the duration. The frame color defaults to color. Animation + /// is referenced by id. + /// + public static void MakeBlankFrames(int animationId, int frameCount, float duration, int color) + { + PluginMakeBlankFrames(animationId, frameCount, duration, color); + } + /// + /// Make a blank animation for the length of the frame count. Frame duration + /// defaults to the duration. The frame color defaults to color. Animation + /// is referenced by name. + /// + public static void MakeBlankFramesName(string path, int frameCount, float duration, int color) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginMakeBlankFramesName(lp_Path, frameCount, duration, color); + FreeIntPtr(lp_Path); + } + /// + /// D suffix for limited data types. + /// + public static double MakeBlankFramesNameD(string path, double frameCount, double duration, double color) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + double result = PluginMakeBlankFramesNameD(lp_Path, frameCount, duration, color); + FreeIntPtr(lp_Path); + return result; + } + /// + /// Make a blank animation for the length of the frame count. Frame duration + /// defaults to the duration. The frame color is random. Animation is referenced + /// by id. + /// + public static void MakeBlankFramesRandom(int animationId, int frameCount, float duration) + { + PluginMakeBlankFramesRandom(animationId, frameCount, duration); + } + /// + /// Make a blank animation for the length of the frame count. Frame duration + /// defaults to the duration. The frame color is random black and white. Animation + /// is referenced by id. + /// + public static void MakeBlankFramesRandomBlackAndWhite(int animationId, int frameCount, float duration) + { + PluginMakeBlankFramesRandomBlackAndWhite(animationId, frameCount, duration); + } + /// + /// Make a blank animation for the length of the frame count. Frame duration + /// defaults to the duration. The frame color is random black and white. Animation + /// is referenced by name. + /// + public static void MakeBlankFramesRandomBlackAndWhiteName(string path, int frameCount, float duration) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginMakeBlankFramesRandomBlackAndWhiteName(lp_Path, frameCount, duration); + FreeIntPtr(lp_Path); + } + /// + /// D suffix for limited data types. + /// + public static double MakeBlankFramesRandomBlackAndWhiteNameD(string path, double frameCount, double duration) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + double result = PluginMakeBlankFramesRandomBlackAndWhiteNameD(lp_Path, frameCount, duration); + FreeIntPtr(lp_Path); + return result; + } + /// + /// Make a blank animation for the length of the frame count. Frame duration + /// defaults to the duration. The frame color is random. Animation is referenced + /// by name. + /// + public static void MakeBlankFramesRandomName(string path, int frameCount, float duration) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginMakeBlankFramesRandomName(lp_Path, frameCount, duration); + FreeIntPtr(lp_Path); + } + /// + /// D suffix for limited data types. + /// + public static double MakeBlankFramesRandomNameD(string path, double frameCount, double duration) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + double result = PluginMakeBlankFramesRandomNameD(lp_Path, frameCount, duration); + FreeIntPtr(lp_Path); + return result; + } + /// + /// Make a blank animation for the length of the frame count. Frame duration + /// defaults to the duration. The frame color defaults to color. Animation + /// is referenced by id. + /// + public static void MakeBlankFramesRGB(int animationId, int frameCount, float duration, int red, int green, int blue) + { + PluginMakeBlankFramesRGB(animationId, frameCount, duration, red, green, blue); + } + /// + /// Make a blank animation for the length of the frame count. Frame duration + /// defaults to the duration. The frame color defaults to color. Animation + /// is referenced by name. + /// + public static void MakeBlankFramesRGBName(string path, int frameCount, float duration, int red, int green, int blue) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginMakeBlankFramesRGBName(lp_Path, frameCount, duration, red, green, blue); + FreeIntPtr(lp_Path); + } + /// + /// D suffix for limited data types. + /// + public static double MakeBlankFramesRGBNameD(string path, double frameCount, double duration, double red, double green, double blue) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + double result = PluginMakeBlankFramesRGBNameD(lp_Path, frameCount, duration, red, green, blue); + FreeIntPtr(lp_Path); + return result; + } + /// + /// Flips the color grid horizontally for all `Chroma` animation frames. Returns + /// the animation id upon success. Returns negative one upon failure. + /// + public static int MirrorHorizontally(int animationId) + { + int result = PluginMirrorHorizontally(animationId); + return result; + } + /// + /// Flips the color grid vertically for all `Chroma` animation frames. This + /// method has no effect for `EChromaSDKDevice1DEnum` devices. Returns the + /// animation id upon success. Returns negative one upon failure. + /// + public static int MirrorVertically(int animationId) + { + int result = PluginMirrorVertically(animationId); + return result; + } + /// + /// Multiply the color intensity with the lerp result from color 1 to color + /// 2 using the frame index divided by the frame count for the `t` parameter. + /// Animation is referenced in id. + /// + public static void MultiplyColorLerpAllFrames(int animationId, int color1, int color2) + { + PluginMultiplyColorLerpAllFrames(animationId, color1, color2); + } + /// + /// Multiply the color intensity with the lerp result from color 1 to color + /// 2 using the frame index divided by the frame count for the `t` parameter. + /// Animation is referenced in name. + /// + public static void MultiplyColorLerpAllFramesName(string path, int color1, int color2) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginMultiplyColorLerpAllFramesName(lp_Path, color1, color2); + FreeIntPtr(lp_Path); + } + /// + /// D suffix for limited data types. + /// + public static double MultiplyColorLerpAllFramesNameD(string path, double color1, double color2) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + double result = PluginMultiplyColorLerpAllFramesNameD(lp_Path, color1, color2); + FreeIntPtr(lp_Path); + return result; + } + /// + /// Multiply all the colors in the frame by the intensity value. The valid the + /// intensity range is from 0.0 to 255.0. RGB components are multiplied equally. + /// An intensity of 0.5 would half the color value. Black colors in the frame + /// will not be affected by this method. + /// + public static void MultiplyIntensity(int animationId, int frameId, float intensity) + { + PluginMultiplyIntensity(animationId, frameId, intensity); + } + /// + /// Multiply all the colors for all frames by the intensity value. The valid + /// the intensity range is from 0.0 to 255.0. RGB components are multiplied + /// equally. An intensity of 0.5 would half the color value. Black colors in + /// the frame will not be affected by this method. + /// + public static void MultiplyIntensityAllFrames(int animationId, float intensity) + { + PluginMultiplyIntensityAllFrames(animationId, intensity); + } + /// + /// Multiply all the colors for all frames by the intensity value. The valid + /// the intensity range is from 0.0 to 255.0. RGB components are multiplied + /// equally. An intensity of 0.5 would half the color value. Black colors in + /// the frame will not be affected by this method. + /// + public static void MultiplyIntensityAllFramesName(string path, float intensity) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginMultiplyIntensityAllFramesName(lp_Path, intensity); + FreeIntPtr(lp_Path); + } + /// + /// D suffix for limited data types. + /// + public static double MultiplyIntensityAllFramesNameD(string path, double intensity) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + double result = PluginMultiplyIntensityAllFramesNameD(lp_Path, intensity); + FreeIntPtr(lp_Path); + return result; + } + /// + /// Multiply all frames by the RBG color intensity. Animation is referenced + /// by id. + /// + public static void MultiplyIntensityAllFramesRGB(int animationId, int red, int green, int blue) + { + PluginMultiplyIntensityAllFramesRGB(animationId, red, green, blue); + } + /// + /// Multiply all frames by the RBG color intensity. Animation is referenced + /// by name. + /// + public static void MultiplyIntensityAllFramesRGBName(string path, int red, int green, int blue) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginMultiplyIntensityAllFramesRGBName(lp_Path, red, green, blue); + FreeIntPtr(lp_Path); + } + /// + /// D suffix for limited data types. + /// + public static double MultiplyIntensityAllFramesRGBNameD(string path, double red, double green, double blue) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + double result = PluginMultiplyIntensityAllFramesRGBNameD(lp_Path, red, green, blue); + FreeIntPtr(lp_Path); + return result; + } + /// + /// Multiply the specific frame by the RBG color intensity. Animation is referenced + /// by id. + /// + public static void MultiplyIntensityColor(int animationId, int frameId, int color) + { + PluginMultiplyIntensityColor(animationId, frameId, color); + } + /// + /// Multiply all frames by the RBG color intensity. Animation is referenced + /// by id. + /// + public static void MultiplyIntensityColorAllFrames(int animationId, int color) + { + PluginMultiplyIntensityColorAllFrames(animationId, color); + } + /// + /// Multiply all frames by the RBG color intensity. Animation is referenced + /// by name. + /// + public static void MultiplyIntensityColorAllFramesName(string path, int color) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginMultiplyIntensityColorAllFramesName(lp_Path, color); + FreeIntPtr(lp_Path); + } + /// + /// D suffix for limited data types. + /// + public static double MultiplyIntensityColorAllFramesNameD(string path, double color) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + double result = PluginMultiplyIntensityColorAllFramesNameD(lp_Path, color); + FreeIntPtr(lp_Path); + return result; + } + /// + /// Multiply the specific frame by the RBG color intensity. Animation is referenced + /// by name. + /// + public static void MultiplyIntensityColorName(string path, int frameId, int color) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginMultiplyIntensityColorName(lp_Path, frameId, color); + FreeIntPtr(lp_Path); + } + /// + /// D suffix for limited data types. + /// + public static double MultiplyIntensityColorNameD(string path, double frameId, double color) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + double result = PluginMultiplyIntensityColorNameD(lp_Path, frameId, color); + FreeIntPtr(lp_Path); + return result; + } + /// + /// Multiply all the colors in the frame by the intensity value. The valid the + /// intensity range is from 0.0 to 255.0. RGB components are multiplied equally. + /// An intensity of 0.5 would half the color value. Black colors in the frame + /// will not be affected by this method. + /// + public static void MultiplyIntensityName(string path, int frameId, float intensity) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginMultiplyIntensityName(lp_Path, frameId, intensity); + FreeIntPtr(lp_Path); + } + /// + /// D suffix for limited data types. + /// + public static double MultiplyIntensityNameD(string path, double frameId, double intensity) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + double result = PluginMultiplyIntensityNameD(lp_Path, frameId, intensity); + FreeIntPtr(lp_Path); + return result; + } + /// + /// Multiply the specific frame by the RBG color intensity. Animation is referenced + /// by id. + /// + public static void MultiplyIntensityRGB(int animationId, int frameId, int red, int green, int blue) + { + PluginMultiplyIntensityRGB(animationId, frameId, red, green, blue); + } + /// + /// Multiply the specific frame by the RBG color intensity. Animation is referenced + /// by name. + /// + public static void MultiplyIntensityRGBName(string path, int frameId, int red, int green, int blue) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginMultiplyIntensityRGBName(lp_Path, frameId, red, green, blue); + FreeIntPtr(lp_Path); + } + /// + /// D suffix for limited data types. + /// + public static double MultiplyIntensityRGBNameD(string path, double frameId, double red, double green, double blue) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + double result = PluginMultiplyIntensityRGBNameD(lp_Path, frameId, red, green, blue); + FreeIntPtr(lp_Path); + return result; + } + /// + /// Multiply the specific frame by the color lerp result between color 1 and + /// 2 using the frame color value as the `t` value. Animation is referenced + /// by id. + /// + public static void MultiplyNonZeroTargetColorLerp(int animationId, int frameId, int color1, int color2) + { + PluginMultiplyNonZeroTargetColorLerp(animationId, frameId, color1, color2); + } + /// + /// Multiply all frames by the color lerp result between color 1 and 2 using + /// the frame color value as the `t` value. Animation is referenced by id. + /// + /// + public static void MultiplyNonZeroTargetColorLerpAllFrames(int animationId, int color1, int color2) + { + PluginMultiplyNonZeroTargetColorLerpAllFrames(animationId, color1, color2); + } + /// + /// Multiply all frames by the color lerp result between color 1 and 2 using + /// the frame color value as the `t` value. Animation is referenced by name. + /// + /// + public static void MultiplyNonZeroTargetColorLerpAllFramesName(string path, int color1, int color2) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginMultiplyNonZeroTargetColorLerpAllFramesName(lp_Path, color1, color2); + FreeIntPtr(lp_Path); + } + /// + /// D suffix for limited data types. + /// + public static double MultiplyNonZeroTargetColorLerpAllFramesNameD(string path, double color1, double color2) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + double result = PluginMultiplyNonZeroTargetColorLerpAllFramesNameD(lp_Path, color1, color2); + FreeIntPtr(lp_Path); + return result; + } + /// + /// Multiply the specific frame by the color lerp result between RGB 1 and 2 + /// using the frame color value as the `t` value. Animation is referenced by + /// id. + /// + public static void MultiplyNonZeroTargetColorLerpAllFramesRGB(int animationId, int red1, int green1, int blue1, int red2, int green2, int blue2) + { + PluginMultiplyNonZeroTargetColorLerpAllFramesRGB(animationId, red1, green1, blue1, red2, green2, blue2); + } + /// + /// Multiply the specific frame by the color lerp result between RGB 1 and 2 + /// using the frame color value as the `t` value. Animation is referenced by + /// name. + /// + public static void MultiplyNonZeroTargetColorLerpAllFramesRGBName(string path, int red1, int green1, int blue1, int red2, int green2, int blue2) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginMultiplyNonZeroTargetColorLerpAllFramesRGBName(lp_Path, red1, green1, blue1, red2, green2, blue2); + FreeIntPtr(lp_Path); + } + /// + /// D suffix for limited data types. + /// + public static double MultiplyNonZeroTargetColorLerpAllFramesRGBNameD(string path, double red1, double green1, double blue1, double red2, double green2, double blue2) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + double result = PluginMultiplyNonZeroTargetColorLerpAllFramesRGBNameD(lp_Path, red1, green1, blue1, red2, green2, blue2); + FreeIntPtr(lp_Path); + return result; + } + /// + /// Multiply the specific frame by the color lerp result between color 1 and + /// 2 using the frame color value as the `t` value. Animation is referenced + /// by id. + /// + public static void MultiplyTargetColorLerp(int animationId, int frameId, int color1, int color2) + { + PluginMultiplyTargetColorLerp(animationId, frameId, color1, color2); + } + /// + /// Multiply all frames by the color lerp result between color 1 and 2 using + /// the frame color value as the `t` value. Animation is referenced by id. + /// + /// + public static void MultiplyTargetColorLerpAllFrames(int animationId, int color1, int color2) + { + PluginMultiplyTargetColorLerpAllFrames(animationId, color1, color2); + } + /// + /// Multiply all frames by the color lerp result between color 1 and 2 using + /// the frame color value as the `t` value. Animation is referenced by name. + /// + /// + public static void MultiplyTargetColorLerpAllFramesName(string path, int color1, int color2) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginMultiplyTargetColorLerpAllFramesName(lp_Path, color1, color2); + FreeIntPtr(lp_Path); + } + /// + /// D suffix for limited data types. + /// + public static double MultiplyTargetColorLerpAllFramesNameD(string path, double color1, double color2) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + double result = PluginMultiplyTargetColorLerpAllFramesNameD(lp_Path, color1, color2); + FreeIntPtr(lp_Path); + return result; + } + /// + /// Multiply all frames by the color lerp result between RGB 1 and 2 using the + /// frame color value as the `t` value. Animation is referenced by id. + /// + public static void MultiplyTargetColorLerpAllFramesRGB(int animationId, int red1, int green1, int blue1, int red2, int green2, int blue2) + { + PluginMultiplyTargetColorLerpAllFramesRGB(animationId, red1, green1, blue1, red2, green2, blue2); + } + /// + /// Multiply all frames by the color lerp result between RGB 1 and 2 using the + /// frame color value as the `t` value. Animation is referenced by name. + /// + public static void MultiplyTargetColorLerpAllFramesRGBName(string path, int red1, int green1, int blue1, int red2, int green2, int blue2) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginMultiplyTargetColorLerpAllFramesRGBName(lp_Path, red1, green1, blue1, red2, green2, blue2); + FreeIntPtr(lp_Path); + } + /// + /// D suffix for limited data types. + /// + public static double MultiplyTargetColorLerpAllFramesRGBNameD(string path, double red1, double green1, double blue1, double red2, double green2, double blue2) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + double result = PluginMultiplyTargetColorLerpAllFramesRGBNameD(lp_Path, red1, green1, blue1, red2, green2, blue2); + FreeIntPtr(lp_Path); + return result; + } + /// + /// Multiply the specific frame by the color lerp result between color 1 and + /// 2 using the frame color value as the `t` value. Animation is referenced + /// by name. + /// + public static void MultiplyTargetColorLerpName(string path, int frameId, int color1, int color2) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginMultiplyTargetColorLerpName(lp_Path, frameId, color1, color2); + FreeIntPtr(lp_Path); + } + /// + /// Offset all colors in the frame using the RGB offset. Use the range of -255 + /// to 255 for red, green, and blue parameters. Negative values remove color. + /// Positive values add color. + /// + public static void OffsetColors(int animationId, int frameId, int red, int green, int blue) + { + PluginOffsetColors(animationId, frameId, red, green, blue); + } + /// + /// Offset all colors for all frames using the RGB offset. Use the range of + /// -255 to 255 for red, green, and blue parameters. Negative values remove + /// color. Positive values add color. + /// + public static void OffsetColorsAllFrames(int animationId, int red, int green, int blue) + { + PluginOffsetColorsAllFrames(animationId, red, green, blue); + } + /// + /// Offset all colors for all frames using the RGB offset. Use the range of + /// -255 to 255 for red, green, and blue parameters. Negative values remove + /// color. Positive values add color. + /// + public static void OffsetColorsAllFramesName(string path, int red, int green, int blue) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginOffsetColorsAllFramesName(lp_Path, red, green, blue); + FreeIntPtr(lp_Path); + } + /// + /// D suffix for limited data types. + /// + public static double OffsetColorsAllFramesNameD(string path, double red, double green, double blue) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + double result = PluginOffsetColorsAllFramesNameD(lp_Path, red, green, blue); + FreeIntPtr(lp_Path); + return result; + } + /// + /// Offset all colors in the frame using the RGB offset. Use the range of -255 + /// to 255 for red, green, and blue parameters. Negative values remove color. + /// Positive values add color. + /// + public static void OffsetColorsName(string path, int frameId, int red, int green, int blue) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginOffsetColorsName(lp_Path, frameId, red, green, blue); + FreeIntPtr(lp_Path); + } + /// + /// D suffix for limited data types. + /// + public static double OffsetColorsNameD(string path, double frameId, double red, double green, double blue) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + double result = PluginOffsetColorsNameD(lp_Path, frameId, red, green, blue); + FreeIntPtr(lp_Path); + return result; + } + /// + /// This method will only update colors in the animation that are not already + /// set to black. Offset a subset of colors in the frame using the RGB offset. + /// Use the range of -255 to 255 for red, green, and blue parameters. Negative + /// values remove color. Positive values add color. + /// + public static void OffsetNonZeroColors(int animationId, int frameId, int red, int green, int blue) + { + PluginOffsetNonZeroColors(animationId, frameId, red, green, blue); + } + /// + /// This method will only update colors in the animation that are not already + /// set to black. Offset a subset of colors for all frames using the RGB offset. + /// Use the range of -255 to 255 for red, green, and blue parameters. Negative + /// values remove color. Positive values add color. + /// + public static void OffsetNonZeroColorsAllFrames(int animationId, int red, int green, int blue) + { + PluginOffsetNonZeroColorsAllFrames(animationId, red, green, blue); + } + /// + /// This method will only update colors in the animation that are not already + /// set to black. Offset a subset of colors for all frames using the RGB offset. + /// Use the range of -255 to 255 for red, green, and blue parameters. Negative + /// values remove color. Positive values add color. + /// + public static void OffsetNonZeroColorsAllFramesName(string path, int red, int green, int blue) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginOffsetNonZeroColorsAllFramesName(lp_Path, red, green, blue); + FreeIntPtr(lp_Path); + } + /// + /// D suffix for limited data types. + /// + public static double OffsetNonZeroColorsAllFramesNameD(string path, double red, double green, double blue) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + double result = PluginOffsetNonZeroColorsAllFramesNameD(lp_Path, red, green, blue); + FreeIntPtr(lp_Path); + return result; + } + /// + /// This method will only update colors in the animation that are not already + /// set to black. Offset a subset of colors in the frame using the RGB offset. + /// Use the range of -255 to 255 for red, green, and blue parameters. Negative + /// values remove color. Positive values add color. + /// + public static void OffsetNonZeroColorsName(string path, int frameId, int red, int green, int blue) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginOffsetNonZeroColorsName(lp_Path, frameId, red, green, blue); + FreeIntPtr(lp_Path); + } + /// + /// D suffix for limited data types. + /// + public static double OffsetNonZeroColorsNameD(string path, double frameId, double red, double green, double blue) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + double result = PluginOffsetNonZeroColorsNameD(lp_Path, frameId, red, green, blue); + FreeIntPtr(lp_Path); + return result; + } + /// + /// Opens a `Chroma` animation file so that it can be played. Returns an animation + /// id >= 0 upon success. Returns negative one if there was a failure. The + /// animation id is used in most of the API methods. + /// + public static int OpenAnimation(string path) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + int result = PluginOpenAnimation(lp_Path); + FreeIntPtr(lp_Path); + return result; + } + /// + /// D suffix for limited data types. + /// + public static double OpenAnimationD(string path) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + double result = PluginOpenAnimationD(lp_Path); + FreeIntPtr(lp_Path); + return result; + } + /// + /// Opens a `Chroma` animation data from memory so that it can be played. `Data` + /// is a pointer to BYTE array of the loaded animation in memory. `Name` will + /// be assigned to the animation when loaded. Returns an animation id >= 0 + /// upon success. Returns negative one if there was a failure. The animation + /// id is used in most of the API methods. + /// + public static int OpenAnimationFromMemory(byte[] data, string name) + { + string str_Name = name; + IntPtr lp_Name = GetPathIntPtr(str_Name); + int result = PluginOpenAnimationFromMemory(data, lp_Name); + FreeIntPtr(lp_Name); + return result; + } + /// + /// Opens a `Chroma` animation file with the `.chroma` extension. Returns zero + /// upon success. Returns negative one if there was a failure. + /// + public static int OpenEditorDialog(string path) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + int result = PluginOpenEditorDialog(lp_Path); + FreeIntPtr(lp_Path); + return result; + } + /// + /// Open the named animation in the editor dialog and play the animation at + /// start. + /// + public static int OpenEditorDialogAndPlay(string path) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + int result = PluginOpenEditorDialogAndPlay(lp_Path); + FreeIntPtr(lp_Path); + return result; + } + /// + /// D suffix for limited data types. + /// + public static double OpenEditorDialogAndPlayD(string path) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + double result = PluginOpenEditorDialogAndPlayD(lp_Path); + FreeIntPtr(lp_Path); + return result; + } + /// + /// D suffix for limited data types. + /// + public static double OpenEditorDialogD(string path) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + double result = PluginOpenEditorDialogD(lp_Path); + FreeIntPtr(lp_Path); + return result; + } + /// + /// Sets the `duration` for all grames in the `Chroma` animation to the `duration` + /// parameter. Returns the animation id upon success. Returns negative one + /// upon failure. + /// + public static int OverrideFrameDuration(int animationId, float duration) + { + int result = PluginOverrideFrameDuration(animationId, duration); + return result; + } + /// + /// D suffix for limited data types. + /// + public static double OverrideFrameDurationD(double animationId, double duration) + { + double result = PluginOverrideFrameDurationD(animationId, duration); + return result; + } + /// + /// Override the duration of all frames with the `duration` value. Animation + /// is referenced by name. + /// + public static void OverrideFrameDurationName(string path, float duration) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginOverrideFrameDurationName(lp_Path, duration); + FreeIntPtr(lp_Path); + } + /// + /// Pause the current animation referenced by id. + /// + public static void PauseAnimation(int animationId) + { + PluginPauseAnimation(animationId); + } + /// + /// Pause the current animation referenced by name. + /// + public static void PauseAnimationName(string path) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginPauseAnimationName(lp_Path); + FreeIntPtr(lp_Path); + } + /// + /// D suffix for limited data types. + /// + public static double PauseAnimationNameD(string path) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + double result = PluginPauseAnimationNameD(lp_Path); + FreeIntPtr(lp_Path); + return result; + } + /// + /// Plays the `Chroma` animation. This will load the animation, if not loaded + /// previously. Returns the animation id upon success. Returns negative one + /// upon failure. + /// + public static int PlayAnimation(int animationId) + { + int result = PluginPlayAnimation(animationId); + return result; + } + /// + /// D suffix for limited data types. + /// + public static double PlayAnimationD(double animationId) + { + double result = PluginPlayAnimationD(animationId); + return result; + } + /// + /// `PluginPlayAnimationFrame` automatically handles initializing the `ChromaSDK`. + /// The method will play the animation given the `animationId` with looping + /// `on` or `off` starting at the `frameId`. + /// + public static void PlayAnimationFrame(int animationId, int frameId, bool loop) + { + PluginPlayAnimationFrame(animationId, frameId, loop); + } + /// + /// `PluginPlayAnimationFrameName` automatically handles initializing the `ChromaSDK`. + /// The named `.chroma` animation file will be automatically opened. The animation + /// will play with looping `on` or `off` starting at the `frameId`. + /// + public static void PlayAnimationFrameName(string path, int frameId, bool loop) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginPlayAnimationFrameName(lp_Path, frameId, loop); + FreeIntPtr(lp_Path); + } + /// + /// D suffix for limited data types. + /// + public static double PlayAnimationFrameNameD(string path, double frameId, double loop) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + double result = PluginPlayAnimationFrameNameD(lp_Path, frameId, loop); + FreeIntPtr(lp_Path); + return result; + } + /// + /// `PluginPlayAnimationLoop` automatically handles initializing the `ChromaSDK`. + /// The method will play the animation given the `animationId` with looping + /// `on` or `off`. + /// + public static void PlayAnimationLoop(int animationId, bool loop) + { + PluginPlayAnimationLoop(animationId, loop); + } + /// + /// `PluginPlayAnimationName` automatically handles initializing the `ChromaSDK`. + /// The named `.chroma` animation file will be automatically opened. The animation + /// will play with looping `on` or `off`. + /// + public static void PlayAnimationName(string path, bool loop) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginPlayAnimationName(lp_Path, loop); + FreeIntPtr(lp_Path); + } + /// + /// D suffix for limited data types. + /// + public static double PlayAnimationNameD(string path, double loop) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + double result = PluginPlayAnimationNameD(lp_Path, loop); + FreeIntPtr(lp_Path); + return result; + } + /// + /// `PluginPlayComposite` automatically handles initializing the `ChromaSDK`. + /// The named animation files for the `.chroma` set will be automatically opened. + /// The set of animations will play with looping `on` or `off`. + /// + public static void PlayComposite(string name, bool loop) + { + string str_Name = name; + IntPtr lp_Name = GetPathIntPtr(str_Name); + PluginPlayComposite(lp_Name, loop); + FreeIntPtr(lp_Name); + } + /// + /// D suffix for limited data types. + /// + public static double PlayCompositeD(string name, double loop) + { + string str_Name = name; + IntPtr lp_Name = GetPathIntPtr(str_Name); + double result = PluginPlayCompositeD(lp_Name, loop); + FreeIntPtr(lp_Name); + return result; + } + /// + /// Displays the `Chroma` animation frame on `Chroma` hardware given the `frameIndex`. + /// Returns the animation id upon success. Returns negative one upon failure. + /// + /// + public static int PreviewFrame(int animationId, int frameIndex) + { + int result = PluginPreviewFrame(animationId, frameIndex); + return result; + } + /// + /// D suffix for limited data types. + /// + public static double PreviewFrameD(double animationId, double frameIndex) + { + double result = PluginPreviewFrameD(animationId, frameIndex); + return result; + } + /// + /// Displays the `Chroma` animation frame on `Chroma` hardware given the `frameIndex`. + /// Animaton is referenced by name. + /// + public static void PreviewFrameName(string path, int frameIndex) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginPreviewFrameName(lp_Path, frameIndex); + FreeIntPtr(lp_Path); + } + /// + /// Reduce the frames of the animation by removing every nth element. Animation + /// is referenced by id. + /// + public static void ReduceFrames(int animationId, int n) + { + PluginReduceFrames(animationId, n); + } + /// + /// Reduce the frames of the animation by removing every nth element. Animation + /// is referenced by name. + /// + public static void ReduceFramesName(string path, int n) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginReduceFramesName(lp_Path, n); + FreeIntPtr(lp_Path); + } + /// + /// D suffix for limited data types. + /// + public static double ReduceFramesNameD(string path, double n) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + double result = PluginReduceFramesNameD(lp_Path, n); + FreeIntPtr(lp_Path); + return result; + } + /// + /// Resets the `Chroma` animation to 1 blank frame. Returns the animation id + /// upon success. Returns negative one upon failure. + /// + public static int ResetAnimation(int animationId) + { + int result = PluginResetAnimation(animationId); + return result; + } + /// + /// Resume the animation with loop `ON` or `OFF` referenced by id. + /// + public static void ResumeAnimation(int animationId, bool loop) + { + PluginResumeAnimation(animationId, loop); + } + /// + /// Resume the animation with loop `ON` or `OFF` referenced by name. + /// + public static void ResumeAnimationName(string path, bool loop) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginResumeAnimationName(lp_Path, loop); + FreeIntPtr(lp_Path); + } + /// + /// D suffix for limited data types. + /// + public static double ResumeAnimationNameD(string path, double loop) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + double result = PluginResumeAnimationNameD(lp_Path, loop); + FreeIntPtr(lp_Path); + return result; + } + /// + /// Reverse the animation frame order of the `Chroma` animation. Returns the + /// animation id upon success. Returns negative one upon failure. Animation + /// is referenced by id. + /// + public static int Reverse(int animationId) + { + int result = PluginReverse(animationId); + return result; + } + /// + /// Reverse the animation frame order of the `Chroma` animation. Animation is + /// referenced by id. + /// + public static void ReverseAllFrames(int animationId) + { + PluginReverseAllFrames(animationId); + } + /// + /// Reverse the animation frame order of the `Chroma` animation. Animation is + /// referenced by name. + /// + public static void ReverseAllFramesName(string path) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginReverseAllFramesName(lp_Path); + FreeIntPtr(lp_Path); + } + /// + /// D suffix for limited data types. + /// + public static double ReverseAllFramesNameD(string path) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + double result = PluginReverseAllFramesNameD(lp_Path); + FreeIntPtr(lp_Path); + return result; + } + /// + /// Save the animation referenced by id to the path specified. + /// + public static int SaveAnimation(int animationId, string path) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + int result = PluginSaveAnimation(animationId, lp_Path); + FreeIntPtr(lp_Path); + return result; + } + /// + /// Save the named animation to the target path specified. + /// + public static int SaveAnimationName(string sourceAnimation, string targetAnimation) + { + string str_SourceAnimation = sourceAnimation; + IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); + string str_TargetAnimation = targetAnimation; + IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); + int result = PluginSaveAnimationName(lp_SourceAnimation, lp_TargetAnimation); + FreeIntPtr(lp_SourceAnimation); + FreeIntPtr(lp_TargetAnimation); + return result; + } + /// + /// Set the animation color for a frame given the `1D` `led`. The `led` should + /// be greater than or equal to 0 and less than the `MaxLeds`. The animation + /// is referenced by id. + /// + public static void Set1DColor(int animationId, int frameId, int led, int color) + { + PluginSet1DColor(animationId, frameId, led, color); + } + /// + /// Set the animation color for a frame given the `1D` `led`. The `led` should + /// be greater than or equal to 0 and less than the `MaxLeds`. The animation + /// is referenced by name. + /// + public static void Set1DColorName(string path, int frameId, int led, int color) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginSet1DColorName(lp_Path, frameId, led, color); + FreeIntPtr(lp_Path); + } + /// + /// D suffix for limited data types. + /// + public static double Set1DColorNameD(string path, double frameId, double led, double color) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + double result = PluginSet1DColorNameD(lp_Path, frameId, led, color); + FreeIntPtr(lp_Path); + return result; + } + /// + /// Set the animation color for a frame given the `2D` `row` and `column`. The + /// `row` should be greater than or equal to 0 and less than the `MaxRow`. + /// The `column` should be greater than or equal to 0 and less than the `MaxColumn`. + /// The animation is referenced by id. + /// + public static void Set2DColor(int animationId, int frameId, int row, int column, int color) + { + PluginSet2DColor(animationId, frameId, row, column, color); + } + /// + /// Set the animation color for a frame given the `2D` `row` and `column`. The + /// `row` should be greater than or equal to 0 and less than the `MaxRow`. + /// The `column` should be greater than or equal to 0 and less than the `MaxColumn`. + /// The animation is referenced by name. + /// + public static void Set2DColorName(string path, int frameId, int row, int column, int color) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginSet2DColorName(lp_Path, frameId, row, column, color); + FreeIntPtr(lp_Path); + } + /// + /// D suffix for limited data types. + /// + public static double Set2DColorNameD(string path, double frameId, double rowColumnIndex, double color) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + double result = PluginSet2DColorNameD(lp_Path, frameId, rowColumnIndex, color); + FreeIntPtr(lp_Path); + return result; + } + /// + /// When custom color is set, the custom key mode will be used. The animation + /// is referenced by id. + /// + public static void SetChromaCustomColorAllFrames(int animationId) + { + PluginSetChromaCustomColorAllFrames(animationId); + } + /// + /// When custom color is set, the custom key mode will be used. The animation + /// is referenced by name. + /// + public static void SetChromaCustomColorAllFramesName(string path) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginSetChromaCustomColorAllFramesName(lp_Path); + FreeIntPtr(lp_Path); + } + /// + /// D suffix for limited data types. + /// + public static double SetChromaCustomColorAllFramesNameD(string path) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + double result = PluginSetChromaCustomColorAllFramesNameD(lp_Path); + FreeIntPtr(lp_Path); + return result; + } + /// + /// Set the Chroma custom key color flag on all frames. `True` changes the layout + /// from grid to key. `True` changes the layout from key to grid. Animation + /// is referenced by id. + /// + public static void SetChromaCustomFlag(int animationId, bool flag) + { + PluginSetChromaCustomFlag(animationId, flag); + } + /// + /// Set the Chroma custom key color flag on all frames. `True` changes the layout + /// from grid to key. `True` changes the layout from key to grid. Animation + /// is referenced by name. + /// + public static void SetChromaCustomFlagName(string path, bool flag) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginSetChromaCustomFlagName(lp_Path, flag); + FreeIntPtr(lp_Path); + } + /// + /// D suffix for limited data types. + /// + public static double SetChromaCustomFlagNameD(string path, double flag) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + double result = PluginSetChromaCustomFlagNameD(lp_Path, flag); + FreeIntPtr(lp_Path); + return result; + } + /// + /// Set the current frame of the animation referenced by id. + /// + public static void SetCurrentFrame(int animationId, int frameId) + { + PluginSetCurrentFrame(animationId, frameId); + } + /// + /// Set the current frame of the animation referenced by name. + /// + public static void SetCurrentFrameName(string path, int frameId) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginSetCurrentFrameName(lp_Path, frameId); + FreeIntPtr(lp_Path); + } + /// + /// D suffix for limited data types. + /// + public static double SetCurrentFrameNameD(string path, double frameId) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + double result = PluginSetCurrentFrameNameD(lp_Path, frameId); + FreeIntPtr(lp_Path); + return result; + } + /// + /// Set the custom alpha flag on the color array + /// + public static int SetCustomColorFlag2D(int device, int[] colors) + { + int result = PluginSetCustomColorFlag2D(device, colors); + return result; + } + /// + /// Changes the `deviceType` and `device` of a `Chroma` animation. If the device + /// is changed, the `Chroma` animation will be reset with 1 blank frame. Returns + /// the animation id upon success. Returns negative one upon failure. + /// + public static int SetDevice(int animationId, int deviceType, int device) + { + int result = PluginSetDevice(animationId, deviceType, device); + return result; + } + /// + /// SetEffect will display the referenced effect id. + /// + public static int SetEffect(Guid effectId) + { + int result = PluginSetEffect(effectId); + return result; + } + /// + /// SetEffectCustom1D will display the referenced colors immediately + /// + public static int SetEffectCustom1D(int device, int[] colors) + { + int result = PluginSetEffectCustom1D(device, colors); + return result; + } + /// + /// SetEffectCustom2D will display the referenced colors immediately. + /// + public static int SetEffectCustom2D(int device, int[] colors) + { + int result = PluginSetEffectCustom2D(device, colors); + return result; + } + /// + /// SetEffectKeyboardCustom2D will display the referenced custom keyboard colors + /// immediately. Colors represent a visual grid layout. Keys represent the + /// hotkeys for any layout. + /// + public static int SetEffectKeyboardCustom2D(int device, int[] colors, int[] keys) + { + int result = PluginSetEffectKeyboardCustom2D(device, colors, keys); + return result; + } + /// + /// When the idle animation is used, the named animation will play when no other + /// animations are playing. Reference the animation by id. + /// + public static void SetIdleAnimation(int animationId) + { + PluginSetIdleAnimation(animationId); + } + /// + /// When the idle animation is used, the named animation will play when no other + /// animations are playing. Reference the animation by name. + /// + public static void SetIdleAnimationName(string path) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginSetIdleAnimationName(lp_Path); + FreeIntPtr(lp_Path); + } + /// + /// Set animation key to a static color for the given frame. + /// + public static void SetKeyColor(int animationId, int frameId, int rzkey, int color) + { + PluginSetKeyColor(animationId, frameId, rzkey, color); + } + /// + /// Set the key to the specified key color for all frames. Animation is referenced + /// by id. + /// + public static void SetKeyColorAllFrames(int animationId, int rzkey, int color) + { + PluginSetKeyColorAllFrames(animationId, rzkey, color); + } + /// + /// Set the key to the specified key color for all frames. Animation is referenced + /// by name. + /// + public static void SetKeyColorAllFramesName(string path, int rzkey, int color) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginSetKeyColorAllFramesName(lp_Path, rzkey, color); + FreeIntPtr(lp_Path); + } + /// + /// D suffix for limited data types. + /// + public static double SetKeyColorAllFramesNameD(string path, double rzkey, double color) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + double result = PluginSetKeyColorAllFramesNameD(lp_Path, rzkey, color); + FreeIntPtr(lp_Path); + return result; + } + /// + /// Set the key to the specified key color for all frames. Animation is referenced + /// by id. + /// + public static void SetKeyColorAllFramesRGB(int animationId, int rzkey, int red, int green, int blue) + { + PluginSetKeyColorAllFramesRGB(animationId, rzkey, red, green, blue); + } + /// + /// Set the key to the specified key color for all frames. Animation is referenced + /// by name. + /// + public static void SetKeyColorAllFramesRGBName(string path, int rzkey, int red, int green, int blue) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginSetKeyColorAllFramesRGBName(lp_Path, rzkey, red, green, blue); + FreeIntPtr(lp_Path); + } + /// + /// D suffix for limited data types. + /// + public static double SetKeyColorAllFramesRGBNameD(string path, double rzkey, double red, double green, double blue) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + double result = PluginSetKeyColorAllFramesRGBNameD(lp_Path, rzkey, red, green, blue); + FreeIntPtr(lp_Path); + return result; + } + /// + /// Set animation key to a static color for the given frame. + /// + public static void SetKeyColorName(string path, int frameId, int rzkey, int color) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginSetKeyColorName(lp_Path, frameId, rzkey, color); + FreeIntPtr(lp_Path); + } + /// + /// D suffix for limited data types. + /// + public static double SetKeyColorNameD(string path, double frameId, double rzkey, double color) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + double result = PluginSetKeyColorNameD(lp_Path, frameId, rzkey, color); + FreeIntPtr(lp_Path); + return result; + } + /// + /// Set the key to the specified key color for the specified frame. Animation + /// is referenced by id. + /// + public static void SetKeyColorRGB(int animationId, int frameId, int rzkey, int red, int green, int blue) + { + PluginSetKeyColorRGB(animationId, frameId, rzkey, red, green, blue); + } + /// + /// Set the key to the specified key color for the specified frame. Animation + /// is referenced by name. + /// + public static void SetKeyColorRGBName(string path, int frameId, int rzkey, int red, int green, int blue) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginSetKeyColorRGBName(lp_Path, frameId, rzkey, red, green, blue); + FreeIntPtr(lp_Path); + } + /// + /// D suffix for limited data types. + /// + public static double SetKeyColorRGBNameD(string path, double frameId, double rzkey, double red, double green, double blue) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + double result = PluginSetKeyColorRGBNameD(lp_Path, frameId, rzkey, red, green, blue); + FreeIntPtr(lp_Path); + return result; + } + /// + /// Set animation key to a static color for the given frame if the existing + /// color is not already black. + /// + public static void SetKeyNonZeroColor(int animationId, int frameId, int rzkey, int color) + { + PluginSetKeyNonZeroColor(animationId, frameId, rzkey, color); + } + /// + /// Set animation key to a static color for the given frame if the existing + /// color is not already black. + /// + public static void SetKeyNonZeroColorName(string path, int frameId, int rzkey, int color) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginSetKeyNonZeroColorName(lp_Path, frameId, rzkey, color); + FreeIntPtr(lp_Path); + } + /// + /// D suffix for limited data types. + /// + public static double SetKeyNonZeroColorNameD(string path, double frameId, double rzkey, double color) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + double result = PluginSetKeyNonZeroColorNameD(lp_Path, frameId, rzkey, color); + FreeIntPtr(lp_Path); + return result; + } + /// + /// Set the key to the specified key color for the specified frame where color + /// is not black. Animation is referenced by id. + /// + public static void SetKeyNonZeroColorRGB(int animationId, int frameId, int rzkey, int red, int green, int blue) + { + PluginSetKeyNonZeroColorRGB(animationId, frameId, rzkey, red, green, blue); + } + /// + /// Set the key to the specified key color for the specified frame where color + /// is not black. Animation is referenced by name. + /// + public static void SetKeyNonZeroColorRGBName(string path, int frameId, int rzkey, int red, int green, int blue) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginSetKeyNonZeroColorRGBName(lp_Path, frameId, rzkey, red, green, blue); + FreeIntPtr(lp_Path); + } + /// + /// D suffix for limited data types. + /// + public static double SetKeyNonZeroColorRGBNameD(string path, double frameId, double rzkey, double red, double green, double blue) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + double result = PluginSetKeyNonZeroColorRGBNameD(lp_Path, frameId, rzkey, red, green, blue); + FreeIntPtr(lp_Path); + return result; + } + /// + /// Set animation key by row and column to a static color for the given frame. + /// + /// + public static void SetKeyRowColumnColorName(string path, int frameId, int row, int column, int color) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginSetKeyRowColumnColorName(lp_Path, frameId, row, column, color); + FreeIntPtr(lp_Path); + } + /// + /// Set an array of animation keys to a static color for the given frame. Animation + /// is referenced by id. + /// + public static void SetKeysColor(int animationId, int frameId, int[] rzkeys, int keyCount, int color) + { + PluginSetKeysColor(animationId, frameId, rzkeys, keyCount, color); + } + /// + /// Set an array of animation keys to a static color for all frames. Animation + /// is referenced by id. + /// + public static void SetKeysColorAllFrames(int animationId, int[] rzkeys, int keyCount, int color) + { + PluginSetKeysColorAllFrames(animationId, rzkeys, keyCount, color); + } + /// + /// Set an array of animation keys to a static color for all frames. Animation + /// is referenced by name. + /// + public static void SetKeysColorAllFramesName(string path, int[] rzkeys, int keyCount, int color) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginSetKeysColorAllFramesName(lp_Path, rzkeys, keyCount, color); + FreeIntPtr(lp_Path); + } + /// + /// Set an array of animation keys to a static color for all frames. Animation + /// is referenced by id. + /// + public static void SetKeysColorAllFramesRGB(int animationId, int[] rzkeys, int keyCount, int red, int green, int blue) + { + PluginSetKeysColorAllFramesRGB(animationId, rzkeys, keyCount, red, green, blue); + } + /// + /// Set an array of animation keys to a static color for all frames. Animation + /// is referenced by name. + /// + public static void SetKeysColorAllFramesRGBName(string path, int[] rzkeys, int keyCount, int red, int green, int blue) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginSetKeysColorAllFramesRGBName(lp_Path, rzkeys, keyCount, red, green, blue); + FreeIntPtr(lp_Path); + } + /// + /// Set an array of animation keys to a static color for the given frame. + /// + public static void SetKeysColorName(string path, int frameId, int[] rzkeys, int keyCount, int color) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginSetKeysColorName(lp_Path, frameId, rzkeys, keyCount, color); + FreeIntPtr(lp_Path); + } + /// + /// Set an array of animation keys to a static color for the given frame. Animation + /// is referenced by id. + /// + public static void SetKeysColorRGB(int animationId, int frameId, int[] rzkeys, int keyCount, int red, int green, int blue) + { + PluginSetKeysColorRGB(animationId, frameId, rzkeys, keyCount, red, green, blue); + } + /// + /// Set an array of animation keys to a static color for the given frame. Animation + /// is referenced by name. + /// + public static void SetKeysColorRGBName(string path, int frameId, int[] rzkeys, int keyCount, int red, int green, int blue) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginSetKeysColorRGBName(lp_Path, frameId, rzkeys, keyCount, red, green, blue); + FreeIntPtr(lp_Path); + } + /// + /// Set an array of animation keys to a static color for the given frame if + /// the existing color is not already black. + /// + public static void SetKeysNonZeroColor(int animationId, int frameId, int[] rzkeys, int keyCount, int color) + { + PluginSetKeysNonZeroColor(animationId, frameId, rzkeys, keyCount, color); + } + /// + /// Set an array of animation keys to a static color for the given frame where + /// the color is not black. Animation is referenced by id. + /// + public static void SetKeysNonZeroColorAllFrames(int animationId, int[] rzkeys, int keyCount, int color) + { + PluginSetKeysNonZeroColorAllFrames(animationId, rzkeys, keyCount, color); + } + /// + /// Set an array of animation keys to a static color for all frames if the existing + /// color is not already black. Reference animation by name. + /// + public static void SetKeysNonZeroColorAllFramesName(string path, int[] rzkeys, int keyCount, int color) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginSetKeysNonZeroColorAllFramesName(lp_Path, rzkeys, keyCount, color); + FreeIntPtr(lp_Path); + } + /// + /// Set an array of animation keys to a static color for the given frame if + /// the existing color is not already black. Reference animation by name. + /// + public static void SetKeysNonZeroColorName(string path, int frameId, int[] rzkeys, int keyCount, int color) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginSetKeysNonZeroColorName(lp_Path, frameId, rzkeys, keyCount, color); + FreeIntPtr(lp_Path); + } + /// + /// Set an array of animation keys to a static color for the given frame where + /// the color is not black. Animation is referenced by id. + /// + public static void SetKeysNonZeroColorRGB(int animationId, int frameId, int[] rzkeys, int keyCount, int red, int green, int blue) + { + PluginSetKeysNonZeroColorRGB(animationId, frameId, rzkeys, keyCount, red, green, blue); + } + /// + /// Set an array of animation keys to a static color for the given frame where + /// the color is not black. Animation is referenced by name. + /// + public static void SetKeysNonZeroColorRGBName(string path, int frameId, int[] rzkeys, int keyCount, int red, int green, int blue) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginSetKeysNonZeroColorRGBName(lp_Path, frameId, rzkeys, keyCount, red, green, blue); + FreeIntPtr(lp_Path); + } + /// + /// Set an array of animation keys to a static color for the given frame where + /// the color is black. Animation is referenced by id. + /// + public static void SetKeysZeroColor(int animationId, int frameId, int[] rzkeys, int keyCount, int color) + { + PluginSetKeysZeroColor(animationId, frameId, rzkeys, keyCount, color); + } + /// + /// Set an array of animation keys to a static color for all frames where the + /// color is black. Animation is referenced by id. + /// + public static void SetKeysZeroColorAllFrames(int animationId, int[] rzkeys, int keyCount, int color) + { + PluginSetKeysZeroColorAllFrames(animationId, rzkeys, keyCount, color); + } + /// + /// Set an array of animation keys to a static color for all frames where the + /// color is black. Animation is referenced by name. + /// + public static void SetKeysZeroColorAllFramesName(string path, int[] rzkeys, int keyCount, int color) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginSetKeysZeroColorAllFramesName(lp_Path, rzkeys, keyCount, color); + FreeIntPtr(lp_Path); + } + /// + /// Set an array of animation keys to a static color for all frames where the + /// color is black. Animation is referenced by id. + /// + public static void SetKeysZeroColorAllFramesRGB(int animationId, int[] rzkeys, int keyCount, int red, int green, int blue) + { + PluginSetKeysZeroColorAllFramesRGB(animationId, rzkeys, keyCount, red, green, blue); + } + /// + /// Set an array of animation keys to a static color for all frames where the + /// color is black. Animation is referenced by name. + /// + public static void SetKeysZeroColorAllFramesRGBName(string path, int[] rzkeys, int keyCount, int red, int green, int blue) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginSetKeysZeroColorAllFramesRGBName(lp_Path, rzkeys, keyCount, red, green, blue); + FreeIntPtr(lp_Path); + } + /// + /// Set an array of animation keys to a static color for the given frame where + /// the color is black. Animation is referenced by name. + /// + public static void SetKeysZeroColorName(string path, int frameId, int[] rzkeys, int keyCount, int color) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginSetKeysZeroColorName(lp_Path, frameId, rzkeys, keyCount, color); + FreeIntPtr(lp_Path); + } + /// + /// Set an array of animation keys to a static color for the given frame where + /// the color is black. Animation is referenced by id. + /// + public static void SetKeysZeroColorRGB(int animationId, int frameId, int[] rzkeys, int keyCount, int red, int green, int blue) + { + PluginSetKeysZeroColorRGB(animationId, frameId, rzkeys, keyCount, red, green, blue); + } + /// + /// Set an array of animation keys to a static color for the given frame where + /// the color is black. Animation is referenced by name. + /// + public static void SetKeysZeroColorRGBName(string path, int frameId, int[] rzkeys, int keyCount, int red, int green, int blue) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginSetKeysZeroColorRGBName(lp_Path, frameId, rzkeys, keyCount, red, green, blue); + FreeIntPtr(lp_Path); + } + /// + /// Set animation key to a static color for the given frame where the color + /// is black. Animation is referenced by id. + /// + public static void SetKeyZeroColor(int animationId, int frameId, int rzkey, int color) + { + PluginSetKeyZeroColor(animationId, frameId, rzkey, color); + } + /// + /// Set animation key to a static color for the given frame where the color + /// is black. Animation is referenced by name. + /// + public static void SetKeyZeroColorName(string path, int frameId, int rzkey, int color) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginSetKeyZeroColorName(lp_Path, frameId, rzkey, color); + FreeIntPtr(lp_Path); + } + /// + /// D suffix for limited data types. + /// + public static double SetKeyZeroColorNameD(string path, double frameId, double rzkey, double color) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + double result = PluginSetKeyZeroColorNameD(lp_Path, frameId, rzkey, color); + FreeIntPtr(lp_Path); + return result; + } + /// + /// Set animation key to a static color for the given frame where the color + /// is black. Animation is referenced by id. + /// + public static void SetKeyZeroColorRGB(int animationId, int frameId, int rzkey, int red, int green, int blue) + { + PluginSetKeyZeroColorRGB(animationId, frameId, rzkey, red, green, blue); + } + /// + /// Set animation key to a static color for the given frame where the color + /// is black. Animation is referenced by name. + /// + public static void SetKeyZeroColorRGBName(string path, int frameId, int rzkey, int red, int green, int blue) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginSetKeyZeroColorRGBName(lp_Path, frameId, rzkey, red, green, blue); + FreeIntPtr(lp_Path); + } + /// + /// D suffix for limited data types. + /// + public static double SetKeyZeroColorRGBNameD(string path, double frameId, double rzkey, double red, double green, double blue) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + double result = PluginSetKeyZeroColorRGBNameD(lp_Path, frameId, rzkey, red, green, blue); + FreeIntPtr(lp_Path); + return result; + } + /// + /// Invokes the setup for a debug logging callback so that `stdout` is redirected + /// to the callback. This is used by `Unity` so that debug messages can appear + /// in the console window. + /// + public static void SetLogDelegate(IntPtr fp) + { + PluginSetLogDelegate(fp); + } + /// + /// Sets the target device to the static color. + /// + public static void SetStaticColor(int deviceType, int device, int color) + { + PluginSetStaticColor(deviceType, device, color); + } + /// + /// Sets all devices to the static color. + /// + public static void SetStaticColorAll(int color) + { + PluginSetStaticColorAll(color); + } + /// + /// Sets the target device to the static color. + /// + public static void StaticColor(int deviceType, int device, int color) + { + PluginStaticColor(deviceType, device, color); + } + /// + /// Sets all devices to the static color. + /// + public static void StaticColorAll(int color) + { + PluginStaticColorAll(color); + } + /// + /// D suffix for limited data types. + /// + public static double StaticColorD(double deviceType, double device, double color) + { + double result = PluginStaticColorD(deviceType, device, color); + return result; + } + /// + /// `PluginStopAll` will automatically stop all animations that are playing. + /// + /// + public static void StopAll() + { + PluginStopAll(); + } + /// + /// Stops animation playback if in progress. Returns the animation id upon success. + /// Returns negative one upon failure. + /// + public static int StopAnimation(int animationId) + { + int result = PluginStopAnimation(animationId); + return result; + } + /// + /// D suffix for limited data types. + /// + public static double StopAnimationD(double animationId) + { + double result = PluginStopAnimationD(animationId); + return result; + } + /// + /// `PluginStopAnimationName` automatically handles initializing the `ChromaSDK`. + /// The named `.chroma` animation file will be automatically opened. The animation + /// will stop if playing. + /// + public static void StopAnimationName(string path) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginStopAnimationName(lp_Path); + FreeIntPtr(lp_Path); + } + /// + /// D suffix for limited data types. + /// + public static double StopAnimationNameD(string path) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + double result = PluginStopAnimationNameD(lp_Path); + FreeIntPtr(lp_Path); + return result; + } + /// + /// `PluginStopAnimationType` automatically handles initializing the `ChromaSDK`. + /// If any animation is playing for the `deviceType` and `device` combination, + /// it will be stopped. + /// + public static void StopAnimationType(int deviceType, int device) + { + PluginStopAnimationType(deviceType, device); + } + /// + /// D suffix for limited data types. + /// + public static double StopAnimationTypeD(double deviceType, double device) + { + double result = PluginStopAnimationTypeD(deviceType, device); + return result; + } + /// + /// `PluginStopComposite` automatically handles initializing the `ChromaSDK`. + /// The named animation files for the `.chroma` set will be automatically opened. + /// The set of animations will be stopped if playing. + /// + public static void StopComposite(string name) + { + string str_Name = name; + IntPtr lp_Name = GetPathIntPtr(str_Name); + PluginStopComposite(lp_Name); + FreeIntPtr(lp_Name); + } + /// + /// D suffix for limited data types. + /// + public static double StopCompositeD(string name) + { + string str_Name = name; + IntPtr lp_Name = GetPathIntPtr(str_Name); + double result = PluginStopCompositeD(lp_Name); + FreeIntPtr(lp_Name); + return result; + } + /// + /// Return color1 - color2 + /// + public static int SubtractColor(int color1, int color2) + { + int result = PluginSubtractColor(color1, color2); + return result; + } + /// + /// Subtract the source color from the target color for the frame where the + /// target color is not black. Source and target are referenced by id. + /// + public static void SubtractNonZeroAllKeys(int sourceAnimationId, int targetAnimationId, int frameId) + { + PluginSubtractNonZeroAllKeys(sourceAnimationId, targetAnimationId, frameId); + } + /// + /// Subtract the source color from the target color for all frames where the + /// target color is not black. Source and target are referenced by id. + /// + public static void SubtractNonZeroAllKeysAllFrames(int sourceAnimationId, int targetAnimationId) + { + PluginSubtractNonZeroAllKeysAllFrames(sourceAnimationId, targetAnimationId); + } + /// + /// Subtract the source color from the target color for all frames where the + /// target color is not black. Source and target are referenced by name. + /// + public static void SubtractNonZeroAllKeysAllFramesName(string sourceAnimation, string targetAnimation) + { + string str_SourceAnimation = sourceAnimation; + IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); + string str_TargetAnimation = targetAnimation; + IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); + PluginSubtractNonZeroAllKeysAllFramesName(lp_SourceAnimation, lp_TargetAnimation); + FreeIntPtr(lp_SourceAnimation); + FreeIntPtr(lp_TargetAnimation); + } + /// + /// D suffix for limited data types. + /// + public static double SubtractNonZeroAllKeysAllFramesNameD(string sourceAnimation, string targetAnimation) + { + string str_SourceAnimation = sourceAnimation; + IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); + string str_TargetAnimation = targetAnimation; + IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); + double result = PluginSubtractNonZeroAllKeysAllFramesNameD(lp_SourceAnimation, lp_TargetAnimation); + FreeIntPtr(lp_SourceAnimation); + FreeIntPtr(lp_TargetAnimation); + return result; + } + /// + /// Subtract the source color from the target color for all frames where the + /// target color is not black starting at offset for the length of the source. + /// Source and target are referenced by id. + /// + public static void SubtractNonZeroAllKeysAllFramesOffset(int sourceAnimationId, int targetAnimationId, int offset) + { + PluginSubtractNonZeroAllKeysAllFramesOffset(sourceAnimationId, targetAnimationId, offset); + } + /// + /// Subtract the source color from the target color for all frames where the + /// target color is not black starting at offset for the length of the source. + /// Source and target are referenced by name. + /// + public static void SubtractNonZeroAllKeysAllFramesOffsetName(string sourceAnimation, string targetAnimation, int offset) + { + string str_SourceAnimation = sourceAnimation; + IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); + string str_TargetAnimation = targetAnimation; + IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); + PluginSubtractNonZeroAllKeysAllFramesOffsetName(lp_SourceAnimation, lp_TargetAnimation, offset); + FreeIntPtr(lp_SourceAnimation); + FreeIntPtr(lp_TargetAnimation); + } + /// + /// D suffix for limited data types. + /// + public static double SubtractNonZeroAllKeysAllFramesOffsetNameD(string sourceAnimation, string targetAnimation, double offset) + { + string str_SourceAnimation = sourceAnimation; + IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); + string str_TargetAnimation = targetAnimation; + IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); + double result = PluginSubtractNonZeroAllKeysAllFramesOffsetNameD(lp_SourceAnimation, lp_TargetAnimation, offset); + FreeIntPtr(lp_SourceAnimation); + FreeIntPtr(lp_TargetAnimation); + return result; + } + /// + /// Subtract the source color from the target color for the frame where the + /// target color is not black. Source and target are referenced by name. + /// + public static void SubtractNonZeroAllKeysName(string sourceAnimation, string targetAnimation, int frameId) + { + string str_SourceAnimation = sourceAnimation; + IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); + string str_TargetAnimation = targetAnimation; + IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); + PluginSubtractNonZeroAllKeysName(lp_SourceAnimation, lp_TargetAnimation, frameId); + FreeIntPtr(lp_SourceAnimation); + FreeIntPtr(lp_TargetAnimation); + } + /// + /// Subtract the source color from the target where color is not black for the + /// source frame and target offset frame, reference source and target by id. + /// + /// + public static void SubtractNonZeroAllKeysOffset(int sourceAnimationId, int targetAnimationId, int frameId, int offset) + { + PluginSubtractNonZeroAllKeysOffset(sourceAnimationId, targetAnimationId, frameId, offset); + } + /// + /// Subtract the source color from the target where color is not black for the + /// source frame and target offset frame, reference source and target by name. + /// + /// + public static void SubtractNonZeroAllKeysOffsetName(string sourceAnimation, string targetAnimation, int frameId, int offset) + { + string str_SourceAnimation = sourceAnimation; + IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); + string str_TargetAnimation = targetAnimation; + IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); + PluginSubtractNonZeroAllKeysOffsetName(lp_SourceAnimation, lp_TargetAnimation, frameId, offset); + FreeIntPtr(lp_SourceAnimation); + FreeIntPtr(lp_TargetAnimation); + } + /// + /// D suffix for limited data types. + /// + public static double SubtractNonZeroAllKeysOffsetNameD(string sourceAnimation, string targetAnimation, double frameId, double offset) + { + string str_SourceAnimation = sourceAnimation; + IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); + string str_TargetAnimation = targetAnimation; + IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); + double result = PluginSubtractNonZeroAllKeysOffsetNameD(lp_SourceAnimation, lp_TargetAnimation, frameId, offset); + FreeIntPtr(lp_SourceAnimation); + FreeIntPtr(lp_TargetAnimation); + return result; + } + /// + /// Subtract the source color from the target color where the target color is + /// not black for all frames. Reference source and target by id. + /// + public static void SubtractNonZeroTargetAllKeysAllFrames(int sourceAnimationId, int targetAnimationId) + { + PluginSubtractNonZeroTargetAllKeysAllFrames(sourceAnimationId, targetAnimationId); + } + /// + /// Subtract the source color from the target color where the target color is + /// not black for all frames. Reference source and target by name. + /// + public static void SubtractNonZeroTargetAllKeysAllFramesName(string sourceAnimation, string targetAnimation) + { + string str_SourceAnimation = sourceAnimation; + IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); + string str_TargetAnimation = targetAnimation; + IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); + PluginSubtractNonZeroTargetAllKeysAllFramesName(lp_SourceAnimation, lp_TargetAnimation); + FreeIntPtr(lp_SourceAnimation); + FreeIntPtr(lp_TargetAnimation); + } + /// + /// D suffix for limited data types. + /// + public static double SubtractNonZeroTargetAllKeysAllFramesNameD(string sourceAnimation, string targetAnimation) + { + string str_SourceAnimation = sourceAnimation; + IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); + string str_TargetAnimation = targetAnimation; + IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); + double result = PluginSubtractNonZeroTargetAllKeysAllFramesNameD(lp_SourceAnimation, lp_TargetAnimation); + FreeIntPtr(lp_SourceAnimation); + FreeIntPtr(lp_TargetAnimation); + return result; + } + /// + /// Subtract the source color from the target color where the target color is + /// not black for all frames starting at the target offset for the length of + /// the source. Reference source and target by id. + /// + public static void SubtractNonZeroTargetAllKeysAllFramesOffset(int sourceAnimationId, int targetAnimationId, int offset) + { + PluginSubtractNonZeroTargetAllKeysAllFramesOffset(sourceAnimationId, targetAnimationId, offset); + } + /// + /// Subtract the source color from the target color where the target color is + /// not black for all frames starting at the target offset for the length of + /// the source. Reference source and target by name. + /// + public static void SubtractNonZeroTargetAllKeysAllFramesOffsetName(string sourceAnimation, string targetAnimation, int offset) + { + string str_SourceAnimation = sourceAnimation; + IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); + string str_TargetAnimation = targetAnimation; + IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); + PluginSubtractNonZeroTargetAllKeysAllFramesOffsetName(lp_SourceAnimation, lp_TargetAnimation, offset); + FreeIntPtr(lp_SourceAnimation); + FreeIntPtr(lp_TargetAnimation); + } + /// + /// D suffix for limited data types. + /// + public static double SubtractNonZeroTargetAllKeysAllFramesOffsetNameD(string sourceAnimation, string targetAnimation, double offset) + { + string str_SourceAnimation = sourceAnimation; + IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); + string str_TargetAnimation = targetAnimation; + IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); + double result = PluginSubtractNonZeroTargetAllKeysAllFramesOffsetNameD(lp_SourceAnimation, lp_TargetAnimation, offset); + FreeIntPtr(lp_SourceAnimation); + FreeIntPtr(lp_TargetAnimation); + return result; + } + /// + /// Subtract the source color from the target color where the target color is + /// not black from the source frame to the target offset frame. Reference source + /// and target by id. + /// + public static void SubtractNonZeroTargetAllKeysOffset(int sourceAnimationId, int targetAnimationId, int frameId, int offset) + { + PluginSubtractNonZeroTargetAllKeysOffset(sourceAnimationId, targetAnimationId, frameId, offset); + } + /// + /// Subtract the source color from the target color where the target color is + /// not black from the source frame to the target offset frame. Reference source + /// and target by name. + /// + public static void SubtractNonZeroTargetAllKeysOffsetName(string sourceAnimation, string targetAnimation, int frameId, int offset) + { + string str_SourceAnimation = sourceAnimation; + IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); + string str_TargetAnimation = targetAnimation; + IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); + PluginSubtractNonZeroTargetAllKeysOffsetName(lp_SourceAnimation, lp_TargetAnimation, frameId, offset); + FreeIntPtr(lp_SourceAnimation); + FreeIntPtr(lp_TargetAnimation); + } + /// + /// D suffix for limited data types. + /// + public static double SubtractNonZeroTargetAllKeysOffsetNameD(string sourceAnimation, string targetAnimation, double frameId, double offset) + { + string str_SourceAnimation = sourceAnimation; + IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); + string str_TargetAnimation = targetAnimation; + IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); + double result = PluginSubtractNonZeroTargetAllKeysOffsetNameD(lp_SourceAnimation, lp_TargetAnimation, frameId, offset); + FreeIntPtr(lp_SourceAnimation); + FreeIntPtr(lp_TargetAnimation); + return result; + } + /// + /// Subtract all frames with the min RGB color where the animation color is + /// less than the min threshold AND with the max RGB color where the animation + /// is more than the max threshold. Animation is referenced by id. + /// + public static void SubtractThresholdColorsMinMaxAllFramesRGB(int animationId, int minThreshold, int minRed, int minGreen, int minBlue, int maxThreshold, int maxRed, int maxGreen, int maxBlue) + { + PluginSubtractThresholdColorsMinMaxAllFramesRGB(animationId, minThreshold, minRed, minGreen, minBlue, maxThreshold, maxRed, maxGreen, maxBlue); + } + /// + /// Subtract all frames with the min RGB color where the animation color is + /// less than the min threshold AND with the max RGB color where the animation + /// is more than the max threshold. Animation is referenced by name. + /// + public static void SubtractThresholdColorsMinMaxAllFramesRGBName(string path, int minThreshold, int minRed, int minGreen, int minBlue, int maxThreshold, int maxRed, int maxGreen, int maxBlue) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginSubtractThresholdColorsMinMaxAllFramesRGBName(lp_Path, minThreshold, minRed, minGreen, minBlue, maxThreshold, maxRed, maxGreen, maxBlue); + FreeIntPtr(lp_Path); + } + /// + /// D suffix for limited data types. + /// + public static double SubtractThresholdColorsMinMaxAllFramesRGBNameD(string path, double minThreshold, double minRed, double minGreen, double minBlue, double maxThreshold, double maxRed, double maxGreen, double maxBlue) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + double result = PluginSubtractThresholdColorsMinMaxAllFramesRGBNameD(lp_Path, minThreshold, minRed, minGreen, minBlue, maxThreshold, maxRed, maxGreen, maxBlue); + FreeIntPtr(lp_Path); + return result; + } + /// + /// Subtract the specified frame with the min RGB color where the animation + /// color is less than the min threshold AND with the max RGB color where the + /// animation is more than the max threshold. Animation is referenced by id. + /// + /// + public static void SubtractThresholdColorsMinMaxRGB(int animationId, int frameId, int minThreshold, int minRed, int minGreen, int minBlue, int maxThreshold, int maxRed, int maxGreen, int maxBlue) + { + PluginSubtractThresholdColorsMinMaxRGB(animationId, frameId, minThreshold, minRed, minGreen, minBlue, maxThreshold, maxRed, maxGreen, maxBlue); + } + /// + /// Subtract the specified frame with the min RGB color where the animation + /// color is less than the min threshold AND with the max RGB color where the + /// animation is more than the max threshold. Animation is referenced by name. + /// + /// + public static void SubtractThresholdColorsMinMaxRGBName(string path, int frameId, int minThreshold, int minRed, int minGreen, int minBlue, int maxThreshold, int maxRed, int maxGreen, int maxBlue) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginSubtractThresholdColorsMinMaxRGBName(lp_Path, frameId, minThreshold, minRed, minGreen, minBlue, maxThreshold, maxRed, maxGreen, maxBlue); + FreeIntPtr(lp_Path); + } + /// + /// D suffix for limited data types. + /// + public static double SubtractThresholdColorsMinMaxRGBNameD(string path, int frameId, int minThreshold, int minRed, int minGreen, int minBlue, int maxThreshold, int maxRed, int maxGreen, int maxBlue) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + double result = PluginSubtractThresholdColorsMinMaxRGBNameD(lp_Path, frameId, minThreshold, minRed, minGreen, minBlue, maxThreshold, maxRed, maxGreen, maxBlue); + FreeIntPtr(lp_Path); + return result; + } + /// + /// Trim the end of the animation. The length of the animation will be the lastFrameId + /// plus one. Reference the animation by id. + /// + public static void TrimEndFrames(int animationId, int lastFrameId) + { + PluginTrimEndFrames(animationId, lastFrameId); + } + /// + /// Trim the end of the animation. The length of the animation will be the lastFrameId + /// plus one. Reference the animation by name. + /// + public static void TrimEndFramesName(string path, int lastFrameId) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginTrimEndFramesName(lp_Path, lastFrameId); + FreeIntPtr(lp_Path); + } + /// + /// D suffix for limited data types. + /// + public static double TrimEndFramesNameD(string path, double lastFrameId) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + double result = PluginTrimEndFramesNameD(lp_Path, lastFrameId); + FreeIntPtr(lp_Path); + return result; + } + /// + /// Remove the frame from the animation. Reference animation by id. + /// + public static void TrimFrame(int animationId, int frameId) + { + PluginTrimFrame(animationId, frameId); + } + /// + /// Remove the frame from the animation. Reference animation by name. + /// + public static void TrimFrameName(string path, int frameId) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginTrimFrameName(lp_Path, frameId); + FreeIntPtr(lp_Path); + } + /// + /// D suffix for limited data types. + /// + public static double TrimFrameNameD(string path, double frameId) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + double result = PluginTrimFrameNameD(lp_Path, frameId); + FreeIntPtr(lp_Path); + return result; + } + /// + /// Trim the start of the animation starting at frame 0 for the number of frames. + /// Reference the animation by id. + /// + public static void TrimStartFrames(int animationId, int numberOfFrames) + { + PluginTrimStartFrames(animationId, numberOfFrames); + } + /// + /// Trim the start of the animation starting at frame 0 for the number of frames. + /// Reference the animation by name. + /// + public static void TrimStartFramesName(string path, int numberOfFrames) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginTrimStartFramesName(lp_Path, numberOfFrames); + FreeIntPtr(lp_Path); + } + /// + /// D suffix for limited data types. + /// + public static double TrimStartFramesNameD(string path, double numberOfFrames) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + double result = PluginTrimStartFramesNameD(lp_Path, numberOfFrames); + FreeIntPtr(lp_Path); + return result; + } + /// + /// Uninitializes the `ChromaSDK`. Returns 0 upon success. Returns negative + /// one upon failure. + /// + public static int Uninit() + { + int result = PluginUninit(); + return result; + } + /// + /// D suffix for limited data types. + /// + public static double UninitD() + { + double result = PluginUninitD(); + return result; + } + /// + /// Unloads `Chroma` effects to free up resources. Returns the animation id + /// upon success. Returns negative one upon failure. Reference the animation + /// by id. + /// + public static int UnloadAnimation(int animationId) + { + int result = PluginUnloadAnimation(animationId); + return result; + } + /// + /// D suffix for limited data types. + /// + public static double UnloadAnimationD(double animationId) + { + double result = PluginUnloadAnimationD(animationId); + return result; + } + /// + /// Unload the animation effects. Reference the animation by name. + /// + public static void UnloadAnimationName(string path) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginUnloadAnimationName(lp_Path); + FreeIntPtr(lp_Path); + } + /// + /// Unload the the composite set of animation effects. Reference the animation + /// by name. + /// + public static void UnloadComposite(string name) + { + string str_Name = name; + IntPtr lp_Name = GetPathIntPtr(str_Name); + PluginUnloadComposite(lp_Name); + FreeIntPtr(lp_Name); + } + /// + /// Unload the Razer Chroma SDK Library before exiting the application. + /// + public static void UnloadLibrarySDK() + { + PluginUnloadLibrarySDK(); + } + /// + /// Unload the Razer Chroma Streaming Plugin Library before exiting the application. + /// + /// + public static void UnloadLibraryStreamingPlugin() + { + PluginUnloadLibraryStreamingPlugin(); + } + /// + /// Updates the `frameIndex` of the `Chroma` animation referenced by id and + /// sets the `duration` (in seconds). The `color` is expected to be an array + /// of the dimensions for the `deviceType/device`. The `length` parameter is + /// the size of the `color` array. For `EChromaSDKDevice1DEnum` the array size + /// should be `MAX LEDS`. For `EChromaSDKDevice2DEnum` the array size should + /// be `MAX ROW` times `MAX COLUMN`. Keys are populated only for EChromaSDKDevice2DEnum::DE_Keyboard + /// and EChromaSDKDevice2DEnum::DE_KeyboardExtended. Keys will only use the + /// EChromaSDKDevice2DEnum::DE_Keyboard `MAX_ROW` times `MAX_COLUMN` keysLength. + /// + /// + public static int UpdateFrame(int animationId, int frameIndex, float duration, int[] colors, int length, int[] keys, int keysLength) + { + int result = PluginUpdateFrame(animationId, frameIndex, duration, colors, length, keys, keysLength); + return result; + } + /// + /// Update the `frameIndex` of the `Chroma` animation referenced by name and + /// sets the `duration` (in seconds). The `color` is expected to be an array + /// of the dimensions for the `deviceType/device`. The `length` parameter is + /// the size of the `color` array. For `EChromaSDKDevice1DEnum` the array size + /// should be `MAX LEDS`. For `EChromaSDKDevice2DEnum` the array size should + /// be `MAX ROW` times `MAX COLUMN`. Keys are populated only for EChromaSDKDevice2DEnum::DE_Keyboard + /// and EChromaSDKDevice2DEnum::DE_KeyboardExtended. Keys will only use the + /// EChromaSDKDevice2DEnum::DE_Keyboard `MAX_ROW` times `MAX_COLUMN` keysLength. + /// Returns the animation id upon success. Returns negative one upon failure. + /// + /// + public static int UpdateFrameName(string path, int frameIndex, float duration, int[] colors, int length, int[] keys, int keysLength) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + int result = PluginUpdateFrameName(lp_Path, frameIndex, duration, colors, length, keys, keysLength); + FreeIntPtr(lp_Path); + return result; + } + /// + /// When the idle animation flag is true, when no other animations are playing, + /// the idle animation will be used. The idle animation will not be affected + /// by the API calls to PluginIsPlaying, PluginStopAnimationType, PluginGetPlayingAnimationId, + /// and PluginGetPlayingAnimationCount. Then the idle animation flag is false, + /// the idle animation is disabled. `Device` uses `EChromaSDKDeviceEnum` enums. + /// + /// + public static void UseIdleAnimation(int device, bool flag) + { + PluginUseIdleAnimation(device, flag); + } + /// + /// Set idle animation flag for all devices. + /// + public static void UseIdleAnimations(bool flag) + { + PluginUseIdleAnimations(flag); + } + /// + /// Set preloading animation flag, which is set to true by default. Reference + /// animation by id. + /// + public static void UsePreloading(int animationId, bool flag) + { + PluginUsePreloading(animationId, flag); + } + /// + /// Set preloading animation flag, which is set to true by default. Reference + /// animation by name. + /// + public static void UsePreloadingName(string path, bool flag) + { + string str_Path = path; + IntPtr lp_Path = GetPathIntPtr(str_Path); + PluginUsePreloadingName(lp_Path, flag); + FreeIntPtr(lp_Path); + } + #endregion + + #region Private DLL Hooks + /// + /// Return the sum of colors + /// EXPORT_API int PluginAddColor(const int color1, const int color2); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern int PluginAddColor(int color1, int color2); + /// + /// Adds a frame to the `Chroma` animation and sets the `duration` (in seconds). + /// The `color` is expected to be an array of the dimensions for the `deviceType/device`. + /// The `length` parameter is the size of the `color` array. For `EChromaSDKDevice1DEnum` + /// the array size should be `MAX LEDS`. For `EChromaSDKDevice2DEnum` the array + /// size should be `MAX ROW` times `MAX COLUMN`. Returns the animation id upon + /// success. Returns negative one upon failure. + /// EXPORT_API int PluginAddFrame(int animationId, float duration, int* colors, int length); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern int PluginAddFrame(int animationId, float duration, int[] colors, int length); + /// + /// Add source color to target where color is not black for frame id, reference + /// source and target by id. + /// EXPORT_API void PluginAddNonZeroAllKeys(int sourceAnimationId, int targetAnimationId, int frameId); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginAddNonZeroAllKeys(int sourceAnimationId, int targetAnimationId, int frameId); + /// + /// Add source color to target where color is not black for all frames, reference + /// source and target by id. + /// EXPORT_API void PluginAddNonZeroAllKeysAllFrames(int sourceAnimationId, int targetAnimationId); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginAddNonZeroAllKeysAllFrames(int sourceAnimationId, int targetAnimationId); + /// + /// Add source color to target where color is not black for all frames, reference + /// source and target by name. + /// EXPORT_API void PluginAddNonZeroAllKeysAllFramesName(const char* sourceAnimation, const char* targetAnimation); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginAddNonZeroAllKeysAllFramesName(IntPtr sourceAnimation, IntPtr targetAnimation); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginAddNonZeroAllKeysAllFramesNameD(const char* sourceAnimation, const char* targetAnimation); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginAddNonZeroAllKeysAllFramesNameD(IntPtr sourceAnimation, IntPtr targetAnimation); + /// + /// Add source color to target where color is not black for all frames starting + /// at offset for the length of the source, reference source and target by + /// id. + /// EXPORT_API void PluginAddNonZeroAllKeysAllFramesOffset(int sourceAnimationId, int targetAnimationId, int offset); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginAddNonZeroAllKeysAllFramesOffset(int sourceAnimationId, int targetAnimationId, int offset); + /// + /// Add source color to target where color is not black for all frames starting + /// at offset for the length of the source, reference source and target by + /// name. + /// EXPORT_API void PluginAddNonZeroAllKeysAllFramesOffsetName(const char* sourceAnimation, const char* targetAnimation, int offset); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginAddNonZeroAllKeysAllFramesOffsetName(IntPtr sourceAnimation, IntPtr targetAnimation, int offset); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginAddNonZeroAllKeysAllFramesOffsetNameD(const char* sourceAnimation, const char* targetAnimation, double offset); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginAddNonZeroAllKeysAllFramesOffsetNameD(IntPtr sourceAnimation, IntPtr targetAnimation, double offset); + /// + /// Add source color to target where color is not black for frame id, reference + /// source and target by name. + /// EXPORT_API void PluginAddNonZeroAllKeysName(const char* sourceAnimation, const char* targetAnimation, int frameId); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginAddNonZeroAllKeysName(IntPtr sourceAnimation, IntPtr targetAnimation, int frameId); + /// + /// Add source color to target where color is not black for the source frame + /// and target offset frame, reference source and target by id. + /// EXPORT_API void PluginAddNonZeroAllKeysOffset(int sourceAnimationId, int targetAnimationId, int frameId, int offset); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginAddNonZeroAllKeysOffset(int sourceAnimationId, int targetAnimationId, int frameId, int offset); + /// + /// Add source color to target where color is not black for the source frame + /// and target offset frame, reference source and target by name. + /// EXPORT_API void PluginAddNonZeroAllKeysOffsetName(const char* sourceAnimation, const char* targetAnimation, int frameId, int offset); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginAddNonZeroAllKeysOffsetName(IntPtr sourceAnimation, IntPtr targetAnimation, int frameId, int offset); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginAddNonZeroAllKeysOffsetNameD(const char* sourceAnimation, const char* targetAnimation, double frameId, double offset); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginAddNonZeroAllKeysOffsetNameD(IntPtr sourceAnimation, IntPtr targetAnimation, double frameId, double offset); + /// + /// Add source color to target where the target color is not black for all frames, + /// reference source and target by id. + /// EXPORT_API void PluginAddNonZeroTargetAllKeysAllFrames(int sourceAnimationId, int targetAnimationId); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginAddNonZeroTargetAllKeysAllFrames(int sourceAnimationId, int targetAnimationId); + /// + /// Add source color to target where the target color is not black for all frames, + /// reference source and target by name. + /// EXPORT_API void PluginAddNonZeroTargetAllKeysAllFramesName(const char* sourceAnimation, const char* targetAnimation); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginAddNonZeroTargetAllKeysAllFramesName(IntPtr sourceAnimation, IntPtr targetAnimation); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginAddNonZeroTargetAllKeysAllFramesNameD(const char* sourceAnimation, const char* targetAnimation); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginAddNonZeroTargetAllKeysAllFramesNameD(IntPtr sourceAnimation, IntPtr targetAnimation); + /// + /// Add source color to target where the target color is not black for all frames + /// starting at offset for the length of the source, reference source and target + /// by id. + /// EXPORT_API void PluginAddNonZeroTargetAllKeysAllFramesOffset(int sourceAnimationId, int targetAnimationId, int offset); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginAddNonZeroTargetAllKeysAllFramesOffset(int sourceAnimationId, int targetAnimationId, int offset); + /// + /// Add source color to target where the target color is not black for all frames + /// starting at offset for the length of the source, reference source and target + /// by name. + /// EXPORT_API void PluginAddNonZeroTargetAllKeysAllFramesOffsetName(const char* sourceAnimation, const char* targetAnimation, int offset); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginAddNonZeroTargetAllKeysAllFramesOffsetName(IntPtr sourceAnimation, IntPtr targetAnimation, int offset); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginAddNonZeroTargetAllKeysAllFramesOffsetNameD(const char* sourceAnimation, const char* targetAnimation, double offset); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginAddNonZeroTargetAllKeysAllFramesOffsetNameD(IntPtr sourceAnimation, IntPtr targetAnimation, double offset); + /// + /// Add source color to target where target color is not blank from the source + /// frame to the target offset frame, reference source and target by id. + /// EXPORT_API void PluginAddNonZeroTargetAllKeysOffset(int sourceAnimationId, int targetAnimationId, int frameId, int offset); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginAddNonZeroTargetAllKeysOffset(int sourceAnimationId, int targetAnimationId, int frameId, int offset); + /// + /// Add source color to target where target color is not blank from the source + /// frame to the target offset frame, reference source and target by name. + /// + /// EXPORT_API void PluginAddNonZeroTargetAllKeysOffsetName(const char* sourceAnimation, const char* targetAnimation, int frameId, int offset); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginAddNonZeroTargetAllKeysOffsetName(IntPtr sourceAnimation, IntPtr targetAnimation, int frameId, int offset); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginAddNonZeroTargetAllKeysOffsetNameD(const char* sourceAnimation, const char* targetAnimation, double frameId, double offset); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginAddNonZeroTargetAllKeysOffsetNameD(IntPtr sourceAnimation, IntPtr targetAnimation, double frameId, double offset); + /// + /// Append all source frames to the target animation, reference source and target + /// by id. + /// EXPORT_API void PluginAppendAllFrames(int sourceAnimationId, int targetAnimationId); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginAppendAllFrames(int sourceAnimationId, int targetAnimationId); + /// + /// Append all source frames to the target animation, reference source and target + /// by name. + /// EXPORT_API void PluginAppendAllFramesName(const char* sourceAnimation, const char* targetAnimation); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginAppendAllFramesName(IntPtr sourceAnimation, IntPtr targetAnimation); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginAppendAllFramesNameD(const char* sourceAnimation, const char* targetAnimation); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginAppendAllFramesNameD(IntPtr sourceAnimation, IntPtr targetAnimation); + /// + /// `PluginClearAll` will issue a `CLEAR` effect for all devices. + /// EXPORT_API void PluginClearAll(); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginClearAll(); + /// + /// `PluginClearAnimationType` will issue a `CLEAR` effect for the given device. + /// + /// EXPORT_API void PluginClearAnimationType(int deviceType, int device); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginClearAnimationType(int deviceType, int device); + /// + /// `PluginCloseAll` closes all open animations so they can be reloaded from + /// disk. The set of animations will be stopped if playing. + /// EXPORT_API void PluginCloseAll(); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginCloseAll(); + /// + /// Closes the `Chroma` animation to free up resources referenced by id. Returns + /// the animation id upon success. Returns negative one upon failure. This + /// might be used while authoring effects if there was a change necessitating + /// re-opening the animation. The animation id can no longer be used once closed. + /// + /// EXPORT_API int PluginCloseAnimation(int animationId); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern int PluginCloseAnimation(int animationId); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginCloseAnimationD(double animationId); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginCloseAnimationD(double animationId); + /// + /// Closes the `Chroma` animation referenced by name so that the animation can + /// be reloaded from disk. + /// EXPORT_API void PluginCloseAnimationName(const char* path); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginCloseAnimationName(IntPtr path); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginCloseAnimationNameD(const char* path); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginCloseAnimationNameD(IntPtr path); + /// + /// `PluginCloseComposite` closes a set of animations so they can be reloaded + /// from disk. The set of animations will be stopped if playing. + /// EXPORT_API void PluginCloseComposite(const char* name); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginCloseComposite(IntPtr name); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginCloseCompositeD(const char* name); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginCloseCompositeD(IntPtr name); + /// + /// Copy source animation to target animation for the given frame. Source and + /// target are referenced by id. + /// EXPORT_API void PluginCopyAllKeys(int sourceAnimationId, int targetAnimationId, int frameId); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginCopyAllKeys(int sourceAnimationId, int targetAnimationId, int frameId); + /// + /// Copy source animation to target animation for the given frame. Source and + /// target are referenced by id. + /// EXPORT_API void PluginCopyAllKeysName(const char* sourceAnimation, const char* targetAnimation, int frameId); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginCopyAllKeysName(IntPtr sourceAnimation, IntPtr targetAnimation, int frameId); + /// + /// Copy animation to named target animation in memory. If target animation + /// exists, close first. Source is referenced by id. + /// EXPORT_API int PluginCopyAnimation(int sourceAnimationId, const char* targetAnimation); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern int PluginCopyAnimation(int sourceAnimationId, IntPtr targetAnimation); + /// + /// Copy animation to named target animation in memory. If target animation + /// exists, close first. Source is referenced by name. + /// EXPORT_API void PluginCopyAnimationName(const char* sourceAnimation, const char* targetAnimation); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginCopyAnimationName(IntPtr sourceAnimation, IntPtr targetAnimation); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginCopyAnimationNameD(const char* sourceAnimation, const char* targetAnimation); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginCopyAnimationNameD(IntPtr sourceAnimation, IntPtr targetAnimation); + /// + /// Copy blue channel to other channels for all frames. Intensity range is 0.0 + /// to 1.0. Reference the animation by id. + /// EXPORT_API void PluginCopyBlueChannelAllFrames(int animationId, float redIntensity, float greenIntensity); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginCopyBlueChannelAllFrames(int animationId, float redIntensity, float greenIntensity); + /// + /// Copy blue channel to other channels for all frames. Intensity range is 0.0 + /// to 1.0. Reference the animation by name. + /// EXPORT_API void PluginCopyBlueChannelAllFramesName(const char* path, float redIntensity, float greenIntensity); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginCopyBlueChannelAllFramesName(IntPtr path, float redIntensity, float greenIntensity); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginCopyBlueChannelAllFramesNameD(const char* path, double redIntensity, double greenIntensity); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginCopyBlueChannelAllFramesNameD(IntPtr path, double redIntensity, double greenIntensity); + /// + /// Copy green channel to other channels for all frames. Intensity range is + /// 0.0 to 1.0. Reference the animation by id. + /// EXPORT_API void PluginCopyGreenChannelAllFrames(int animationId, float redIntensity, float blueIntensity); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginCopyGreenChannelAllFrames(int animationId, float redIntensity, float blueIntensity); + /// + /// Copy green channel to other channels for all frames. Intensity range is + /// 0.0 to 1.0. Reference the animation by name. + /// EXPORT_API void PluginCopyGreenChannelAllFramesName(const char* path, float redIntensity, float blueIntensity); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginCopyGreenChannelAllFramesName(IntPtr path, float redIntensity, float blueIntensity); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginCopyGreenChannelAllFramesNameD(const char* path, double redIntensity, double blueIntensity); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginCopyGreenChannelAllFramesNameD(IntPtr path, double redIntensity, double blueIntensity); + /// + /// Copy animation key color from the source animation to the target animation + /// for the given frame. Reference the source and target by id. + /// EXPORT_API void PluginCopyKeyColor(int sourceAnimationId, int targetAnimationId, int frameId, int rzkey); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginCopyKeyColor(int sourceAnimationId, int targetAnimationId, int frameId, int rzkey); + /// + /// Copy animation key color from the source animation to the target animation + /// for all frames. Reference the source and target by id. + /// EXPORT_API void PluginCopyKeyColorAllFrames(int sourceAnimationId, int targetAnimationId, int rzkey); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginCopyKeyColorAllFrames(int sourceAnimationId, int targetAnimationId, int rzkey); + /// + /// Copy animation key color from the source animation to the target animation + /// for all frames. Reference the source and target by name. + /// EXPORT_API void PluginCopyKeyColorAllFramesName(const char* sourceAnimation, const char* targetAnimation, int rzkey); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginCopyKeyColorAllFramesName(IntPtr sourceAnimation, IntPtr targetAnimation, int rzkey); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginCopyKeyColorAllFramesNameD(const char* sourceAnimation, const char* targetAnimation, double rzkey); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginCopyKeyColorAllFramesNameD(IntPtr sourceAnimation, IntPtr targetAnimation, double rzkey); + /// + /// Copy animation key color from the source animation to the target animation + /// for all frames, starting at the offset for the length of the source animation. + /// Source and target are referenced by id. + /// EXPORT_API void PluginCopyKeyColorAllFramesOffset(int sourceAnimationId, int targetAnimationId, int rzkey, int offset); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginCopyKeyColorAllFramesOffset(int sourceAnimationId, int targetAnimationId, int rzkey, int offset); + /// + /// Copy animation key color from the source animation to the target animation + /// for all frames, starting at the offset for the length of the source animation. + /// Source and target are referenced by name. + /// EXPORT_API void PluginCopyKeyColorAllFramesOffsetName(const char* sourceAnimation, const char* targetAnimation, int rzkey, int offset); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginCopyKeyColorAllFramesOffsetName(IntPtr sourceAnimation, IntPtr targetAnimation, int rzkey, int offset); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginCopyKeyColorAllFramesOffsetNameD(const char* sourceAnimation, const char* targetAnimation, double rzkey, double offset); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginCopyKeyColorAllFramesOffsetNameD(IntPtr sourceAnimation, IntPtr targetAnimation, double rzkey, double offset); + /// + /// Copy animation key color from the source animation to the target animation + /// for the given frame. + /// EXPORT_API void PluginCopyKeyColorName(const char* sourceAnimation, const char* targetAnimation, int frameId, int rzkey); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginCopyKeyColorName(IntPtr sourceAnimation, IntPtr targetAnimation, int frameId, int rzkey); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginCopyKeyColorNameD(const char* sourceAnimation, const char* targetAnimation, double frameId, double rzkey); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginCopyKeyColorNameD(IntPtr sourceAnimation, IntPtr targetAnimation, double frameId, double rzkey); + /// + /// Copy animation color for a set of keys from the source animation to the + /// target animation for the given frame. Reference the source and target by + /// id. + /// EXPORT_API void PluginCopyKeysColor(int sourceAnimationId, int targetAnimationId, int frameId, const int* keys, int size); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginCopyKeysColor(int sourceAnimationId, int targetAnimationId, int frameId, int[] keys, int size); + /// + /// Copy animation color for a set of keys from the source animation to the + /// target animation for all frames. Reference the source and target by id. + /// + /// EXPORT_API void PluginCopyKeysColorAllFrames(int sourceAnimationId, int targetAnimationId, const int* keys, int size); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginCopyKeysColorAllFrames(int sourceAnimationId, int targetAnimationId, int[] keys, int size); + /// + /// Copy animation color for a set of keys from the source animation to the + /// target animation for all frames. Reference the source and target by name. + /// + /// EXPORT_API void PluginCopyKeysColorAllFramesName(const char* sourceAnimation, const char* targetAnimation, const int* keys, int size); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginCopyKeysColorAllFramesName(IntPtr sourceAnimation, IntPtr targetAnimation, int[] keys, int size); + /// + /// Copy animation color for a set of keys from the source animation to the + /// target animation for the given frame. Reference the source and target by + /// name. + /// EXPORT_API void PluginCopyKeysColorName(const char* sourceAnimation, const char* targetAnimation, int frameId, const int* keys, int size); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginCopyKeysColorName(IntPtr sourceAnimation, IntPtr targetAnimation, int frameId, int[] keys, int size); + /// + /// Copy animation color for a set of keys from the source animation to the + /// target animation from the source frame to the target frame. Reference the + /// source and target by id. + /// EXPORT_API void PluginCopyKeysColorOffset(int sourceAnimationId, int targetAnimationId, int sourceFrameId, int targetFrameId, const int* keys, int size); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginCopyKeysColorOffset(int sourceAnimationId, int targetAnimationId, int sourceFrameId, int targetFrameId, int[] keys, int size); + /// + /// Copy animation color for a set of keys from the source animation to the + /// target animation from the source frame to the target frame. Reference the + /// source and target by name. + /// EXPORT_API void PluginCopyKeysColorOffsetName(const char* sourceAnimation, const char* targetAnimation, int sourceFrameId, int targetFrameId, const int* keys, int size); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginCopyKeysColorOffsetName(IntPtr sourceAnimation, IntPtr targetAnimation, int sourceFrameId, int targetFrameId, int[] keys, int size); + /// + /// Copy source animation to target animation for the given frame. Source and + /// target are referenced by id. + /// EXPORT_API void PluginCopyNonZeroAllKeys(int sourceAnimationId, int targetAnimationId, int frameId); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginCopyNonZeroAllKeys(int sourceAnimationId, int targetAnimationId, int frameId); + /// + /// Copy nonzero colors from a source animation to a target animation for all + /// frames. Reference source and target by id. + /// EXPORT_API void PluginCopyNonZeroAllKeysAllFrames(int sourceAnimationId, int targetAnimationId); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginCopyNonZeroAllKeysAllFrames(int sourceAnimationId, int targetAnimationId); + /// + /// Copy nonzero colors from a source animation to a target animation for all + /// frames. Reference source and target by name. + /// EXPORT_API void PluginCopyNonZeroAllKeysAllFramesName(const char* sourceAnimation, const char* targetAnimation); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginCopyNonZeroAllKeysAllFramesName(IntPtr sourceAnimation, IntPtr targetAnimation); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginCopyNonZeroAllKeysAllFramesNameD(const char* sourceAnimation, const char* targetAnimation); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginCopyNonZeroAllKeysAllFramesNameD(IntPtr sourceAnimation, IntPtr targetAnimation); + /// + /// Copy nonzero colors from a source animation to a target animation for all + /// frames starting at the offset for the length of the source animation. The + /// source and target are referenced by id. + /// EXPORT_API void PluginCopyNonZeroAllKeysAllFramesOffset(int sourceAnimationId, int targetAnimationId, int offset); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginCopyNonZeroAllKeysAllFramesOffset(int sourceAnimationId, int targetAnimationId, int offset); + /// + /// Copy nonzero colors from a source animation to a target animation for all + /// frames starting at the offset for the length of the source animation. The + /// source and target are referenced by name. + /// EXPORT_API void PluginCopyNonZeroAllKeysAllFramesOffsetName(const char* sourceAnimation, const char* targetAnimation, int offset); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginCopyNonZeroAllKeysAllFramesOffsetName(IntPtr sourceAnimation, IntPtr targetAnimation, int offset); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginCopyNonZeroAllKeysAllFramesOffsetNameD(const char* sourceAnimation, const char* targetAnimation, double offset); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginCopyNonZeroAllKeysAllFramesOffsetNameD(IntPtr sourceAnimation, IntPtr targetAnimation, double offset); + /// + /// Copy nonzero colors from source animation to target animation for the specified + /// frame. Source and target are referenced by id. + /// EXPORT_API void PluginCopyNonZeroAllKeysName(const char* sourceAnimation, const char* targetAnimation, int frameId); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginCopyNonZeroAllKeysName(IntPtr sourceAnimation, IntPtr targetAnimation, int frameId); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginCopyNonZeroAllKeysNameD(const char* sourceAnimation, const char* targetAnimation, double frameId); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginCopyNonZeroAllKeysNameD(IntPtr sourceAnimation, IntPtr targetAnimation, double frameId); + /// + /// Copy nonzero colors from the source animation to the target animation from + /// the source frame to the target offset frame. Source and target are referenced + /// by id. + /// EXPORT_API void PluginCopyNonZeroAllKeysOffset(int sourceAnimationId, int targetAnimationId, int frameId, int offset); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginCopyNonZeroAllKeysOffset(int sourceAnimationId, int targetAnimationId, int frameId, int offset); + /// + /// Copy nonzero colors from the source animation to the target animation from + /// the source frame to the target offset frame. Source and target are referenced + /// by name. + /// EXPORT_API void PluginCopyNonZeroAllKeysOffsetName(const char* sourceAnimation, const char* targetAnimation, int frameId, int offset); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginCopyNonZeroAllKeysOffsetName(IntPtr sourceAnimation, IntPtr targetAnimation, int frameId, int offset); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginCopyNonZeroAllKeysOffsetNameD(const char* sourceAnimation, const char* targetAnimation, double frameId, double offset); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginCopyNonZeroAllKeysOffsetNameD(IntPtr sourceAnimation, IntPtr targetAnimation, double frameId, double offset); + /// + /// Copy animation key color from the source animation to the target animation + /// for the given frame where color is not zero. + /// EXPORT_API void PluginCopyNonZeroKeyColor(int sourceAnimationId, int targetAnimationId, int frameId, int rzkey); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginCopyNonZeroKeyColor(int sourceAnimationId, int targetAnimationId, int frameId, int rzkey); + /// + /// Copy animation key color from the source animation to the target animation + /// for the given frame where color is not zero. + /// EXPORT_API void PluginCopyNonZeroKeyColorName(const char* sourceAnimation, const char* targetAnimation, int frameId, int rzkey); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginCopyNonZeroKeyColorName(IntPtr sourceAnimation, IntPtr targetAnimation, int frameId, int rzkey); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginCopyNonZeroKeyColorNameD(const char* sourceAnimation, const char* targetAnimation, double frameId, double rzkey); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginCopyNonZeroKeyColorNameD(IntPtr sourceAnimation, IntPtr targetAnimation, double frameId, double rzkey); + /// + /// Copy nonzero colors from the source animation to the target animation where + /// the target color is nonzero for the specified frame. Source and target + /// are referenced by id. + /// EXPORT_API void PluginCopyNonZeroTargetAllKeys(int sourceAnimationId, int targetAnimationId, int frameId); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginCopyNonZeroTargetAllKeys(int sourceAnimationId, int targetAnimationId, int frameId); + /// + /// Copy nonzero colors from the source animation to the target animation where + /// the target color is nonzero for all frames. Source and target are referenced + /// by id. + /// EXPORT_API void PluginCopyNonZeroTargetAllKeysAllFrames(int sourceAnimationId, int targetAnimationId); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginCopyNonZeroTargetAllKeysAllFrames(int sourceAnimationId, int targetAnimationId); + /// + /// Copy nonzero colors from the source animation to the target animation where + /// the target color is nonzero for all frames. Source and target are referenced + /// by name. + /// EXPORT_API void PluginCopyNonZeroTargetAllKeysAllFramesName(const char* sourceAnimation, const char* targetAnimation); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginCopyNonZeroTargetAllKeysAllFramesName(IntPtr sourceAnimation, IntPtr targetAnimation); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginCopyNonZeroTargetAllKeysAllFramesNameD(const char* sourceAnimation, const char* targetAnimation); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginCopyNonZeroTargetAllKeysAllFramesNameD(IntPtr sourceAnimation, IntPtr targetAnimation); + /// + /// Copy nonzero colors from the source animation to the target animation where + /// the target color is nonzero for all frames. Source and target are referenced + /// by name. + /// EXPORT_API void PluginCopyNonZeroTargetAllKeysAllFramesOffset(int sourceAnimationId, int targetAnimationId, int offset); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginCopyNonZeroTargetAllKeysAllFramesOffset(int sourceAnimationId, int targetAnimationId, int offset); + /// + /// Copy nonzero colors from the source animation to the target animation where + /// the target color is nonzero for all frames starting at the target offset + /// for the length of the source animation. Source and target animations are + /// referenced by name. + /// EXPORT_API void PluginCopyNonZeroTargetAllKeysAllFramesOffsetName(const char* sourceAnimation, const char* targetAnimation, int offset); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginCopyNonZeroTargetAllKeysAllFramesOffsetName(IntPtr sourceAnimation, IntPtr targetAnimation, int offset); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginCopyNonZeroTargetAllKeysAllFramesOffsetNameD(const char* sourceAnimation, const char* targetAnimation, double offset); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginCopyNonZeroTargetAllKeysAllFramesOffsetNameD(IntPtr sourceAnimation, IntPtr targetAnimation, double offset); + /// + /// Copy nonzero colors from the source animation to the target animation where + /// the target color is nonzero for the specified frame. The source and target + /// are referenced by name. + /// EXPORT_API void PluginCopyNonZeroTargetAllKeysName(const char* sourceAnimation, const char* targetAnimation, int frameId); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginCopyNonZeroTargetAllKeysName(IntPtr sourceAnimation, IntPtr targetAnimation, int frameId); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginCopyNonZeroTargetAllKeysNameD(const char* sourceAnimation, const char* targetAnimation, double frameId); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginCopyNonZeroTargetAllKeysNameD(IntPtr sourceAnimation, IntPtr targetAnimation, double frameId); + /// + /// Copy nonzero colors from the source animation to the target animation where + /// the target color is nonzero for the specified source frame and target offset + /// frame. The source and target are referenced by id. + /// EXPORT_API void PluginCopyNonZeroTargetAllKeysOffset(int sourceAnimationId, int targetAnimationId, int frameId, int offset); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginCopyNonZeroTargetAllKeysOffset(int sourceAnimationId, int targetAnimationId, int frameId, int offset); + /// + /// Copy nonzero colors from the source animation to the target animation where + /// the target color is nonzero for the specified source frame and target offset + /// frame. The source and target are referenced by name. + /// EXPORT_API void PluginCopyNonZeroTargetAllKeysOffsetName(const char* sourceAnimation, const char* targetAnimation, int frameId, int offset); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginCopyNonZeroTargetAllKeysOffsetName(IntPtr sourceAnimation, IntPtr targetAnimation, int frameId, int offset); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginCopyNonZeroTargetAllKeysOffsetNameD(const char* sourceAnimation, const char* targetAnimation, double frameId, double offset); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginCopyNonZeroTargetAllKeysOffsetNameD(IntPtr sourceAnimation, IntPtr targetAnimation, double frameId, double offset); + /// + /// Copy nonzero colors from the source animation to the target animation where + /// the target color is zero for all frames. Source and target are referenced + /// by id. + /// EXPORT_API void PluginCopyNonZeroTargetZeroAllKeysAllFrames(int sourceAnimationId, int targetAnimationId); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginCopyNonZeroTargetZeroAllKeysAllFrames(int sourceAnimationId, int targetAnimationId); + /// + /// Copy nonzero colors from the source animation to the target animation where + /// the target color is zero for all frames. Source and target are referenced + /// by name. + /// EXPORT_API void PluginCopyNonZeroTargetZeroAllKeysAllFramesName(const char* sourceAnimation, const char* targetAnimation); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginCopyNonZeroTargetZeroAllKeysAllFramesName(IntPtr sourceAnimation, IntPtr targetAnimation); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginCopyNonZeroTargetZeroAllKeysAllFramesNameD(const char* sourceAnimation, const char* targetAnimation); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginCopyNonZeroTargetZeroAllKeysAllFramesNameD(IntPtr sourceAnimation, IntPtr targetAnimation); + /// + /// Copy red channel to other channels for all frames. Intensity range is 0.0 + /// to 1.0. Reference the animation by id. + /// EXPORT_API void PluginCopyRedChannelAllFrames(int animationId, float greenIntensity, float blueIntensity); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginCopyRedChannelAllFrames(int animationId, float greenIntensity, float blueIntensity); + /// + /// Copy green channel to other channels for all frames. Intensity range is + /// 0.0 to 1.0. Reference the animation by name. + /// EXPORT_API void PluginCopyRedChannelAllFramesName(const char* path, float greenIntensity, float blueIntensity); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginCopyRedChannelAllFramesName(IntPtr path, float greenIntensity, float blueIntensity); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginCopyRedChannelAllFramesNameD(const char* path, double greenIntensity, double blueIntensity); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginCopyRedChannelAllFramesNameD(IntPtr path, double greenIntensity, double blueIntensity); + /// + /// Copy zero colors from source animation to target animation for the frame. + /// Source and target are referenced by id. + /// EXPORT_API void PluginCopyZeroAllKeys(int sourceAnimationId, int targetAnimationId, int frameId); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginCopyZeroAllKeys(int sourceAnimationId, int targetAnimationId, int frameId); + /// + /// Copy zero colors from source animation to target animation for all frames. + /// Source and target are referenced by id. + /// EXPORT_API void PluginCopyZeroAllKeysAllFrames(int sourceAnimationId, int targetAnimationId); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginCopyZeroAllKeysAllFrames(int sourceAnimationId, int targetAnimationId); + /// + /// Copy zero colors from source animation to target animation for all frames. + /// Source and target are referenced by name. + /// EXPORT_API void PluginCopyZeroAllKeysAllFramesName(const char* sourceAnimation, const char* targetAnimation); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginCopyZeroAllKeysAllFramesName(IntPtr sourceAnimation, IntPtr targetAnimation); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginCopyZeroAllKeysAllFramesNameD(const char* sourceAnimation, const char* targetAnimation); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginCopyZeroAllKeysAllFramesNameD(IntPtr sourceAnimation, IntPtr targetAnimation); + /// + /// Copy zero colors from source animation to target animation for all frames + /// starting at the target offset for the length of the source animation. Source + /// and target are referenced by id. + /// EXPORT_API void PluginCopyZeroAllKeysAllFramesOffset(int sourceAnimationId, int targetAnimationId, int offset); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginCopyZeroAllKeysAllFramesOffset(int sourceAnimationId, int targetAnimationId, int offset); + /// + /// Copy zero colors from source animation to target animation for all frames + /// starting at the target offset for the length of the source animation. Source + /// and target are referenced by name. + /// EXPORT_API void PluginCopyZeroAllKeysAllFramesOffsetName(const char* sourceAnimation, const char* targetAnimation, int offset); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginCopyZeroAllKeysAllFramesOffsetName(IntPtr sourceAnimation, IntPtr targetAnimation, int offset); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginCopyZeroAllKeysAllFramesOffsetNameD(const char* sourceAnimation, const char* targetAnimation, double offset); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginCopyZeroAllKeysAllFramesOffsetNameD(IntPtr sourceAnimation, IntPtr targetAnimation, double offset); + /// + /// Copy zero colors from source animation to target animation for the frame. + /// Source and target are referenced by name. + /// EXPORT_API void PluginCopyZeroAllKeysName(const char* sourceAnimation, const char* targetAnimation, int frameId); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginCopyZeroAllKeysName(IntPtr sourceAnimation, IntPtr targetAnimation, int frameId); + /// + /// Copy zero colors from source animation to target animation for the frame + /// id starting at the target offset for the length of the source animation. + /// Source and target are referenced by id. + /// EXPORT_API void PluginCopyZeroAllKeysOffset(int sourceAnimationId, int targetAnimationId, int frameId, int offset); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginCopyZeroAllKeysOffset(int sourceAnimationId, int targetAnimationId, int frameId, int offset); + /// + /// Copy zero colors from source animation to target animation for the frame + /// id starting at the target offset for the length of the source animation. + /// Source and target are referenced by name. + /// EXPORT_API void PluginCopyZeroAllKeysOffsetName(const char* sourceAnimation, const char* targetAnimation, int frameId, int offset); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginCopyZeroAllKeysOffsetName(IntPtr sourceAnimation, IntPtr targetAnimation, int frameId, int offset); + /// + /// Copy zero key color from source animation to target animation for the specified + /// frame. Source and target are referenced by id. + /// EXPORT_API void PluginCopyZeroKeyColor(int sourceAnimationId, int targetAnimationId, int frameId, int rzkey); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginCopyZeroKeyColor(int sourceAnimationId, int targetAnimationId, int frameId, int rzkey); + /// + /// Copy zero key color from source animation to target animation for the specified + /// frame. Source and target are referenced by name. + /// EXPORT_API void PluginCopyZeroKeyColorName(const char* sourceAnimation, const char* targetAnimation, int frameId, int rzkey); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginCopyZeroKeyColorName(IntPtr sourceAnimation, IntPtr targetAnimation, int frameId, int rzkey); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginCopyZeroKeyColorNameD(const char* sourceAnimation, const char* targetAnimation, double frameId, double rzkey); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginCopyZeroKeyColorNameD(IntPtr sourceAnimation, IntPtr targetAnimation, double frameId, double rzkey); + /// + /// Copy nonzero color from source animation to target animation where target + /// is zero for the frame. Source and target are referenced by id. + /// EXPORT_API void PluginCopyZeroTargetAllKeys(int sourceAnimationId, int targetAnimationId, int frameId); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginCopyZeroTargetAllKeys(int sourceAnimationId, int targetAnimationId, int frameId); + /// + /// Copy nonzero color from source animation to target animation where target + /// is zero for all frames. Source and target are referenced by id. + /// EXPORT_API void PluginCopyZeroTargetAllKeysAllFrames(int sourceAnimationId, int targetAnimationId); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginCopyZeroTargetAllKeysAllFrames(int sourceAnimationId, int targetAnimationId); + /// + /// Copy nonzero color from source animation to target animation where target + /// is zero for all frames. Source and target are referenced by name. + /// EXPORT_API void PluginCopyZeroTargetAllKeysAllFramesName(const char* sourceAnimation, const char* targetAnimation); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginCopyZeroTargetAllKeysAllFramesName(IntPtr sourceAnimation, IntPtr targetAnimation); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginCopyZeroTargetAllKeysAllFramesNameD(const char* sourceAnimation, const char* targetAnimation); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginCopyZeroTargetAllKeysAllFramesNameD(IntPtr sourceAnimation, IntPtr targetAnimation); + /// + /// Copy nonzero color from source animation to target animation where target + /// is zero for the frame. Source and target are referenced by name. + /// EXPORT_API void PluginCopyZeroTargetAllKeysName(const char* sourceAnimation, const char* targetAnimation, int frameId); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginCopyZeroTargetAllKeysName(IntPtr sourceAnimation, IntPtr targetAnimation, int frameId); + /// + /// Direct access to low level API. + /// EXPORT_API RZRESULT PluginCoreCreateChromaLinkEffect(ChromaSDK::ChromaLink::EFFECT_TYPE Effect, PRZPARAM pParam, RZEFFECTID* pEffectId); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern int PluginCoreCreateChromaLinkEffect(int effect, IntPtr pParam, out Guid pEffectId); + /// + /// Direct access to low level API. + /// EXPORT_API RZRESULT PluginCoreCreateEffect(RZDEVICEID DeviceId, ChromaSDK::EFFECT_TYPE Effect, PRZPARAM pParam, RZEFFECTID* pEffectId); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern int PluginCoreCreateEffect(Guid deviceId, int effect, IntPtr pParam, out Guid pEffectId); + /// + /// Direct access to low level API. + /// EXPORT_API RZRESULT PluginCoreCreateHeadsetEffect(ChromaSDK::Headset::EFFECT_TYPE Effect, PRZPARAM pParam, RZEFFECTID* pEffectId); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern int PluginCoreCreateHeadsetEffect(int effect, IntPtr pParam, out Guid pEffectId); + /// + /// Direct access to low level API. + /// EXPORT_API RZRESULT PluginCoreCreateKeyboardEffect(ChromaSDK::Keyboard::EFFECT_TYPE Effect, PRZPARAM pParam, RZEFFECTID* pEffectId); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern int PluginCoreCreateKeyboardEffect(int effect, IntPtr pParam, out Guid pEffectId); + /// + /// Direct access to low level API. + /// EXPORT_API RZRESULT PluginCoreCreateKeypadEffect(ChromaSDK::Keypad::EFFECT_TYPE Effect, PRZPARAM pParam, RZEFFECTID* pEffectId); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern int PluginCoreCreateKeypadEffect(int effect, IntPtr pParam, out Guid pEffectId); + /// + /// Direct access to low level API. + /// EXPORT_API RZRESULT PluginCoreCreateMouseEffect(ChromaSDK::Mouse::EFFECT_TYPE Effect, PRZPARAM pParam, RZEFFECTID* pEffectId); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern int PluginCoreCreateMouseEffect(int effect, IntPtr pParam, out Guid pEffectId); + /// + /// Direct access to low level API. + /// EXPORT_API RZRESULT PluginCoreCreateMousepadEffect(ChromaSDK::Mousepad::EFFECT_TYPE Effect, PRZPARAM pParam, RZEFFECTID* pEffectId); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern int PluginCoreCreateMousepadEffect(int effect, IntPtr pParam, out Guid pEffectId); + /// + /// Direct access to low level API. + /// EXPORT_API RZRESULT PluginCoreDeleteEffect(RZEFFECTID EffectId); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern int PluginCoreDeleteEffect(Guid effectId); + /// + /// Direct access to low level API. + /// EXPORT_API RZRESULT PluginCoreInit(); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern int PluginCoreInit(); + /// + /// Direct access to low level API. + /// EXPORT_API RZRESULT PluginCoreInitSDK(ChromaSDK::APPINFOTYPE* AppInfo); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern int PluginCoreInitSDK(ref ChromaSDK.APPINFOTYPE appInfo); + /// + /// Direct access to low level API. + /// EXPORT_API RZRESULT PluginCoreQueryDevice(RZDEVICEID DeviceId, ChromaSDK::DEVICE_INFO_TYPE& DeviceInfo); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern int PluginCoreQueryDevice(Guid deviceId, out DEVICE_INFO_TYPE deviceInfo); + /// + /// Direct access to low level API. + /// EXPORT_API RZRESULT PluginCoreSetEffect(RZEFFECTID EffectId); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern int PluginCoreSetEffect(Guid effectId); + /// + /// Begin broadcasting Chroma RGB data using the stored stream key as the endpoint. + /// Intended for Cloud Gaming Platforms, restore the streaming key when the + /// game instance is launched to continue streaming. streamId is a null terminated + /// string streamKey is a null terminated string StreamGetStatus() should return + /// the READY status to use this method. + /// EXPORT_API bool PluginCoreStreamBroadcast(const char* streamId, const char* streamKey); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + [return: MarshalAs(UnmanagedType.I1)] + private static extern bool PluginCoreStreamBroadcast(IntPtr streamId, IntPtr streamKey); + /// + /// End broadcasting Chroma RGB data. StreamGetStatus() should return the BROADCASTING + /// status to use this method. + /// EXPORT_API bool PluginCoreStreamBroadcastEnd(); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + [return: MarshalAs(UnmanagedType.I1)] + private static extern bool PluginCoreStreamBroadcastEnd(); + /// + /// shortcode: Pass the address of a preallocated character buffer to get the + /// streaming auth code. The buffer should have a minimum length of 6. length: + /// Length will return as zero if the streaming auth code could not be obtained. + /// If length is greater than zero, it will be the length of the returned streaming + /// auth code. Once you have the shortcode, it should be shown to the user + /// so they can associate the stream with their Razer ID StreamGetStatus() + /// should return the READY status before invoking this method. platform: is + /// the null terminated string that identifies the source of the stream: { + /// GEFORCE_NOW, LUNA, STADIA, GAME_PASS } title: is the null terminated string + /// that identifies the application or game. + /// EXPORT_API void PluginCoreStreamGetAuthShortcode(char* shortcode, unsigned char* length, const wchar_t* platform, const wchar_t* title); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginCoreStreamGetAuthShortcode(IntPtr shortcode, out byte length, IntPtr platform, IntPtr title); + /// + /// focus: Pass the address of a preallocated character buffer to get the stream + /// focus. The buffer should have a length of 48 length: Length will return + /// as zero if the stream focus could not be obtained. If length is greater + /// than zero, it will be the length of the returned stream focus. + /// EXPORT_API bool PluginCoreStreamGetFocus(char* focus, unsigned char* length); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + [return: MarshalAs(UnmanagedType.I1)] + private static extern bool PluginCoreStreamGetFocus(IntPtr focus, out byte length); + /// + /// Intended for Cloud Gaming Platforms, store the stream id to persist in user + /// preferences to continue streaming if the game is suspended or closed. shortcode: + /// The shortcode is a null terminated string. Use the shortcode that authorized + /// the stream to obtain the stream id. streamId should be a preallocated buffer + /// to get the stream key. The buffer should have a length of 48. length: Length + /// will return zero if the key could not be obtained. If the length is greater + /// than zero, it will be the length of the returned streaming id. Retrieve + /// the stream id after authorizing the shortcode. The authorization window + /// will expire in 5 minutes. Be sure to save the stream key before the window + /// expires. StreamGetStatus() should return the READY status to use this method. + /// + /// EXPORT_API void PluginCoreStreamGetId(const char* shortcode, char* streamId, unsigned char* length); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginCoreStreamGetId(IntPtr shortcode, IntPtr streamId, out byte length); + /// + /// Intended for Cloud Gaming Platforms, store the streaming key to persist + /// in user preferences to continue streaming if the game is suspended or closed. + /// shortcode: The shortcode is a null terminated string. Use the shortcode + /// that authorized the stream to obtain the stream key. If the status is in + /// the BROADCASTING or WATCHING state, passing a NULL shortcode will return + /// the active streamId. streamKey should be a preallocated buffer to get the + /// stream key. The buffer should have a length of 48. length: Length will + /// return zero if the key could not be obtained. If the length is greater + /// than zero, it will be the length of the returned streaming key. Retrieve + /// the stream key after authorizing the shortcode. The authorization window + /// will expire in 5 minutes. Be sure to save the stream key before the window + /// expires. StreamGetStatus() should return the READY status to use this method. + /// + /// EXPORT_API void PluginCoreStreamGetKey(const char* shortcode, char* streamKey, unsigned char* length); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginCoreStreamGetKey(IntPtr shortcode, IntPtr streamKey, out byte length); + /// + /// Returns StreamStatus, the current status of the service + /// EXPORT_API ChromaSDK::Stream::StreamStatusType PluginCoreStreamGetStatus(); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern ChromaSDK.Stream.StreamStatusType PluginCoreStreamGetStatus(); + /// + /// Convert StreamStatusType to a printable string + /// EXPORT_API const char* PluginCoreStreamGetStatusString(ChromaSDK::Stream::StreamStatusType status); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern IntPtr PluginCoreStreamGetStatusString(ChromaSDK.Stream.StreamStatusType status); + /// + /// This prevents the stream id and stream key from being obtained through the + /// shortcode. This closes the auth window. shortcode is a null terminated + /// string. StreamGetStatus() should return the READY status to use this method. + /// returns success when shortcode has been released + /// EXPORT_API bool PluginCoreStreamReleaseShortcode(const char* shortcode); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + [return: MarshalAs(UnmanagedType.I1)] + private static extern bool PluginCoreStreamReleaseShortcode(IntPtr shortcode); + /// + /// The focus is a null terminated string. Set the focus identifer for the application + /// designated to automatically change the streaming state. Returns true on + /// success. + /// EXPORT_API bool PluginCoreStreamSetFocus(const char* focus); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + [return: MarshalAs(UnmanagedType.I1)] + private static extern bool PluginCoreStreamSetFocus(IntPtr focus); + /// + /// Returns true if the Chroma streaming is supported. If false is returned, + /// avoid calling stream methods. + /// EXPORT_API bool PluginCoreStreamSupportsStreaming(); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + [return: MarshalAs(UnmanagedType.I1)] + private static extern bool PluginCoreStreamSupportsStreaming(); + /// + /// Begin watching the Chroma RGB data using streamID parameter. streamId is + /// a null terminated string. StreamGetStatus() should return the READY status + /// to use this method. + /// EXPORT_API bool PluginCoreStreamWatch(const char* streamId, unsigned long long timestamp); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + [return: MarshalAs(UnmanagedType.I1)] + private static extern bool PluginCoreStreamWatch(IntPtr streamId, ulong timestamp); + /// + /// End watching Chroma RGB data stream. StreamGetStatus() should return the + /// WATCHING status to use this method. + /// EXPORT_API bool PluginCoreStreamWatchEnd(); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + [return: MarshalAs(UnmanagedType.I1)] + private static extern bool PluginCoreStreamWatchEnd(); + /// + /// Direct access to low level API. + /// EXPORT_API RZRESULT PluginCoreUnInit(); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern int PluginCoreUnInit(); + /// + /// Creates a `Chroma` animation at the given path. The `deviceType` parameter + /// uses `EChromaSDKDeviceTypeEnum` as an integer. The `device` parameter uses + /// `EChromaSDKDevice1DEnum` or `EChromaSDKDevice2DEnum` as an integer, respective + /// to the `deviceType`. Returns the animation id upon success. Returns negative + /// one upon failure. Saves a `Chroma` animation file with the `.chroma` extension + /// at the given path. Returns the animation id upon success. Returns negative + /// one upon failure. + /// EXPORT_API int PluginCreateAnimation(const char* path, int deviceType, int device); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern int PluginCreateAnimation(IntPtr path, int deviceType, int device); + /// + /// Creates a `Chroma` animation in memory without creating a file. The `deviceType` + /// parameter uses `EChromaSDKDeviceTypeEnum` as an integer. The `device` parameter + /// uses `EChromaSDKDevice1DEnum` or `EChromaSDKDevice2DEnum` as an integer, + /// respective to the `deviceType`. Returns the animation id upon success. + /// Returns negative one upon failure. Returns the animation id upon success. + /// Returns negative one upon failure. + /// EXPORT_API int PluginCreateAnimationInMemory(int deviceType, int device); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern int PluginCreateAnimationInMemory(int deviceType, int device); + /// + /// Create a device specific effect. + /// EXPORT_API RZRESULT PluginCreateEffect(RZDEVICEID deviceId, ChromaSDK::EFFECT_TYPE effect, int* colors, int size, ChromaSDK::FChromaSDKGuid* effectId); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern int PluginCreateEffect(Guid deviceId, int effect, int[] colors, int size, out FChromaSDKGuid effectId); + /// + /// Delete an effect given the effect id. + /// EXPORT_API RZRESULT PluginDeleteEffect(const ChromaSDK::FChromaSDKGuid& effectId); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern int PluginDeleteEffect(Guid effectId); + /// + /// Duplicate the first animation frame so that the animation length matches + /// the frame count. Animation is referenced by id. + /// EXPORT_API void PluginDuplicateFirstFrame(int animationId, int frameCount); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginDuplicateFirstFrame(int animationId, int frameCount); + /// + /// Duplicate the first animation frame so that the animation length matches + /// the frame count. Animation is referenced by name. + /// EXPORT_API void PluginDuplicateFirstFrameName(const char* path, int frameCount); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginDuplicateFirstFrameName(IntPtr path, int frameCount); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginDuplicateFirstFrameNameD(const char* path, double frameCount); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginDuplicateFirstFrameNameD(IntPtr path, double frameCount); + /// + /// Duplicate all the frames of the animation to double the animation length. + /// Frame 1 becomes frame 1 and 2. Frame 2 becomes frame 3 and 4. And so on. + /// The animation is referenced by id. + /// EXPORT_API void PluginDuplicateFrames(int animationId); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginDuplicateFrames(int animationId); + /// + /// Duplicate all the frames of the animation to double the animation length. + /// Frame 1 becomes frame 1 and 2. Frame 2 becomes frame 3 and 4. And so on. + /// The animation is referenced by name. + /// EXPORT_API void PluginDuplicateFramesName(const char* path); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginDuplicateFramesName(IntPtr path); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginDuplicateFramesNameD(const char* path); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginDuplicateFramesNameD(IntPtr path); + /// + /// Duplicate all the animation frames in reverse so that the animation plays + /// forwards and backwards. Animation is referenced by id. + /// EXPORT_API void PluginDuplicateMirrorFrames(int animationId); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginDuplicateMirrorFrames(int animationId); + /// + /// Duplicate all the animation frames in reverse so that the animation plays + /// forwards and backwards. Animation is referenced by name. + /// EXPORT_API void PluginDuplicateMirrorFramesName(const char* path); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginDuplicateMirrorFramesName(IntPtr path); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginDuplicateMirrorFramesNameD(const char* path); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginDuplicateMirrorFramesNameD(IntPtr path); + /// + /// Fade the animation to black starting at the fade frame index to the end + /// of the animation. Animation is referenced by id. + /// EXPORT_API void PluginFadeEndFrames(int animationId, int fade); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginFadeEndFrames(int animationId, int fade); + /// + /// Fade the animation to black starting at the fade frame index to the end + /// of the animation. Animation is referenced by name. + /// EXPORT_API void PluginFadeEndFramesName(const char* path, int fade); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginFadeEndFramesName(IntPtr path, int fade); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginFadeEndFramesNameD(const char* path, double fade); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginFadeEndFramesNameD(IntPtr path, double fade); + /// + /// Fade the animation from black to full color starting at 0 to the fade frame + /// index. Animation is referenced by id. + /// EXPORT_API void PluginFadeStartFrames(int animationId, int fade); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginFadeStartFrames(int animationId, int fade); + /// + /// Fade the animation from black to full color starting at 0 to the fade frame + /// index. Animation is referenced by name. + /// EXPORT_API void PluginFadeStartFramesName(const char* path, int fade); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginFadeStartFramesName(IntPtr path, int fade); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginFadeStartFramesNameD(const char* path, double fade); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginFadeStartFramesNameD(IntPtr path, double fade); + /// + /// Set the RGB value for all colors in the specified frame. Animation is referenced + /// by id. + /// EXPORT_API void PluginFillColor(int animationId, int frameId, int color); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginFillColor(int animationId, int frameId, int color); + /// + /// Set the RGB value for all colors for all frames. Animation is referenced + /// by id. + /// EXPORT_API void PluginFillColorAllFrames(int animationId, int color); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginFillColorAllFrames(int animationId, int color); + /// + /// Set the RGB value for all colors for all frames. Animation is referenced + /// by name. + /// EXPORT_API void PluginFillColorAllFramesName(const char* path, int color); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginFillColorAllFramesName(IntPtr path, int color); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginFillColorAllFramesNameD(const char* path, double color); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginFillColorAllFramesNameD(IntPtr path, double color); + /// + /// Set the RGB value for all colors for all frames. Use the range of 0 to 255 + /// for red, green, and blue parameters. Animation is referenced by id. + /// EXPORT_API void PluginFillColorAllFramesRGB(int animationId, int red, int green, int blue); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginFillColorAllFramesRGB(int animationId, int red, int green, int blue); + /// + /// Set the RGB value for all colors for all frames. Use the range of 0 to 255 + /// for red, green, and blue parameters. Animation is referenced by name. + /// EXPORT_API void PluginFillColorAllFramesRGBName(const char* path, int red, int green, int blue); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginFillColorAllFramesRGBName(IntPtr path, int red, int green, int blue); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginFillColorAllFramesRGBNameD(const char* path, double red, double green, double blue); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginFillColorAllFramesRGBNameD(IntPtr path, double red, double green, double blue); + /// + /// Set the RGB value for all colors in the specified frame. Animation is referenced + /// by name. + /// EXPORT_API void PluginFillColorName(const char* path, int frameId, int color); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginFillColorName(IntPtr path, int frameId, int color); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginFillColorNameD(const char* path, double frameId, double color); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginFillColorNameD(IntPtr path, double frameId, double color); + /// + /// Set the RGB value for all colors in the specified frame. Animation is referenced + /// by id. + /// EXPORT_API void PluginFillColorRGB(int animationId, int frameId, int red, int green, int blue); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginFillColorRGB(int animationId, int frameId, int red, int green, int blue); + /// + /// Set the RGB value for all colors in the specified frame. Animation is referenced + /// by name. + /// EXPORT_API void PluginFillColorRGBName(const char* path, int frameId, int red, int green, int blue); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginFillColorRGBName(IntPtr path, int frameId, int red, int green, int blue); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginFillColorRGBNameD(const char* path, double frameId, double red, double green, double blue); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginFillColorRGBNameD(IntPtr path, double frameId, double red, double green, double blue); + /// + /// This method will only update colors in the animation that are not already + /// set to black. Set the RGB value for a subset of colors in the specified + /// frame. Animation is referenced by id. + /// EXPORT_API void PluginFillNonZeroColor(int animationId, int frameId, int color); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginFillNonZeroColor(int animationId, int frameId, int color); + /// + /// This method will only update colors in the animation that are not already + /// set to black. Set the RGB value for a subset of colors for all frames. + /// Animation is referenced by id. + /// EXPORT_API void PluginFillNonZeroColorAllFrames(int animationId, int color); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginFillNonZeroColorAllFrames(int animationId, int color); + /// + /// This method will only update colors in the animation that are not already + /// set to black. Set the RGB value for a subset of colors for all frames. + /// Animation is referenced by name. + /// EXPORT_API void PluginFillNonZeroColorAllFramesName(const char* path, int color); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginFillNonZeroColorAllFramesName(IntPtr path, int color); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginFillNonZeroColorAllFramesNameD(const char* path, double color); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginFillNonZeroColorAllFramesNameD(IntPtr path, double color); + /// + /// This method will only update colors in the animation that are not already + /// set to black. Set the RGB value for a subset of colors for all frames. + /// Use the range of 0 to 255 for red, green, and blue parameters. Animation + /// is referenced by id. + /// EXPORT_API void PluginFillNonZeroColorAllFramesRGB(int animationId, int red, int green, int blue); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginFillNonZeroColorAllFramesRGB(int animationId, int red, int green, int blue); + /// + /// This method will only update colors in the animation that are not already + /// set to black. Set the RGB value for a subset of colors for all frames. + /// Use the range of 0 to 255 for red, green, and blue parameters. Animation + /// is referenced by name. + /// EXPORT_API void PluginFillNonZeroColorAllFramesRGBName(const char* path, int red, int green, int blue); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginFillNonZeroColorAllFramesRGBName(IntPtr path, int red, int green, int blue); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginFillNonZeroColorAllFramesRGBNameD(const char* path, double red, double green, double blue); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginFillNonZeroColorAllFramesRGBNameD(IntPtr path, double red, double green, double blue); + /// + /// This method will only update colors in the animation that are not already + /// set to black. Set the RGB value for a subset of colors in the specified + /// frame. Animation is referenced by name. + /// EXPORT_API void PluginFillNonZeroColorName(const char* path, int frameId, int color); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginFillNonZeroColorName(IntPtr path, int frameId, int color); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginFillNonZeroColorNameD(const char* path, double frameId, double color); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginFillNonZeroColorNameD(IntPtr path, double frameId, double color); + /// + /// This method will only update colors in the animation that are not already + /// set to black. Set the RGB value for a subset of colors in the specified + /// frame. Use the range of 0 to 255 for red, green, and blue parameters. Animation + /// is referenced by id. + /// EXPORT_API void PluginFillNonZeroColorRGB(int animationId, int frameId, int red, int green, int blue); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginFillNonZeroColorRGB(int animationId, int frameId, int red, int green, int blue); + /// + /// This method will only update colors in the animation that are not already + /// set to black. Set the RGB value for a subset of colors in the specified + /// frame. Use the range of 0 to 255 for red, green, and blue parameters. Animation + /// is referenced by name. + /// EXPORT_API void PluginFillNonZeroColorRGBName(const char* path, int frameId, int red, int green, int blue); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginFillNonZeroColorRGBName(IntPtr path, int frameId, int red, int green, int blue); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginFillNonZeroColorRGBNameD(const char* path, double frameId, double red, double green, double blue); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginFillNonZeroColorRGBNameD(IntPtr path, double frameId, double red, double green, double blue); + /// + /// Fill the frame with random RGB values for the given frame. Animation is + /// referenced by id. + /// EXPORT_API void PluginFillRandomColors(int animationId, int frameId); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginFillRandomColors(int animationId, int frameId); + /// + /// Fill the frame with random RGB values for all frames. Animation is referenced + /// by id. + /// EXPORT_API void PluginFillRandomColorsAllFrames(int animationId); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginFillRandomColorsAllFrames(int animationId); + /// + /// Fill the frame with random RGB values for all frames. Animation is referenced + /// by name. + /// EXPORT_API void PluginFillRandomColorsAllFramesName(const char* path); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginFillRandomColorsAllFramesName(IntPtr path); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginFillRandomColorsAllFramesNameD(const char* path); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginFillRandomColorsAllFramesNameD(IntPtr path); + /// + /// Fill the frame with random black and white values for the specified frame. + /// Animation is referenced by id. + /// EXPORT_API void PluginFillRandomColorsBlackAndWhite(int animationId, int frameId); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginFillRandomColorsBlackAndWhite(int animationId, int frameId); + /// + /// Fill the frame with random black and white values for all frames. Animation + /// is referenced by id. + /// EXPORT_API void PluginFillRandomColorsBlackAndWhiteAllFrames(int animationId); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginFillRandomColorsBlackAndWhiteAllFrames(int animationId); + /// + /// Fill the frame with random black and white values for all frames. Animation + /// is referenced by name. + /// EXPORT_API void PluginFillRandomColorsBlackAndWhiteAllFramesName(const char* path); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginFillRandomColorsBlackAndWhiteAllFramesName(IntPtr path); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginFillRandomColorsBlackAndWhiteAllFramesNameD(const char* path); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginFillRandomColorsBlackAndWhiteAllFramesNameD(IntPtr path); + /// + /// Fill the frame with random black and white values for the specified frame. + /// Animation is referenced by name. + /// EXPORT_API void PluginFillRandomColorsBlackAndWhiteName(const char* path, int frameId); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginFillRandomColorsBlackAndWhiteName(IntPtr path, int frameId); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginFillRandomColorsBlackAndWhiteNameD(const char* path, double frameId); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginFillRandomColorsBlackAndWhiteNameD(IntPtr path, double frameId); + /// + /// Fill the frame with random RGB values for the given frame. Animation is + /// referenced by name. + /// EXPORT_API void PluginFillRandomColorsName(const char* path, int frameId); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginFillRandomColorsName(IntPtr path, int frameId); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginFillRandomColorsNameD(const char* path, double frameId); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginFillRandomColorsNameD(IntPtr path, double frameId); + /// + /// Fill the specified frame with RGB color where the animation color is less + /// than the RGB threshold. Animation is referenced by id. + /// EXPORT_API void PluginFillThresholdColors(int animationId, int frameId, int threshold, int color); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginFillThresholdColors(int animationId, int frameId, int threshold, int color); + /// + /// Fill all frames with RGB color where the animation color is less than the + /// RGB threshold. Animation is referenced by id. + /// EXPORT_API void PluginFillThresholdColorsAllFrames(int animationId, int threshold, int color); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginFillThresholdColorsAllFrames(int animationId, int threshold, int color); + /// + /// Fill all frames with RGB color where the animation color is less than the + /// RGB threshold. Animation is referenced by name. + /// EXPORT_API void PluginFillThresholdColorsAllFramesName(const char* path, int threshold, int color); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginFillThresholdColorsAllFramesName(IntPtr path, int threshold, int color); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginFillThresholdColorsAllFramesNameD(const char* path, double threshold, double color); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginFillThresholdColorsAllFramesNameD(IntPtr path, double threshold, double color); + /// + /// Fill all frames with RGB color where the animation color is less than the + /// threshold. Animation is referenced by id. + /// EXPORT_API void PluginFillThresholdColorsAllFramesRGB(int animationId, int threshold, int red, int green, int blue); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginFillThresholdColorsAllFramesRGB(int animationId, int threshold, int red, int green, int blue); + /// + /// Fill all frames with RGB color where the animation color is less than the + /// threshold. Animation is referenced by name. + /// EXPORT_API void PluginFillThresholdColorsAllFramesRGBName(const char* path, int threshold, int red, int green, int blue); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginFillThresholdColorsAllFramesRGBName(IntPtr path, int threshold, int red, int green, int blue); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginFillThresholdColorsAllFramesRGBNameD(const char* path, double threshold, double red, double green, double blue); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginFillThresholdColorsAllFramesRGBNameD(IntPtr path, double threshold, double red, double green, double blue); + /// + /// Fill all frames with the min RGB color where the animation color is less + /// than the min threshold AND with the max RGB color where the animation is + /// more than the max threshold. Animation is referenced by id. + /// EXPORT_API void PluginFillThresholdColorsMinMaxAllFramesRGB(int animationId, int minThreshold, int minRed, int minGreen, int minBlue, int maxThreshold, int maxRed, int maxGreen, int maxBlue); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginFillThresholdColorsMinMaxAllFramesRGB(int animationId, int minThreshold, int minRed, int minGreen, int minBlue, int maxThreshold, int maxRed, int maxGreen, int maxBlue); + /// + /// Fill all frames with the min RGB color where the animation color is less + /// than the min threshold AND with the max RGB color where the animation is + /// more than the max threshold. Animation is referenced by name. + /// EXPORT_API void PluginFillThresholdColorsMinMaxAllFramesRGBName(const char* path, int minThreshold, int minRed, int minGreen, int minBlue, int maxThreshold, int maxRed, int maxGreen, int maxBlue); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginFillThresholdColorsMinMaxAllFramesRGBName(IntPtr path, int minThreshold, int minRed, int minGreen, int minBlue, int maxThreshold, int maxRed, int maxGreen, int maxBlue); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginFillThresholdColorsMinMaxAllFramesRGBNameD(const char* path, double minThreshold, double minRed, double minGreen, double minBlue, double maxThreshold, double maxRed, double maxGreen, double maxBlue); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginFillThresholdColorsMinMaxAllFramesRGBNameD(IntPtr path, double minThreshold, double minRed, double minGreen, double minBlue, double maxThreshold, double maxRed, double maxGreen, double maxBlue); + /// + /// Fill the specified frame with the min RGB color where the animation color + /// is less than the min threshold AND with the max RGB color where the animation + /// is more than the max threshold. Animation is referenced by id. + /// EXPORT_API void PluginFillThresholdColorsMinMaxRGB(int animationId, int frameId, int minThreshold, int minRed, int minGreen, int minBlue, int maxThreshold, int maxRed, int maxGreen, int maxBlue); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginFillThresholdColorsMinMaxRGB(int animationId, int frameId, int minThreshold, int minRed, int minGreen, int minBlue, int maxThreshold, int maxRed, int maxGreen, int maxBlue); + /// + /// Fill the specified frame with the min RGB color where the animation color + /// is less than the min threshold AND with the max RGB color where the animation + /// is more than the max threshold. Animation is referenced by name. + /// EXPORT_API void PluginFillThresholdColorsMinMaxRGBName(const char* path, int frameId, int minThreshold, int minRed, int minGreen, int minBlue, int maxThreshold, int maxRed, int maxGreen, int maxBlue); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginFillThresholdColorsMinMaxRGBName(IntPtr path, int frameId, int minThreshold, int minRed, int minGreen, int minBlue, int maxThreshold, int maxRed, int maxGreen, int maxBlue); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginFillThresholdColorsMinMaxRGBNameD(const char* path, double frameId, double minThreshold, double minRed, double minGreen, double minBlue, double maxThreshold, double maxRed, double maxGreen, double maxBlue); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginFillThresholdColorsMinMaxRGBNameD(IntPtr path, double frameId, double minThreshold, double minRed, double minGreen, double minBlue, double maxThreshold, double maxRed, double maxGreen, double maxBlue); + /// + /// Fill the specified frame with RGB color where the animation color is less + /// than the RGB threshold. Animation is referenced by name. + /// EXPORT_API void PluginFillThresholdColorsName(const char* path, int frameId, int threshold, int color); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginFillThresholdColorsName(IntPtr path, int frameId, int threshold, int color); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginFillThresholdColorsNameD(const char* path, double frameId, double threshold, double color); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginFillThresholdColorsNameD(IntPtr path, double frameId, double threshold, double color); + /// + /// Fill the specified frame with RGB color where the animation color is less + /// than the RGB threshold. Animation is referenced by id. + /// EXPORT_API void PluginFillThresholdColorsRGB(int animationId, int frameId, int threshold, int red, int green, int blue); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginFillThresholdColorsRGB(int animationId, int frameId, int threshold, int red, int green, int blue); + /// + /// Fill the specified frame with RGB color where the animation color is less + /// than the RGB threshold. Animation is referenced by name. + /// EXPORT_API void PluginFillThresholdColorsRGBName(const char* path, int frameId, int threshold, int red, int green, int blue); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginFillThresholdColorsRGBName(IntPtr path, int frameId, int threshold, int red, int green, int blue); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginFillThresholdColorsRGBNameD(const char* path, double frameId, double threshold, double red, double green, double blue); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginFillThresholdColorsRGBNameD(IntPtr path, double frameId, double threshold, double red, double green, double blue); + /// + /// Fill all frames with RGB color where the animation color is less than the + /// RGB threshold. Animation is referenced by id. + /// EXPORT_API void PluginFillThresholdRGBColorsAllFramesRGB(int animationId, int redThreshold, int greenThreshold, int blueThreshold, int red, int green, int blue); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginFillThresholdRGBColorsAllFramesRGB(int animationId, int redThreshold, int greenThreshold, int blueThreshold, int red, int green, int blue); + /// + /// Fill all frames with RGB color where the animation color is less than the + /// RGB threshold. Animation is referenced by name. + /// EXPORT_API void PluginFillThresholdRGBColorsAllFramesRGBName(const char* path, int redThreshold, int greenThreshold, int blueThreshold, int red, int green, int blue); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginFillThresholdRGBColorsAllFramesRGBName(IntPtr path, int redThreshold, int greenThreshold, int blueThreshold, int red, int green, int blue); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginFillThresholdRGBColorsAllFramesRGBNameD(const char* path, double redThreshold, double greenThreshold, double blueThreshold, double red, double green, double blue); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginFillThresholdRGBColorsAllFramesRGBNameD(IntPtr path, double redThreshold, double greenThreshold, double blueThreshold, double red, double green, double blue); + /// + /// Fill the specified frame with RGB color where the animation color is less + /// than the RGB threshold. Animation is referenced by id. + /// EXPORT_API void PluginFillThresholdRGBColorsRGB(int animationId, int frameId, int redThreshold, int greenThreshold, int blueThreshold, int red, int green, int blue); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginFillThresholdRGBColorsRGB(int animationId, int frameId, int redThreshold, int greenThreshold, int blueThreshold, int red, int green, int blue); + /// + /// Fill the specified frame with RGB color where the animation color is less + /// than the RGB threshold. Animation is referenced by name. + /// EXPORT_API void PluginFillThresholdRGBColorsRGBName(const char* path, int frameId, int redThreshold, int greenThreshold, int blueThreshold, int red, int green, int blue); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginFillThresholdRGBColorsRGBName(IntPtr path, int frameId, int redThreshold, int greenThreshold, int blueThreshold, int red, int green, int blue); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginFillThresholdRGBColorsRGBNameD(const char* path, double frameId, double redThreshold, double greenThreshold, double blueThreshold, double red, double green, double blue); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginFillThresholdRGBColorsRGBNameD(IntPtr path, double frameId, double redThreshold, double greenThreshold, double blueThreshold, double red, double green, double blue); + /// + /// Fill the specified frame with RGB color where the animation color is zero. + /// Animation is referenced by id. + /// EXPORT_API void PluginFillZeroColor(int animationId, int frameId, int color); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginFillZeroColor(int animationId, int frameId, int color); + /// + /// Fill all frames with RGB color where the animation color is zero. Animation + /// is referenced by id. + /// EXPORT_API void PluginFillZeroColorAllFrames(int animationId, int color); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginFillZeroColorAllFrames(int animationId, int color); + /// + /// Fill all frames with RGB color where the animation color is zero. Animation + /// is referenced by name. + /// EXPORT_API void PluginFillZeroColorAllFramesName(const char* path, int color); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginFillZeroColorAllFramesName(IntPtr path, int color); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginFillZeroColorAllFramesNameD(const char* path, double color); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginFillZeroColorAllFramesNameD(IntPtr path, double color); + /// + /// Fill all frames with RGB color where the animation color is zero. Animation + /// is referenced by id. + /// EXPORT_API void PluginFillZeroColorAllFramesRGB(int animationId, int red, int green, int blue); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginFillZeroColorAllFramesRGB(int animationId, int red, int green, int blue); + /// + /// Fill all frames with RGB color where the animation color is zero. Animation + /// is referenced by name. + /// EXPORT_API void PluginFillZeroColorAllFramesRGBName(const char* path, int red, int green, int blue); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginFillZeroColorAllFramesRGBName(IntPtr path, int red, int green, int blue); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginFillZeroColorAllFramesRGBNameD(const char* path, double red, double green, double blue); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginFillZeroColorAllFramesRGBNameD(IntPtr path, double red, double green, double blue); + /// + /// Fill the specified frame with RGB color where the animation color is zero. + /// Animation is referenced by name. + /// EXPORT_API void PluginFillZeroColorName(const char* path, int frameId, int color); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginFillZeroColorName(IntPtr path, int frameId, int color); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginFillZeroColorNameD(const char* path, double frameId, double color); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginFillZeroColorNameD(IntPtr path, double frameId, double color); + /// + /// Fill the specified frame with RGB color where the animation color is zero. + /// Animation is referenced by id. + /// EXPORT_API void PluginFillZeroColorRGB(int animationId, int frameId, int red, int green, int blue); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginFillZeroColorRGB(int animationId, int frameId, int red, int green, int blue); + /// + /// Fill the specified frame with RGB color where the animation color is zero. + /// Animation is referenced by name. + /// EXPORT_API void PluginFillZeroColorRGBName(const char* path, int frameId, int red, int green, int blue); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginFillZeroColorRGBName(IntPtr path, int frameId, int red, int green, int blue); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginFillZeroColorRGBNameD(const char* path, double frameId, double red, double green, double blue); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginFillZeroColorRGBNameD(IntPtr path, double frameId, double red, double green, double blue); + /// + /// Get the animation color for a frame given the `1D` `led`. The `led` should + /// be greater than or equal to 0 and less than the `MaxLeds`. Animation is + /// referenced by id. + /// EXPORT_API int PluginGet1DColor(int animationId, int frameId, int led); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern int PluginGet1DColor(int animationId, int frameId, int led); + /// + /// Get the animation color for a frame given the `1D` `led`. The `led` should + /// be greater than or equal to 0 and less than the `MaxLeds`. Animation is + /// referenced by name. + /// EXPORT_API int PluginGet1DColorName(const char* path, int frameId, int led); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern int PluginGet1DColorName(IntPtr path, int frameId, int led); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginGet1DColorNameD(const char* path, double frameId, double led); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginGet1DColorNameD(IntPtr path, double frameId, double led); + /// + /// Get the animation color for a frame given the `2D` `row` and `column`. The + /// `row` should be greater than or equal to 0 and less than the `MaxRow`. + /// The `column` should be greater than or equal to 0 and less than the `MaxColumn`. + /// Animation is referenced by id. + /// EXPORT_API int PluginGet2DColor(int animationId, int frameId, int row, int column); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern int PluginGet2DColor(int animationId, int frameId, int row, int column); + /// + /// Get the animation color for a frame given the `2D` `row` and `column`. The + /// `row` should be greater than or equal to 0 and less than the `MaxRow`. + /// The `column` should be greater than or equal to 0 and less than the `MaxColumn`. + /// Animation is referenced by name. + /// EXPORT_API int PluginGet2DColorName(const char* path, int frameId, int row, int column); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern int PluginGet2DColorName(IntPtr path, int frameId, int row, int column); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginGet2DColorNameD(const char* path, double frameId, double row, double column); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginGet2DColorNameD(IntPtr path, double frameId, double row, double column); + /// + /// Get the animation id for the named animation. + /// EXPORT_API int PluginGetAnimation(const char* name); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern int PluginGetAnimation(IntPtr name); + /// + /// `PluginGetAnimationCount` will return the number of loaded animations. + /// EXPORT_API int PluginGetAnimationCount(); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern int PluginGetAnimationCount(); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginGetAnimationD(const char* name); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginGetAnimationD(IntPtr name); + /// + /// `PluginGetAnimationId` will return the `animationId` given the `index` of + /// the loaded animation. The `index` is zero-based and less than the number + /// returned by `PluginGetAnimationCount`. Use `PluginGetAnimationName` to + /// get the name of the animation. + /// EXPORT_API int PluginGetAnimationId(int index); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern int PluginGetAnimationId(int index); + /// + /// `PluginGetAnimationName` takes an `animationId` and returns the name of + /// the animation of the `.chroma` animation file. If a name is not available + /// then an empty string will be returned. + /// EXPORT_API const char* PluginGetAnimationName(int animationId); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern IntPtr PluginGetAnimationName(int animationId); + /// + /// Get the current frame of the animation referenced by id. + /// EXPORT_API int PluginGetCurrentFrame(int animationId); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern int PluginGetCurrentFrame(int animationId); + /// + /// Get the current frame of the animation referenced by name. + /// EXPORT_API int PluginGetCurrentFrameName(const char* path); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern int PluginGetCurrentFrameName(IntPtr path); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginGetCurrentFrameNameD(const char* path); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginGetCurrentFrameNameD(IntPtr path); + /// + /// Returns the `EChromaSDKDevice1DEnum` or `EChromaSDKDevice2DEnum` of a `Chroma` + /// animation respective to the `deviceType`, as an integer upon success. Returns + /// negative one upon failure. + /// EXPORT_API int PluginGetDevice(int animationId); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern int PluginGetDevice(int animationId); + /// + /// Returns the `EChromaSDKDevice1DEnum` or `EChromaSDKDevice2DEnum` of a `Chroma` + /// animation respective to the `deviceType`, as an integer upon success. Returns + /// negative one upon failure. + /// EXPORT_API int PluginGetDeviceName(const char* path); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern int PluginGetDeviceName(IntPtr path); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginGetDeviceNameD(const char* path); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginGetDeviceNameD(IntPtr path); + /// + /// Returns the `EChromaSDKDeviceTypeEnum` of a `Chroma` animation as an integer + /// upon success. Returns negative one upon failure. + /// EXPORT_API int PluginGetDeviceType(int animationId); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern int PluginGetDeviceType(int animationId); + /// + /// Returns the `EChromaSDKDeviceTypeEnum` of a `Chroma` animation as an integer + /// upon success. Returns negative one upon failure. + /// EXPORT_API int PluginGetDeviceTypeName(const char* path); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern int PluginGetDeviceTypeName(IntPtr path); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginGetDeviceTypeNameD(const char* path); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginGetDeviceTypeNameD(IntPtr path); + /// + /// Get the frame colors and duration (in seconds) for a `Chroma` animation + /// referenced by id. The `color` is expected to be an array of the expected + /// dimensions for the `deviceType/device`. The `length` parameter is the size + /// of the `color` array. For `EChromaSDKDevice1DEnum` the array size should + /// be `MAX LEDS`. For `EChromaSDKDevice2DEnum` the array size should be `MAX + /// ROW` times `MAX COLUMN`. Keys are populated only for EChromaSDKDevice2DEnum::DE_Keyboard + /// and EChromaSDKDevice2DEnum::DE_KeyboardExtended. Keys will only use the + /// EChromaSDKDevice2DEnum::DE_Keyboard `MAX_ROW` times `MAX_COLUMN` keysLength. + /// Returns the animation id upon success. Returns negative one upon failure. + /// + /// EXPORT_API int PluginGetFrame(int animationId, int frameIndex, float* duration, int* colors, int length, int* keys, int keysLength); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern int PluginGetFrame(int animationId, int frameIndex, out float duration, int[] colors, int length, int[] keys, int keysLength); + /// + /// Returns the frame count of a `Chroma` animation upon success. Returns negative + /// one upon failure. + /// EXPORT_API int PluginGetFrameCount(int animationId); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern int PluginGetFrameCount(int animationId); + /// + /// Returns the frame count of a `Chroma` animation upon success. Returns negative + /// one upon failure. + /// EXPORT_API int PluginGetFrameCountName(const char* path); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern int PluginGetFrameCountName(IntPtr path); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginGetFrameCountNameD(const char* path); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginGetFrameCountNameD(IntPtr path); + /// + /// Get the frame colors and duration (in seconds) for a `Chroma` animation + /// referenced by name. The `color` is expected to be an array of the expected + /// dimensions for the `deviceType/device`. The `length` parameter is the size + /// of the `color` array. For `EChromaSDKDevice1DEnum` the array size should + /// be `MAX LEDS`. For `EChromaSDKDevice2DEnum` the array size should be `MAX + /// ROW` times `MAX COLUMN`. Keys are populated only for EChromaSDKDevice2DEnum::DE_Keyboard + /// and EChromaSDKDevice2DEnum::DE_KeyboardExtended. Keys will only use the + /// EChromaSDKDevice2DEnum::DE_Keyboard `MAX_ROW` times `MAX_COLUMN` keysLength. + /// Returns the animation id upon success. Returns negative one upon failure. + /// + /// EXPORT_API int PluginGetFrameName(const char* path, int frameIndex, float* duration, int* colors, int length, int* keys, int keysLength); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern int PluginGetFrameName(IntPtr path, int frameIndex, out float duration, int[] colors, int length, int[] keys, int keysLength); + /// + /// Get the color of an animation key for the given frame referenced by id. + /// + /// EXPORT_API int PluginGetKeyColor(int animationId, int frameId, int rzkey); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern int PluginGetKeyColor(int animationId, int frameId, int rzkey); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginGetKeyColorD(const char* path, double frameId, double rzkey); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginGetKeyColorD(IntPtr path, double frameId, double rzkey); + /// + /// Get the color of an animation key for the given frame referenced by name. + /// + /// EXPORT_API int PluginGetKeyColorName(const char* path, int frameId, int rzkey); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern int PluginGetKeyColorName(IntPtr path, int frameId, int rzkey); + /// + /// Returns `RZRESULT_SUCCESS` if the plugin has been initialized successfully. + /// Returns `RZRESULT_DLL_NOT_FOUND` if core Chroma library is not found. Returns + /// `RZRESULT_DLL_INVALID_SIGNATURE` if core Chroma library has an invalid + /// signature. + /// EXPORT_API RZRESULT PluginGetLibraryLoadedState(); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern int PluginGetLibraryLoadedState(); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginGetLibraryLoadedStateD(); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginGetLibraryLoadedStateD(); + /// + /// Returns the `MAX COLUMN` given the `EChromaSDKDevice2DEnum` device as an + /// integer upon success. Returns negative one upon failure. + /// EXPORT_API int PluginGetMaxColumn(int device); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern int PluginGetMaxColumn(int device); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginGetMaxColumnD(double device); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginGetMaxColumnD(double device); + /// + /// Returns the MAX LEDS given the `EChromaSDKDevice1DEnum` device as an integer + /// upon success. Returns negative one upon failure. + /// EXPORT_API int PluginGetMaxLeds(int device); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern int PluginGetMaxLeds(int device); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginGetMaxLedsD(double device); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginGetMaxLedsD(double device); + /// + /// Returns the `MAX ROW` given the `EChromaSDKDevice2DEnum` device as an integer + /// upon success. Returns negative one upon failure. + /// EXPORT_API int PluginGetMaxRow(int device); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern int PluginGetMaxRow(int device); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginGetMaxRowD(double device); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginGetMaxRowD(double device); + /// + /// `PluginGetPlayingAnimationCount` will return the number of playing animations. + /// + /// EXPORT_API int PluginGetPlayingAnimationCount(); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern int PluginGetPlayingAnimationCount(); + /// + /// `PluginGetPlayingAnimationId` will return the `animationId` given the `index` + /// of the playing animation. The `index` is zero-based and less than the number + /// returned by `PluginGetPlayingAnimationCount`. Use `PluginGetAnimationName` + /// to get the name of the animation. + /// EXPORT_API int PluginGetPlayingAnimationId(int index); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern int PluginGetPlayingAnimationId(int index); + /// + /// Get the RGB color given red, green, and blue. + /// EXPORT_API int PluginGetRGB(int red, int green, int blue); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern int PluginGetRGB(int red, int green, int blue); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginGetRGBD(double red, double green, double blue); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginGetRGBD(double red, double green, double blue); + /// + /// Check if the animation has loop enabled referenced by id. + /// EXPORT_API bool PluginHasAnimationLoop(int animationId); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + [return: MarshalAs(UnmanagedType.I1)] + private static extern bool PluginHasAnimationLoop(int animationId); + /// + /// Check if the animation has loop enabled referenced by name. + /// EXPORT_API bool PluginHasAnimationLoopName(const char* path); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + [return: MarshalAs(UnmanagedType.I1)] + private static extern bool PluginHasAnimationLoopName(IntPtr path); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginHasAnimationLoopNameD(const char* path); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginHasAnimationLoopNameD(IntPtr path); + /// + /// Initialize the ChromaSDK. Zero indicates success, otherwise failure. Many + /// API methods auto initialize the ChromaSDK if not already initialized. + /// EXPORT_API RZRESULT PluginInit(); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern int PluginInit(); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginInitD(); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginInitD(); + /// + /// Initialize the ChromaSDK. AppInfo populates the details in Synapse. Zero + /// indicates success, otherwise failure. Many API methods auto initialize + /// the ChromaSDK if not already initialized. + /// EXPORT_API RZRESULT PluginInitSDK(ChromaSDK::APPINFOTYPE* AppInfo); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern int PluginInitSDK(ref ChromaSDK.APPINFOTYPE appInfo); + /// + /// Insert an animation delay by duplicating the frame by the delay number of + /// times. Animation is referenced by id. + /// EXPORT_API void PluginInsertDelay(int animationId, int frameId, int delay); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginInsertDelay(int animationId, int frameId, int delay); + /// + /// Insert an animation delay by duplicating the frame by the delay number of + /// times. Animation is referenced by name. + /// EXPORT_API void PluginInsertDelayName(const char* path, int frameId, int delay); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginInsertDelayName(IntPtr path, int frameId, int delay); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginInsertDelayNameD(const char* path, double frameId, double delay); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginInsertDelayNameD(IntPtr path, double frameId, double delay); + /// + /// Duplicate the source frame index at the target frame index. Animation is + /// referenced by id. + /// EXPORT_API void PluginInsertFrame(int animationId, int sourceFrame, int targetFrame); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginInsertFrame(int animationId, int sourceFrame, int targetFrame); + /// + /// Duplicate the source frame index at the target frame index. Animation is + /// referenced by name. + /// EXPORT_API void PluginInsertFrameName(const char* path, int sourceFrame, int targetFrame); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginInsertFrameName(IntPtr path, int sourceFrame, int targetFrame); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginInsertFrameNameD(const char* path, double sourceFrame, double targetFrame); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginInsertFrameNameD(IntPtr path, double sourceFrame, double targetFrame); + /// + /// Invert all the colors at the specified frame. Animation is referenced by + /// id. + /// EXPORT_API void PluginInvertColors(int animationId, int frameId); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginInvertColors(int animationId, int frameId); + /// + /// Invert all the colors for all frames. Animation is referenced by id. + /// EXPORT_API void PluginInvertColorsAllFrames(int animationId); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginInvertColorsAllFrames(int animationId); + /// + /// Invert all the colors for all frames. Animation is referenced by name. + /// EXPORT_API void PluginInvertColorsAllFramesName(const char* path); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginInvertColorsAllFramesName(IntPtr path); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginInvertColorsAllFramesNameD(const char* path); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginInvertColorsAllFramesNameD(IntPtr path); + /// + /// Invert all the colors at the specified frame. Animation is referenced by + /// name. + /// EXPORT_API void PluginInvertColorsName(const char* path, int frameId); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginInvertColorsName(IntPtr path, int frameId); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginInvertColorsNameD(const char* path, double frameId); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginInvertColorsNameD(IntPtr path, double frameId); + /// + /// Check if the animation is paused referenced by id. + /// EXPORT_API bool PluginIsAnimationPaused(int animationId); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + [return: MarshalAs(UnmanagedType.I1)] + private static extern bool PluginIsAnimationPaused(int animationId); + /// + /// Check if the animation is paused referenced by name. + /// EXPORT_API bool PluginIsAnimationPausedName(const char* path); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + [return: MarshalAs(UnmanagedType.I1)] + private static extern bool PluginIsAnimationPausedName(IntPtr path); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginIsAnimationPausedNameD(const char* path); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginIsAnimationPausedNameD(IntPtr path); + /// + /// The editor dialog is a non-blocking modal window, this method returns true + /// if the modal window is open, otherwise false. + /// EXPORT_API bool PluginIsDialogOpen(); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + [return: MarshalAs(UnmanagedType.I1)] + private static extern bool PluginIsDialogOpen(); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginIsDialogOpenD(); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginIsDialogOpenD(); + /// + /// Returns true if the plugin has been initialized. Returns false if the plugin + /// is uninitialized. + /// EXPORT_API bool PluginIsInitialized(); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + [return: MarshalAs(UnmanagedType.I1)] + private static extern bool PluginIsInitialized(); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginIsInitializedD(); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginIsInitializedD(); + /// + /// If the method can be invoked the method returns true. + /// EXPORT_API bool PluginIsPlatformSupported(); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + [return: MarshalAs(UnmanagedType.I1)] + private static extern bool PluginIsPlatformSupported(); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginIsPlatformSupportedD(); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginIsPlatformSupportedD(); + /// + /// `PluginIsPlayingName` automatically handles initializing the `ChromaSDK`. + /// The named `.chroma` animation file will be automatically opened. The method + /// will return whether the animation is playing or not. Animation is referenced + /// by id. + /// EXPORT_API bool PluginIsPlaying(int animationId); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + [return: MarshalAs(UnmanagedType.I1)] + private static extern bool PluginIsPlaying(int animationId); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginIsPlayingD(double animationId); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginIsPlayingD(double animationId); + /// + /// `PluginIsPlayingName` automatically handles initializing the `ChromaSDK`. + /// The named `.chroma` animation file will be automatically opened. The method + /// will return whether the animation is playing or not. Animation is referenced + /// by name. + /// EXPORT_API bool PluginIsPlayingName(const char* path); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + [return: MarshalAs(UnmanagedType.I1)] + private static extern bool PluginIsPlayingName(IntPtr path); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginIsPlayingNameD(const char* path); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginIsPlayingNameD(IntPtr path); + /// + /// `PluginIsPlayingType` automatically handles initializing the `ChromaSDK`. + /// If any animation is playing for the `deviceType` and `device` combination, + /// the method will return true, otherwise false. + /// EXPORT_API bool PluginIsPlayingType(int deviceType, int device); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + [return: MarshalAs(UnmanagedType.I1)] + private static extern bool PluginIsPlayingType(int deviceType, int device); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginIsPlayingTypeD(double deviceType, double device); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginIsPlayingTypeD(double deviceType, double device); + /// + /// Do a lerp math operation on a float. + /// EXPORT_API float PluginLerp(float start, float end, float amt); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern float PluginLerp(float start, float end, float amt); + /// + /// Lerp from one color to another given t in the range 0.0 to 1.0. + /// EXPORT_API int PluginLerpColor(int from, int to, float t); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern int PluginLerpColor(int from, int to, float t); + /// + /// Loads `Chroma` effects so that the animation can be played immediately. + /// Returns the animation id upon success. Returns negative one upon failure. + /// + /// EXPORT_API int PluginLoadAnimation(int animationId); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern int PluginLoadAnimation(int animationId); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginLoadAnimationD(double animationId); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginLoadAnimationD(double animationId); + /// + /// Load the named animation. + /// EXPORT_API void PluginLoadAnimationName(const char* path); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginLoadAnimationName(IntPtr path); + /// + /// Load a composite set of animations. + /// EXPORT_API void PluginLoadComposite(const char* name); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginLoadComposite(IntPtr name); + /// + /// Make a blank animation for the length of the frame count. Frame duration + /// defaults to the duration. The frame color defaults to color. Animation + /// is referenced by id. + /// EXPORT_API void PluginMakeBlankFrames(int animationId, int frameCount, float duration, int color); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginMakeBlankFrames(int animationId, int frameCount, float duration, int color); + /// + /// Make a blank animation for the length of the frame count. Frame duration + /// defaults to the duration. The frame color defaults to color. Animation + /// is referenced by name. + /// EXPORT_API void PluginMakeBlankFramesName(const char* path, int frameCount, float duration, int color); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginMakeBlankFramesName(IntPtr path, int frameCount, float duration, int color); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginMakeBlankFramesNameD(const char* path, double frameCount, double duration, double color); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginMakeBlankFramesNameD(IntPtr path, double frameCount, double duration, double color); + /// + /// Make a blank animation for the length of the frame count. Frame duration + /// defaults to the duration. The frame color is random. Animation is referenced + /// by id. + /// EXPORT_API void PluginMakeBlankFramesRandom(int animationId, int frameCount, float duration); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginMakeBlankFramesRandom(int animationId, int frameCount, float duration); + /// + /// Make a blank animation for the length of the frame count. Frame duration + /// defaults to the duration. The frame color is random black and white. Animation + /// is referenced by id. + /// EXPORT_API void PluginMakeBlankFramesRandomBlackAndWhite(int animationId, int frameCount, float duration); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginMakeBlankFramesRandomBlackAndWhite(int animationId, int frameCount, float duration); + /// + /// Make a blank animation for the length of the frame count. Frame duration + /// defaults to the duration. The frame color is random black and white. Animation + /// is referenced by name. + /// EXPORT_API void PluginMakeBlankFramesRandomBlackAndWhiteName(const char* path, int frameCount, float duration); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginMakeBlankFramesRandomBlackAndWhiteName(IntPtr path, int frameCount, float duration); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginMakeBlankFramesRandomBlackAndWhiteNameD(const char* path, double frameCount, double duration); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginMakeBlankFramesRandomBlackAndWhiteNameD(IntPtr path, double frameCount, double duration); + /// + /// Make a blank animation for the length of the frame count. Frame duration + /// defaults to the duration. The frame color is random. Animation is referenced + /// by name. + /// EXPORT_API void PluginMakeBlankFramesRandomName(const char* path, int frameCount, float duration); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginMakeBlankFramesRandomName(IntPtr path, int frameCount, float duration); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginMakeBlankFramesRandomNameD(const char* path, double frameCount, double duration); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginMakeBlankFramesRandomNameD(IntPtr path, double frameCount, double duration); + /// + /// Make a blank animation for the length of the frame count. Frame duration + /// defaults to the duration. The frame color defaults to color. Animation + /// is referenced by id. + /// EXPORT_API void PluginMakeBlankFramesRGB(int animationId, int frameCount, float duration, int red, int green, int blue); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginMakeBlankFramesRGB(int animationId, int frameCount, float duration, int red, int green, int blue); + /// + /// Make a blank animation for the length of the frame count. Frame duration + /// defaults to the duration. The frame color defaults to color. Animation + /// is referenced by name. + /// EXPORT_API void PluginMakeBlankFramesRGBName(const char* path, int frameCount, float duration, int red, int green, int blue); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginMakeBlankFramesRGBName(IntPtr path, int frameCount, float duration, int red, int green, int blue); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginMakeBlankFramesRGBNameD(const char* path, double frameCount, double duration, double red, double green, double blue); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginMakeBlankFramesRGBNameD(IntPtr path, double frameCount, double duration, double red, double green, double blue); + /// + /// Flips the color grid horizontally for all `Chroma` animation frames. Returns + /// the animation id upon success. Returns negative one upon failure. + /// EXPORT_API int PluginMirrorHorizontally(int animationId); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern int PluginMirrorHorizontally(int animationId); + /// + /// Flips the color grid vertically for all `Chroma` animation frames. This + /// method has no effect for `EChromaSDKDevice1DEnum` devices. Returns the + /// animation id upon success. Returns negative one upon failure. + /// EXPORT_API int PluginMirrorVertically(int animationId); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern int PluginMirrorVertically(int animationId); + /// + /// Multiply the color intensity with the lerp result from color 1 to color + /// 2 using the frame index divided by the frame count for the `t` parameter. + /// Animation is referenced in id. + /// EXPORT_API void PluginMultiplyColorLerpAllFrames(int animationId, int color1, int color2); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginMultiplyColorLerpAllFrames(int animationId, int color1, int color2); + /// + /// Multiply the color intensity with the lerp result from color 1 to color + /// 2 using the frame index divided by the frame count for the `t` parameter. + /// Animation is referenced in name. + /// EXPORT_API void PluginMultiplyColorLerpAllFramesName(const char* path, int color1, int color2); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginMultiplyColorLerpAllFramesName(IntPtr path, int color1, int color2); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginMultiplyColorLerpAllFramesNameD(const char* path, double color1, double color2); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginMultiplyColorLerpAllFramesNameD(IntPtr path, double color1, double color2); + /// + /// Multiply all the colors in the frame by the intensity value. The valid the + /// intensity range is from 0.0 to 255.0. RGB components are multiplied equally. + /// An intensity of 0.5 would half the color value. Black colors in the frame + /// will not be affected by this method. + /// EXPORT_API void PluginMultiplyIntensity(int animationId, int frameId, float intensity); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginMultiplyIntensity(int animationId, int frameId, float intensity); + /// + /// Multiply all the colors for all frames by the intensity value. The valid + /// the intensity range is from 0.0 to 255.0. RGB components are multiplied + /// equally. An intensity of 0.5 would half the color value. Black colors in + /// the frame will not be affected by this method. + /// EXPORT_API void PluginMultiplyIntensityAllFrames(int animationId, float intensity); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginMultiplyIntensityAllFrames(int animationId, float intensity); + /// + /// Multiply all the colors for all frames by the intensity value. The valid + /// the intensity range is from 0.0 to 255.0. RGB components are multiplied + /// equally. An intensity of 0.5 would half the color value. Black colors in + /// the frame will not be affected by this method. + /// EXPORT_API void PluginMultiplyIntensityAllFramesName(const char* path, float intensity); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginMultiplyIntensityAllFramesName(IntPtr path, float intensity); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginMultiplyIntensityAllFramesNameD(const char* path, double intensity); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginMultiplyIntensityAllFramesNameD(IntPtr path, double intensity); + /// + /// Multiply all frames by the RBG color intensity. Animation is referenced + /// by id. + /// EXPORT_API void PluginMultiplyIntensityAllFramesRGB(int animationId, int red, int green, int blue); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginMultiplyIntensityAllFramesRGB(int animationId, int red, int green, int blue); + /// + /// Multiply all frames by the RBG color intensity. Animation is referenced + /// by name. + /// EXPORT_API void PluginMultiplyIntensityAllFramesRGBName(const char* path, int red, int green, int blue); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginMultiplyIntensityAllFramesRGBName(IntPtr path, int red, int green, int blue); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginMultiplyIntensityAllFramesRGBNameD(const char* path, double red, double green, double blue); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginMultiplyIntensityAllFramesRGBNameD(IntPtr path, double red, double green, double blue); + /// + /// Multiply the specific frame by the RBG color intensity. Animation is referenced + /// by id. + /// EXPORT_API void PluginMultiplyIntensityColor(int animationId, int frameId, int color); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginMultiplyIntensityColor(int animationId, int frameId, int color); + /// + /// Multiply all frames by the RBG color intensity. Animation is referenced + /// by id. + /// EXPORT_API void PluginMultiplyIntensityColorAllFrames(int animationId, int color); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginMultiplyIntensityColorAllFrames(int animationId, int color); + /// + /// Multiply all frames by the RBG color intensity. Animation is referenced + /// by name. + /// EXPORT_API void PluginMultiplyIntensityColorAllFramesName(const char* path, int color); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginMultiplyIntensityColorAllFramesName(IntPtr path, int color); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginMultiplyIntensityColorAllFramesNameD(const char* path, double color); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginMultiplyIntensityColorAllFramesNameD(IntPtr path, double color); + /// + /// Multiply the specific frame by the RBG color intensity. Animation is referenced + /// by name. + /// EXPORT_API void PluginMultiplyIntensityColorName(const char* path, int frameId, int color); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginMultiplyIntensityColorName(IntPtr path, int frameId, int color); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginMultiplyIntensityColorNameD(const char* path, double frameId, double color); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginMultiplyIntensityColorNameD(IntPtr path, double frameId, double color); + /// + /// Multiply all the colors in the frame by the intensity value. The valid the + /// intensity range is from 0.0 to 255.0. RGB components are multiplied equally. + /// An intensity of 0.5 would half the color value. Black colors in the frame + /// will not be affected by this method. + /// EXPORT_API void PluginMultiplyIntensityName(const char* path, int frameId, float intensity); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginMultiplyIntensityName(IntPtr path, int frameId, float intensity); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginMultiplyIntensityNameD(const char* path, double frameId, double intensity); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginMultiplyIntensityNameD(IntPtr path, double frameId, double intensity); + /// + /// Multiply the specific frame by the RBG color intensity. Animation is referenced + /// by id. + /// EXPORT_API void PluginMultiplyIntensityRGB(int animationId, int frameId, int red, int green, int blue); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginMultiplyIntensityRGB(int animationId, int frameId, int red, int green, int blue); + /// + /// Multiply the specific frame by the RBG color intensity. Animation is referenced + /// by name. + /// EXPORT_API void PluginMultiplyIntensityRGBName(const char* path, int frameId, int red, int green, int blue); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginMultiplyIntensityRGBName(IntPtr path, int frameId, int red, int green, int blue); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginMultiplyIntensityRGBNameD(const char* path, double frameId, double red, double green, double blue); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginMultiplyIntensityRGBNameD(IntPtr path, double frameId, double red, double green, double blue); + /// + /// Multiply the specific frame by the color lerp result between color 1 and + /// 2 using the frame color value as the `t` value. Animation is referenced + /// by id. + /// EXPORT_API void PluginMultiplyNonZeroTargetColorLerp(int animationId, int frameId, int color1, int color2); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginMultiplyNonZeroTargetColorLerp(int animationId, int frameId, int color1, int color2); + /// + /// Multiply all frames by the color lerp result between color 1 and 2 using + /// the frame color value as the `t` value. Animation is referenced by id. + /// + /// EXPORT_API void PluginMultiplyNonZeroTargetColorLerpAllFrames(int animationId, int color1, int color2); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginMultiplyNonZeroTargetColorLerpAllFrames(int animationId, int color1, int color2); + /// + /// Multiply all frames by the color lerp result between color 1 and 2 using + /// the frame color value as the `t` value. Animation is referenced by name. + /// + /// EXPORT_API void PluginMultiplyNonZeroTargetColorLerpAllFramesName(const char* path, int color1, int color2); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginMultiplyNonZeroTargetColorLerpAllFramesName(IntPtr path, int color1, int color2); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginMultiplyNonZeroTargetColorLerpAllFramesNameD(const char* path, double color1, double color2); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginMultiplyNonZeroTargetColorLerpAllFramesNameD(IntPtr path, double color1, double color2); + /// + /// Multiply the specific frame by the color lerp result between RGB 1 and 2 + /// using the frame color value as the `t` value. Animation is referenced by + /// id. + /// EXPORT_API void PluginMultiplyNonZeroTargetColorLerpAllFramesRGB(int animationId, int red1, int green1, int blue1, int red2, int green2, int blue2); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginMultiplyNonZeroTargetColorLerpAllFramesRGB(int animationId, int red1, int green1, int blue1, int red2, int green2, int blue2); + /// + /// Multiply the specific frame by the color lerp result between RGB 1 and 2 + /// using the frame color value as the `t` value. Animation is referenced by + /// name. + /// EXPORT_API void PluginMultiplyNonZeroTargetColorLerpAllFramesRGBName(const char* path, int red1, int green1, int blue1, int red2, int green2, int blue2); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginMultiplyNonZeroTargetColorLerpAllFramesRGBName(IntPtr path, int red1, int green1, int blue1, int red2, int green2, int blue2); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginMultiplyNonZeroTargetColorLerpAllFramesRGBNameD(const char* path, double red1, double green1, double blue1, double red2, double green2, double blue2); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginMultiplyNonZeroTargetColorLerpAllFramesRGBNameD(IntPtr path, double red1, double green1, double blue1, double red2, double green2, double blue2); + /// + /// Multiply the specific frame by the color lerp result between color 1 and + /// 2 using the frame color value as the `t` value. Animation is referenced + /// by id. + /// EXPORT_API void PluginMultiplyTargetColorLerp(int animationId, int frameId, int color1, int color2); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginMultiplyTargetColorLerp(int animationId, int frameId, int color1, int color2); + /// + /// Multiply all frames by the color lerp result between color 1 and 2 using + /// the frame color value as the `t` value. Animation is referenced by id. + /// + /// EXPORT_API void PluginMultiplyTargetColorLerpAllFrames(int animationId, int color1, int color2); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginMultiplyTargetColorLerpAllFrames(int animationId, int color1, int color2); + /// + /// Multiply all frames by the color lerp result between color 1 and 2 using + /// the frame color value as the `t` value. Animation is referenced by name. + /// + /// EXPORT_API void PluginMultiplyTargetColorLerpAllFramesName(const char* path, int color1, int color2); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginMultiplyTargetColorLerpAllFramesName(IntPtr path, int color1, int color2); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginMultiplyTargetColorLerpAllFramesNameD(const char* path, double color1, double color2); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginMultiplyTargetColorLerpAllFramesNameD(IntPtr path, double color1, double color2); + /// + /// Multiply all frames by the color lerp result between RGB 1 and 2 using the + /// frame color value as the `t` value. Animation is referenced by id. + /// EXPORT_API void PluginMultiplyTargetColorLerpAllFramesRGB(int animationId, int red1, int green1, int blue1, int red2, int green2, int blue2); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginMultiplyTargetColorLerpAllFramesRGB(int animationId, int red1, int green1, int blue1, int red2, int green2, int blue2); + /// + /// Multiply all frames by the color lerp result between RGB 1 and 2 using the + /// frame color value as the `t` value. Animation is referenced by name. + /// EXPORT_API void PluginMultiplyTargetColorLerpAllFramesRGBName(const char* path, int red1, int green1, int blue1, int red2, int green2, int blue2); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginMultiplyTargetColorLerpAllFramesRGBName(IntPtr path, int red1, int green1, int blue1, int red2, int green2, int blue2); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginMultiplyTargetColorLerpAllFramesRGBNameD(const char* path, double red1, double green1, double blue1, double red2, double green2, double blue2); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginMultiplyTargetColorLerpAllFramesRGBNameD(IntPtr path, double red1, double green1, double blue1, double red2, double green2, double blue2); + /// + /// Multiply the specific frame by the color lerp result between color 1 and + /// 2 using the frame color value as the `t` value. Animation is referenced + /// by name. + /// EXPORT_API void PluginMultiplyTargetColorLerpName(const char* path, int frameId, int color1, int color2); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginMultiplyTargetColorLerpName(IntPtr path, int frameId, int color1, int color2); + /// + /// Offset all colors in the frame using the RGB offset. Use the range of -255 + /// to 255 for red, green, and blue parameters. Negative values remove color. + /// Positive values add color. + /// EXPORT_API void PluginOffsetColors(int animationId, int frameId, int red, int green, int blue); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginOffsetColors(int animationId, int frameId, int red, int green, int blue); + /// + /// Offset all colors for all frames using the RGB offset. Use the range of + /// -255 to 255 for red, green, and blue parameters. Negative values remove + /// color. Positive values add color. + /// EXPORT_API void PluginOffsetColorsAllFrames(int animationId, int red, int green, int blue); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginOffsetColorsAllFrames(int animationId, int red, int green, int blue); + /// + /// Offset all colors for all frames using the RGB offset. Use the range of + /// -255 to 255 for red, green, and blue parameters. Negative values remove + /// color. Positive values add color. + /// EXPORT_API void PluginOffsetColorsAllFramesName(const char* path, int red, int green, int blue); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginOffsetColorsAllFramesName(IntPtr path, int red, int green, int blue); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginOffsetColorsAllFramesNameD(const char* path, double red, double green, double blue); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginOffsetColorsAllFramesNameD(IntPtr path, double red, double green, double blue); + /// + /// Offset all colors in the frame using the RGB offset. Use the range of -255 + /// to 255 for red, green, and blue parameters. Negative values remove color. + /// Positive values add color. + /// EXPORT_API void PluginOffsetColorsName(const char* path, int frameId, int red, int green, int blue); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginOffsetColorsName(IntPtr path, int frameId, int red, int green, int blue); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginOffsetColorsNameD(const char* path, double frameId, double red, double green, double blue); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginOffsetColorsNameD(IntPtr path, double frameId, double red, double green, double blue); + /// + /// This method will only update colors in the animation that are not already + /// set to black. Offset a subset of colors in the frame using the RGB offset. + /// Use the range of -255 to 255 for red, green, and blue parameters. Negative + /// values remove color. Positive values add color. + /// EXPORT_API void PluginOffsetNonZeroColors(int animationId, int frameId, int red, int green, int blue); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginOffsetNonZeroColors(int animationId, int frameId, int red, int green, int blue); + /// + /// This method will only update colors in the animation that are not already + /// set to black. Offset a subset of colors for all frames using the RGB offset. + /// Use the range of -255 to 255 for red, green, and blue parameters. Negative + /// values remove color. Positive values add color. + /// EXPORT_API void PluginOffsetNonZeroColorsAllFrames(int animationId, int red, int green, int blue); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginOffsetNonZeroColorsAllFrames(int animationId, int red, int green, int blue); + /// + /// This method will only update colors in the animation that are not already + /// set to black. Offset a subset of colors for all frames using the RGB offset. + /// Use the range of -255 to 255 for red, green, and blue parameters. Negative + /// values remove color. Positive values add color. + /// EXPORT_API void PluginOffsetNonZeroColorsAllFramesName(const char* path, int red, int green, int blue); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginOffsetNonZeroColorsAllFramesName(IntPtr path, int red, int green, int blue); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginOffsetNonZeroColorsAllFramesNameD(const char* path, double red, double green, double blue); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginOffsetNonZeroColorsAllFramesNameD(IntPtr path, double red, double green, double blue); + /// + /// This method will only update colors in the animation that are not already + /// set to black. Offset a subset of colors in the frame using the RGB offset. + /// Use the range of -255 to 255 for red, green, and blue parameters. Negative + /// values remove color. Positive values add color. + /// EXPORT_API void PluginOffsetNonZeroColorsName(const char* path, int frameId, int red, int green, int blue); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginOffsetNonZeroColorsName(IntPtr path, int frameId, int red, int green, int blue); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginOffsetNonZeroColorsNameD(const char* path, double frameId, double red, double green, double blue); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginOffsetNonZeroColorsNameD(IntPtr path, double frameId, double red, double green, double blue); + /// + /// Opens a `Chroma` animation file so that it can be played. Returns an animation + /// id >= 0 upon success. Returns negative one if there was a failure. The + /// animation id is used in most of the API methods. + /// EXPORT_API int PluginOpenAnimation(const char* path); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern int PluginOpenAnimation(IntPtr path); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginOpenAnimationD(const char* path); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginOpenAnimationD(IntPtr path); + /// + /// Opens a `Chroma` animation data from memory so that it can be played. `Data` + /// is a pointer to BYTE array of the loaded animation in memory. `Name` will + /// be assigned to the animation when loaded. Returns an animation id >= 0 + /// upon success. Returns negative one if there was a failure. The animation + /// id is used in most of the API methods. + /// EXPORT_API int PluginOpenAnimationFromMemory(const BYTE* data, const char* name); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern int PluginOpenAnimationFromMemory(byte[] data, IntPtr name); + /// + /// Opens a `Chroma` animation file with the `.chroma` extension. Returns zero + /// upon success. Returns negative one if there was a failure. + /// EXPORT_API int PluginOpenEditorDialog(const char* path); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern int PluginOpenEditorDialog(IntPtr path); + /// + /// Open the named animation in the editor dialog and play the animation at + /// start. + /// EXPORT_API int PluginOpenEditorDialogAndPlay(const char* path); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern int PluginOpenEditorDialogAndPlay(IntPtr path); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginOpenEditorDialogAndPlayD(const char* path); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginOpenEditorDialogAndPlayD(IntPtr path); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginOpenEditorDialogD(const char* path); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginOpenEditorDialogD(IntPtr path); + /// + /// Sets the `duration` for all grames in the `Chroma` animation to the `duration` + /// parameter. Returns the animation id upon success. Returns negative one + /// upon failure. + /// EXPORT_API int PluginOverrideFrameDuration(int animationId, float duration); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern int PluginOverrideFrameDuration(int animationId, float duration); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginOverrideFrameDurationD(double animationId, double duration); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginOverrideFrameDurationD(double animationId, double duration); + /// + /// Override the duration of all frames with the `duration` value. Animation + /// is referenced by name. + /// EXPORT_API void PluginOverrideFrameDurationName(const char* path, float duration); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginOverrideFrameDurationName(IntPtr path, float duration); + /// + /// Pause the current animation referenced by id. + /// EXPORT_API void PluginPauseAnimation(int animationId); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginPauseAnimation(int animationId); + /// + /// Pause the current animation referenced by name. + /// EXPORT_API void PluginPauseAnimationName(const char* path); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginPauseAnimationName(IntPtr path); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginPauseAnimationNameD(const char* path); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginPauseAnimationNameD(IntPtr path); + /// + /// Plays the `Chroma` animation. This will load the animation, if not loaded + /// previously. Returns the animation id upon success. Returns negative one + /// upon failure. + /// EXPORT_API int PluginPlayAnimation(int animationId); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern int PluginPlayAnimation(int animationId); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginPlayAnimationD(double animationId); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginPlayAnimationD(double animationId); + /// + /// `PluginPlayAnimationFrame` automatically handles initializing the `ChromaSDK`. + /// The method will play the animation given the `animationId` with looping + /// `on` or `off` starting at the `frameId`. + /// EXPORT_API void PluginPlayAnimationFrame(int animationId, int frameId, bool loop); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginPlayAnimationFrame(int animationId, int frameId, bool loop); + /// + /// `PluginPlayAnimationFrameName` automatically handles initializing the `ChromaSDK`. + /// The named `.chroma` animation file will be automatically opened. The animation + /// will play with looping `on` or `off` starting at the `frameId`. + /// EXPORT_API void PluginPlayAnimationFrameName(const char* path, int frameId, bool loop); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginPlayAnimationFrameName(IntPtr path, int frameId, bool loop); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginPlayAnimationFrameNameD(const char* path, double frameId, double loop); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginPlayAnimationFrameNameD(IntPtr path, double frameId, double loop); + /// + /// `PluginPlayAnimationLoop` automatically handles initializing the `ChromaSDK`. + /// The method will play the animation given the `animationId` with looping + /// `on` or `off`. + /// EXPORT_API void PluginPlayAnimationLoop(int animationId, bool loop); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginPlayAnimationLoop(int animationId, bool loop); + /// + /// `PluginPlayAnimationName` automatically handles initializing the `ChromaSDK`. + /// The named `.chroma` animation file will be automatically opened. The animation + /// will play with looping `on` or `off`. + /// EXPORT_API void PluginPlayAnimationName(const char* path, bool loop); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginPlayAnimationName(IntPtr path, bool loop); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginPlayAnimationNameD(const char* path, double loop); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginPlayAnimationNameD(IntPtr path, double loop); + /// + /// `PluginPlayComposite` automatically handles initializing the `ChromaSDK`. + /// The named animation files for the `.chroma` set will be automatically opened. + /// The set of animations will play with looping `on` or `off`. + /// EXPORT_API void PluginPlayComposite(const char* name, bool loop); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginPlayComposite(IntPtr name, bool loop); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginPlayCompositeD(const char* name, double loop); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginPlayCompositeD(IntPtr name, double loop); + /// + /// Displays the `Chroma` animation frame on `Chroma` hardware given the `frameIndex`. + /// Returns the animation id upon success. Returns negative one upon failure. + /// + /// EXPORT_API int PluginPreviewFrame(int animationId, int frameIndex); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern int PluginPreviewFrame(int animationId, int frameIndex); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginPreviewFrameD(double animationId, double frameIndex); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginPreviewFrameD(double animationId, double frameIndex); + /// + /// Displays the `Chroma` animation frame on `Chroma` hardware given the `frameIndex`. + /// Animaton is referenced by name. + /// EXPORT_API void PluginPreviewFrameName(const char* path, int frameIndex); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginPreviewFrameName(IntPtr path, int frameIndex); + /// + /// Reduce the frames of the animation by removing every nth element. Animation + /// is referenced by id. + /// EXPORT_API void PluginReduceFrames(int animationId, int n); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginReduceFrames(int animationId, int n); + /// + /// Reduce the frames of the animation by removing every nth element. Animation + /// is referenced by name. + /// EXPORT_API void PluginReduceFramesName(const char* path, int n); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginReduceFramesName(IntPtr path, int n); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginReduceFramesNameD(const char* path, double n); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginReduceFramesNameD(IntPtr path, double n); + /// + /// Resets the `Chroma` animation to 1 blank frame. Returns the animation id + /// upon success. Returns negative one upon failure. + /// EXPORT_API int PluginResetAnimation(int animationId); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern int PluginResetAnimation(int animationId); + /// + /// Resume the animation with loop `ON` or `OFF` referenced by id. + /// EXPORT_API void PluginResumeAnimation(int animationId, bool loop); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginResumeAnimation(int animationId, bool loop); + /// + /// Resume the animation with loop `ON` or `OFF` referenced by name. + /// EXPORT_API void PluginResumeAnimationName(const char* path, bool loop); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginResumeAnimationName(IntPtr path, bool loop); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginResumeAnimationNameD(const char* path, double loop); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginResumeAnimationNameD(IntPtr path, double loop); + /// + /// Reverse the animation frame order of the `Chroma` animation. Returns the + /// animation id upon success. Returns negative one upon failure. Animation + /// is referenced by id. + /// EXPORT_API int PluginReverse(int animationId); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern int PluginReverse(int animationId); + /// + /// Reverse the animation frame order of the `Chroma` animation. Animation is + /// referenced by id. + /// EXPORT_API void PluginReverseAllFrames(int animationId); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginReverseAllFrames(int animationId); + /// + /// Reverse the animation frame order of the `Chroma` animation. Animation is + /// referenced by name. + /// EXPORT_API void PluginReverseAllFramesName(const char* path); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginReverseAllFramesName(IntPtr path); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginReverseAllFramesNameD(const char* path); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginReverseAllFramesNameD(IntPtr path); + /// + /// Save the animation referenced by id to the path specified. + /// EXPORT_API int PluginSaveAnimation(int animationId, const char* path); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern int PluginSaveAnimation(int animationId, IntPtr path); + /// + /// Save the named animation to the target path specified. + /// EXPORT_API int PluginSaveAnimationName(const char* sourceAnimation, const char* targetAnimation); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern int PluginSaveAnimationName(IntPtr sourceAnimation, IntPtr targetAnimation); + /// + /// Set the animation color for a frame given the `1D` `led`. The `led` should + /// be greater than or equal to 0 and less than the `MaxLeds`. The animation + /// is referenced by id. + /// EXPORT_API void PluginSet1DColor(int animationId, int frameId, int led, int color); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginSet1DColor(int animationId, int frameId, int led, int color); + /// + /// Set the animation color for a frame given the `1D` `led`. The `led` should + /// be greater than or equal to 0 and less than the `MaxLeds`. The animation + /// is referenced by name. + /// EXPORT_API void PluginSet1DColorName(const char* path, int frameId, int led, int color); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginSet1DColorName(IntPtr path, int frameId, int led, int color); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginSet1DColorNameD(const char* path, double frameId, double led, double color); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginSet1DColorNameD(IntPtr path, double frameId, double led, double color); + /// + /// Set the animation color for a frame given the `2D` `row` and `column`. The + /// `row` should be greater than or equal to 0 and less than the `MaxRow`. + /// The `column` should be greater than or equal to 0 and less than the `MaxColumn`. + /// The animation is referenced by id. + /// EXPORT_API void PluginSet2DColor(int animationId, int frameId, int row, int column, int color); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginSet2DColor(int animationId, int frameId, int row, int column, int color); + /// + /// Set the animation color for a frame given the `2D` `row` and `column`. The + /// `row` should be greater than or equal to 0 and less than the `MaxRow`. + /// The `column` should be greater than or equal to 0 and less than the `MaxColumn`. + /// The animation is referenced by name. + /// EXPORT_API void PluginSet2DColorName(const char* path, int frameId, int row, int column, int color); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginSet2DColorName(IntPtr path, int frameId, int row, int column, int color); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginSet2DColorNameD(const char* path, double frameId, double rowColumnIndex, double color); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginSet2DColorNameD(IntPtr path, double frameId, double rowColumnIndex, double color); + /// + /// When custom color is set, the custom key mode will be used. The animation + /// is referenced by id. + /// EXPORT_API void PluginSetChromaCustomColorAllFrames(int animationId); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginSetChromaCustomColorAllFrames(int animationId); + /// + /// When custom color is set, the custom key mode will be used. The animation + /// is referenced by name. + /// EXPORT_API void PluginSetChromaCustomColorAllFramesName(const char* path); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginSetChromaCustomColorAllFramesName(IntPtr path); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginSetChromaCustomColorAllFramesNameD(const char* path); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginSetChromaCustomColorAllFramesNameD(IntPtr path); + /// + /// Set the Chroma custom key color flag on all frames. `True` changes the layout + /// from grid to key. `True` changes the layout from key to grid. Animation + /// is referenced by id. + /// EXPORT_API void PluginSetChromaCustomFlag(int animationId, bool flag); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginSetChromaCustomFlag(int animationId, bool flag); + /// + /// Set the Chroma custom key color flag on all frames. `True` changes the layout + /// from grid to key. `True` changes the layout from key to grid. Animation + /// is referenced by name. + /// EXPORT_API void PluginSetChromaCustomFlagName(const char* path, bool flag); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginSetChromaCustomFlagName(IntPtr path, bool flag); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginSetChromaCustomFlagNameD(const char* path, double flag); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginSetChromaCustomFlagNameD(IntPtr path, double flag); + /// + /// Set the current frame of the animation referenced by id. + /// EXPORT_API void PluginSetCurrentFrame(int animationId, int frameId); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginSetCurrentFrame(int animationId, int frameId); + /// + /// Set the current frame of the animation referenced by name. + /// EXPORT_API void PluginSetCurrentFrameName(const char* path, int frameId); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginSetCurrentFrameName(IntPtr path, int frameId); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginSetCurrentFrameNameD(const char* path, double frameId); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginSetCurrentFrameNameD(IntPtr path, double frameId); + /// + /// Set the custom alpha flag on the color array + /// EXPORT_API RZRESULT PluginSetCustomColorFlag2D(int device, int* colors); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern int PluginSetCustomColorFlag2D(int device, int[] colors); + /// + /// Changes the `deviceType` and `device` of a `Chroma` animation. If the device + /// is changed, the `Chroma` animation will be reset with 1 blank frame. Returns + /// the animation id upon success. Returns negative one upon failure. + /// EXPORT_API int PluginSetDevice(int animationId, int deviceType, int device); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern int PluginSetDevice(int animationId, int deviceType, int device); + /// + /// SetEffect will display the referenced effect id. + /// EXPORT_API RZRESULT PluginSetEffect(const ChromaSDK::FChromaSDKGuid& effectId); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern int PluginSetEffect(Guid effectId); + /// + /// SetEffectCustom1D will display the referenced colors immediately + /// EXPORT_API RZRESULT PluginSetEffectCustom1D(const int device, const int* colors); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern int PluginSetEffectCustom1D(int device, int[] colors); + /// + /// SetEffectCustom2D will display the referenced colors immediately. + /// EXPORT_API RZRESULT PluginSetEffectCustom2D(const int device, const int* colors); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern int PluginSetEffectCustom2D(int device, int[] colors); + /// + /// SetEffectKeyboardCustom2D will display the referenced custom keyboard colors + /// immediately. Colors represent a visual grid layout. Keys represent the + /// hotkeys for any layout. + /// EXPORT_API RZRESULT PluginSetEffectKeyboardCustom2D(const int device, const int* colors, const int* keys); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern int PluginSetEffectKeyboardCustom2D(int device, int[] colors, int[] keys); + /// + /// When the idle animation is used, the named animation will play when no other + /// animations are playing. Reference the animation by id. + /// EXPORT_API void PluginSetIdleAnimation(int animationId); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginSetIdleAnimation(int animationId); + /// + /// When the idle animation is used, the named animation will play when no other + /// animations are playing. Reference the animation by name. + /// EXPORT_API void PluginSetIdleAnimationName(const char* path); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginSetIdleAnimationName(IntPtr path); + /// + /// Set animation key to a static color for the given frame. + /// EXPORT_API void PluginSetKeyColor(int animationId, int frameId, int rzkey, int color); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginSetKeyColor(int animationId, int frameId, int rzkey, int color); + /// + /// Set the key to the specified key color for all frames. Animation is referenced + /// by id. + /// EXPORT_API void PluginSetKeyColorAllFrames(int animationId, int rzkey, int color); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginSetKeyColorAllFrames(int animationId, int rzkey, int color); + /// + /// Set the key to the specified key color for all frames. Animation is referenced + /// by name. + /// EXPORT_API void PluginSetKeyColorAllFramesName(const char* path, int rzkey, int color); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginSetKeyColorAllFramesName(IntPtr path, int rzkey, int color); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginSetKeyColorAllFramesNameD(const char* path, double rzkey, double color); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginSetKeyColorAllFramesNameD(IntPtr path, double rzkey, double color); + /// + /// Set the key to the specified key color for all frames. Animation is referenced + /// by id. + /// EXPORT_API void PluginSetKeyColorAllFramesRGB(int animationId, int rzkey, int red, int green, int blue); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginSetKeyColorAllFramesRGB(int animationId, int rzkey, int red, int green, int blue); + /// + /// Set the key to the specified key color for all frames. Animation is referenced + /// by name. + /// EXPORT_API void PluginSetKeyColorAllFramesRGBName(const char* path, int rzkey, int red, int green, int blue); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginSetKeyColorAllFramesRGBName(IntPtr path, int rzkey, int red, int green, int blue); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginSetKeyColorAllFramesRGBNameD(const char* path, double rzkey, double red, double green, double blue); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginSetKeyColorAllFramesRGBNameD(IntPtr path, double rzkey, double red, double green, double blue); + /// + /// Set animation key to a static color for the given frame. + /// EXPORT_API void PluginSetKeyColorName(const char* path, int frameId, int rzkey, int color); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginSetKeyColorName(IntPtr path, int frameId, int rzkey, int color); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginSetKeyColorNameD(const char* path, double frameId, double rzkey, double color); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginSetKeyColorNameD(IntPtr path, double frameId, double rzkey, double color); + /// + /// Set the key to the specified key color for the specified frame. Animation + /// is referenced by id. + /// EXPORT_API void PluginSetKeyColorRGB(int animationId, int frameId, int rzkey, int red, int green, int blue); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginSetKeyColorRGB(int animationId, int frameId, int rzkey, int red, int green, int blue); + /// + /// Set the key to the specified key color for the specified frame. Animation + /// is referenced by name. + /// EXPORT_API void PluginSetKeyColorRGBName(const char* path, int frameId, int rzkey, int red, int green, int blue); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginSetKeyColorRGBName(IntPtr path, int frameId, int rzkey, int red, int green, int blue); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginSetKeyColorRGBNameD(const char* path, double frameId, double rzkey, double red, double green, double blue); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginSetKeyColorRGBNameD(IntPtr path, double frameId, double rzkey, double red, double green, double blue); + /// + /// Set animation key to a static color for the given frame if the existing + /// color is not already black. + /// EXPORT_API void PluginSetKeyNonZeroColor(int animationId, int frameId, int rzkey, int color); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginSetKeyNonZeroColor(int animationId, int frameId, int rzkey, int color); + /// + /// Set animation key to a static color for the given frame if the existing + /// color is not already black. + /// EXPORT_API void PluginSetKeyNonZeroColorName(const char* path, int frameId, int rzkey, int color); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginSetKeyNonZeroColorName(IntPtr path, int frameId, int rzkey, int color); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginSetKeyNonZeroColorNameD(const char* path, double frameId, double rzkey, double color); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginSetKeyNonZeroColorNameD(IntPtr path, double frameId, double rzkey, double color); + /// + /// Set the key to the specified key color for the specified frame where color + /// is not black. Animation is referenced by id. + /// EXPORT_API void PluginSetKeyNonZeroColorRGB(int animationId, int frameId, int rzkey, int red, int green, int blue); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginSetKeyNonZeroColorRGB(int animationId, int frameId, int rzkey, int red, int green, int blue); + /// + /// Set the key to the specified key color for the specified frame where color + /// is not black. Animation is referenced by name. + /// EXPORT_API void PluginSetKeyNonZeroColorRGBName(const char* path, int frameId, int rzkey, int red, int green, int blue); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginSetKeyNonZeroColorRGBName(IntPtr path, int frameId, int rzkey, int red, int green, int blue); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginSetKeyNonZeroColorRGBNameD(const char* path, double frameId, double rzkey, double red, double green, double blue); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginSetKeyNonZeroColorRGBNameD(IntPtr path, double frameId, double rzkey, double red, double green, double blue); + /// + /// Set animation key by row and column to a static color for the given frame. + /// + /// EXPORT_API void PluginSetKeyRowColumnColorName(const char* path, int frameId, int row, int column, int color); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginSetKeyRowColumnColorName(IntPtr path, int frameId, int row, int column, int color); + /// + /// Set an array of animation keys to a static color for the given frame. Animation + /// is referenced by id. + /// EXPORT_API void PluginSetKeysColor(int animationId, int frameId, const int* rzkeys, int keyCount, int color); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginSetKeysColor(int animationId, int frameId, int[] rzkeys, int keyCount, int color); + /// + /// Set an array of animation keys to a static color for all frames. Animation + /// is referenced by id. + /// EXPORT_API void PluginSetKeysColorAllFrames(int animationId, const int* rzkeys, int keyCount, int color); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginSetKeysColorAllFrames(int animationId, int[] rzkeys, int keyCount, int color); + /// + /// Set an array of animation keys to a static color for all frames. Animation + /// is referenced by name. + /// EXPORT_API void PluginSetKeysColorAllFramesName(const char* path, const int* rzkeys, int keyCount, int color); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginSetKeysColorAllFramesName(IntPtr path, int[] rzkeys, int keyCount, int color); + /// + /// Set an array of animation keys to a static color for all frames. Animation + /// is referenced by id. + /// EXPORT_API void PluginSetKeysColorAllFramesRGB(int animationId, const int* rzkeys, int keyCount, int red, int green, int blue); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginSetKeysColorAllFramesRGB(int animationId, int[] rzkeys, int keyCount, int red, int green, int blue); + /// + /// Set an array of animation keys to a static color for all frames. Animation + /// is referenced by name. + /// EXPORT_API void PluginSetKeysColorAllFramesRGBName(const char* path, const int* rzkeys, int keyCount, int red, int green, int blue); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginSetKeysColorAllFramesRGBName(IntPtr path, int[] rzkeys, int keyCount, int red, int green, int blue); + /// + /// Set an array of animation keys to a static color for the given frame. + /// EXPORT_API void PluginSetKeysColorName(const char* path, int frameId, const int* rzkeys, int keyCount, int color); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginSetKeysColorName(IntPtr path, int frameId, int[] rzkeys, int keyCount, int color); + /// + /// Set an array of animation keys to a static color for the given frame. Animation + /// is referenced by id. + /// EXPORT_API void PluginSetKeysColorRGB(int animationId, int frameId, const int* rzkeys, int keyCount, int red, int green, int blue); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginSetKeysColorRGB(int animationId, int frameId, int[] rzkeys, int keyCount, int red, int green, int blue); + /// + /// Set an array of animation keys to a static color for the given frame. Animation + /// is referenced by name. + /// EXPORT_API void PluginSetKeysColorRGBName(const char* path, int frameId, const int* rzkeys, int keyCount, int red, int green, int blue); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginSetKeysColorRGBName(IntPtr path, int frameId, int[] rzkeys, int keyCount, int red, int green, int blue); + /// + /// Set an array of animation keys to a static color for the given frame if + /// the existing color is not already black. + /// EXPORT_API void PluginSetKeysNonZeroColor(int animationId, int frameId, const int* rzkeys, int keyCount, int color); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginSetKeysNonZeroColor(int animationId, int frameId, int[] rzkeys, int keyCount, int color); + /// + /// Set an array of animation keys to a static color for the given frame where + /// the color is not black. Animation is referenced by id. + /// EXPORT_API void PluginSetKeysNonZeroColorAllFrames(int animationId, const int* rzkeys, int keyCount, int color); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginSetKeysNonZeroColorAllFrames(int animationId, int[] rzkeys, int keyCount, int color); + /// + /// Set an array of animation keys to a static color for all frames if the existing + /// color is not already black. Reference animation by name. + /// EXPORT_API void PluginSetKeysNonZeroColorAllFramesName(const char* path, const int* rzkeys, int keyCount, int color); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginSetKeysNonZeroColorAllFramesName(IntPtr path, int[] rzkeys, int keyCount, int color); + /// + /// Set an array of animation keys to a static color for the given frame if + /// the existing color is not already black. Reference animation by name. + /// EXPORT_API void PluginSetKeysNonZeroColorName(const char* path, int frameId, const int* rzkeys, int keyCount, int color); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginSetKeysNonZeroColorName(IntPtr path, int frameId, int[] rzkeys, int keyCount, int color); + /// + /// Set an array of animation keys to a static color for the given frame where + /// the color is not black. Animation is referenced by id. + /// EXPORT_API void PluginSetKeysNonZeroColorRGB(int animationId, int frameId, const int* rzkeys, int keyCount, int red, int green, int blue); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginSetKeysNonZeroColorRGB(int animationId, int frameId, int[] rzkeys, int keyCount, int red, int green, int blue); + /// + /// Set an array of animation keys to a static color for the given frame where + /// the color is not black. Animation is referenced by name. + /// EXPORT_API void PluginSetKeysNonZeroColorRGBName(const char* path, int frameId, const int* rzkeys, int keyCount, int red, int green, int blue); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginSetKeysNonZeroColorRGBName(IntPtr path, int frameId, int[] rzkeys, int keyCount, int red, int green, int blue); + /// + /// Set an array of animation keys to a static color for the given frame where + /// the color is black. Animation is referenced by id. + /// EXPORT_API void PluginSetKeysZeroColor(int animationId, int frameId, const int* rzkeys, int keyCount, int color); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginSetKeysZeroColor(int animationId, int frameId, int[] rzkeys, int keyCount, int color); + /// + /// Set an array of animation keys to a static color for all frames where the + /// color is black. Animation is referenced by id. + /// EXPORT_API void PluginSetKeysZeroColorAllFrames(int animationId, const int* rzkeys, int keyCount, int color); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginSetKeysZeroColorAllFrames(int animationId, int[] rzkeys, int keyCount, int color); + /// + /// Set an array of animation keys to a static color for all frames where the + /// color is black. Animation is referenced by name. + /// EXPORT_API void PluginSetKeysZeroColorAllFramesName(const char* path, const int* rzkeys, int keyCount, int color); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginSetKeysZeroColorAllFramesName(IntPtr path, int[] rzkeys, int keyCount, int color); + /// + /// Set an array of animation keys to a static color for all frames where the + /// color is black. Animation is referenced by id. + /// EXPORT_API void PluginSetKeysZeroColorAllFramesRGB(int animationId, const int* rzkeys, int keyCount, int red, int green, int blue); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginSetKeysZeroColorAllFramesRGB(int animationId, int[] rzkeys, int keyCount, int red, int green, int blue); + /// + /// Set an array of animation keys to a static color for all frames where the + /// color is black. Animation is referenced by name. + /// EXPORT_API void PluginSetKeysZeroColorAllFramesRGBName(const char* path, const int* rzkeys, int keyCount, int red, int green, int blue); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginSetKeysZeroColorAllFramesRGBName(IntPtr path, int[] rzkeys, int keyCount, int red, int green, int blue); + /// + /// Set an array of animation keys to a static color for the given frame where + /// the color is black. Animation is referenced by name. + /// EXPORT_API void PluginSetKeysZeroColorName(const char* path, int frameId, const int* rzkeys, int keyCount, int color); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginSetKeysZeroColorName(IntPtr path, int frameId, int[] rzkeys, int keyCount, int color); + /// + /// Set an array of animation keys to a static color for the given frame where + /// the color is black. Animation is referenced by id. + /// EXPORT_API void PluginSetKeysZeroColorRGB(int animationId, int frameId, const int* rzkeys, int keyCount, int red, int green, int blue); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginSetKeysZeroColorRGB(int animationId, int frameId, int[] rzkeys, int keyCount, int red, int green, int blue); + /// + /// Set an array of animation keys to a static color for the given frame where + /// the color is black. Animation is referenced by name. + /// EXPORT_API void PluginSetKeysZeroColorRGBName(const char* path, int frameId, const int* rzkeys, int keyCount, int red, int green, int blue); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginSetKeysZeroColorRGBName(IntPtr path, int frameId, int[] rzkeys, int keyCount, int red, int green, int blue); + /// + /// Set animation key to a static color for the given frame where the color + /// is black. Animation is referenced by id. + /// EXPORT_API void PluginSetKeyZeroColor(int animationId, int frameId, int rzkey, int color); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginSetKeyZeroColor(int animationId, int frameId, int rzkey, int color); + /// + /// Set animation key to a static color for the given frame where the color + /// is black. Animation is referenced by name. + /// EXPORT_API void PluginSetKeyZeroColorName(const char* path, int frameId, int rzkey, int color); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginSetKeyZeroColorName(IntPtr path, int frameId, int rzkey, int color); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginSetKeyZeroColorNameD(const char* path, double frameId, double rzkey, double color); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginSetKeyZeroColorNameD(IntPtr path, double frameId, double rzkey, double color); + /// + /// Set animation key to a static color for the given frame where the color + /// is black. Animation is referenced by id. + /// EXPORT_API void PluginSetKeyZeroColorRGB(int animationId, int frameId, int rzkey, int red, int green, int blue); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginSetKeyZeroColorRGB(int animationId, int frameId, int rzkey, int red, int green, int blue); + /// + /// Set animation key to a static color for the given frame where the color + /// is black. Animation is referenced by name. + /// EXPORT_API void PluginSetKeyZeroColorRGBName(const char* path, int frameId, int rzkey, int red, int green, int blue); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginSetKeyZeroColorRGBName(IntPtr path, int frameId, int rzkey, int red, int green, int blue); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginSetKeyZeroColorRGBNameD(const char* path, double frameId, double rzkey, double red, double green, double blue); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginSetKeyZeroColorRGBNameD(IntPtr path, double frameId, double rzkey, double red, double green, double blue); + /// + /// Invokes the setup for a debug logging callback so that `stdout` is redirected + /// to the callback. This is used by `Unity` so that debug messages can appear + /// in the console window. + /// EXPORT_API void PluginSetLogDelegate(DebugLogPtr fp); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginSetLogDelegate(IntPtr fp); + /// + /// Sets the target device to the static color. + /// EXPORT_API void PluginSetStaticColor(int deviceType, int device, int color); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginSetStaticColor(int deviceType, int device, int color); + /// + /// Sets all devices to the static color. + /// EXPORT_API void PluginSetStaticColorAll(int color); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginSetStaticColorAll(int color); + /// + /// Sets the target device to the static color. + /// EXPORT_API void PluginStaticColor(int deviceType, int device, int color); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginStaticColor(int deviceType, int device, int color); + /// + /// Sets all devices to the static color. + /// EXPORT_API void PluginStaticColorAll(int color); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginStaticColorAll(int color); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginStaticColorD(double deviceType, double device, double color); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginStaticColorD(double deviceType, double device, double color); + /// + /// `PluginStopAll` will automatically stop all animations that are playing. + /// + /// EXPORT_API void PluginStopAll(); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginStopAll(); + /// + /// Stops animation playback if in progress. Returns the animation id upon success. + /// Returns negative one upon failure. + /// EXPORT_API int PluginStopAnimation(int animationId); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern int PluginStopAnimation(int animationId); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginStopAnimationD(double animationId); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginStopAnimationD(double animationId); + /// + /// `PluginStopAnimationName` automatically handles initializing the `ChromaSDK`. + /// The named `.chroma` animation file will be automatically opened. The animation + /// will stop if playing. + /// EXPORT_API void PluginStopAnimationName(const char* path); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginStopAnimationName(IntPtr path); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginStopAnimationNameD(const char* path); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginStopAnimationNameD(IntPtr path); + /// + /// `PluginStopAnimationType` automatically handles initializing the `ChromaSDK`. + /// If any animation is playing for the `deviceType` and `device` combination, + /// it will be stopped. + /// EXPORT_API void PluginStopAnimationType(int deviceType, int device); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginStopAnimationType(int deviceType, int device); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginStopAnimationTypeD(double deviceType, double device); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginStopAnimationTypeD(double deviceType, double device); + /// + /// `PluginStopComposite` automatically handles initializing the `ChromaSDK`. + /// The named animation files for the `.chroma` set will be automatically opened. + /// The set of animations will be stopped if playing. + /// EXPORT_API void PluginStopComposite(const char* name); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginStopComposite(IntPtr name); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginStopCompositeD(const char* name); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginStopCompositeD(IntPtr name); + /// + /// Return color1 - color2 + /// EXPORT_API int PluginSubtractColor(const int color1, const int color2); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern int PluginSubtractColor(int color1, int color2); + /// + /// Subtract the source color from the target color for the frame where the + /// target color is not black. Source and target are referenced by id. + /// EXPORT_API void PluginSubtractNonZeroAllKeys(int sourceAnimationId, int targetAnimationId, int frameId); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginSubtractNonZeroAllKeys(int sourceAnimationId, int targetAnimationId, int frameId); + /// + /// Subtract the source color from the target color for all frames where the + /// target color is not black. Source and target are referenced by id. + /// EXPORT_API void PluginSubtractNonZeroAllKeysAllFrames(int sourceAnimationId, int targetAnimationId); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginSubtractNonZeroAllKeysAllFrames(int sourceAnimationId, int targetAnimationId); + /// + /// Subtract the source color from the target color for all frames where the + /// target color is not black. Source and target are referenced by name. + /// EXPORT_API void PluginSubtractNonZeroAllKeysAllFramesName(const char* sourceAnimation, const char* targetAnimation); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginSubtractNonZeroAllKeysAllFramesName(IntPtr sourceAnimation, IntPtr targetAnimation); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginSubtractNonZeroAllKeysAllFramesNameD(const char* sourceAnimation, const char* targetAnimation); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginSubtractNonZeroAllKeysAllFramesNameD(IntPtr sourceAnimation, IntPtr targetAnimation); + /// + /// Subtract the source color from the target color for all frames where the + /// target color is not black starting at offset for the length of the source. + /// Source and target are referenced by id. + /// EXPORT_API void PluginSubtractNonZeroAllKeysAllFramesOffset(int sourceAnimationId, int targetAnimationId, int offset); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginSubtractNonZeroAllKeysAllFramesOffset(int sourceAnimationId, int targetAnimationId, int offset); + /// + /// Subtract the source color from the target color for all frames where the + /// target color is not black starting at offset for the length of the source. + /// Source and target are referenced by name. + /// EXPORT_API void PluginSubtractNonZeroAllKeysAllFramesOffsetName(const char* sourceAnimation, const char* targetAnimation, int offset); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginSubtractNonZeroAllKeysAllFramesOffsetName(IntPtr sourceAnimation, IntPtr targetAnimation, int offset); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginSubtractNonZeroAllKeysAllFramesOffsetNameD(const char* sourceAnimation, const char* targetAnimation, double offset); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginSubtractNonZeroAllKeysAllFramesOffsetNameD(IntPtr sourceAnimation, IntPtr targetAnimation, double offset); + /// + /// Subtract the source color from the target color for the frame where the + /// target color is not black. Source and target are referenced by name. + /// EXPORT_API void PluginSubtractNonZeroAllKeysName(const char* sourceAnimation, const char* targetAnimation, int frameId); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginSubtractNonZeroAllKeysName(IntPtr sourceAnimation, IntPtr targetAnimation, int frameId); + /// + /// Subtract the source color from the target where color is not black for the + /// source frame and target offset frame, reference source and target by id. + /// + /// EXPORT_API void PluginSubtractNonZeroAllKeysOffset(int sourceAnimationId, int targetAnimationId, int frameId, int offset); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginSubtractNonZeroAllKeysOffset(int sourceAnimationId, int targetAnimationId, int frameId, int offset); + /// + /// Subtract the source color from the target where color is not black for the + /// source frame and target offset frame, reference source and target by name. + /// + /// EXPORT_API void PluginSubtractNonZeroAllKeysOffsetName(const char* sourceAnimation, const char* targetAnimation, int frameId, int offset); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginSubtractNonZeroAllKeysOffsetName(IntPtr sourceAnimation, IntPtr targetAnimation, int frameId, int offset); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginSubtractNonZeroAllKeysOffsetNameD(const char* sourceAnimation, const char* targetAnimation, double frameId, double offset); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginSubtractNonZeroAllKeysOffsetNameD(IntPtr sourceAnimation, IntPtr targetAnimation, double frameId, double offset); + /// + /// Subtract the source color from the target color where the target color is + /// not black for all frames. Reference source and target by id. + /// EXPORT_API void PluginSubtractNonZeroTargetAllKeysAllFrames(int sourceAnimationId, int targetAnimationId); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginSubtractNonZeroTargetAllKeysAllFrames(int sourceAnimationId, int targetAnimationId); + /// + /// Subtract the source color from the target color where the target color is + /// not black for all frames. Reference source and target by name. + /// EXPORT_API void PluginSubtractNonZeroTargetAllKeysAllFramesName(const char* sourceAnimation, const char* targetAnimation); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginSubtractNonZeroTargetAllKeysAllFramesName(IntPtr sourceAnimation, IntPtr targetAnimation); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginSubtractNonZeroTargetAllKeysAllFramesNameD(const char* sourceAnimation, const char* targetAnimation); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginSubtractNonZeroTargetAllKeysAllFramesNameD(IntPtr sourceAnimation, IntPtr targetAnimation); + /// + /// Subtract the source color from the target color where the target color is + /// not black for all frames starting at the target offset for the length of + /// the source. Reference source and target by id. + /// EXPORT_API void PluginSubtractNonZeroTargetAllKeysAllFramesOffset(int sourceAnimationId, int targetAnimationId, int offset); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginSubtractNonZeroTargetAllKeysAllFramesOffset(int sourceAnimationId, int targetAnimationId, int offset); + /// + /// Subtract the source color from the target color where the target color is + /// not black for all frames starting at the target offset for the length of + /// the source. Reference source and target by name. + /// EXPORT_API void PluginSubtractNonZeroTargetAllKeysAllFramesOffsetName(const char* sourceAnimation, const char* targetAnimation, int offset); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginSubtractNonZeroTargetAllKeysAllFramesOffsetName(IntPtr sourceAnimation, IntPtr targetAnimation, int offset); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginSubtractNonZeroTargetAllKeysAllFramesOffsetNameD(const char* sourceAnimation, const char* targetAnimation, double offset); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginSubtractNonZeroTargetAllKeysAllFramesOffsetNameD(IntPtr sourceAnimation, IntPtr targetAnimation, double offset); + /// + /// Subtract the source color from the target color where the target color is + /// not black from the source frame to the target offset frame. Reference source + /// and target by id. + /// EXPORT_API void PluginSubtractNonZeroTargetAllKeysOffset(int sourceAnimationId, int targetAnimationId, int frameId, int offset); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginSubtractNonZeroTargetAllKeysOffset(int sourceAnimationId, int targetAnimationId, int frameId, int offset); + /// + /// Subtract the source color from the target color where the target color is + /// not black from the source frame to the target offset frame. Reference source + /// and target by name. + /// EXPORT_API void PluginSubtractNonZeroTargetAllKeysOffsetName(const char* sourceAnimation, const char* targetAnimation, int frameId, int offset); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginSubtractNonZeroTargetAllKeysOffsetName(IntPtr sourceAnimation, IntPtr targetAnimation, int frameId, int offset); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginSubtractNonZeroTargetAllKeysOffsetNameD(const char* sourceAnimation, const char* targetAnimation, double frameId, double offset); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginSubtractNonZeroTargetAllKeysOffsetNameD(IntPtr sourceAnimation, IntPtr targetAnimation, double frameId, double offset); + /// + /// Subtract all frames with the min RGB color where the animation color is + /// less than the min threshold AND with the max RGB color where the animation + /// is more than the max threshold. Animation is referenced by id. + /// EXPORT_API void PluginSubtractThresholdColorsMinMaxAllFramesRGB(const int animationId, const int minThreshold, const int minRed, const int minGreen, const int minBlue, const int maxThreshold, const int maxRed, const int maxGreen, const int maxBlue); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginSubtractThresholdColorsMinMaxAllFramesRGB(int animationId, int minThreshold, int minRed, int minGreen, int minBlue, int maxThreshold, int maxRed, int maxGreen, int maxBlue); + /// + /// Subtract all frames with the min RGB color where the animation color is + /// less than the min threshold AND with the max RGB color where the animation + /// is more than the max threshold. Animation is referenced by name. + /// EXPORT_API void PluginSubtractThresholdColorsMinMaxAllFramesRGBName(const char* path, const int minThreshold, const int minRed, const int minGreen, const int minBlue, const int maxThreshold, const int maxRed, const int maxGreen, const int maxBlue); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginSubtractThresholdColorsMinMaxAllFramesRGBName(IntPtr path, int minThreshold, int minRed, int minGreen, int minBlue, int maxThreshold, int maxRed, int maxGreen, int maxBlue); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginSubtractThresholdColorsMinMaxAllFramesRGBNameD(const char* path, double minThreshold, double minRed, double minGreen, double minBlue, double maxThreshold, double maxRed, double maxGreen, double maxBlue); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginSubtractThresholdColorsMinMaxAllFramesRGBNameD(IntPtr path, double minThreshold, double minRed, double minGreen, double minBlue, double maxThreshold, double maxRed, double maxGreen, double maxBlue); + /// + /// Subtract the specified frame with the min RGB color where the animation + /// color is less than the min threshold AND with the max RGB color where the + /// animation is more than the max threshold. Animation is referenced by id. + /// + /// EXPORT_API void PluginSubtractThresholdColorsMinMaxRGB(const int animationId, const int frameId, const int minThreshold, const int minRed, const int minGreen, const int minBlue, const int maxThreshold, const int maxRed, const int maxGreen, const int maxBlue); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginSubtractThresholdColorsMinMaxRGB(int animationId, int frameId, int minThreshold, int minRed, int minGreen, int minBlue, int maxThreshold, int maxRed, int maxGreen, int maxBlue); + /// + /// Subtract the specified frame with the min RGB color where the animation + /// color is less than the min threshold AND with the max RGB color where the + /// animation is more than the max threshold. Animation is referenced by name. + /// + /// EXPORT_API void PluginSubtractThresholdColorsMinMaxRGBName(const char* path, const int frameId, const int minThreshold, const int minRed, const int minGreen, const int minBlue, const int maxThreshold, const int maxRed, const int maxGreen, const int maxBlue); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginSubtractThresholdColorsMinMaxRGBName(IntPtr path, int frameId, int minThreshold, int minRed, int minGreen, int minBlue, int maxThreshold, int maxRed, int maxGreen, int maxBlue); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginSubtractThresholdColorsMinMaxRGBNameD(const char* path, const int frameId, const int minThreshold, const int minRed, const int minGreen, const int minBlue, const int maxThreshold, const int maxRed, const int maxGreen, const int maxBlue); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginSubtractThresholdColorsMinMaxRGBNameD(IntPtr path, int frameId, int minThreshold, int minRed, int minGreen, int minBlue, int maxThreshold, int maxRed, int maxGreen, int maxBlue); + /// + /// Trim the end of the animation. The length of the animation will be the lastFrameId + /// plus one. Reference the animation by id. + /// EXPORT_API void PluginTrimEndFrames(int animationId, int lastFrameId); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginTrimEndFrames(int animationId, int lastFrameId); + /// + /// Trim the end of the animation. The length of the animation will be the lastFrameId + /// plus one. Reference the animation by name. + /// EXPORT_API void PluginTrimEndFramesName(const char* path, int lastFrameId); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginTrimEndFramesName(IntPtr path, int lastFrameId); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginTrimEndFramesNameD(const char* path, double lastFrameId); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginTrimEndFramesNameD(IntPtr path, double lastFrameId); + /// + /// Remove the frame from the animation. Reference animation by id. + /// EXPORT_API void PluginTrimFrame(int animationId, int frameId); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginTrimFrame(int animationId, int frameId); + /// + /// Remove the frame from the animation. Reference animation by name. + /// EXPORT_API void PluginTrimFrameName(const char* path, int frameId); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginTrimFrameName(IntPtr path, int frameId); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginTrimFrameNameD(const char* path, double frameId); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginTrimFrameNameD(IntPtr path, double frameId); + /// + /// Trim the start of the animation starting at frame 0 for the number of frames. + /// Reference the animation by id. + /// EXPORT_API void PluginTrimStartFrames(int animationId, int numberOfFrames); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginTrimStartFrames(int animationId, int numberOfFrames); + /// + /// Trim the start of the animation starting at frame 0 for the number of frames. + /// Reference the animation by name. + /// EXPORT_API void PluginTrimStartFramesName(const char* path, int numberOfFrames); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginTrimStartFramesName(IntPtr path, int numberOfFrames); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginTrimStartFramesNameD(const char* path, double numberOfFrames); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginTrimStartFramesNameD(IntPtr path, double numberOfFrames); + /// + /// Uninitializes the `ChromaSDK`. Returns 0 upon success. Returns negative + /// one upon failure. + /// EXPORT_API RZRESULT PluginUninit(); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern int PluginUninit(); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginUninitD(); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginUninitD(); + /// + /// Unloads `Chroma` effects to free up resources. Returns the animation id + /// upon success. Returns negative one upon failure. Reference the animation + /// by id. + /// EXPORT_API int PluginUnloadAnimation(int animationId); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern int PluginUnloadAnimation(int animationId); + /// + /// D suffix for limited data types. + /// EXPORT_API double PluginUnloadAnimationD(double animationId); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern double PluginUnloadAnimationD(double animationId); + /// + /// Unload the animation effects. Reference the animation by name. + /// EXPORT_API void PluginUnloadAnimationName(const char* path); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginUnloadAnimationName(IntPtr path); + /// + /// Unload the the composite set of animation effects. Reference the animation + /// by name. + /// EXPORT_API void PluginUnloadComposite(const char* name); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginUnloadComposite(IntPtr name); + /// + /// Unload the Razer Chroma SDK Library before exiting the application. + /// EXPORT_API void PluginUnloadLibrarySDK(); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginUnloadLibrarySDK(); + /// + /// Unload the Razer Chroma Streaming Plugin Library before exiting the application. + /// + /// EXPORT_API void PluginUnloadLibraryStreamingPlugin(); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginUnloadLibraryStreamingPlugin(); + /// + /// Updates the `frameIndex` of the `Chroma` animation referenced by id and + /// sets the `duration` (in seconds). The `color` is expected to be an array + /// of the dimensions for the `deviceType/device`. The `length` parameter is + /// the size of the `color` array. For `EChromaSDKDevice1DEnum` the array size + /// should be `MAX LEDS`. For `EChromaSDKDevice2DEnum` the array size should + /// be `MAX ROW` times `MAX COLUMN`. Keys are populated only for EChromaSDKDevice2DEnum::DE_Keyboard + /// and EChromaSDKDevice2DEnum::DE_KeyboardExtended. Keys will only use the + /// EChromaSDKDevice2DEnum::DE_Keyboard `MAX_ROW` times `MAX_COLUMN` keysLength. + /// + /// EXPORT_API int PluginUpdateFrame(int animationId, int frameIndex, float duration, int* colors, int length, int* keys, int keysLength); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern int PluginUpdateFrame(int animationId, int frameIndex, float duration, int[] colors, int length, int[] keys, int keysLength); + /// + /// Update the `frameIndex` of the `Chroma` animation referenced by name and + /// sets the `duration` (in seconds). The `color` is expected to be an array + /// of the dimensions for the `deviceType/device`. The `length` parameter is + /// the size of the `color` array. For `EChromaSDKDevice1DEnum` the array size + /// should be `MAX LEDS`. For `EChromaSDKDevice2DEnum` the array size should + /// be `MAX ROW` times `MAX COLUMN`. Keys are populated only for EChromaSDKDevice2DEnum::DE_Keyboard + /// and EChromaSDKDevice2DEnum::DE_KeyboardExtended. Keys will only use the + /// EChromaSDKDevice2DEnum::DE_Keyboard `MAX_ROW` times `MAX_COLUMN` keysLength. + /// Returns the animation id upon success. Returns negative one upon failure. + /// + /// EXPORT_API int PluginUpdateFrameName(const char* path, int frameIndex, float duration, int* colors, int length, int* keys, int keysLength); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern int PluginUpdateFrameName(IntPtr path, int frameIndex, float duration, int[] colors, int length, int[] keys, int keysLength); + /// + /// When the idle animation flag is true, when no other animations are playing, + /// the idle animation will be used. The idle animation will not be affected + /// by the API calls to PluginIsPlaying, PluginStopAnimationType, PluginGetPlayingAnimationId, + /// and PluginGetPlayingAnimationCount. Then the idle animation flag is false, + /// the idle animation is disabled. `Device` uses `EChromaSDKDeviceEnum` enums. + /// + /// EXPORT_API void PluginUseIdleAnimation(int device, bool flag); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginUseIdleAnimation(int device, bool flag); + /// + /// Set idle animation flag for all devices. + /// EXPORT_API void PluginUseIdleAnimations(bool flag); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginUseIdleAnimations(bool flag); + /// + /// Set preloading animation flag, which is set to true by default. Reference + /// animation by id. + /// EXPORT_API void PluginUsePreloading(int animationId, bool flag); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginUsePreloading(int animationId, bool flag); + /// + /// Set preloading animation flag, which is set to true by default. Reference + /// animation by name. + /// EXPORT_API void PluginUsePreloadingName(const char* path, bool flag); + /// + [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] + private static extern void PluginUsePreloadingName(IntPtr path, bool flag); + #endregion } - - public static int UninitAPI() - { - UnloadLibrarySDK(); - UnloadLibraryStreamingPlugin(); - - return 0; - } - -#endregion - - - #region Public API Methods - /// - /// Return the sum of colors - /// - public static int AddColor(int color1, int color2) - { - int result = PluginAddColor(color1, color2); - return result; - } - /// - /// Adds a frame to the `Chroma` animation and sets the `duration` (in seconds). - /// The `color` is expected to be an array of the dimensions for the `deviceType/device`. - /// The `length` parameter is the size of the `color` array. For `EChromaSDKDevice1DEnum` - /// the array size should be `MAX LEDS`. For `EChromaSDKDevice2DEnum` the array - /// size should be `MAX ROW` times `MAX COLUMN`. Returns the animation id upon - /// success. Returns negative one upon failure. - /// - public static int AddFrame(int animationId, float duration, int[] colors, int length) - { - int result = PluginAddFrame(animationId, duration, colors, length); - return result; - } - /// - /// Add source color to target where color is not black for frame id, reference - /// source and target by id. - /// - public static void AddNonZeroAllKeys(int sourceAnimationId, int targetAnimationId, int frameId) - { - PluginAddNonZeroAllKeys(sourceAnimationId, targetAnimationId, frameId); - } - /// - /// Add source color to target where color is not black for all frames, reference - /// source and target by id. - /// - public static void AddNonZeroAllKeysAllFrames(int sourceAnimationId, int targetAnimationId) - { - PluginAddNonZeroAllKeysAllFrames(sourceAnimationId, targetAnimationId); - } - /// - /// Add source color to target where color is not black for all frames, reference - /// source and target by name. - /// - public static void AddNonZeroAllKeysAllFramesName(string sourceAnimation, string targetAnimation) - { - string str_SourceAnimation = sourceAnimation; - IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); - string str_TargetAnimation = targetAnimation; - IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); - PluginAddNonZeroAllKeysAllFramesName(lp_SourceAnimation, lp_TargetAnimation); - FreeIntPtr(lp_SourceAnimation); - FreeIntPtr(lp_TargetAnimation); - } - /// - /// D suffix for limited data types. - /// - public static double AddNonZeroAllKeysAllFramesNameD(string sourceAnimation, string targetAnimation) - { - string str_SourceAnimation = sourceAnimation; - IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); - string str_TargetAnimation = targetAnimation; - IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); - double result = PluginAddNonZeroAllKeysAllFramesNameD(lp_SourceAnimation, lp_TargetAnimation); - FreeIntPtr(lp_SourceAnimation); - FreeIntPtr(lp_TargetAnimation); - return result; - } - /// - /// Add source color to target where color is not black for all frames starting - /// at offset for the length of the source, reference source and target by - /// id. - /// - public static void AddNonZeroAllKeysAllFramesOffset(int sourceAnimationId, int targetAnimationId, int offset) - { - PluginAddNonZeroAllKeysAllFramesOffset(sourceAnimationId, targetAnimationId, offset); - } - /// - /// Add source color to target where color is not black for all frames starting - /// at offset for the length of the source, reference source and target by - /// name. - /// - public static void AddNonZeroAllKeysAllFramesOffsetName(string sourceAnimation, string targetAnimation, int offset) - { - string str_SourceAnimation = sourceAnimation; - IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); - string str_TargetAnimation = targetAnimation; - IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); - PluginAddNonZeroAllKeysAllFramesOffsetName(lp_SourceAnimation, lp_TargetAnimation, offset); - FreeIntPtr(lp_SourceAnimation); - FreeIntPtr(lp_TargetAnimation); - } - /// - /// D suffix for limited data types. - /// - public static double AddNonZeroAllKeysAllFramesOffsetNameD(string sourceAnimation, string targetAnimation, double offset) - { - string str_SourceAnimation = sourceAnimation; - IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); - string str_TargetAnimation = targetAnimation; - IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); - double result = PluginAddNonZeroAllKeysAllFramesOffsetNameD(lp_SourceAnimation, lp_TargetAnimation, offset); - FreeIntPtr(lp_SourceAnimation); - FreeIntPtr(lp_TargetAnimation); - return result; - } - /// - /// Add source color to target where color is not black for frame id, reference - /// source and target by name. - /// - public static void AddNonZeroAllKeysName(string sourceAnimation, string targetAnimation, int frameId) - { - string str_SourceAnimation = sourceAnimation; - IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); - string str_TargetAnimation = targetAnimation; - IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); - PluginAddNonZeroAllKeysName(lp_SourceAnimation, lp_TargetAnimation, frameId); - FreeIntPtr(lp_SourceAnimation); - FreeIntPtr(lp_TargetAnimation); - } - /// - /// Add source color to target where color is not black for the source frame - /// and target offset frame, reference source and target by id. - /// - public static void AddNonZeroAllKeysOffset(int sourceAnimationId, int targetAnimationId, int frameId, int offset) - { - PluginAddNonZeroAllKeysOffset(sourceAnimationId, targetAnimationId, frameId, offset); - } - /// - /// Add source color to target where color is not black for the source frame - /// and target offset frame, reference source and target by name. - /// - public static void AddNonZeroAllKeysOffsetName(string sourceAnimation, string targetAnimation, int frameId, int offset) - { - string str_SourceAnimation = sourceAnimation; - IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); - string str_TargetAnimation = targetAnimation; - IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); - PluginAddNonZeroAllKeysOffsetName(lp_SourceAnimation, lp_TargetAnimation, frameId, offset); - FreeIntPtr(lp_SourceAnimation); - FreeIntPtr(lp_TargetAnimation); - } - /// - /// D suffix for limited data types. - /// - public static double AddNonZeroAllKeysOffsetNameD(string sourceAnimation, string targetAnimation, double frameId, double offset) - { - string str_SourceAnimation = sourceAnimation; - IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); - string str_TargetAnimation = targetAnimation; - IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); - double result = PluginAddNonZeroAllKeysOffsetNameD(lp_SourceAnimation, lp_TargetAnimation, frameId, offset); - FreeIntPtr(lp_SourceAnimation); - FreeIntPtr(lp_TargetAnimation); - return result; - } - /// - /// Add source color to target where the target color is not black for all frames, - /// reference source and target by id. - /// - public static void AddNonZeroTargetAllKeysAllFrames(int sourceAnimationId, int targetAnimationId) - { - PluginAddNonZeroTargetAllKeysAllFrames(sourceAnimationId, targetAnimationId); - } - /// - /// Add source color to target where the target color is not black for all frames, - /// reference source and target by name. - /// - public static void AddNonZeroTargetAllKeysAllFramesName(string sourceAnimation, string targetAnimation) - { - string str_SourceAnimation = sourceAnimation; - IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); - string str_TargetAnimation = targetAnimation; - IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); - PluginAddNonZeroTargetAllKeysAllFramesName(lp_SourceAnimation, lp_TargetAnimation); - FreeIntPtr(lp_SourceAnimation); - FreeIntPtr(lp_TargetAnimation); - } - /// - /// D suffix for limited data types. - /// - public static double AddNonZeroTargetAllKeysAllFramesNameD(string sourceAnimation, string targetAnimation) - { - string str_SourceAnimation = sourceAnimation; - IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); - string str_TargetAnimation = targetAnimation; - IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); - double result = PluginAddNonZeroTargetAllKeysAllFramesNameD(lp_SourceAnimation, lp_TargetAnimation); - FreeIntPtr(lp_SourceAnimation); - FreeIntPtr(lp_TargetAnimation); - return result; - } - /// - /// Add source color to target where the target color is not black for all frames - /// starting at offset for the length of the source, reference source and target - /// by id. - /// - public static void AddNonZeroTargetAllKeysAllFramesOffset(int sourceAnimationId, int targetAnimationId, int offset) - { - PluginAddNonZeroTargetAllKeysAllFramesOffset(sourceAnimationId, targetAnimationId, offset); - } - /// - /// Add source color to target where the target color is not black for all frames - /// starting at offset for the length of the source, reference source and target - /// by name. - /// - public static void AddNonZeroTargetAllKeysAllFramesOffsetName(string sourceAnimation, string targetAnimation, int offset) - { - string str_SourceAnimation = sourceAnimation; - IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); - string str_TargetAnimation = targetAnimation; - IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); - PluginAddNonZeroTargetAllKeysAllFramesOffsetName(lp_SourceAnimation, lp_TargetAnimation, offset); - FreeIntPtr(lp_SourceAnimation); - FreeIntPtr(lp_TargetAnimation); - } - /// - /// D suffix for limited data types. - /// - public static double AddNonZeroTargetAllKeysAllFramesOffsetNameD(string sourceAnimation, string targetAnimation, double offset) - { - string str_SourceAnimation = sourceAnimation; - IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); - string str_TargetAnimation = targetAnimation; - IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); - double result = PluginAddNonZeroTargetAllKeysAllFramesOffsetNameD(lp_SourceAnimation, lp_TargetAnimation, offset); - FreeIntPtr(lp_SourceAnimation); - FreeIntPtr(lp_TargetAnimation); - return result; - } - /// - /// Add source color to target where target color is not blank from the source - /// frame to the target offset frame, reference source and target by id. - /// - public static void AddNonZeroTargetAllKeysOffset(int sourceAnimationId, int targetAnimationId, int frameId, int offset) - { - PluginAddNonZeroTargetAllKeysOffset(sourceAnimationId, targetAnimationId, frameId, offset); - } - /// - /// Add source color to target where target color is not blank from the source - /// frame to the target offset frame, reference source and target by name. - /// - /// - public static void AddNonZeroTargetAllKeysOffsetName(string sourceAnimation, string targetAnimation, int frameId, int offset) - { - string str_SourceAnimation = sourceAnimation; - IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); - string str_TargetAnimation = targetAnimation; - IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); - PluginAddNonZeroTargetAllKeysOffsetName(lp_SourceAnimation, lp_TargetAnimation, frameId, offset); - FreeIntPtr(lp_SourceAnimation); - FreeIntPtr(lp_TargetAnimation); - } - /// - /// D suffix for limited data types. - /// - public static double AddNonZeroTargetAllKeysOffsetNameD(string sourceAnimation, string targetAnimation, double frameId, double offset) - { - string str_SourceAnimation = sourceAnimation; - IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); - string str_TargetAnimation = targetAnimation; - IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); - double result = PluginAddNonZeroTargetAllKeysOffsetNameD(lp_SourceAnimation, lp_TargetAnimation, frameId, offset); - FreeIntPtr(lp_SourceAnimation); - FreeIntPtr(lp_TargetAnimation); - return result; - } - /// - /// Append all source frames to the target animation, reference source and target - /// by id. - /// - public static void AppendAllFrames(int sourceAnimationId, int targetAnimationId) - { - PluginAppendAllFrames(sourceAnimationId, targetAnimationId); - } - /// - /// Append all source frames to the target animation, reference source and target - /// by name. - /// - public static void AppendAllFramesName(string sourceAnimation, string targetAnimation) - { - string str_SourceAnimation = sourceAnimation; - IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); - string str_TargetAnimation = targetAnimation; - IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); - PluginAppendAllFramesName(lp_SourceAnimation, lp_TargetAnimation); - FreeIntPtr(lp_SourceAnimation); - FreeIntPtr(lp_TargetAnimation); - } - /// - /// D suffix for limited data types. - /// - public static double AppendAllFramesNameD(string sourceAnimation, string targetAnimation) - { - string str_SourceAnimation = sourceAnimation; - IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); - string str_TargetAnimation = targetAnimation; - IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); - double result = PluginAppendAllFramesNameD(lp_SourceAnimation, lp_TargetAnimation); - FreeIntPtr(lp_SourceAnimation); - FreeIntPtr(lp_TargetAnimation); - return result; - } - /// - /// `PluginClearAll` will issue a `CLEAR` effect for all devices. - /// - public static void ClearAll() - { - PluginClearAll(); - } - /// - /// `PluginClearAnimationType` will issue a `CLEAR` effect for the given device. - /// - /// - public static void ClearAnimationType(int deviceType, int device) - { - PluginClearAnimationType(deviceType, device); - } - /// - /// `PluginCloseAll` closes all open animations so they can be reloaded from - /// disk. The set of animations will be stopped if playing. - /// - public static void CloseAll() - { - PluginCloseAll(); - } - /// - /// Closes the `Chroma` animation to free up resources referenced by id. Returns - /// the animation id upon success. Returns negative one upon failure. This - /// might be used while authoring effects if there was a change necessitating - /// re-opening the animation. The animation id can no longer be used once closed. - /// - /// - public static int CloseAnimation(int animationId) - { - int result = PluginCloseAnimation(animationId); - return result; - } - /// - /// D suffix for limited data types. - /// - public static double CloseAnimationD(double animationId) - { - double result = PluginCloseAnimationD(animationId); - return result; - } - /// - /// Closes the `Chroma` animation referenced by name so that the animation can - /// be reloaded from disk. - /// - public static void CloseAnimationName(string path) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginCloseAnimationName(lp_Path); - FreeIntPtr(lp_Path); - } - /// - /// D suffix for limited data types. - /// - public static double CloseAnimationNameD(string path) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - double result = PluginCloseAnimationNameD(lp_Path); - FreeIntPtr(lp_Path); - return result; - } - /// - /// `PluginCloseComposite` closes a set of animations so they can be reloaded - /// from disk. The set of animations will be stopped if playing. - /// - public static void CloseComposite(string name) - { - string str_Name = name; - IntPtr lp_Name = GetPathIntPtr(str_Name); - PluginCloseComposite(lp_Name); - FreeIntPtr(lp_Name); - } - /// - /// D suffix for limited data types. - /// - public static double CloseCompositeD(string name) - { - string str_Name = name; - IntPtr lp_Name = GetPathIntPtr(str_Name); - double result = PluginCloseCompositeD(lp_Name); - FreeIntPtr(lp_Name); - return result; - } - /// - /// Copy source animation to target animation for the given frame. Source and - /// target are referenced by id. - /// - public static void CopyAllKeys(int sourceAnimationId, int targetAnimationId, int frameId) - { - PluginCopyAllKeys(sourceAnimationId, targetAnimationId, frameId); - } - /// - /// Copy source animation to target animation for the given frame. Source and - /// target are referenced by id. - /// - public static void CopyAllKeysName(string sourceAnimation, string targetAnimation, int frameId) - { - string str_SourceAnimation = sourceAnimation; - IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); - string str_TargetAnimation = targetAnimation; - IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); - PluginCopyAllKeysName(lp_SourceAnimation, lp_TargetAnimation, frameId); - FreeIntPtr(lp_SourceAnimation); - FreeIntPtr(lp_TargetAnimation); - } - /// - /// Copy animation to named target animation in memory. If target animation - /// exists, close first. Source is referenced by id. - /// - public static int CopyAnimation(int sourceAnimationId, string targetAnimation) - { - string str_TargetAnimation = targetAnimation; - IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); - int result = PluginCopyAnimation(sourceAnimationId, lp_TargetAnimation); - FreeIntPtr(lp_TargetAnimation); - return result; - } - /// - /// Copy animation to named target animation in memory. If target animation - /// exists, close first. Source is referenced by name. - /// - public static void CopyAnimationName(string sourceAnimation, string targetAnimation) - { - string str_SourceAnimation = sourceAnimation; - IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); - string str_TargetAnimation = targetAnimation; - IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); - PluginCopyAnimationName(lp_SourceAnimation, lp_TargetAnimation); - FreeIntPtr(lp_SourceAnimation); - FreeIntPtr(lp_TargetAnimation); - } - /// - /// D suffix for limited data types. - /// - public static double CopyAnimationNameD(string sourceAnimation, string targetAnimation) - { - string str_SourceAnimation = sourceAnimation; - IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); - string str_TargetAnimation = targetAnimation; - IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); - double result = PluginCopyAnimationNameD(lp_SourceAnimation, lp_TargetAnimation); - FreeIntPtr(lp_SourceAnimation); - FreeIntPtr(lp_TargetAnimation); - return result; - } - /// - /// Copy blue channel to other channels for all frames. Intensity range is 0.0 - /// to 1.0. Reference the animation by id. - /// - public static void CopyBlueChannelAllFrames(int animationId, float redIntensity, float greenIntensity) - { - PluginCopyBlueChannelAllFrames(animationId, redIntensity, greenIntensity); - } - /// - /// Copy blue channel to other channels for all frames. Intensity range is 0.0 - /// to 1.0. Reference the animation by name. - /// - public static void CopyBlueChannelAllFramesName(string path, float redIntensity, float greenIntensity) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginCopyBlueChannelAllFramesName(lp_Path, redIntensity, greenIntensity); - FreeIntPtr(lp_Path); - } - /// - /// D suffix for limited data types. - /// - public static double CopyBlueChannelAllFramesNameD(string path, double redIntensity, double greenIntensity) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - double result = PluginCopyBlueChannelAllFramesNameD(lp_Path, redIntensity, greenIntensity); - FreeIntPtr(lp_Path); - return result; - } - /// - /// Copy green channel to other channels for all frames. Intensity range is - /// 0.0 to 1.0. Reference the animation by id. - /// - public static void CopyGreenChannelAllFrames(int animationId, float redIntensity, float blueIntensity) - { - PluginCopyGreenChannelAllFrames(animationId, redIntensity, blueIntensity); - } - /// - /// Copy green channel to other channels for all frames. Intensity range is - /// 0.0 to 1.0. Reference the animation by name. - /// - public static void CopyGreenChannelAllFramesName(string path, float redIntensity, float blueIntensity) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginCopyGreenChannelAllFramesName(lp_Path, redIntensity, blueIntensity); - FreeIntPtr(lp_Path); - } - /// - /// D suffix for limited data types. - /// - public static double CopyGreenChannelAllFramesNameD(string path, double redIntensity, double blueIntensity) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - double result = PluginCopyGreenChannelAllFramesNameD(lp_Path, redIntensity, blueIntensity); - FreeIntPtr(lp_Path); - return result; - } - /// - /// Copy animation key color from the source animation to the target animation - /// for the given frame. Reference the source and target by id. - /// - public static void CopyKeyColor(int sourceAnimationId, int targetAnimationId, int frameId, int rzkey) - { - PluginCopyKeyColor(sourceAnimationId, targetAnimationId, frameId, rzkey); - } - /// - /// Copy animation key color from the source animation to the target animation - /// for all frames. Reference the source and target by id. - /// - public static void CopyKeyColorAllFrames(int sourceAnimationId, int targetAnimationId, int rzkey) - { - PluginCopyKeyColorAllFrames(sourceAnimationId, targetAnimationId, rzkey); - } - /// - /// Copy animation key color from the source animation to the target animation - /// for all frames. Reference the source and target by name. - /// - public static void CopyKeyColorAllFramesName(string sourceAnimation, string targetAnimation, int rzkey) - { - string str_SourceAnimation = sourceAnimation; - IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); - string str_TargetAnimation = targetAnimation; - IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); - PluginCopyKeyColorAllFramesName(lp_SourceAnimation, lp_TargetAnimation, rzkey); - FreeIntPtr(lp_SourceAnimation); - FreeIntPtr(lp_TargetAnimation); - } - /// - /// D suffix for limited data types. - /// - public static double CopyKeyColorAllFramesNameD(string sourceAnimation, string targetAnimation, double rzkey) - { - string str_SourceAnimation = sourceAnimation; - IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); - string str_TargetAnimation = targetAnimation; - IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); - double result = PluginCopyKeyColorAllFramesNameD(lp_SourceAnimation, lp_TargetAnimation, rzkey); - FreeIntPtr(lp_SourceAnimation); - FreeIntPtr(lp_TargetAnimation); - return result; - } - /// - /// Copy animation key color from the source animation to the target animation - /// for all frames, starting at the offset for the length of the source animation. - /// Source and target are referenced by id. - /// - public static void CopyKeyColorAllFramesOffset(int sourceAnimationId, int targetAnimationId, int rzkey, int offset) - { - PluginCopyKeyColorAllFramesOffset(sourceAnimationId, targetAnimationId, rzkey, offset); - } - /// - /// Copy animation key color from the source animation to the target animation - /// for all frames, starting at the offset for the length of the source animation. - /// Source and target are referenced by name. - /// - public static void CopyKeyColorAllFramesOffsetName(string sourceAnimation, string targetAnimation, int rzkey, int offset) - { - string str_SourceAnimation = sourceAnimation; - IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); - string str_TargetAnimation = targetAnimation; - IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); - PluginCopyKeyColorAllFramesOffsetName(lp_SourceAnimation, lp_TargetAnimation, rzkey, offset); - FreeIntPtr(lp_SourceAnimation); - FreeIntPtr(lp_TargetAnimation); - } - /// - /// D suffix for limited data types. - /// - public static double CopyKeyColorAllFramesOffsetNameD(string sourceAnimation, string targetAnimation, double rzkey, double offset) - { - string str_SourceAnimation = sourceAnimation; - IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); - string str_TargetAnimation = targetAnimation; - IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); - double result = PluginCopyKeyColorAllFramesOffsetNameD(lp_SourceAnimation, lp_TargetAnimation, rzkey, offset); - FreeIntPtr(lp_SourceAnimation); - FreeIntPtr(lp_TargetAnimation); - return result; - } - /// - /// Copy animation key color from the source animation to the target animation - /// for the given frame. - /// - public static void CopyKeyColorName(string sourceAnimation, string targetAnimation, int frameId, int rzkey) - { - string str_SourceAnimation = sourceAnimation; - IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); - string str_TargetAnimation = targetAnimation; - IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); - PluginCopyKeyColorName(lp_SourceAnimation, lp_TargetAnimation, frameId, rzkey); - FreeIntPtr(lp_SourceAnimation); - FreeIntPtr(lp_TargetAnimation); - } - /// - /// D suffix for limited data types. - /// - public static double CopyKeyColorNameD(string sourceAnimation, string targetAnimation, double frameId, double rzkey) - { - string str_SourceAnimation = sourceAnimation; - IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); - string str_TargetAnimation = targetAnimation; - IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); - double result = PluginCopyKeyColorNameD(lp_SourceAnimation, lp_TargetAnimation, frameId, rzkey); - FreeIntPtr(lp_SourceAnimation); - FreeIntPtr(lp_TargetAnimation); - return result; - } - /// - /// Copy animation color for a set of keys from the source animation to the - /// target animation for the given frame. Reference the source and target by - /// id. - /// - public static void CopyKeysColor(int sourceAnimationId, int targetAnimationId, int frameId, int[] keys, int size) - { - PluginCopyKeysColor(sourceAnimationId, targetAnimationId, frameId, keys, size); - } - /// - /// Copy animation color for a set of keys from the source animation to the - /// target animation for all frames. Reference the source and target by id. - /// - /// - public static void CopyKeysColorAllFrames(int sourceAnimationId, int targetAnimationId, int[] keys, int size) - { - PluginCopyKeysColorAllFrames(sourceAnimationId, targetAnimationId, keys, size); - } - /// - /// Copy animation color for a set of keys from the source animation to the - /// target animation for all frames. Reference the source and target by name. - /// - /// - public static void CopyKeysColorAllFramesName(string sourceAnimation, string targetAnimation, int[] keys, int size) - { - string str_SourceAnimation = sourceAnimation; - IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); - string str_TargetAnimation = targetAnimation; - IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); - PluginCopyKeysColorAllFramesName(lp_SourceAnimation, lp_TargetAnimation, keys, size); - FreeIntPtr(lp_SourceAnimation); - FreeIntPtr(lp_TargetAnimation); - } - /// - /// Copy animation color for a set of keys from the source animation to the - /// target animation for the given frame. Reference the source and target by - /// name. - /// - public static void CopyKeysColorName(string sourceAnimation, string targetAnimation, int frameId, int[] keys, int size) - { - string str_SourceAnimation = sourceAnimation; - IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); - string str_TargetAnimation = targetAnimation; - IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); - PluginCopyKeysColorName(lp_SourceAnimation, lp_TargetAnimation, frameId, keys, size); - FreeIntPtr(lp_SourceAnimation); - FreeIntPtr(lp_TargetAnimation); - } - /// - /// Copy animation color for a set of keys from the source animation to the - /// target animation from the source frame to the target frame. Reference the - /// source and target by id. - /// - public static void CopyKeysColorOffset(int sourceAnimationId, int targetAnimationId, int sourceFrameId, int targetFrameId, int[] keys, int size) - { - PluginCopyKeysColorOffset(sourceAnimationId, targetAnimationId, sourceFrameId, targetFrameId, keys, size); - } - /// - /// Copy animation color for a set of keys from the source animation to the - /// target animation from the source frame to the target frame. Reference the - /// source and target by name. - /// - public static void CopyKeysColorOffsetName(string sourceAnimation, string targetAnimation, int sourceFrameId, int targetFrameId, int[] keys, int size) - { - string str_SourceAnimation = sourceAnimation; - IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); - string str_TargetAnimation = targetAnimation; - IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); - PluginCopyKeysColorOffsetName(lp_SourceAnimation, lp_TargetAnimation, sourceFrameId, targetFrameId, keys, size); - FreeIntPtr(lp_SourceAnimation); - FreeIntPtr(lp_TargetAnimation); - } - /// - /// Copy source animation to target animation for the given frame. Source and - /// target are referenced by id. - /// - public static void CopyNonZeroAllKeys(int sourceAnimationId, int targetAnimationId, int frameId) - { - PluginCopyNonZeroAllKeys(sourceAnimationId, targetAnimationId, frameId); - } - /// - /// Copy nonzero colors from a source animation to a target animation for all - /// frames. Reference source and target by id. - /// - public static void CopyNonZeroAllKeysAllFrames(int sourceAnimationId, int targetAnimationId) - { - PluginCopyNonZeroAllKeysAllFrames(sourceAnimationId, targetAnimationId); - } - /// - /// Copy nonzero colors from a source animation to a target animation for all - /// frames. Reference source and target by name. - /// - public static void CopyNonZeroAllKeysAllFramesName(string sourceAnimation, string targetAnimation) - { - string str_SourceAnimation = sourceAnimation; - IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); - string str_TargetAnimation = targetAnimation; - IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); - PluginCopyNonZeroAllKeysAllFramesName(lp_SourceAnimation, lp_TargetAnimation); - FreeIntPtr(lp_SourceAnimation); - FreeIntPtr(lp_TargetAnimation); - } - /// - /// D suffix for limited data types. - /// - public static double CopyNonZeroAllKeysAllFramesNameD(string sourceAnimation, string targetAnimation) - { - string str_SourceAnimation = sourceAnimation; - IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); - string str_TargetAnimation = targetAnimation; - IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); - double result = PluginCopyNonZeroAllKeysAllFramesNameD(lp_SourceAnimation, lp_TargetAnimation); - FreeIntPtr(lp_SourceAnimation); - FreeIntPtr(lp_TargetAnimation); - return result; - } - /// - /// Copy nonzero colors from a source animation to a target animation for all - /// frames starting at the offset for the length of the source animation. The - /// source and target are referenced by id. - /// - public static void CopyNonZeroAllKeysAllFramesOffset(int sourceAnimationId, int targetAnimationId, int offset) - { - PluginCopyNonZeroAllKeysAllFramesOffset(sourceAnimationId, targetAnimationId, offset); - } - /// - /// Copy nonzero colors from a source animation to a target animation for all - /// frames starting at the offset for the length of the source animation. The - /// source and target are referenced by name. - /// - public static void CopyNonZeroAllKeysAllFramesOffsetName(string sourceAnimation, string targetAnimation, int offset) - { - string str_SourceAnimation = sourceAnimation; - IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); - string str_TargetAnimation = targetAnimation; - IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); - PluginCopyNonZeroAllKeysAllFramesOffsetName(lp_SourceAnimation, lp_TargetAnimation, offset); - FreeIntPtr(lp_SourceAnimation); - FreeIntPtr(lp_TargetAnimation); - } - /// - /// D suffix for limited data types. - /// - public static double CopyNonZeroAllKeysAllFramesOffsetNameD(string sourceAnimation, string targetAnimation, double offset) - { - string str_SourceAnimation = sourceAnimation; - IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); - string str_TargetAnimation = targetAnimation; - IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); - double result = PluginCopyNonZeroAllKeysAllFramesOffsetNameD(lp_SourceAnimation, lp_TargetAnimation, offset); - FreeIntPtr(lp_SourceAnimation); - FreeIntPtr(lp_TargetAnimation); - return result; - } - /// - /// Copy nonzero colors from source animation to target animation for the specified - /// frame. Source and target are referenced by id. - /// - public static void CopyNonZeroAllKeysName(string sourceAnimation, string targetAnimation, int frameId) - { - string str_SourceAnimation = sourceAnimation; - IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); - string str_TargetAnimation = targetAnimation; - IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); - PluginCopyNonZeroAllKeysName(lp_SourceAnimation, lp_TargetAnimation, frameId); - FreeIntPtr(lp_SourceAnimation); - FreeIntPtr(lp_TargetAnimation); - } - /// - /// D suffix for limited data types. - /// - public static double CopyNonZeroAllKeysNameD(string sourceAnimation, string targetAnimation, double frameId) - { - string str_SourceAnimation = sourceAnimation; - IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); - string str_TargetAnimation = targetAnimation; - IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); - double result = PluginCopyNonZeroAllKeysNameD(lp_SourceAnimation, lp_TargetAnimation, frameId); - FreeIntPtr(lp_SourceAnimation); - FreeIntPtr(lp_TargetAnimation); - return result; - } - /// - /// Copy nonzero colors from the source animation to the target animation from - /// the source frame to the target offset frame. Source and target are referenced - /// by id. - /// - public static void CopyNonZeroAllKeysOffset(int sourceAnimationId, int targetAnimationId, int frameId, int offset) - { - PluginCopyNonZeroAllKeysOffset(sourceAnimationId, targetAnimationId, frameId, offset); - } - /// - /// Copy nonzero colors from the source animation to the target animation from - /// the source frame to the target offset frame. Source and target are referenced - /// by name. - /// - public static void CopyNonZeroAllKeysOffsetName(string sourceAnimation, string targetAnimation, int frameId, int offset) - { - string str_SourceAnimation = sourceAnimation; - IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); - string str_TargetAnimation = targetAnimation; - IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); - PluginCopyNonZeroAllKeysOffsetName(lp_SourceAnimation, lp_TargetAnimation, frameId, offset); - FreeIntPtr(lp_SourceAnimation); - FreeIntPtr(lp_TargetAnimation); - } - /// - /// D suffix for limited data types. - /// - public static double CopyNonZeroAllKeysOffsetNameD(string sourceAnimation, string targetAnimation, double frameId, double offset) - { - string str_SourceAnimation = sourceAnimation; - IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); - string str_TargetAnimation = targetAnimation; - IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); - double result = PluginCopyNonZeroAllKeysOffsetNameD(lp_SourceAnimation, lp_TargetAnimation, frameId, offset); - FreeIntPtr(lp_SourceAnimation); - FreeIntPtr(lp_TargetAnimation); - return result; - } - /// - /// Copy animation key color from the source animation to the target animation - /// for the given frame where color is not zero. - /// - public static void CopyNonZeroKeyColor(int sourceAnimationId, int targetAnimationId, int frameId, int rzkey) - { - PluginCopyNonZeroKeyColor(sourceAnimationId, targetAnimationId, frameId, rzkey); - } - /// - /// Copy animation key color from the source animation to the target animation - /// for the given frame where color is not zero. - /// - public static void CopyNonZeroKeyColorName(string sourceAnimation, string targetAnimation, int frameId, int rzkey) - { - string str_SourceAnimation = sourceAnimation; - IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); - string str_TargetAnimation = targetAnimation; - IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); - PluginCopyNonZeroKeyColorName(lp_SourceAnimation, lp_TargetAnimation, frameId, rzkey); - FreeIntPtr(lp_SourceAnimation); - FreeIntPtr(lp_TargetAnimation); - } - /// - /// D suffix for limited data types. - /// - public static double CopyNonZeroKeyColorNameD(string sourceAnimation, string targetAnimation, double frameId, double rzkey) - { - string str_SourceAnimation = sourceAnimation; - IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); - string str_TargetAnimation = targetAnimation; - IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); - double result = PluginCopyNonZeroKeyColorNameD(lp_SourceAnimation, lp_TargetAnimation, frameId, rzkey); - FreeIntPtr(lp_SourceAnimation); - FreeIntPtr(lp_TargetAnimation); - return result; - } - /// - /// Copy nonzero colors from the source animation to the target animation where - /// the target color is nonzero for the specified frame. Source and target - /// are referenced by id. - /// - public static void CopyNonZeroTargetAllKeys(int sourceAnimationId, int targetAnimationId, int frameId) - { - PluginCopyNonZeroTargetAllKeys(sourceAnimationId, targetAnimationId, frameId); - } - /// - /// Copy nonzero colors from the source animation to the target animation where - /// the target color is nonzero for all frames. Source and target are referenced - /// by id. - /// - public static void CopyNonZeroTargetAllKeysAllFrames(int sourceAnimationId, int targetAnimationId) - { - PluginCopyNonZeroTargetAllKeysAllFrames(sourceAnimationId, targetAnimationId); - } - /// - /// Copy nonzero colors from the source animation to the target animation where - /// the target color is nonzero for all frames. Source and target are referenced - /// by name. - /// - public static void CopyNonZeroTargetAllKeysAllFramesName(string sourceAnimation, string targetAnimation) - { - string str_SourceAnimation = sourceAnimation; - IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); - string str_TargetAnimation = targetAnimation; - IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); - PluginCopyNonZeroTargetAllKeysAllFramesName(lp_SourceAnimation, lp_TargetAnimation); - FreeIntPtr(lp_SourceAnimation); - FreeIntPtr(lp_TargetAnimation); - } - /// - /// D suffix for limited data types. - /// - public static double CopyNonZeroTargetAllKeysAllFramesNameD(string sourceAnimation, string targetAnimation) - { - string str_SourceAnimation = sourceAnimation; - IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); - string str_TargetAnimation = targetAnimation; - IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); - double result = PluginCopyNonZeroTargetAllKeysAllFramesNameD(lp_SourceAnimation, lp_TargetAnimation); - FreeIntPtr(lp_SourceAnimation); - FreeIntPtr(lp_TargetAnimation); - return result; - } - /// - /// Copy nonzero colors from the source animation to the target animation where - /// the target color is nonzero for all frames. Source and target are referenced - /// by name. - /// - public static void CopyNonZeroTargetAllKeysAllFramesOffset(int sourceAnimationId, int targetAnimationId, int offset) - { - PluginCopyNonZeroTargetAllKeysAllFramesOffset(sourceAnimationId, targetAnimationId, offset); - } - /// - /// Copy nonzero colors from the source animation to the target animation where - /// the target color is nonzero for all frames starting at the target offset - /// for the length of the source animation. Source and target animations are - /// referenced by name. - /// - public static void CopyNonZeroTargetAllKeysAllFramesOffsetName(string sourceAnimation, string targetAnimation, int offset) - { - string str_SourceAnimation = sourceAnimation; - IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); - string str_TargetAnimation = targetAnimation; - IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); - PluginCopyNonZeroTargetAllKeysAllFramesOffsetName(lp_SourceAnimation, lp_TargetAnimation, offset); - FreeIntPtr(lp_SourceAnimation); - FreeIntPtr(lp_TargetAnimation); - } - /// - /// D suffix for limited data types. - /// - public static double CopyNonZeroTargetAllKeysAllFramesOffsetNameD(string sourceAnimation, string targetAnimation, double offset) - { - string str_SourceAnimation = sourceAnimation; - IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); - string str_TargetAnimation = targetAnimation; - IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); - double result = PluginCopyNonZeroTargetAllKeysAllFramesOffsetNameD(lp_SourceAnimation, lp_TargetAnimation, offset); - FreeIntPtr(lp_SourceAnimation); - FreeIntPtr(lp_TargetAnimation); - return result; - } - /// - /// Copy nonzero colors from the source animation to the target animation where - /// the target color is nonzero for the specified frame. The source and target - /// are referenced by name. - /// - public static void CopyNonZeroTargetAllKeysName(string sourceAnimation, string targetAnimation, int frameId) - { - string str_SourceAnimation = sourceAnimation; - IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); - string str_TargetAnimation = targetAnimation; - IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); - PluginCopyNonZeroTargetAllKeysName(lp_SourceAnimation, lp_TargetAnimation, frameId); - FreeIntPtr(lp_SourceAnimation); - FreeIntPtr(lp_TargetAnimation); - } - /// - /// D suffix for limited data types. - /// - public static double CopyNonZeroTargetAllKeysNameD(string sourceAnimation, string targetAnimation, double frameId) - { - string str_SourceAnimation = sourceAnimation; - IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); - string str_TargetAnimation = targetAnimation; - IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); - double result = PluginCopyNonZeroTargetAllKeysNameD(lp_SourceAnimation, lp_TargetAnimation, frameId); - FreeIntPtr(lp_SourceAnimation); - FreeIntPtr(lp_TargetAnimation); - return result; - } - /// - /// Copy nonzero colors from the source animation to the target animation where - /// the target color is nonzero for the specified source frame and target offset - /// frame. The source and target are referenced by id. - /// - public static void CopyNonZeroTargetAllKeysOffset(int sourceAnimationId, int targetAnimationId, int frameId, int offset) - { - PluginCopyNonZeroTargetAllKeysOffset(sourceAnimationId, targetAnimationId, frameId, offset); - } - /// - /// Copy nonzero colors from the source animation to the target animation where - /// the target color is nonzero for the specified source frame and target offset - /// frame. The source and target are referenced by name. - /// - public static void CopyNonZeroTargetAllKeysOffsetName(string sourceAnimation, string targetAnimation, int frameId, int offset) - { - string str_SourceAnimation = sourceAnimation; - IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); - string str_TargetAnimation = targetAnimation; - IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); - PluginCopyNonZeroTargetAllKeysOffsetName(lp_SourceAnimation, lp_TargetAnimation, frameId, offset); - FreeIntPtr(lp_SourceAnimation); - FreeIntPtr(lp_TargetAnimation); - } - /// - /// D suffix for limited data types. - /// - public static double CopyNonZeroTargetAllKeysOffsetNameD(string sourceAnimation, string targetAnimation, double frameId, double offset) - { - string str_SourceAnimation = sourceAnimation; - IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); - string str_TargetAnimation = targetAnimation; - IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); - double result = PluginCopyNonZeroTargetAllKeysOffsetNameD(lp_SourceAnimation, lp_TargetAnimation, frameId, offset); - FreeIntPtr(lp_SourceAnimation); - FreeIntPtr(lp_TargetAnimation); - return result; - } - /// - /// Copy nonzero colors from the source animation to the target animation where - /// the target color is zero for all frames. Source and target are referenced - /// by id. - /// - public static void CopyNonZeroTargetZeroAllKeysAllFrames(int sourceAnimationId, int targetAnimationId) - { - PluginCopyNonZeroTargetZeroAllKeysAllFrames(sourceAnimationId, targetAnimationId); - } - /// - /// Copy nonzero colors from the source animation to the target animation where - /// the target color is zero for all frames. Source and target are referenced - /// by name. - /// - public static void CopyNonZeroTargetZeroAllKeysAllFramesName(string sourceAnimation, string targetAnimation) - { - string str_SourceAnimation = sourceAnimation; - IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); - string str_TargetAnimation = targetAnimation; - IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); - PluginCopyNonZeroTargetZeroAllKeysAllFramesName(lp_SourceAnimation, lp_TargetAnimation); - FreeIntPtr(lp_SourceAnimation); - FreeIntPtr(lp_TargetAnimation); - } - /// - /// D suffix for limited data types. - /// - public static double CopyNonZeroTargetZeroAllKeysAllFramesNameD(string sourceAnimation, string targetAnimation) - { - string str_SourceAnimation = sourceAnimation; - IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); - string str_TargetAnimation = targetAnimation; - IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); - double result = PluginCopyNonZeroTargetZeroAllKeysAllFramesNameD(lp_SourceAnimation, lp_TargetAnimation); - FreeIntPtr(lp_SourceAnimation); - FreeIntPtr(lp_TargetAnimation); - return result; - } - /// - /// Copy red channel to other channels for all frames. Intensity range is 0.0 - /// to 1.0. Reference the animation by id. - /// - public static void CopyRedChannelAllFrames(int animationId, float greenIntensity, float blueIntensity) - { - PluginCopyRedChannelAllFrames(animationId, greenIntensity, blueIntensity); - } - /// - /// Copy green channel to other channels for all frames. Intensity range is - /// 0.0 to 1.0. Reference the animation by name. - /// - public static void CopyRedChannelAllFramesName(string path, float greenIntensity, float blueIntensity) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginCopyRedChannelAllFramesName(lp_Path, greenIntensity, blueIntensity); - FreeIntPtr(lp_Path); - } - /// - /// D suffix for limited data types. - /// - public static double CopyRedChannelAllFramesNameD(string path, double greenIntensity, double blueIntensity) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - double result = PluginCopyRedChannelAllFramesNameD(lp_Path, greenIntensity, blueIntensity); - FreeIntPtr(lp_Path); - return result; - } - /// - /// Copy zero colors from source animation to target animation for the frame. - /// Source and target are referenced by id. - /// - public static void CopyZeroAllKeys(int sourceAnimationId, int targetAnimationId, int frameId) - { - PluginCopyZeroAllKeys(sourceAnimationId, targetAnimationId, frameId); - } - /// - /// Copy zero colors from source animation to target animation for all frames. - /// Source and target are referenced by id. - /// - public static void CopyZeroAllKeysAllFrames(int sourceAnimationId, int targetAnimationId) - { - PluginCopyZeroAllKeysAllFrames(sourceAnimationId, targetAnimationId); - } - /// - /// Copy zero colors from source animation to target animation for all frames. - /// Source and target are referenced by name. - /// - public static void CopyZeroAllKeysAllFramesName(string sourceAnimation, string targetAnimation) - { - string str_SourceAnimation = sourceAnimation; - IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); - string str_TargetAnimation = targetAnimation; - IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); - PluginCopyZeroAllKeysAllFramesName(lp_SourceAnimation, lp_TargetAnimation); - FreeIntPtr(lp_SourceAnimation); - FreeIntPtr(lp_TargetAnimation); - } - /// - /// D suffix for limited data types. - /// - public static double CopyZeroAllKeysAllFramesNameD(string sourceAnimation, string targetAnimation) - { - string str_SourceAnimation = sourceAnimation; - IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); - string str_TargetAnimation = targetAnimation; - IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); - double result = PluginCopyZeroAllKeysAllFramesNameD(lp_SourceAnimation, lp_TargetAnimation); - FreeIntPtr(lp_SourceAnimation); - FreeIntPtr(lp_TargetAnimation); - return result; - } - /// - /// Copy zero colors from source animation to target animation for all frames - /// starting at the target offset for the length of the source animation. Source - /// and target are referenced by id. - /// - public static void CopyZeroAllKeysAllFramesOffset(int sourceAnimationId, int targetAnimationId, int offset) - { - PluginCopyZeroAllKeysAllFramesOffset(sourceAnimationId, targetAnimationId, offset); - } - /// - /// Copy zero colors from source animation to target animation for all frames - /// starting at the target offset for the length of the source animation. Source - /// and target are referenced by name. - /// - public static void CopyZeroAllKeysAllFramesOffsetName(string sourceAnimation, string targetAnimation, int offset) - { - string str_SourceAnimation = sourceAnimation; - IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); - string str_TargetAnimation = targetAnimation; - IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); - PluginCopyZeroAllKeysAllFramesOffsetName(lp_SourceAnimation, lp_TargetAnimation, offset); - FreeIntPtr(lp_SourceAnimation); - FreeIntPtr(lp_TargetAnimation); - } - /// - /// D suffix for limited data types. - /// - public static double CopyZeroAllKeysAllFramesOffsetNameD(string sourceAnimation, string targetAnimation, double offset) - { - string str_SourceAnimation = sourceAnimation; - IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); - string str_TargetAnimation = targetAnimation; - IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); - double result = PluginCopyZeroAllKeysAllFramesOffsetNameD(lp_SourceAnimation, lp_TargetAnimation, offset); - FreeIntPtr(lp_SourceAnimation); - FreeIntPtr(lp_TargetAnimation); - return result; - } - /// - /// Copy zero colors from source animation to target animation for the frame. - /// Source and target are referenced by name. - /// - public static void CopyZeroAllKeysName(string sourceAnimation, string targetAnimation, int frameId) - { - string str_SourceAnimation = sourceAnimation; - IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); - string str_TargetAnimation = targetAnimation; - IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); - PluginCopyZeroAllKeysName(lp_SourceAnimation, lp_TargetAnimation, frameId); - FreeIntPtr(lp_SourceAnimation); - FreeIntPtr(lp_TargetAnimation); - } - /// - /// Copy zero colors from source animation to target animation for the frame - /// id starting at the target offset for the length of the source animation. - /// Source and target are referenced by id. - /// - public static void CopyZeroAllKeysOffset(int sourceAnimationId, int targetAnimationId, int frameId, int offset) - { - PluginCopyZeroAllKeysOffset(sourceAnimationId, targetAnimationId, frameId, offset); - } - /// - /// Copy zero colors from source animation to target animation for the frame - /// id starting at the target offset for the length of the source animation. - /// Source and target are referenced by name. - /// - public static void CopyZeroAllKeysOffsetName(string sourceAnimation, string targetAnimation, int frameId, int offset) - { - string str_SourceAnimation = sourceAnimation; - IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); - string str_TargetAnimation = targetAnimation; - IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); - PluginCopyZeroAllKeysOffsetName(lp_SourceAnimation, lp_TargetAnimation, frameId, offset); - FreeIntPtr(lp_SourceAnimation); - FreeIntPtr(lp_TargetAnimation); - } - /// - /// Copy zero key color from source animation to target animation for the specified - /// frame. Source and target are referenced by id. - /// - public static void CopyZeroKeyColor(int sourceAnimationId, int targetAnimationId, int frameId, int rzkey) - { - PluginCopyZeroKeyColor(sourceAnimationId, targetAnimationId, frameId, rzkey); - } - /// - /// Copy zero key color from source animation to target animation for the specified - /// frame. Source and target are referenced by name. - /// - public static void CopyZeroKeyColorName(string sourceAnimation, string targetAnimation, int frameId, int rzkey) - { - string str_SourceAnimation = sourceAnimation; - IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); - string str_TargetAnimation = targetAnimation; - IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); - PluginCopyZeroKeyColorName(lp_SourceAnimation, lp_TargetAnimation, frameId, rzkey); - FreeIntPtr(lp_SourceAnimation); - FreeIntPtr(lp_TargetAnimation); - } - /// - /// D suffix for limited data types. - /// - public static double CopyZeroKeyColorNameD(string sourceAnimation, string targetAnimation, double frameId, double rzkey) - { - string str_SourceAnimation = sourceAnimation; - IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); - string str_TargetAnimation = targetAnimation; - IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); - double result = PluginCopyZeroKeyColorNameD(lp_SourceAnimation, lp_TargetAnimation, frameId, rzkey); - FreeIntPtr(lp_SourceAnimation); - FreeIntPtr(lp_TargetAnimation); - return result; - } - /// - /// Copy nonzero color from source animation to target animation where target - /// is zero for the frame. Source and target are referenced by id. - /// - public static void CopyZeroTargetAllKeys(int sourceAnimationId, int targetAnimationId, int frameId) - { - PluginCopyZeroTargetAllKeys(sourceAnimationId, targetAnimationId, frameId); - } - /// - /// Copy nonzero color from source animation to target animation where target - /// is zero for all frames. Source and target are referenced by id. - /// - public static void CopyZeroTargetAllKeysAllFrames(int sourceAnimationId, int targetAnimationId) - { - PluginCopyZeroTargetAllKeysAllFrames(sourceAnimationId, targetAnimationId); - } - /// - /// Copy nonzero color from source animation to target animation where target - /// is zero for all frames. Source and target are referenced by name. - /// - public static void CopyZeroTargetAllKeysAllFramesName(string sourceAnimation, string targetAnimation) - { - string str_SourceAnimation = sourceAnimation; - IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); - string str_TargetAnimation = targetAnimation; - IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); - PluginCopyZeroTargetAllKeysAllFramesName(lp_SourceAnimation, lp_TargetAnimation); - FreeIntPtr(lp_SourceAnimation); - FreeIntPtr(lp_TargetAnimation); - } - /// - /// D suffix for limited data types. - /// - public static double CopyZeroTargetAllKeysAllFramesNameD(string sourceAnimation, string targetAnimation) - { - string str_SourceAnimation = sourceAnimation; - IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); - string str_TargetAnimation = targetAnimation; - IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); - double result = PluginCopyZeroTargetAllKeysAllFramesNameD(lp_SourceAnimation, lp_TargetAnimation); - FreeIntPtr(lp_SourceAnimation); - FreeIntPtr(lp_TargetAnimation); - return result; - } - /// - /// Copy nonzero color from source animation to target animation where target - /// is zero for the frame. Source and target are referenced by name. - /// - public static void CopyZeroTargetAllKeysName(string sourceAnimation, string targetAnimation, int frameId) - { - string str_SourceAnimation = sourceAnimation; - IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); - string str_TargetAnimation = targetAnimation; - IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); - PluginCopyZeroTargetAllKeysName(lp_SourceAnimation, lp_TargetAnimation, frameId); - FreeIntPtr(lp_SourceAnimation); - FreeIntPtr(lp_TargetAnimation); - } - /// - /// Direct access to low level API. - /// - public static int CoreCreateChromaLinkEffect(int effect, IntPtr pParam, out Guid pEffectId) - { - int result = PluginCoreCreateChromaLinkEffect(effect, pParam, out pEffectId); - return result; - } - /// - /// Direct access to low level API. - /// - public static int CoreCreateEffect(Guid deviceId, EFFECT_TYPE effect, IntPtr pParam, out Guid pEffectId) - { - int result = PluginCoreCreateEffect(deviceId, (int)effect, pParam, out pEffectId); - return result; - } - /// - /// Direct access to low level API. - /// - public static int CoreCreateHeadsetEffect(int effect, IntPtr pParam, out Guid pEffectId) - { - int result = PluginCoreCreateHeadsetEffect(effect, pParam, out pEffectId); - return result; - } - /// - /// Direct access to low level API. - /// - public static int CoreCreateKeyboardEffect(int effect, IntPtr pParam, out Guid pEffectId) - { - int result = PluginCoreCreateKeyboardEffect(effect, pParam, out pEffectId); - return result; - } - /// - /// Direct access to low level API. - /// - public static int CoreCreateKeypadEffect(int effect, IntPtr pParam, out Guid pEffectId) - { - int result = PluginCoreCreateKeypadEffect(effect, pParam, out pEffectId); - return result; - } - /// - /// Direct access to low level API. - /// - public static int CoreCreateMouseEffect(int effect, IntPtr pParam, out Guid pEffectId) - { - int result = PluginCoreCreateMouseEffect(effect, pParam, out pEffectId); - return result; - } - /// - /// Direct access to low level API. - /// - public static int CoreCreateMousepadEffect(int effect, IntPtr pParam, out Guid pEffectId) - { - int result = PluginCoreCreateMousepadEffect(effect, pParam, out pEffectId); - return result; - } - /// - /// Direct access to low level API. - /// - public static int CoreDeleteEffect(Guid effectId) - { - int result = PluginCoreDeleteEffect(effectId); - return result; - } - /// - /// Direct access to low level API. - /// - public static int CoreInit() - { - int result = PluginCoreInit(); - return result; - } - /// - /// Direct access to low level API. - /// - public static int CoreInitSDK(ref ChromaSDK.APPINFOTYPE appInfo) - { - int result = PluginCoreInitSDK(ref appInfo); - return result; - } - /// - /// Direct access to low level API. - /// - public static int CoreQueryDevice(Guid deviceId, out DEVICE_INFO_TYPE deviceInfo) - { - int result = PluginCoreQueryDevice(deviceId, out deviceInfo); - return result; - } - /// - /// Direct access to low level API. - /// - public static int CoreSetEffect(Guid effectId) - { - int result = PluginCoreSetEffect(effectId); - return result; - } - /// - /// Begin broadcasting Chroma RGB data using the stored stream key as the endpoint. - /// Intended for Cloud Gaming Platforms, restore the streaming key when the - /// game instance is launched to continue streaming. streamId is a null terminated - /// string streamKey is a null terminated string StreamGetStatus() should return - /// the READY status to use this method. - /// - public static bool CoreStreamBroadcast(string streamId, string streamKey) - { - string str_StreamId = streamId; - IntPtr lp_StreamId = GetAsciiIntPtr(str_StreamId); - string str_StreamKey = streamKey; - IntPtr lp_StreamKey = GetAsciiIntPtr(str_StreamKey); - bool result = PluginCoreStreamBroadcast(lp_StreamId, lp_StreamKey); - FreeIntPtr(lp_StreamId); - FreeIntPtr(lp_StreamKey); - return result; - } - /// - /// End broadcasting Chroma RGB data. StreamGetStatus() should return the BROADCASTING - /// status to use this method. - /// - public static bool CoreStreamBroadcastEnd() - { - bool result = PluginCoreStreamBroadcastEnd(); - return result; - } - /// - /// shortcode: Pass the address of a preallocated character buffer to get the - /// streaming auth code. The buffer should have a minimum length of 6. length: - /// Length will return as zero if the streaming auth code could not be obtained. - /// If length is greater than zero, it will be the length of the returned streaming - /// auth code. Once you have the shortcode, it should be shown to the user - /// so they can associate the stream with their Razer ID StreamGetStatus() - /// should return the READY status before invoking this method. platform: is - /// the null terminated string that identifies the source of the stream: { - /// GEFORCE_NOW, LUNA, STADIA, GAME_PASS } title: is the null terminated string - /// that identifies the application or game. - /// - public static void CoreStreamGetAuthShortcode(ref string shortcode, out byte length, string platform, string title) - { - string str_Shortcode = shortcode; - IntPtr lp_Shortcode = GetAsciiIntPtr(str_Shortcode); - string str_Platform = platform; - IntPtr lp_Platform = GetUnicodeIntPtr(str_Platform); - string str_Title = title; - IntPtr lp_Title = GetUnicodeIntPtr(str_Title); - PluginCoreStreamGetAuthShortcode(lp_Shortcode, out length, lp_Platform, lp_Title); - if (lp_Shortcode != IntPtr.Zero) - { - shortcode = Marshal.PtrToStringAnsi(lp_Shortcode); - } - FreeIntPtr(lp_Shortcode); - FreeIntPtr(lp_Platform); - FreeIntPtr(lp_Title); - } - /// - /// focus: Pass the address of a preallocated character buffer to get the stream - /// focus. The buffer should have a length of 48 length: Length will return - /// as zero if the stream focus could not be obtained. If length is greater - /// than zero, it will be the length of the returned stream focus. - /// - public static bool CoreStreamGetFocus(ref string focus, out byte length) - { - string str_Focus = focus; - IntPtr lp_Focus = GetAsciiIntPtr(str_Focus); - bool result = PluginCoreStreamGetFocus(lp_Focus, out length); - if (lp_Focus != IntPtr.Zero) - { - focus = Marshal.PtrToStringAnsi(lp_Focus); - } - FreeIntPtr(lp_Focus); - return result; - } - /// - /// Intended for Cloud Gaming Platforms, store the stream id to persist in user - /// preferences to continue streaming if the game is suspended or closed. shortcode: - /// The shortcode is a null terminated string. Use the shortcode that authorized - /// the stream to obtain the stream id. streamId should be a preallocated buffer - /// to get the stream key. The buffer should have a length of 48. length: Length - /// will return zero if the key could not be obtained. If the length is greater - /// than zero, it will be the length of the returned streaming id. Retrieve - /// the stream id after authorizing the shortcode. The authorization window - /// will expire in 5 minutes. Be sure to save the stream key before the window - /// expires. StreamGetStatus() should return the READY status to use this method. - /// - /// - public static void CoreStreamGetId(string shortcode, ref string streamId, out byte length) - { - string str_Shortcode = shortcode; - IntPtr lp_Shortcode = GetAsciiIntPtr(str_Shortcode); - string str_StreamId = streamId; - IntPtr lp_StreamId = GetAsciiIntPtr(str_StreamId); - PluginCoreStreamGetId(lp_Shortcode, lp_StreamId, out length); - FreeIntPtr(lp_Shortcode); - if (lp_StreamId != IntPtr.Zero) - { - streamId = Marshal.PtrToStringAnsi(lp_StreamId); - } - FreeIntPtr(lp_StreamId); - } - /// - /// Intended for Cloud Gaming Platforms, store the streaming key to persist - /// in user preferences to continue streaming if the game is suspended or closed. - /// shortcode: The shortcode is a null terminated string. Use the shortcode - /// that authorized the stream to obtain the stream key. If the status is in - /// the BROADCASTING or WATCHING state, passing a NULL shortcode will return - /// the active streamId. streamKey should be a preallocated buffer to get the - /// stream key. The buffer should have a length of 48. length: Length will - /// return zero if the key could not be obtained. If the length is greater - /// than zero, it will be the length of the returned streaming key. Retrieve - /// the stream key after authorizing the shortcode. The authorization window - /// will expire in 5 minutes. Be sure to save the stream key before the window - /// expires. StreamGetStatus() should return the READY status to use this method. - /// - /// - public static void CoreStreamGetKey(string shortcode, ref string streamKey, out byte length) - { - string str_Shortcode = shortcode; - IntPtr lp_Shortcode = GetAsciiIntPtr(str_Shortcode); - string str_StreamKey = streamKey; - IntPtr lp_StreamKey = GetAsciiIntPtr(str_StreamKey); - PluginCoreStreamGetKey(lp_Shortcode, lp_StreamKey, out length); - FreeIntPtr(lp_Shortcode); - if (lp_StreamKey != IntPtr.Zero) - { - streamKey = Marshal.PtrToStringAnsi(lp_StreamKey); - } - FreeIntPtr(lp_StreamKey); - } - /// - /// Returns StreamStatus, the current status of the service - /// - public static ChromaSDK.Stream.StreamStatusType CoreStreamGetStatus() - { - ChromaSDK.Stream.StreamStatusType result = PluginCoreStreamGetStatus(); - return result; - } - /// - /// Convert StreamStatusType to a printable string - /// - public static string CoreStreamGetStatusString(ChromaSDK.Stream.StreamStatusType status) - { - string result = Marshal.PtrToStringAnsi(PluginCoreStreamGetStatusString(status)); - return result; - } - /// - /// This prevents the stream id and stream key from being obtained through the - /// shortcode. This closes the auth window. shortcode is a null terminated - /// string. StreamGetStatus() should return the READY status to use this method. - /// returns success when shortcode has been released - /// - public static bool CoreStreamReleaseShortcode(string shortcode) - { - string str_Shortcode = shortcode; - IntPtr lp_Shortcode = GetAsciiIntPtr(str_Shortcode); - bool result = PluginCoreStreamReleaseShortcode(lp_Shortcode); - FreeIntPtr(lp_Shortcode); - return result; - } - /// - /// The focus is a null terminated string. Set the focus identifer for the application - /// designated to automatically change the streaming state. Returns true on - /// success. - /// - public static bool CoreStreamSetFocus(string focus) - { - string str_Focus = focus; - IntPtr lp_Focus = GetAsciiIntPtr(str_Focus); - bool result = PluginCoreStreamSetFocus(lp_Focus); - FreeIntPtr(lp_Focus); - return result; - } - /// - /// Returns true if the Chroma streaming is supported. If false is returned, - /// avoid calling stream methods. - /// - public static bool CoreStreamSupportsStreaming() - { - bool result = PluginCoreStreamSupportsStreaming(); - return result; - } - /// - /// Begin watching the Chroma RGB data using streamID parameter. streamId is - /// a null terminated string. StreamGetStatus() should return the READY status - /// to use this method. - /// - public static bool CoreStreamWatch(string streamId, ulong timestamp) - { - string str_StreamId = streamId; - IntPtr lp_StreamId = GetAsciiIntPtr(str_StreamId); - bool result = PluginCoreStreamWatch(lp_StreamId, timestamp); - FreeIntPtr(lp_StreamId); - return result; - } - /// - /// End watching Chroma RGB data stream. StreamGetStatus() should return the - /// WATCHING status to use this method. - /// - public static bool CoreStreamWatchEnd() - { - bool result = PluginCoreStreamWatchEnd(); - return result; - } - /// - /// Direct access to low level API. - /// - public static int CoreUnInit() - { - int result = PluginCoreUnInit(); - return result; - } - /// - /// Creates a `Chroma` animation at the given path. The `deviceType` parameter - /// uses `EChromaSDKDeviceTypeEnum` as an integer. The `device` parameter uses - /// `EChromaSDKDevice1DEnum` or `EChromaSDKDevice2DEnum` as an integer, respective - /// to the `deviceType`. Returns the animation id upon success. Returns negative - /// one upon failure. Saves a `Chroma` animation file with the `.chroma` extension - /// at the given path. Returns the animation id upon success. Returns negative - /// one upon failure. - /// - public static int CreateAnimation(string path, int deviceType, int device) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - int result = PluginCreateAnimation(lp_Path, deviceType, device); - FreeIntPtr(lp_Path); - return result; - } - /// - /// Creates a `Chroma` animation in memory without creating a file. The `deviceType` - /// parameter uses `EChromaSDKDeviceTypeEnum` as an integer. The `device` parameter - /// uses `EChromaSDKDevice1DEnum` or `EChromaSDKDevice2DEnum` as an integer, - /// respective to the `deviceType`. Returns the animation id upon success. - /// Returns negative one upon failure. Returns the animation id upon success. - /// Returns negative one upon failure. - /// - public static int CreateAnimationInMemory(int deviceType, int device) - { - int result = PluginCreateAnimationInMemory(deviceType, device); - return result; - } - /// - /// Create a device specific effect. - /// - public static int CreateEffect(Guid deviceId, EFFECT_TYPE effect, int[] colors, int size, out FChromaSDKGuid effectId) - { - int result = PluginCreateEffect(deviceId, (int)effect, colors, size, out effectId); - return result; - } - /// - /// Delete an effect given the effect id. - /// - public static int DeleteEffect(Guid effectId) - { - int result = PluginDeleteEffect(effectId); - return result; - } - /// - /// Duplicate the first animation frame so that the animation length matches - /// the frame count. Animation is referenced by id. - /// - public static void DuplicateFirstFrame(int animationId, int frameCount) - { - PluginDuplicateFirstFrame(animationId, frameCount); - } - /// - /// Duplicate the first animation frame so that the animation length matches - /// the frame count. Animation is referenced by name. - /// - public static void DuplicateFirstFrameName(string path, int frameCount) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginDuplicateFirstFrameName(lp_Path, frameCount); - FreeIntPtr(lp_Path); - } - /// - /// D suffix for limited data types. - /// - public static double DuplicateFirstFrameNameD(string path, double frameCount) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - double result = PluginDuplicateFirstFrameNameD(lp_Path, frameCount); - FreeIntPtr(lp_Path); - return result; - } - /// - /// Duplicate all the frames of the animation to double the animation length. - /// Frame 1 becomes frame 1 and 2. Frame 2 becomes frame 3 and 4. And so on. - /// The animation is referenced by id. - /// - public static void DuplicateFrames(int animationId) - { - PluginDuplicateFrames(animationId); - } - /// - /// Duplicate all the frames of the animation to double the animation length. - /// Frame 1 becomes frame 1 and 2. Frame 2 becomes frame 3 and 4. And so on. - /// The animation is referenced by name. - /// - public static void DuplicateFramesName(string path) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginDuplicateFramesName(lp_Path); - FreeIntPtr(lp_Path); - } - /// - /// D suffix for limited data types. - /// - public static double DuplicateFramesNameD(string path) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - double result = PluginDuplicateFramesNameD(lp_Path); - FreeIntPtr(lp_Path); - return result; - } - /// - /// Duplicate all the animation frames in reverse so that the animation plays - /// forwards and backwards. Animation is referenced by id. - /// - public static void DuplicateMirrorFrames(int animationId) - { - PluginDuplicateMirrorFrames(animationId); - } - /// - /// Duplicate all the animation frames in reverse so that the animation plays - /// forwards and backwards. Animation is referenced by name. - /// - public static void DuplicateMirrorFramesName(string path) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginDuplicateMirrorFramesName(lp_Path); - FreeIntPtr(lp_Path); - } - /// - /// D suffix for limited data types. - /// - public static double DuplicateMirrorFramesNameD(string path) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - double result = PluginDuplicateMirrorFramesNameD(lp_Path); - FreeIntPtr(lp_Path); - return result; - } - /// - /// Fade the animation to black starting at the fade frame index to the end - /// of the animation. Animation is referenced by id. - /// - public static void FadeEndFrames(int animationId, int fade) - { - PluginFadeEndFrames(animationId, fade); - } - /// - /// Fade the animation to black starting at the fade frame index to the end - /// of the animation. Animation is referenced by name. - /// - public static void FadeEndFramesName(string path, int fade) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginFadeEndFramesName(lp_Path, fade); - FreeIntPtr(lp_Path); - } - /// - /// D suffix for limited data types. - /// - public static double FadeEndFramesNameD(string path, double fade) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - double result = PluginFadeEndFramesNameD(lp_Path, fade); - FreeIntPtr(lp_Path); - return result; - } - /// - /// Fade the animation from black to full color starting at 0 to the fade frame - /// index. Animation is referenced by id. - /// - public static void FadeStartFrames(int animationId, int fade) - { - PluginFadeStartFrames(animationId, fade); - } - /// - /// Fade the animation from black to full color starting at 0 to the fade frame - /// index. Animation is referenced by name. - /// - public static void FadeStartFramesName(string path, int fade) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginFadeStartFramesName(lp_Path, fade); - FreeIntPtr(lp_Path); - } - /// - /// D suffix for limited data types. - /// - public static double FadeStartFramesNameD(string path, double fade) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - double result = PluginFadeStartFramesNameD(lp_Path, fade); - FreeIntPtr(lp_Path); - return result; - } - /// - /// Set the RGB value for all colors in the specified frame. Animation is referenced - /// by id. - /// - public static void FillColor(int animationId, int frameId, int color) - { - PluginFillColor(animationId, frameId, color); - } - /// - /// Set the RGB value for all colors for all frames. Animation is referenced - /// by id. - /// - public static void FillColorAllFrames(int animationId, int color) - { - PluginFillColorAllFrames(animationId, color); - } - /// - /// Set the RGB value for all colors for all frames. Animation is referenced - /// by name. - /// - public static void FillColorAllFramesName(string path, int color) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginFillColorAllFramesName(lp_Path, color); - FreeIntPtr(lp_Path); - } - /// - /// D suffix for limited data types. - /// - public static double FillColorAllFramesNameD(string path, double color) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - double result = PluginFillColorAllFramesNameD(lp_Path, color); - FreeIntPtr(lp_Path); - return result; - } - /// - /// Set the RGB value for all colors for all frames. Use the range of 0 to 255 - /// for red, green, and blue parameters. Animation is referenced by id. - /// - public static void FillColorAllFramesRGB(int animationId, int red, int green, int blue) - { - PluginFillColorAllFramesRGB(animationId, red, green, blue); - } - /// - /// Set the RGB value for all colors for all frames. Use the range of 0 to 255 - /// for red, green, and blue parameters. Animation is referenced by name. - /// - public static void FillColorAllFramesRGBName(string path, int red, int green, int blue) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginFillColorAllFramesRGBName(lp_Path, red, green, blue); - FreeIntPtr(lp_Path); - } - /// - /// D suffix for limited data types. - /// - public static double FillColorAllFramesRGBNameD(string path, double red, double green, double blue) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - double result = PluginFillColorAllFramesRGBNameD(lp_Path, red, green, blue); - FreeIntPtr(lp_Path); - return result; - } - /// - /// Set the RGB value for all colors in the specified frame. Animation is referenced - /// by name. - /// - public static void FillColorName(string path, int frameId, int color) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginFillColorName(lp_Path, frameId, color); - FreeIntPtr(lp_Path); - } - /// - /// D suffix for limited data types. - /// - public static double FillColorNameD(string path, double frameId, double color) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - double result = PluginFillColorNameD(lp_Path, frameId, color); - FreeIntPtr(lp_Path); - return result; - } - /// - /// Set the RGB value for all colors in the specified frame. Animation is referenced - /// by id. - /// - public static void FillColorRGB(int animationId, int frameId, int red, int green, int blue) - { - PluginFillColorRGB(animationId, frameId, red, green, blue); - } - /// - /// Set the RGB value for all colors in the specified frame. Animation is referenced - /// by name. - /// - public static void FillColorRGBName(string path, int frameId, int red, int green, int blue) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginFillColorRGBName(lp_Path, frameId, red, green, blue); - FreeIntPtr(lp_Path); - } - /// - /// D suffix for limited data types. - /// - public static double FillColorRGBNameD(string path, double frameId, double red, double green, double blue) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - double result = PluginFillColorRGBNameD(lp_Path, frameId, red, green, blue); - FreeIntPtr(lp_Path); - return result; - } - /// - /// This method will only update colors in the animation that are not already - /// set to black. Set the RGB value for a subset of colors in the specified - /// frame. Animation is referenced by id. - /// - public static void FillNonZeroColor(int animationId, int frameId, int color) - { - PluginFillNonZeroColor(animationId, frameId, color); - } - /// - /// This method will only update colors in the animation that are not already - /// set to black. Set the RGB value for a subset of colors for all frames. - /// Animation is referenced by id. - /// - public static void FillNonZeroColorAllFrames(int animationId, int color) - { - PluginFillNonZeroColorAllFrames(animationId, color); - } - /// - /// This method will only update colors in the animation that are not already - /// set to black. Set the RGB value for a subset of colors for all frames. - /// Animation is referenced by name. - /// - public static void FillNonZeroColorAllFramesName(string path, int color) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginFillNonZeroColorAllFramesName(lp_Path, color); - FreeIntPtr(lp_Path); - } - /// - /// D suffix for limited data types. - /// - public static double FillNonZeroColorAllFramesNameD(string path, double color) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - double result = PluginFillNonZeroColorAllFramesNameD(lp_Path, color); - FreeIntPtr(lp_Path); - return result; - } - /// - /// This method will only update colors in the animation that are not already - /// set to black. Set the RGB value for a subset of colors for all frames. - /// Use the range of 0 to 255 for red, green, and blue parameters. Animation - /// is referenced by id. - /// - public static void FillNonZeroColorAllFramesRGB(int animationId, int red, int green, int blue) - { - PluginFillNonZeroColorAllFramesRGB(animationId, red, green, blue); - } - /// - /// This method will only update colors in the animation that are not already - /// set to black. Set the RGB value for a subset of colors for all frames. - /// Use the range of 0 to 255 for red, green, and blue parameters. Animation - /// is referenced by name. - /// - public static void FillNonZeroColorAllFramesRGBName(string path, int red, int green, int blue) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginFillNonZeroColorAllFramesRGBName(lp_Path, red, green, blue); - FreeIntPtr(lp_Path); - } - /// - /// D suffix for limited data types. - /// - public static double FillNonZeroColorAllFramesRGBNameD(string path, double red, double green, double blue) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - double result = PluginFillNonZeroColorAllFramesRGBNameD(lp_Path, red, green, blue); - FreeIntPtr(lp_Path); - return result; - } - /// - /// This method will only update colors in the animation that are not already - /// set to black. Set the RGB value for a subset of colors in the specified - /// frame. Animation is referenced by name. - /// - public static void FillNonZeroColorName(string path, int frameId, int color) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginFillNonZeroColorName(lp_Path, frameId, color); - FreeIntPtr(lp_Path); - } - /// - /// D suffix for limited data types. - /// - public static double FillNonZeroColorNameD(string path, double frameId, double color) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - double result = PluginFillNonZeroColorNameD(lp_Path, frameId, color); - FreeIntPtr(lp_Path); - return result; - } - /// - /// This method will only update colors in the animation that are not already - /// set to black. Set the RGB value for a subset of colors in the specified - /// frame. Use the range of 0 to 255 for red, green, and blue parameters. Animation - /// is referenced by id. - /// - public static void FillNonZeroColorRGB(int animationId, int frameId, int red, int green, int blue) - { - PluginFillNonZeroColorRGB(animationId, frameId, red, green, blue); - } - /// - /// This method will only update colors in the animation that are not already - /// set to black. Set the RGB value for a subset of colors in the specified - /// frame. Use the range of 0 to 255 for red, green, and blue parameters. Animation - /// is referenced by name. - /// - public static void FillNonZeroColorRGBName(string path, int frameId, int red, int green, int blue) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginFillNonZeroColorRGBName(lp_Path, frameId, red, green, blue); - FreeIntPtr(lp_Path); - } - /// - /// D suffix for limited data types. - /// - public static double FillNonZeroColorRGBNameD(string path, double frameId, double red, double green, double blue) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - double result = PluginFillNonZeroColorRGBNameD(lp_Path, frameId, red, green, blue); - FreeIntPtr(lp_Path); - return result; - } - /// - /// Fill the frame with random RGB values for the given frame. Animation is - /// referenced by id. - /// - public static void FillRandomColors(int animationId, int frameId) - { - PluginFillRandomColors(animationId, frameId); - } - /// - /// Fill the frame with random RGB values for all frames. Animation is referenced - /// by id. - /// - public static void FillRandomColorsAllFrames(int animationId) - { - PluginFillRandomColorsAllFrames(animationId); - } - /// - /// Fill the frame with random RGB values for all frames. Animation is referenced - /// by name. - /// - public static void FillRandomColorsAllFramesName(string path) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginFillRandomColorsAllFramesName(lp_Path); - FreeIntPtr(lp_Path); - } - /// - /// D suffix for limited data types. - /// - public static double FillRandomColorsAllFramesNameD(string path) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - double result = PluginFillRandomColorsAllFramesNameD(lp_Path); - FreeIntPtr(lp_Path); - return result; - } - /// - /// Fill the frame with random black and white values for the specified frame. - /// Animation is referenced by id. - /// - public static void FillRandomColorsBlackAndWhite(int animationId, int frameId) - { - PluginFillRandomColorsBlackAndWhite(animationId, frameId); - } - /// - /// Fill the frame with random black and white values for all frames. Animation - /// is referenced by id. - /// - public static void FillRandomColorsBlackAndWhiteAllFrames(int animationId) - { - PluginFillRandomColorsBlackAndWhiteAllFrames(animationId); - } - /// - /// Fill the frame with random black and white values for all frames. Animation - /// is referenced by name. - /// - public static void FillRandomColorsBlackAndWhiteAllFramesName(string path) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginFillRandomColorsBlackAndWhiteAllFramesName(lp_Path); - FreeIntPtr(lp_Path); - } - /// - /// D suffix for limited data types. - /// - public static double FillRandomColorsBlackAndWhiteAllFramesNameD(string path) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - double result = PluginFillRandomColorsBlackAndWhiteAllFramesNameD(lp_Path); - FreeIntPtr(lp_Path); - return result; - } - /// - /// Fill the frame with random black and white values for the specified frame. - /// Animation is referenced by name. - /// - public static void FillRandomColorsBlackAndWhiteName(string path, int frameId) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginFillRandomColorsBlackAndWhiteName(lp_Path, frameId); - FreeIntPtr(lp_Path); - } - /// - /// D suffix for limited data types. - /// - public static double FillRandomColorsBlackAndWhiteNameD(string path, double frameId) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - double result = PluginFillRandomColorsBlackAndWhiteNameD(lp_Path, frameId); - FreeIntPtr(lp_Path); - return result; - } - /// - /// Fill the frame with random RGB values for the given frame. Animation is - /// referenced by name. - /// - public static void FillRandomColorsName(string path, int frameId) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginFillRandomColorsName(lp_Path, frameId); - FreeIntPtr(lp_Path); - } - /// - /// D suffix for limited data types. - /// - public static double FillRandomColorsNameD(string path, double frameId) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - double result = PluginFillRandomColorsNameD(lp_Path, frameId); - FreeIntPtr(lp_Path); - return result; - } - /// - /// Fill the specified frame with RGB color where the animation color is less - /// than the RGB threshold. Animation is referenced by id. - /// - public static void FillThresholdColors(int animationId, int frameId, int threshold, int color) - { - PluginFillThresholdColors(animationId, frameId, threshold, color); - } - /// - /// Fill all frames with RGB color where the animation color is less than the - /// RGB threshold. Animation is referenced by id. - /// - public static void FillThresholdColorsAllFrames(int animationId, int threshold, int color) - { - PluginFillThresholdColorsAllFrames(animationId, threshold, color); - } - /// - /// Fill all frames with RGB color where the animation color is less than the - /// RGB threshold. Animation is referenced by name. - /// - public static void FillThresholdColorsAllFramesName(string path, int threshold, int color) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginFillThresholdColorsAllFramesName(lp_Path, threshold, color); - FreeIntPtr(lp_Path); - } - /// - /// D suffix for limited data types. - /// - public static double FillThresholdColorsAllFramesNameD(string path, double threshold, double color) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - double result = PluginFillThresholdColorsAllFramesNameD(lp_Path, threshold, color); - FreeIntPtr(lp_Path); - return result; - } - /// - /// Fill all frames with RGB color where the animation color is less than the - /// threshold. Animation is referenced by id. - /// - public static void FillThresholdColorsAllFramesRGB(int animationId, int threshold, int red, int green, int blue) - { - PluginFillThresholdColorsAllFramesRGB(animationId, threshold, red, green, blue); - } - /// - /// Fill all frames with RGB color where the animation color is less than the - /// threshold. Animation is referenced by name. - /// - public static void FillThresholdColorsAllFramesRGBName(string path, int threshold, int red, int green, int blue) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginFillThresholdColorsAllFramesRGBName(lp_Path, threshold, red, green, blue); - FreeIntPtr(lp_Path); - } - /// - /// D suffix for limited data types. - /// - public static double FillThresholdColorsAllFramesRGBNameD(string path, double threshold, double red, double green, double blue) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - double result = PluginFillThresholdColorsAllFramesRGBNameD(lp_Path, threshold, red, green, blue); - FreeIntPtr(lp_Path); - return result; - } - /// - /// Fill all frames with the min RGB color where the animation color is less - /// than the min threshold AND with the max RGB color where the animation is - /// more than the max threshold. Animation is referenced by id. - /// - public static void FillThresholdColorsMinMaxAllFramesRGB(int animationId, int minThreshold, int minRed, int minGreen, int minBlue, int maxThreshold, int maxRed, int maxGreen, int maxBlue) - { - PluginFillThresholdColorsMinMaxAllFramesRGB(animationId, minThreshold, minRed, minGreen, minBlue, maxThreshold, maxRed, maxGreen, maxBlue); - } - /// - /// Fill all frames with the min RGB color where the animation color is less - /// than the min threshold AND with the max RGB color where the animation is - /// more than the max threshold. Animation is referenced by name. - /// - public static void FillThresholdColorsMinMaxAllFramesRGBName(string path, int minThreshold, int minRed, int minGreen, int minBlue, int maxThreshold, int maxRed, int maxGreen, int maxBlue) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginFillThresholdColorsMinMaxAllFramesRGBName(lp_Path, minThreshold, minRed, minGreen, minBlue, maxThreshold, maxRed, maxGreen, maxBlue); - FreeIntPtr(lp_Path); - } - /// - /// D suffix for limited data types. - /// - public static double FillThresholdColorsMinMaxAllFramesRGBNameD(string path, double minThreshold, double minRed, double minGreen, double minBlue, double maxThreshold, double maxRed, double maxGreen, double maxBlue) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - double result = PluginFillThresholdColorsMinMaxAllFramesRGBNameD(lp_Path, minThreshold, minRed, minGreen, minBlue, maxThreshold, maxRed, maxGreen, maxBlue); - FreeIntPtr(lp_Path); - return result; - } - /// - /// Fill the specified frame with the min RGB color where the animation color - /// is less than the min threshold AND with the max RGB color where the animation - /// is more than the max threshold. Animation is referenced by id. - /// - public static void FillThresholdColorsMinMaxRGB(int animationId, int frameId, int minThreshold, int minRed, int minGreen, int minBlue, int maxThreshold, int maxRed, int maxGreen, int maxBlue) - { - PluginFillThresholdColorsMinMaxRGB(animationId, frameId, minThreshold, minRed, minGreen, minBlue, maxThreshold, maxRed, maxGreen, maxBlue); - } - /// - /// Fill the specified frame with the min RGB color where the animation color - /// is less than the min threshold AND with the max RGB color where the animation - /// is more than the max threshold. Animation is referenced by name. - /// - public static void FillThresholdColorsMinMaxRGBName(string path, int frameId, int minThreshold, int minRed, int minGreen, int minBlue, int maxThreshold, int maxRed, int maxGreen, int maxBlue) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginFillThresholdColorsMinMaxRGBName(lp_Path, frameId, minThreshold, minRed, minGreen, minBlue, maxThreshold, maxRed, maxGreen, maxBlue); - FreeIntPtr(lp_Path); - } - /// - /// D suffix for limited data types. - /// - public static double FillThresholdColorsMinMaxRGBNameD(string path, double frameId, double minThreshold, double minRed, double minGreen, double minBlue, double maxThreshold, double maxRed, double maxGreen, double maxBlue) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - double result = PluginFillThresholdColorsMinMaxRGBNameD(lp_Path, frameId, minThreshold, minRed, minGreen, minBlue, maxThreshold, maxRed, maxGreen, maxBlue); - FreeIntPtr(lp_Path); - return result; - } - /// - /// Fill the specified frame with RGB color where the animation color is less - /// than the RGB threshold. Animation is referenced by name. - /// - public static void FillThresholdColorsName(string path, int frameId, int threshold, int color) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginFillThresholdColorsName(lp_Path, frameId, threshold, color); - FreeIntPtr(lp_Path); - } - /// - /// D suffix for limited data types. - /// - public static double FillThresholdColorsNameD(string path, double frameId, double threshold, double color) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - double result = PluginFillThresholdColorsNameD(lp_Path, frameId, threshold, color); - FreeIntPtr(lp_Path); - return result; - } - /// - /// Fill the specified frame with RGB color where the animation color is less - /// than the RGB threshold. Animation is referenced by id. - /// - public static void FillThresholdColorsRGB(int animationId, int frameId, int threshold, int red, int green, int blue) - { - PluginFillThresholdColorsRGB(animationId, frameId, threshold, red, green, blue); - } - /// - /// Fill the specified frame with RGB color where the animation color is less - /// than the RGB threshold. Animation is referenced by name. - /// - public static void FillThresholdColorsRGBName(string path, int frameId, int threshold, int red, int green, int blue) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginFillThresholdColorsRGBName(lp_Path, frameId, threshold, red, green, blue); - FreeIntPtr(lp_Path); - } - /// - /// D suffix for limited data types. - /// - public static double FillThresholdColorsRGBNameD(string path, double frameId, double threshold, double red, double green, double blue) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - double result = PluginFillThresholdColorsRGBNameD(lp_Path, frameId, threshold, red, green, blue); - FreeIntPtr(lp_Path); - return result; - } - /// - /// Fill all frames with RGB color where the animation color is less than the - /// RGB threshold. Animation is referenced by id. - /// - public static void FillThresholdRGBColorsAllFramesRGB(int animationId, int redThreshold, int greenThreshold, int blueThreshold, int red, int green, int blue) - { - PluginFillThresholdRGBColorsAllFramesRGB(animationId, redThreshold, greenThreshold, blueThreshold, red, green, blue); - } - /// - /// Fill all frames with RGB color where the animation color is less than the - /// RGB threshold. Animation is referenced by name. - /// - public static void FillThresholdRGBColorsAllFramesRGBName(string path, int redThreshold, int greenThreshold, int blueThreshold, int red, int green, int blue) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginFillThresholdRGBColorsAllFramesRGBName(lp_Path, redThreshold, greenThreshold, blueThreshold, red, green, blue); - FreeIntPtr(lp_Path); - } - /// - /// D suffix for limited data types. - /// - public static double FillThresholdRGBColorsAllFramesRGBNameD(string path, double redThreshold, double greenThreshold, double blueThreshold, double red, double green, double blue) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - double result = PluginFillThresholdRGBColorsAllFramesRGBNameD(lp_Path, redThreshold, greenThreshold, blueThreshold, red, green, blue); - FreeIntPtr(lp_Path); - return result; - } - /// - /// Fill the specified frame with RGB color where the animation color is less - /// than the RGB threshold. Animation is referenced by id. - /// - public static void FillThresholdRGBColorsRGB(int animationId, int frameId, int redThreshold, int greenThreshold, int blueThreshold, int red, int green, int blue) - { - PluginFillThresholdRGBColorsRGB(animationId, frameId, redThreshold, greenThreshold, blueThreshold, red, green, blue); - } - /// - /// Fill the specified frame with RGB color where the animation color is less - /// than the RGB threshold. Animation is referenced by name. - /// - public static void FillThresholdRGBColorsRGBName(string path, int frameId, int redThreshold, int greenThreshold, int blueThreshold, int red, int green, int blue) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginFillThresholdRGBColorsRGBName(lp_Path, frameId, redThreshold, greenThreshold, blueThreshold, red, green, blue); - FreeIntPtr(lp_Path); - } - /// - /// D suffix for limited data types. - /// - public static double FillThresholdRGBColorsRGBNameD(string path, double frameId, double redThreshold, double greenThreshold, double blueThreshold, double red, double green, double blue) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - double result = PluginFillThresholdRGBColorsRGBNameD(lp_Path, frameId, redThreshold, greenThreshold, blueThreshold, red, green, blue); - FreeIntPtr(lp_Path); - return result; - } - /// - /// Fill the specified frame with RGB color where the animation color is zero. - /// Animation is referenced by id. - /// - public static void FillZeroColor(int animationId, int frameId, int color) - { - PluginFillZeroColor(animationId, frameId, color); - } - /// - /// Fill all frames with RGB color where the animation color is zero. Animation - /// is referenced by id. - /// - public static void FillZeroColorAllFrames(int animationId, int color) - { - PluginFillZeroColorAllFrames(animationId, color); - } - /// - /// Fill all frames with RGB color where the animation color is zero. Animation - /// is referenced by name. - /// - public static void FillZeroColorAllFramesName(string path, int color) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginFillZeroColorAllFramesName(lp_Path, color); - FreeIntPtr(lp_Path); - } - /// - /// D suffix for limited data types. - /// - public static double FillZeroColorAllFramesNameD(string path, double color) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - double result = PluginFillZeroColorAllFramesNameD(lp_Path, color); - FreeIntPtr(lp_Path); - return result; - } - /// - /// Fill all frames with RGB color where the animation color is zero. Animation - /// is referenced by id. - /// - public static void FillZeroColorAllFramesRGB(int animationId, int red, int green, int blue) - { - PluginFillZeroColorAllFramesRGB(animationId, red, green, blue); - } - /// - /// Fill all frames with RGB color where the animation color is zero. Animation - /// is referenced by name. - /// - public static void FillZeroColorAllFramesRGBName(string path, int red, int green, int blue) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginFillZeroColorAllFramesRGBName(lp_Path, red, green, blue); - FreeIntPtr(lp_Path); - } - /// - /// D suffix for limited data types. - /// - public static double FillZeroColorAllFramesRGBNameD(string path, double red, double green, double blue) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - double result = PluginFillZeroColorAllFramesRGBNameD(lp_Path, red, green, blue); - FreeIntPtr(lp_Path); - return result; - } - /// - /// Fill the specified frame with RGB color where the animation color is zero. - /// Animation is referenced by name. - /// - public static void FillZeroColorName(string path, int frameId, int color) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginFillZeroColorName(lp_Path, frameId, color); - FreeIntPtr(lp_Path); - } - /// - /// D suffix for limited data types. - /// - public static double FillZeroColorNameD(string path, double frameId, double color) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - double result = PluginFillZeroColorNameD(lp_Path, frameId, color); - FreeIntPtr(lp_Path); - return result; - } - /// - /// Fill the specified frame with RGB color where the animation color is zero. - /// Animation is referenced by id. - /// - public static void FillZeroColorRGB(int animationId, int frameId, int red, int green, int blue) - { - PluginFillZeroColorRGB(animationId, frameId, red, green, blue); - } - /// - /// Fill the specified frame with RGB color where the animation color is zero. - /// Animation is referenced by name. - /// - public static void FillZeroColorRGBName(string path, int frameId, int red, int green, int blue) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginFillZeroColorRGBName(lp_Path, frameId, red, green, blue); - FreeIntPtr(lp_Path); - } - /// - /// D suffix for limited data types. - /// - public static double FillZeroColorRGBNameD(string path, double frameId, double red, double green, double blue) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - double result = PluginFillZeroColorRGBNameD(lp_Path, frameId, red, green, blue); - FreeIntPtr(lp_Path); - return result; - } - /// - /// Get the animation color for a frame given the `1D` `led`. The `led` should - /// be greater than or equal to 0 and less than the `MaxLeds`. Animation is - /// referenced by id. - /// - public static int Get1DColor(int animationId, int frameId, int led) - { - int result = PluginGet1DColor(animationId, frameId, led); - return result; - } - /// - /// Get the animation color for a frame given the `1D` `led`. The `led` should - /// be greater than or equal to 0 and less than the `MaxLeds`. Animation is - /// referenced by name. - /// - public static int Get1DColorName(string path, int frameId, int led) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - int result = PluginGet1DColorName(lp_Path, frameId, led); - FreeIntPtr(lp_Path); - return result; - } - /// - /// D suffix for limited data types. - /// - public static double Get1DColorNameD(string path, double frameId, double led) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - double result = PluginGet1DColorNameD(lp_Path, frameId, led); - FreeIntPtr(lp_Path); - return result; - } - /// - /// Get the animation color for a frame given the `2D` `row` and `column`. The - /// `row` should be greater than or equal to 0 and less than the `MaxRow`. - /// The `column` should be greater than or equal to 0 and less than the `MaxColumn`. - /// Animation is referenced by id. - /// - public static int Get2DColor(int animationId, int frameId, int row, int column) - { - int result = PluginGet2DColor(animationId, frameId, row, column); - return result; - } - /// - /// Get the animation color for a frame given the `2D` `row` and `column`. The - /// `row` should be greater than or equal to 0 and less than the `MaxRow`. - /// The `column` should be greater than or equal to 0 and less than the `MaxColumn`. - /// Animation is referenced by name. - /// - public static int Get2DColorName(string path, int frameId, int row, int column) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - int result = PluginGet2DColorName(lp_Path, frameId, row, column); - FreeIntPtr(lp_Path); - return result; - } - /// - /// D suffix for limited data types. - /// - public static double Get2DColorNameD(string path, double frameId, double row, double column) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - double result = PluginGet2DColorNameD(lp_Path, frameId, row, column); - FreeIntPtr(lp_Path); - return result; - } - /// - /// Get the animation id for the named animation. - /// - public static int GetAnimation(string name) - { - string str_Name = name; - IntPtr lp_Name = GetPathIntPtr(str_Name); - int result = PluginGetAnimation(lp_Name); - FreeIntPtr(lp_Name); - return result; - } - /// - /// `PluginGetAnimationCount` will return the number of loaded animations. - /// - public static int GetAnimationCount() - { - int result = PluginGetAnimationCount(); - return result; - } - /// - /// D suffix for limited data types. - /// - public static double GetAnimationD(string name) - { - string str_Name = name; - IntPtr lp_Name = GetPathIntPtr(str_Name); - double result = PluginGetAnimationD(lp_Name); - FreeIntPtr(lp_Name); - return result; - } - /// - /// `PluginGetAnimationId` will return the `animationId` given the `index` of - /// the loaded animation. The `index` is zero-based and less than the number - /// returned by `PluginGetAnimationCount`. Use `PluginGetAnimationName` to - /// get the name of the animation. - /// - public static int GetAnimationId(int index) - { - int result = PluginGetAnimationId(index); - return result; - } - /// - /// `PluginGetAnimationName` takes an `animationId` and returns the name of - /// the animation of the `.chroma` animation file. If a name is not available - /// then an empty string will be returned. - /// - public static string GetAnimationName(int animationId) - { - string result = Marshal.PtrToStringAnsi(PluginGetAnimationName(animationId)); - return result; - } - /// - /// Get the current frame of the animation referenced by id. - /// - public static int GetCurrentFrame(int animationId) - { - int result = PluginGetCurrentFrame(animationId); - return result; - } - /// - /// Get the current frame of the animation referenced by name. - /// - public static int GetCurrentFrameName(string path) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - int result = PluginGetCurrentFrameName(lp_Path); - FreeIntPtr(lp_Path); - return result; - } - /// - /// D suffix for limited data types. - /// - public static double GetCurrentFrameNameD(string path) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - double result = PluginGetCurrentFrameNameD(lp_Path); - FreeIntPtr(lp_Path); - return result; - } - /// - /// Returns the `EChromaSDKDevice1DEnum` or `EChromaSDKDevice2DEnum` of a `Chroma` - /// animation respective to the `deviceType`, as an integer upon success. Returns - /// negative one upon failure. - /// - public static int GetDevice(int animationId) - { - int result = PluginGetDevice(animationId); - return result; - } - /// - /// Returns the `EChromaSDKDevice1DEnum` or `EChromaSDKDevice2DEnum` of a `Chroma` - /// animation respective to the `deviceType`, as an integer upon success. Returns - /// negative one upon failure. - /// - public static int GetDeviceName(string path) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - int result = PluginGetDeviceName(lp_Path); - FreeIntPtr(lp_Path); - return result; - } - /// - /// D suffix for limited data types. - /// - public static double GetDeviceNameD(string path) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - double result = PluginGetDeviceNameD(lp_Path); - FreeIntPtr(lp_Path); - return result; - } - /// - /// Returns the `EChromaSDKDeviceTypeEnum` of a `Chroma` animation as an integer - /// upon success. Returns negative one upon failure. - /// - public static int GetDeviceType(int animationId) - { - int result = PluginGetDeviceType(animationId); - return result; - } - /// - /// Returns the `EChromaSDKDeviceTypeEnum` of a `Chroma` animation as an integer - /// upon success. Returns negative one upon failure. - /// - public static int GetDeviceTypeName(string path) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - int result = PluginGetDeviceTypeName(lp_Path); - FreeIntPtr(lp_Path); - return result; - } - /// - /// D suffix for limited data types. - /// - public static double GetDeviceTypeNameD(string path) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - double result = PluginGetDeviceTypeNameD(lp_Path); - FreeIntPtr(lp_Path); - return result; - } - /// - /// Get the frame colors and duration (in seconds) for a `Chroma` animation - /// referenced by id. The `color` is expected to be an array of the expected - /// dimensions for the `deviceType/device`. The `length` parameter is the size - /// of the `color` array. For `EChromaSDKDevice1DEnum` the array size should - /// be `MAX LEDS`. For `EChromaSDKDevice2DEnum` the array size should be `MAX - /// ROW` times `MAX COLUMN`. Keys are populated only for EChromaSDKDevice2DEnum::DE_Keyboard - /// and EChromaSDKDevice2DEnum::DE_KeyboardExtended. Keys will only use the - /// EChromaSDKDevice2DEnum::DE_Keyboard `MAX_ROW` times `MAX_COLUMN` keysLength. - /// Returns the animation id upon success. Returns negative one upon failure. - /// - /// - public static int GetFrame(int animationId, int frameIndex, out float duration, int[] colors, int length, int[] keys, int keysLength) - { - int result = PluginGetFrame(animationId, frameIndex, out duration, colors, length, keys, keysLength); - return result; - } - /// - /// Returns the frame count of a `Chroma` animation upon success. Returns negative - /// one upon failure. - /// - public static int GetFrameCount(int animationId) - { - int result = PluginGetFrameCount(animationId); - return result; - } - /// - /// Returns the frame count of a `Chroma` animation upon success. Returns negative - /// one upon failure. - /// - public static int GetFrameCountName(string path) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - int result = PluginGetFrameCountName(lp_Path); - FreeIntPtr(lp_Path); - return result; - } - /// - /// D suffix for limited data types. - /// - public static double GetFrameCountNameD(string path) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - double result = PluginGetFrameCountNameD(lp_Path); - FreeIntPtr(lp_Path); - return result; - } - /// - /// Get the frame colors and duration (in seconds) for a `Chroma` animation - /// referenced by name. The `color` is expected to be an array of the expected - /// dimensions for the `deviceType/device`. The `length` parameter is the size - /// of the `color` array. For `EChromaSDKDevice1DEnum` the array size should - /// be `MAX LEDS`. For `EChromaSDKDevice2DEnum` the array size should be `MAX - /// ROW` times `MAX COLUMN`. Keys are populated only for EChromaSDKDevice2DEnum::DE_Keyboard - /// and EChromaSDKDevice2DEnum::DE_KeyboardExtended. Keys will only use the - /// EChromaSDKDevice2DEnum::DE_Keyboard `MAX_ROW` times `MAX_COLUMN` keysLength. - /// Returns the animation id upon success. Returns negative one upon failure. - /// - /// - public static int GetFrameName(string path, int frameIndex, out float duration, int[] colors, int length, int[] keys, int keysLength) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - int result = PluginGetFrameName(lp_Path, frameIndex, out duration, colors, length, keys, keysLength); - FreeIntPtr(lp_Path); - return result; - } - /// - /// Get the color of an animation key for the given frame referenced by id. - /// - /// - public static int GetKeyColor(int animationId, int frameId, int rzkey) - { - int result = PluginGetKeyColor(animationId, frameId, rzkey); - return result; - } - /// - /// D suffix for limited data types. - /// - public static double GetKeyColorD(string path, double frameId, double rzkey) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - double result = PluginGetKeyColorD(lp_Path, frameId, rzkey); - FreeIntPtr(lp_Path); - return result; - } - /// - /// Get the color of an animation key for the given frame referenced by name. - /// - /// - public static int GetKeyColorName(string path, int frameId, int rzkey) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - int result = PluginGetKeyColorName(lp_Path, frameId, rzkey); - FreeIntPtr(lp_Path); - return result; - } - /// - /// Returns `RZRESULT_SUCCESS` if the plugin has been initialized successfully. - /// Returns `RZRESULT_DLL_NOT_FOUND` if core Chroma library is not found. Returns - /// `RZRESULT_DLL_INVALID_SIGNATURE` if core Chroma library has an invalid - /// signature. - /// - public static int GetLibraryLoadedState() - { - int result = PluginGetLibraryLoadedState(); - return result; - } - /// - /// D suffix for limited data types. - /// - public static double GetLibraryLoadedStateD() - { - double result = PluginGetLibraryLoadedStateD(); - return result; - } - /// - /// Returns the `MAX COLUMN` given the `EChromaSDKDevice2DEnum` device as an - /// integer upon success. Returns negative one upon failure. - /// - public static int GetMaxColumn(Device2D device) - { - int result = PluginGetMaxColumn((int)device); - return result; - } - /// - /// D suffix for limited data types. - /// - public static double GetMaxColumnD(double device) - { - double result = PluginGetMaxColumnD(device); - return result; - } - /// - /// Returns the MAX LEDS given the `EChromaSDKDevice1DEnum` device as an integer - /// upon success. Returns negative one upon failure. - /// - public static int GetMaxLeds(Device1D device) - { - int result = PluginGetMaxLeds((int)device); - return result; - } - /// - /// D suffix for limited data types. - /// - public static double GetMaxLedsD(double device) - { - double result = PluginGetMaxLedsD(device); - return result; - } - /// - /// Returns the `MAX ROW` given the `EChromaSDKDevice2DEnum` device as an integer - /// upon success. Returns negative one upon failure. - /// - public static int GetMaxRow(Device2D device) - { - int result = PluginGetMaxRow((int)device); - return result; - } - /// - /// D suffix for limited data types. - /// - public static double GetMaxRowD(double device) - { - double result = PluginGetMaxRowD(device); - return result; - } - /// - /// `PluginGetPlayingAnimationCount` will return the number of playing animations. - /// - /// - public static int GetPlayingAnimationCount() - { - int result = PluginGetPlayingAnimationCount(); - return result; - } - /// - /// `PluginGetPlayingAnimationId` will return the `animationId` given the `index` - /// of the playing animation. The `index` is zero-based and less than the number - /// returned by `PluginGetPlayingAnimationCount`. Use `PluginGetAnimationName` - /// to get the name of the animation. - /// - public static int GetPlayingAnimationId(int index) - { - int result = PluginGetPlayingAnimationId(index); - return result; - } - /// - /// Get the RGB color given red, green, and blue. - /// - public static int GetRGB(int red, int green, int blue) - { - int result = PluginGetRGB(red, green, blue); - return result; - } - /// - /// D suffix for limited data types. - /// - public static double GetRGBD(double red, double green, double blue) - { - double result = PluginGetRGBD(red, green, blue); - return result; - } - /// - /// Check if the animation has loop enabled referenced by id. - /// - public static bool HasAnimationLoop(int animationId) - { - bool result = PluginHasAnimationLoop(animationId); - return result; - } - /// - /// Check if the animation has loop enabled referenced by name. - /// - public static bool HasAnimationLoopName(string path) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - bool result = PluginHasAnimationLoopName(lp_Path); - FreeIntPtr(lp_Path); - return result; - } - /// - /// D suffix for limited data types. - /// - public static double HasAnimationLoopNameD(string path) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - double result = PluginHasAnimationLoopNameD(lp_Path); - FreeIntPtr(lp_Path); - return result; - } - /// - /// Initialize the ChromaSDK. Zero indicates success, otherwise failure. Many - /// API methods auto initialize the ChromaSDK if not already initialized. - /// - public static int Init() - { - int result = PluginInit(); - return result; - } - /// - /// D suffix for limited data types. - /// - public static double InitD() - { - double result = PluginInitD(); - return result; - } - /// - /// Initialize the ChromaSDK. AppInfo populates the details in Synapse. Zero - /// indicates success, otherwise failure. Many API methods auto initialize - /// the ChromaSDK if not already initialized. - /// - public static int InitSDK(ref ChromaSDK.APPINFOTYPE appInfo) - { - int result = PluginInitSDK(ref appInfo); - return result; - } - /// - /// Insert an animation delay by duplicating the frame by the delay number of - /// times. Animation is referenced by id. - /// - public static void InsertDelay(int animationId, int frameId, int delay) - { - PluginInsertDelay(animationId, frameId, delay); - } - /// - /// Insert an animation delay by duplicating the frame by the delay number of - /// times. Animation is referenced by name. - /// - public static void InsertDelayName(string path, int frameId, int delay) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginInsertDelayName(lp_Path, frameId, delay); - FreeIntPtr(lp_Path); - } - /// - /// D suffix for limited data types. - /// - public static double InsertDelayNameD(string path, double frameId, double delay) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - double result = PluginInsertDelayNameD(lp_Path, frameId, delay); - FreeIntPtr(lp_Path); - return result; - } - /// - /// Duplicate the source frame index at the target frame index. Animation is - /// referenced by id. - /// - public static void InsertFrame(int animationId, int sourceFrame, int targetFrame) - { - PluginInsertFrame(animationId, sourceFrame, targetFrame); - } - /// - /// Duplicate the source frame index at the target frame index. Animation is - /// referenced by name. - /// - public static void InsertFrameName(string path, int sourceFrame, int targetFrame) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginInsertFrameName(lp_Path, sourceFrame, targetFrame); - FreeIntPtr(lp_Path); - } - /// - /// D suffix for limited data types. - /// - public static double InsertFrameNameD(string path, double sourceFrame, double targetFrame) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - double result = PluginInsertFrameNameD(lp_Path, sourceFrame, targetFrame); - FreeIntPtr(lp_Path); - return result; - } - /// - /// Invert all the colors at the specified frame. Animation is referenced by - /// id. - /// - public static void InvertColors(int animationId, int frameId) - { - PluginInvertColors(animationId, frameId); - } - /// - /// Invert all the colors for all frames. Animation is referenced by id. - /// - public static void InvertColorsAllFrames(int animationId) - { - PluginInvertColorsAllFrames(animationId); - } - /// - /// Invert all the colors for all frames. Animation is referenced by name. - /// - public static void InvertColorsAllFramesName(string path) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginInvertColorsAllFramesName(lp_Path); - FreeIntPtr(lp_Path); - } - /// - /// D suffix for limited data types. - /// - public static double InvertColorsAllFramesNameD(string path) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - double result = PluginInvertColorsAllFramesNameD(lp_Path); - FreeIntPtr(lp_Path); - return result; - } - /// - /// Invert all the colors at the specified frame. Animation is referenced by - /// name. - /// - public static void InvertColorsName(string path, int frameId) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginInvertColorsName(lp_Path, frameId); - FreeIntPtr(lp_Path); - } - /// - /// D suffix for limited data types. - /// - public static double InvertColorsNameD(string path, double frameId) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - double result = PluginInvertColorsNameD(lp_Path, frameId); - FreeIntPtr(lp_Path); - return result; - } - /// - /// Check if the animation is paused referenced by id. - /// - public static bool IsAnimationPaused(int animationId) - { - bool result = PluginIsAnimationPaused(animationId); - return result; - } - /// - /// Check if the animation is paused referenced by name. - /// - public static bool IsAnimationPausedName(string path) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - bool result = PluginIsAnimationPausedName(lp_Path); - FreeIntPtr(lp_Path); - return result; - } - /// - /// D suffix for limited data types. - /// - public static double IsAnimationPausedNameD(string path) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - double result = PluginIsAnimationPausedNameD(lp_Path); - FreeIntPtr(lp_Path); - return result; - } - /// - /// The editor dialog is a non-blocking modal window, this method returns true - /// if the modal window is open, otherwise false. - /// - public static bool IsDialogOpen() - { - bool result = PluginIsDialogOpen(); - return result; - } - /// - /// D suffix for limited data types. - /// - public static double IsDialogOpenD() - { - double result = PluginIsDialogOpenD(); - return result; - } - /// - /// Returns true if the plugin has been initialized. Returns false if the plugin - /// is uninitialized. - /// - public static bool IsInitialized() - { - bool result = PluginIsInitialized(); - return result; - } - /// - /// D suffix for limited data types. - /// - public static double IsInitializedD() - { - double result = PluginIsInitializedD(); - return result; - } - /// - /// If the method can be invoked the method returns true. - /// - public static bool IsPlatformSupported() - { - bool result = PluginIsPlatformSupported(); - return result; - } - /// - /// D suffix for limited data types. - /// - public static double IsPlatformSupportedD() - { - double result = PluginIsPlatformSupportedD(); - return result; - } - /// - /// `PluginIsPlayingName` automatically handles initializing the `ChromaSDK`. - /// The named `.chroma` animation file will be automatically opened. The method - /// will return whether the animation is playing or not. Animation is referenced - /// by id. - /// - public static bool IsPlaying(int animationId) - { - bool result = PluginIsPlaying(animationId); - return result; - } - /// - /// D suffix for limited data types. - /// - public static double IsPlayingD(double animationId) - { - double result = PluginIsPlayingD(animationId); - return result; - } - /// - /// `PluginIsPlayingName` automatically handles initializing the `ChromaSDK`. - /// The named `.chroma` animation file will be automatically opened. The method - /// will return whether the animation is playing or not. Animation is referenced - /// by name. - /// - public static bool IsPlayingName(string path) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - bool result = PluginIsPlayingName(lp_Path); - FreeIntPtr(lp_Path); - return result; - } - /// - /// D suffix for limited data types. - /// - public static double IsPlayingNameD(string path) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - double result = PluginIsPlayingNameD(lp_Path); - FreeIntPtr(lp_Path); - return result; - } - /// - /// `PluginIsPlayingType` automatically handles initializing the `ChromaSDK`. - /// If any animation is playing for the `deviceType` and `device` combination, - /// the method will return true, otherwise false. - /// - public static bool IsPlayingType(int deviceType, int device) - { - bool result = PluginIsPlayingType(deviceType, device); - return result; - } - /// - /// D suffix for limited data types. - /// - public static double IsPlayingTypeD(double deviceType, double device) - { - double result = PluginIsPlayingTypeD(deviceType, device); - return result; - } - /// - /// Do a lerp math operation on a float. - /// - public static float Lerp(float start, float end, float amt) - { - float result = PluginLerp(start, end, amt); - return result; - } - /// - /// Lerp from one color to another given t in the range 0.0 to 1.0. - /// - public static int LerpColor(int from, int to, float t) - { - int result = PluginLerpColor(from, to, t); - return result; - } - /// - /// Loads `Chroma` effects so that the animation can be played immediately. - /// Returns the animation id upon success. Returns negative one upon failure. - /// - /// - public static int LoadAnimation(int animationId) - { - int result = PluginLoadAnimation(animationId); - return result; - } - /// - /// D suffix for limited data types. - /// - public static double LoadAnimationD(double animationId) - { - double result = PluginLoadAnimationD(animationId); - return result; - } - /// - /// Load the named animation. - /// - public static void LoadAnimationName(string path) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginLoadAnimationName(lp_Path); - FreeIntPtr(lp_Path); - } - /// - /// Load a composite set of animations. - /// - public static void LoadComposite(string name) - { - string str_Name = name; - IntPtr lp_Name = GetPathIntPtr(str_Name); - PluginLoadComposite(lp_Name); - FreeIntPtr(lp_Name); - } - /// - /// Make a blank animation for the length of the frame count. Frame duration - /// defaults to the duration. The frame color defaults to color. Animation - /// is referenced by id. - /// - public static void MakeBlankFrames(int animationId, int frameCount, float duration, int color) - { - PluginMakeBlankFrames(animationId, frameCount, duration, color); - } - /// - /// Make a blank animation for the length of the frame count. Frame duration - /// defaults to the duration. The frame color defaults to color. Animation - /// is referenced by name. - /// - public static void MakeBlankFramesName(string path, int frameCount, float duration, int color) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginMakeBlankFramesName(lp_Path, frameCount, duration, color); - FreeIntPtr(lp_Path); - } - /// - /// D suffix for limited data types. - /// - public static double MakeBlankFramesNameD(string path, double frameCount, double duration, double color) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - double result = PluginMakeBlankFramesNameD(lp_Path, frameCount, duration, color); - FreeIntPtr(lp_Path); - return result; - } - /// - /// Make a blank animation for the length of the frame count. Frame duration - /// defaults to the duration. The frame color is random. Animation is referenced - /// by id. - /// - public static void MakeBlankFramesRandom(int animationId, int frameCount, float duration) - { - PluginMakeBlankFramesRandom(animationId, frameCount, duration); - } - /// - /// Make a blank animation for the length of the frame count. Frame duration - /// defaults to the duration. The frame color is random black and white. Animation - /// is referenced by id. - /// - public static void MakeBlankFramesRandomBlackAndWhite(int animationId, int frameCount, float duration) - { - PluginMakeBlankFramesRandomBlackAndWhite(animationId, frameCount, duration); - } - /// - /// Make a blank animation for the length of the frame count. Frame duration - /// defaults to the duration. The frame color is random black and white. Animation - /// is referenced by name. - /// - public static void MakeBlankFramesRandomBlackAndWhiteName(string path, int frameCount, float duration) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginMakeBlankFramesRandomBlackAndWhiteName(lp_Path, frameCount, duration); - FreeIntPtr(lp_Path); - } - /// - /// D suffix for limited data types. - /// - public static double MakeBlankFramesRandomBlackAndWhiteNameD(string path, double frameCount, double duration) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - double result = PluginMakeBlankFramesRandomBlackAndWhiteNameD(lp_Path, frameCount, duration); - FreeIntPtr(lp_Path); - return result; - } - /// - /// Make a blank animation for the length of the frame count. Frame duration - /// defaults to the duration. The frame color is random. Animation is referenced - /// by name. - /// - public static void MakeBlankFramesRandomName(string path, int frameCount, float duration) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginMakeBlankFramesRandomName(lp_Path, frameCount, duration); - FreeIntPtr(lp_Path); - } - /// - /// D suffix for limited data types. - /// - public static double MakeBlankFramesRandomNameD(string path, double frameCount, double duration) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - double result = PluginMakeBlankFramesRandomNameD(lp_Path, frameCount, duration); - FreeIntPtr(lp_Path); - return result; - } - /// - /// Make a blank animation for the length of the frame count. Frame duration - /// defaults to the duration. The frame color defaults to color. Animation - /// is referenced by id. - /// - public static void MakeBlankFramesRGB(int animationId, int frameCount, float duration, int red, int green, int blue) - { - PluginMakeBlankFramesRGB(animationId, frameCount, duration, red, green, blue); - } - /// - /// Make a blank animation for the length of the frame count. Frame duration - /// defaults to the duration. The frame color defaults to color. Animation - /// is referenced by name. - /// - public static void MakeBlankFramesRGBName(string path, int frameCount, float duration, int red, int green, int blue) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginMakeBlankFramesRGBName(lp_Path, frameCount, duration, red, green, blue); - FreeIntPtr(lp_Path); - } - /// - /// D suffix for limited data types. - /// - public static double MakeBlankFramesRGBNameD(string path, double frameCount, double duration, double red, double green, double blue) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - double result = PluginMakeBlankFramesRGBNameD(lp_Path, frameCount, duration, red, green, blue); - FreeIntPtr(lp_Path); - return result; - } - /// - /// Flips the color grid horizontally for all `Chroma` animation frames. Returns - /// the animation id upon success. Returns negative one upon failure. - /// - public static int MirrorHorizontally(int animationId) - { - int result = PluginMirrorHorizontally(animationId); - return result; - } - /// - /// Flips the color grid vertically for all `Chroma` animation frames. This - /// method has no effect for `EChromaSDKDevice1DEnum` devices. Returns the - /// animation id upon success. Returns negative one upon failure. - /// - public static int MirrorVertically(int animationId) - { - int result = PluginMirrorVertically(animationId); - return result; - } - /// - /// Multiply the color intensity with the lerp result from color 1 to color - /// 2 using the frame index divided by the frame count for the `t` parameter. - /// Animation is referenced in id. - /// - public static void MultiplyColorLerpAllFrames(int animationId, int color1, int color2) - { - PluginMultiplyColorLerpAllFrames(animationId, color1, color2); - } - /// - /// Multiply the color intensity with the lerp result from color 1 to color - /// 2 using the frame index divided by the frame count for the `t` parameter. - /// Animation is referenced in name. - /// - public static void MultiplyColorLerpAllFramesName(string path, int color1, int color2) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginMultiplyColorLerpAllFramesName(lp_Path, color1, color2); - FreeIntPtr(lp_Path); - } - /// - /// D suffix for limited data types. - /// - public static double MultiplyColorLerpAllFramesNameD(string path, double color1, double color2) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - double result = PluginMultiplyColorLerpAllFramesNameD(lp_Path, color1, color2); - FreeIntPtr(lp_Path); - return result; - } - /// - /// Multiply all the colors in the frame by the intensity value. The valid the - /// intensity range is from 0.0 to 255.0. RGB components are multiplied equally. - /// An intensity of 0.5 would half the color value. Black colors in the frame - /// will not be affected by this method. - /// - public static void MultiplyIntensity(int animationId, int frameId, float intensity) - { - PluginMultiplyIntensity(animationId, frameId, intensity); - } - /// - /// Multiply all the colors for all frames by the intensity value. The valid - /// the intensity range is from 0.0 to 255.0. RGB components are multiplied - /// equally. An intensity of 0.5 would half the color value. Black colors in - /// the frame will not be affected by this method. - /// - public static void MultiplyIntensityAllFrames(int animationId, float intensity) - { - PluginMultiplyIntensityAllFrames(animationId, intensity); - } - /// - /// Multiply all the colors for all frames by the intensity value. The valid - /// the intensity range is from 0.0 to 255.0. RGB components are multiplied - /// equally. An intensity of 0.5 would half the color value. Black colors in - /// the frame will not be affected by this method. - /// - public static void MultiplyIntensityAllFramesName(string path, float intensity) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginMultiplyIntensityAllFramesName(lp_Path, intensity); - FreeIntPtr(lp_Path); - } - /// - /// D suffix for limited data types. - /// - public static double MultiplyIntensityAllFramesNameD(string path, double intensity) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - double result = PluginMultiplyIntensityAllFramesNameD(lp_Path, intensity); - FreeIntPtr(lp_Path); - return result; - } - /// - /// Multiply all frames by the RBG color intensity. Animation is referenced - /// by id. - /// - public static void MultiplyIntensityAllFramesRGB(int animationId, int red, int green, int blue) - { - PluginMultiplyIntensityAllFramesRGB(animationId, red, green, blue); - } - /// - /// Multiply all frames by the RBG color intensity. Animation is referenced - /// by name. - /// - public static void MultiplyIntensityAllFramesRGBName(string path, int red, int green, int blue) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginMultiplyIntensityAllFramesRGBName(lp_Path, red, green, blue); - FreeIntPtr(lp_Path); - } - /// - /// D suffix for limited data types. - /// - public static double MultiplyIntensityAllFramesRGBNameD(string path, double red, double green, double blue) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - double result = PluginMultiplyIntensityAllFramesRGBNameD(lp_Path, red, green, blue); - FreeIntPtr(lp_Path); - return result; - } - /// - /// Multiply the specific frame by the RBG color intensity. Animation is referenced - /// by id. - /// - public static void MultiplyIntensityColor(int animationId, int frameId, int color) - { - PluginMultiplyIntensityColor(animationId, frameId, color); - } - /// - /// Multiply all frames by the RBG color intensity. Animation is referenced - /// by id. - /// - public static void MultiplyIntensityColorAllFrames(int animationId, int color) - { - PluginMultiplyIntensityColorAllFrames(animationId, color); - } - /// - /// Multiply all frames by the RBG color intensity. Animation is referenced - /// by name. - /// - public static void MultiplyIntensityColorAllFramesName(string path, int color) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginMultiplyIntensityColorAllFramesName(lp_Path, color); - FreeIntPtr(lp_Path); - } - /// - /// D suffix for limited data types. - /// - public static double MultiplyIntensityColorAllFramesNameD(string path, double color) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - double result = PluginMultiplyIntensityColorAllFramesNameD(lp_Path, color); - FreeIntPtr(lp_Path); - return result; - } - /// - /// Multiply the specific frame by the RBG color intensity. Animation is referenced - /// by name. - /// - public static void MultiplyIntensityColorName(string path, int frameId, int color) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginMultiplyIntensityColorName(lp_Path, frameId, color); - FreeIntPtr(lp_Path); - } - /// - /// D suffix for limited data types. - /// - public static double MultiplyIntensityColorNameD(string path, double frameId, double color) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - double result = PluginMultiplyIntensityColorNameD(lp_Path, frameId, color); - FreeIntPtr(lp_Path); - return result; - } - /// - /// Multiply all the colors in the frame by the intensity value. The valid the - /// intensity range is from 0.0 to 255.0. RGB components are multiplied equally. - /// An intensity of 0.5 would half the color value. Black colors in the frame - /// will not be affected by this method. - /// - public static void MultiplyIntensityName(string path, int frameId, float intensity) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginMultiplyIntensityName(lp_Path, frameId, intensity); - FreeIntPtr(lp_Path); - } - /// - /// D suffix for limited data types. - /// - public static double MultiplyIntensityNameD(string path, double frameId, double intensity) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - double result = PluginMultiplyIntensityNameD(lp_Path, frameId, intensity); - FreeIntPtr(lp_Path); - return result; - } - /// - /// Multiply the specific frame by the RBG color intensity. Animation is referenced - /// by id. - /// - public static void MultiplyIntensityRGB(int animationId, int frameId, int red, int green, int blue) - { - PluginMultiplyIntensityRGB(animationId, frameId, red, green, blue); - } - /// - /// Multiply the specific frame by the RBG color intensity. Animation is referenced - /// by name. - /// - public static void MultiplyIntensityRGBName(string path, int frameId, int red, int green, int blue) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginMultiplyIntensityRGBName(lp_Path, frameId, red, green, blue); - FreeIntPtr(lp_Path); - } - /// - /// D suffix for limited data types. - /// - public static double MultiplyIntensityRGBNameD(string path, double frameId, double red, double green, double blue) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - double result = PluginMultiplyIntensityRGBNameD(lp_Path, frameId, red, green, blue); - FreeIntPtr(lp_Path); - return result; - } - /// - /// Multiply the specific frame by the color lerp result between color 1 and - /// 2 using the frame color value as the `t` value. Animation is referenced - /// by id. - /// - public static void MultiplyNonZeroTargetColorLerp(int animationId, int frameId, int color1, int color2) - { - PluginMultiplyNonZeroTargetColorLerp(animationId, frameId, color1, color2); - } - /// - /// Multiply all frames by the color lerp result between color 1 and 2 using - /// the frame color value as the `t` value. Animation is referenced by id. - /// - /// - public static void MultiplyNonZeroTargetColorLerpAllFrames(int animationId, int color1, int color2) - { - PluginMultiplyNonZeroTargetColorLerpAllFrames(animationId, color1, color2); - } - /// - /// Multiply all frames by the color lerp result between color 1 and 2 using - /// the frame color value as the `t` value. Animation is referenced by name. - /// - /// - public static void MultiplyNonZeroTargetColorLerpAllFramesName(string path, int color1, int color2) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginMultiplyNonZeroTargetColorLerpAllFramesName(lp_Path, color1, color2); - FreeIntPtr(lp_Path); - } - /// - /// D suffix for limited data types. - /// - public static double MultiplyNonZeroTargetColorLerpAllFramesNameD(string path, double color1, double color2) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - double result = PluginMultiplyNonZeroTargetColorLerpAllFramesNameD(lp_Path, color1, color2); - FreeIntPtr(lp_Path); - return result; - } - /// - /// Multiply the specific frame by the color lerp result between RGB 1 and 2 - /// using the frame color value as the `t` value. Animation is referenced by - /// id. - /// - public static void MultiplyNonZeroTargetColorLerpAllFramesRGB(int animationId, int red1, int green1, int blue1, int red2, int green2, int blue2) - { - PluginMultiplyNonZeroTargetColorLerpAllFramesRGB(animationId, red1, green1, blue1, red2, green2, blue2); - } - /// - /// Multiply the specific frame by the color lerp result between RGB 1 and 2 - /// using the frame color value as the `t` value. Animation is referenced by - /// name. - /// - public static void MultiplyNonZeroTargetColorLerpAllFramesRGBName(string path, int red1, int green1, int blue1, int red2, int green2, int blue2) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginMultiplyNonZeroTargetColorLerpAllFramesRGBName(lp_Path, red1, green1, blue1, red2, green2, blue2); - FreeIntPtr(lp_Path); - } - /// - /// D suffix for limited data types. - /// - public static double MultiplyNonZeroTargetColorLerpAllFramesRGBNameD(string path, double red1, double green1, double blue1, double red2, double green2, double blue2) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - double result = PluginMultiplyNonZeroTargetColorLerpAllFramesRGBNameD(lp_Path, red1, green1, blue1, red2, green2, blue2); - FreeIntPtr(lp_Path); - return result; - } - /// - /// Multiply the specific frame by the color lerp result between color 1 and - /// 2 using the frame color value as the `t` value. Animation is referenced - /// by id. - /// - public static void MultiplyTargetColorLerp(int animationId, int frameId, int color1, int color2) - { - PluginMultiplyTargetColorLerp(animationId, frameId, color1, color2); - } - /// - /// Multiply all frames by the color lerp result between color 1 and 2 using - /// the frame color value as the `t` value. Animation is referenced by id. - /// - /// - public static void MultiplyTargetColorLerpAllFrames(int animationId, int color1, int color2) - { - PluginMultiplyTargetColorLerpAllFrames(animationId, color1, color2); - } - /// - /// Multiply all frames by the color lerp result between color 1 and 2 using - /// the frame color value as the `t` value. Animation is referenced by name. - /// - /// - public static void MultiplyTargetColorLerpAllFramesName(string path, int color1, int color2) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginMultiplyTargetColorLerpAllFramesName(lp_Path, color1, color2); - FreeIntPtr(lp_Path); - } - /// - /// D suffix for limited data types. - /// - public static double MultiplyTargetColorLerpAllFramesNameD(string path, double color1, double color2) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - double result = PluginMultiplyTargetColorLerpAllFramesNameD(lp_Path, color1, color2); - FreeIntPtr(lp_Path); - return result; - } - /// - /// Multiply all frames by the color lerp result between RGB 1 and 2 using the - /// frame color value as the `t` value. Animation is referenced by id. - /// - public static void MultiplyTargetColorLerpAllFramesRGB(int animationId, int red1, int green1, int blue1, int red2, int green2, int blue2) - { - PluginMultiplyTargetColorLerpAllFramesRGB(animationId, red1, green1, blue1, red2, green2, blue2); - } - /// - /// Multiply all frames by the color lerp result between RGB 1 and 2 using the - /// frame color value as the `t` value. Animation is referenced by name. - /// - public static void MultiplyTargetColorLerpAllFramesRGBName(string path, int red1, int green1, int blue1, int red2, int green2, int blue2) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginMultiplyTargetColorLerpAllFramesRGBName(lp_Path, red1, green1, blue1, red2, green2, blue2); - FreeIntPtr(lp_Path); - } - /// - /// D suffix for limited data types. - /// - public static double MultiplyTargetColorLerpAllFramesRGBNameD(string path, double red1, double green1, double blue1, double red2, double green2, double blue2) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - double result = PluginMultiplyTargetColorLerpAllFramesRGBNameD(lp_Path, red1, green1, blue1, red2, green2, blue2); - FreeIntPtr(lp_Path); - return result; - } - /// - /// Multiply the specific frame by the color lerp result between color 1 and - /// 2 using the frame color value as the `t` value. Animation is referenced - /// by name. - /// - public static void MultiplyTargetColorLerpName(string path, int frameId, int color1, int color2) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginMultiplyTargetColorLerpName(lp_Path, frameId, color1, color2); - FreeIntPtr(lp_Path); - } - /// - /// Offset all colors in the frame using the RGB offset. Use the range of -255 - /// to 255 for red, green, and blue parameters. Negative values remove color. - /// Positive values add color. - /// - public static void OffsetColors(int animationId, int frameId, int red, int green, int blue) - { - PluginOffsetColors(animationId, frameId, red, green, blue); - } - /// - /// Offset all colors for all frames using the RGB offset. Use the range of - /// -255 to 255 for red, green, and blue parameters. Negative values remove - /// color. Positive values add color. - /// - public static void OffsetColorsAllFrames(int animationId, int red, int green, int blue) - { - PluginOffsetColorsAllFrames(animationId, red, green, blue); - } - /// - /// Offset all colors for all frames using the RGB offset. Use the range of - /// -255 to 255 for red, green, and blue parameters. Negative values remove - /// color. Positive values add color. - /// - public static void OffsetColorsAllFramesName(string path, int red, int green, int blue) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginOffsetColorsAllFramesName(lp_Path, red, green, blue); - FreeIntPtr(lp_Path); - } - /// - /// D suffix for limited data types. - /// - public static double OffsetColorsAllFramesNameD(string path, double red, double green, double blue) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - double result = PluginOffsetColorsAllFramesNameD(lp_Path, red, green, blue); - FreeIntPtr(lp_Path); - return result; - } - /// - /// Offset all colors in the frame using the RGB offset. Use the range of -255 - /// to 255 for red, green, and blue parameters. Negative values remove color. - /// Positive values add color. - /// - public static void OffsetColorsName(string path, int frameId, int red, int green, int blue) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginOffsetColorsName(lp_Path, frameId, red, green, blue); - FreeIntPtr(lp_Path); - } - /// - /// D suffix for limited data types. - /// - public static double OffsetColorsNameD(string path, double frameId, double red, double green, double blue) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - double result = PluginOffsetColorsNameD(lp_Path, frameId, red, green, blue); - FreeIntPtr(lp_Path); - return result; - } - /// - /// This method will only update colors in the animation that are not already - /// set to black. Offset a subset of colors in the frame using the RGB offset. - /// Use the range of -255 to 255 for red, green, and blue parameters. Negative - /// values remove color. Positive values add color. - /// - public static void OffsetNonZeroColors(int animationId, int frameId, int red, int green, int blue) - { - PluginOffsetNonZeroColors(animationId, frameId, red, green, blue); - } - /// - /// This method will only update colors in the animation that are not already - /// set to black. Offset a subset of colors for all frames using the RGB offset. - /// Use the range of -255 to 255 for red, green, and blue parameters. Negative - /// values remove color. Positive values add color. - /// - public static void OffsetNonZeroColorsAllFrames(int animationId, int red, int green, int blue) - { - PluginOffsetNonZeroColorsAllFrames(animationId, red, green, blue); - } - /// - /// This method will only update colors in the animation that are not already - /// set to black. Offset a subset of colors for all frames using the RGB offset. - /// Use the range of -255 to 255 for red, green, and blue parameters. Negative - /// values remove color. Positive values add color. - /// - public static void OffsetNonZeroColorsAllFramesName(string path, int red, int green, int blue) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginOffsetNonZeroColorsAllFramesName(lp_Path, red, green, blue); - FreeIntPtr(lp_Path); - } - /// - /// D suffix for limited data types. - /// - public static double OffsetNonZeroColorsAllFramesNameD(string path, double red, double green, double blue) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - double result = PluginOffsetNonZeroColorsAllFramesNameD(lp_Path, red, green, blue); - FreeIntPtr(lp_Path); - return result; - } - /// - /// This method will only update colors in the animation that are not already - /// set to black. Offset a subset of colors in the frame using the RGB offset. - /// Use the range of -255 to 255 for red, green, and blue parameters. Negative - /// values remove color. Positive values add color. - /// - public static void OffsetNonZeroColorsName(string path, int frameId, int red, int green, int blue) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginOffsetNonZeroColorsName(lp_Path, frameId, red, green, blue); - FreeIntPtr(lp_Path); - } - /// - /// D suffix for limited data types. - /// - public static double OffsetNonZeroColorsNameD(string path, double frameId, double red, double green, double blue) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - double result = PluginOffsetNonZeroColorsNameD(lp_Path, frameId, red, green, blue); - FreeIntPtr(lp_Path); - return result; - } - /// - /// Opens a `Chroma` animation file so that it can be played. Returns an animation - /// id >= 0 upon success. Returns negative one if there was a failure. The - /// animation id is used in most of the API methods. - /// - public static int OpenAnimation(string path) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - int result = PluginOpenAnimation(lp_Path); - FreeIntPtr(lp_Path); - return result; - } - /// - /// D suffix for limited data types. - /// - public static double OpenAnimationD(string path) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - double result = PluginOpenAnimationD(lp_Path); - FreeIntPtr(lp_Path); - return result; - } - /// - /// Opens a `Chroma` animation data from memory so that it can be played. `Data` - /// is a pointer to BYTE array of the loaded animation in memory. `Name` will - /// be assigned to the animation when loaded. Returns an animation id >= 0 - /// upon success. Returns negative one if there was a failure. The animation - /// id is used in most of the API methods. - /// - public static int OpenAnimationFromMemory(byte[] data, string name) - { - string str_Name = name; - IntPtr lp_Name = GetPathIntPtr(str_Name); - int result = PluginOpenAnimationFromMemory(data, lp_Name); - FreeIntPtr(lp_Name); - return result; - } - /// - /// Opens a `Chroma` animation file with the `.chroma` extension. Returns zero - /// upon success. Returns negative one if there was a failure. - /// - public static int OpenEditorDialog(string path) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - int result = PluginOpenEditorDialog(lp_Path); - FreeIntPtr(lp_Path); - return result; - } - /// - /// Open the named animation in the editor dialog and play the animation at - /// start. - /// - public static int OpenEditorDialogAndPlay(string path) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - int result = PluginOpenEditorDialogAndPlay(lp_Path); - FreeIntPtr(lp_Path); - return result; - } - /// - /// D suffix for limited data types. - /// - public static double OpenEditorDialogAndPlayD(string path) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - double result = PluginOpenEditorDialogAndPlayD(lp_Path); - FreeIntPtr(lp_Path); - return result; - } - /// - /// D suffix for limited data types. - /// - public static double OpenEditorDialogD(string path) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - double result = PluginOpenEditorDialogD(lp_Path); - FreeIntPtr(lp_Path); - return result; - } - /// - /// Sets the `duration` for all grames in the `Chroma` animation to the `duration` - /// parameter. Returns the animation id upon success. Returns negative one - /// upon failure. - /// - public static int OverrideFrameDuration(int animationId, float duration) - { - int result = PluginOverrideFrameDuration(animationId, duration); - return result; - } - /// - /// D suffix for limited data types. - /// - public static double OverrideFrameDurationD(double animationId, double duration) - { - double result = PluginOverrideFrameDurationD(animationId, duration); - return result; - } - /// - /// Override the duration of all frames with the `duration` value. Animation - /// is referenced by name. - /// - public static void OverrideFrameDurationName(string path, float duration) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginOverrideFrameDurationName(lp_Path, duration); - FreeIntPtr(lp_Path); - } - /// - /// Pause the current animation referenced by id. - /// - public static void PauseAnimation(int animationId) - { - PluginPauseAnimation(animationId); - } - /// - /// Pause the current animation referenced by name. - /// - public static void PauseAnimationName(string path) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginPauseAnimationName(lp_Path); - FreeIntPtr(lp_Path); - } - /// - /// D suffix for limited data types. - /// - public static double PauseAnimationNameD(string path) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - double result = PluginPauseAnimationNameD(lp_Path); - FreeIntPtr(lp_Path); - return result; - } - /// - /// Plays the `Chroma` animation. This will load the animation, if not loaded - /// previously. Returns the animation id upon success. Returns negative one - /// upon failure. - /// - public static int PlayAnimation(int animationId) - { - int result = PluginPlayAnimation(animationId); - return result; - } - /// - /// D suffix for limited data types. - /// - public static double PlayAnimationD(double animationId) - { - double result = PluginPlayAnimationD(animationId); - return result; - } - /// - /// `PluginPlayAnimationFrame` automatically handles initializing the `ChromaSDK`. - /// The method will play the animation given the `animationId` with looping - /// `on` or `off` starting at the `frameId`. - /// - public static void PlayAnimationFrame(int animationId, int frameId, bool loop) - { - PluginPlayAnimationFrame(animationId, frameId, loop); - } - /// - /// `PluginPlayAnimationFrameName` automatically handles initializing the `ChromaSDK`. - /// The named `.chroma` animation file will be automatically opened. The animation - /// will play with looping `on` or `off` starting at the `frameId`. - /// - public static void PlayAnimationFrameName(string path, int frameId, bool loop) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginPlayAnimationFrameName(lp_Path, frameId, loop); - FreeIntPtr(lp_Path); - } - /// - /// D suffix for limited data types. - /// - public static double PlayAnimationFrameNameD(string path, double frameId, double loop) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - double result = PluginPlayAnimationFrameNameD(lp_Path, frameId, loop); - FreeIntPtr(lp_Path); - return result; - } - /// - /// `PluginPlayAnimationLoop` automatically handles initializing the `ChromaSDK`. - /// The method will play the animation given the `animationId` with looping - /// `on` or `off`. - /// - public static void PlayAnimationLoop(int animationId, bool loop) - { - PluginPlayAnimationLoop(animationId, loop); - } - /// - /// `PluginPlayAnimationName` automatically handles initializing the `ChromaSDK`. - /// The named `.chroma` animation file will be automatically opened. The animation - /// will play with looping `on` or `off`. - /// - public static void PlayAnimationName(string path, bool loop) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginPlayAnimationName(lp_Path, loop); - FreeIntPtr(lp_Path); - } - /// - /// D suffix for limited data types. - /// - public static double PlayAnimationNameD(string path, double loop) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - double result = PluginPlayAnimationNameD(lp_Path, loop); - FreeIntPtr(lp_Path); - return result; - } - /// - /// `PluginPlayComposite` automatically handles initializing the `ChromaSDK`. - /// The named animation files for the `.chroma` set will be automatically opened. - /// The set of animations will play with looping `on` or `off`. - /// - public static void PlayComposite(string name, bool loop) - { - string str_Name = name; - IntPtr lp_Name = GetPathIntPtr(str_Name); - PluginPlayComposite(lp_Name, loop); - FreeIntPtr(lp_Name); - } - /// - /// D suffix for limited data types. - /// - public static double PlayCompositeD(string name, double loop) - { - string str_Name = name; - IntPtr lp_Name = GetPathIntPtr(str_Name); - double result = PluginPlayCompositeD(lp_Name, loop); - FreeIntPtr(lp_Name); - return result; - } - /// - /// Displays the `Chroma` animation frame on `Chroma` hardware given the `frameIndex`. - /// Returns the animation id upon success. Returns negative one upon failure. - /// - /// - public static int PreviewFrame(int animationId, int frameIndex) - { - int result = PluginPreviewFrame(animationId, frameIndex); - return result; - } - /// - /// D suffix for limited data types. - /// - public static double PreviewFrameD(double animationId, double frameIndex) - { - double result = PluginPreviewFrameD(animationId, frameIndex); - return result; - } - /// - /// Displays the `Chroma` animation frame on `Chroma` hardware given the `frameIndex`. - /// Animaton is referenced by name. - /// - public static void PreviewFrameName(string path, int frameIndex) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginPreviewFrameName(lp_Path, frameIndex); - FreeIntPtr(lp_Path); - } - /// - /// Reduce the frames of the animation by removing every nth element. Animation - /// is referenced by id. - /// - public static void ReduceFrames(int animationId, int n) - { - PluginReduceFrames(animationId, n); - } - /// - /// Reduce the frames of the animation by removing every nth element. Animation - /// is referenced by name. - /// - public static void ReduceFramesName(string path, int n) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginReduceFramesName(lp_Path, n); - FreeIntPtr(lp_Path); - } - /// - /// D suffix for limited data types. - /// - public static double ReduceFramesNameD(string path, double n) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - double result = PluginReduceFramesNameD(lp_Path, n); - FreeIntPtr(lp_Path); - return result; - } - /// - /// Resets the `Chroma` animation to 1 blank frame. Returns the animation id - /// upon success. Returns negative one upon failure. - /// - public static int ResetAnimation(int animationId) - { - int result = PluginResetAnimation(animationId); - return result; - } - /// - /// Resume the animation with loop `ON` or `OFF` referenced by id. - /// - public static void ResumeAnimation(int animationId, bool loop) - { - PluginResumeAnimation(animationId, loop); - } - /// - /// Resume the animation with loop `ON` or `OFF` referenced by name. - /// - public static void ResumeAnimationName(string path, bool loop) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginResumeAnimationName(lp_Path, loop); - FreeIntPtr(lp_Path); - } - /// - /// D suffix for limited data types. - /// - public static double ResumeAnimationNameD(string path, double loop) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - double result = PluginResumeAnimationNameD(lp_Path, loop); - FreeIntPtr(lp_Path); - return result; - } - /// - /// Reverse the animation frame order of the `Chroma` animation. Returns the - /// animation id upon success. Returns negative one upon failure. Animation - /// is referenced by id. - /// - public static int Reverse(int animationId) - { - int result = PluginReverse(animationId); - return result; - } - /// - /// Reverse the animation frame order of the `Chroma` animation. Animation is - /// referenced by id. - /// - public static void ReverseAllFrames(int animationId) - { - PluginReverseAllFrames(animationId); - } - /// - /// Reverse the animation frame order of the `Chroma` animation. Animation is - /// referenced by name. - /// - public static void ReverseAllFramesName(string path) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginReverseAllFramesName(lp_Path); - FreeIntPtr(lp_Path); - } - /// - /// D suffix for limited data types. - /// - public static double ReverseAllFramesNameD(string path) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - double result = PluginReverseAllFramesNameD(lp_Path); - FreeIntPtr(lp_Path); - return result; - } - /// - /// Save the animation referenced by id to the path specified. - /// - public static int SaveAnimation(int animationId, string path) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - int result = PluginSaveAnimation(animationId, lp_Path); - FreeIntPtr(lp_Path); - return result; - } - /// - /// Save the named animation to the target path specified. - /// - public static int SaveAnimationName(string sourceAnimation, string targetAnimation) - { - string str_SourceAnimation = sourceAnimation; - IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); - string str_TargetAnimation = targetAnimation; - IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); - int result = PluginSaveAnimationName(lp_SourceAnimation, lp_TargetAnimation); - FreeIntPtr(lp_SourceAnimation); - FreeIntPtr(lp_TargetAnimation); - return result; - } - /// - /// Set the animation color for a frame given the `1D` `led`. The `led` should - /// be greater than or equal to 0 and less than the `MaxLeds`. The animation - /// is referenced by id. - /// - public static void Set1DColor(int animationId, int frameId, int led, int color) - { - PluginSet1DColor(animationId, frameId, led, color); - } - /// - /// Set the animation color for a frame given the `1D` `led`. The `led` should - /// be greater than or equal to 0 and less than the `MaxLeds`. The animation - /// is referenced by name. - /// - public static void Set1DColorName(string path, int frameId, int led, int color) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginSet1DColorName(lp_Path, frameId, led, color); - FreeIntPtr(lp_Path); - } - /// - /// D suffix for limited data types. - /// - public static double Set1DColorNameD(string path, double frameId, double led, double color) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - double result = PluginSet1DColorNameD(lp_Path, frameId, led, color); - FreeIntPtr(lp_Path); - return result; - } - /// - /// Set the animation color for a frame given the `2D` `row` and `column`. The - /// `row` should be greater than or equal to 0 and less than the `MaxRow`. - /// The `column` should be greater than or equal to 0 and less than the `MaxColumn`. - /// The animation is referenced by id. - /// - public static void Set2DColor(int animationId, int frameId, int row, int column, int color) - { - PluginSet2DColor(animationId, frameId, row, column, color); - } - /// - /// Set the animation color for a frame given the `2D` `row` and `column`. The - /// `row` should be greater than or equal to 0 and less than the `MaxRow`. - /// The `column` should be greater than or equal to 0 and less than the `MaxColumn`. - /// The animation is referenced by name. - /// - public static void Set2DColorName(string path, int frameId, int row, int column, int color) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginSet2DColorName(lp_Path, frameId, row, column, color); - FreeIntPtr(lp_Path); - } - /// - /// D suffix for limited data types. - /// - public static double Set2DColorNameD(string path, double frameId, double rowColumnIndex, double color) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - double result = PluginSet2DColorNameD(lp_Path, frameId, rowColumnIndex, color); - FreeIntPtr(lp_Path); - return result; - } - /// - /// When custom color is set, the custom key mode will be used. The animation - /// is referenced by id. - /// - public static void SetChromaCustomColorAllFrames(int animationId) - { - PluginSetChromaCustomColorAllFrames(animationId); - } - /// - /// When custom color is set, the custom key mode will be used. The animation - /// is referenced by name. - /// - public static void SetChromaCustomColorAllFramesName(string path) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginSetChromaCustomColorAllFramesName(lp_Path); - FreeIntPtr(lp_Path); - } - /// - /// D suffix for limited data types. - /// - public static double SetChromaCustomColorAllFramesNameD(string path) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - double result = PluginSetChromaCustomColorAllFramesNameD(lp_Path); - FreeIntPtr(lp_Path); - return result; - } - /// - /// Set the Chroma custom key color flag on all frames. `True` changes the layout - /// from grid to key. `True` changes the layout from key to grid. Animation - /// is referenced by id. - /// - public static void SetChromaCustomFlag(int animationId, bool flag) - { - PluginSetChromaCustomFlag(animationId, flag); - } - /// - /// Set the Chroma custom key color flag on all frames. `True` changes the layout - /// from grid to key. `True` changes the layout from key to grid. Animation - /// is referenced by name. - /// - public static void SetChromaCustomFlagName(string path, bool flag) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginSetChromaCustomFlagName(lp_Path, flag); - FreeIntPtr(lp_Path); - } - /// - /// D suffix for limited data types. - /// - public static double SetChromaCustomFlagNameD(string path, double flag) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - double result = PluginSetChromaCustomFlagNameD(lp_Path, flag); - FreeIntPtr(lp_Path); - return result; - } - /// - /// Set the current frame of the animation referenced by id. - /// - public static void SetCurrentFrame(int animationId, int frameId) - { - PluginSetCurrentFrame(animationId, frameId); - } - /// - /// Set the current frame of the animation referenced by name. - /// - public static void SetCurrentFrameName(string path, int frameId) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginSetCurrentFrameName(lp_Path, frameId); - FreeIntPtr(lp_Path); - } - /// - /// D suffix for limited data types. - /// - public static double SetCurrentFrameNameD(string path, double frameId) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - double result = PluginSetCurrentFrameNameD(lp_Path, frameId); - FreeIntPtr(lp_Path); - return result; - } - /// - /// Set the custom alpha flag on the color array - /// - public static int SetCustomColorFlag2D(int device, int[] colors) - { - int result = PluginSetCustomColorFlag2D(device, colors); - return result; - } - /// - /// Changes the `deviceType` and `device` of a `Chroma` animation. If the device - /// is changed, the `Chroma` animation will be reset with 1 blank frame. Returns - /// the animation id upon success. Returns negative one upon failure. - /// - public static int SetDevice(int animationId, int deviceType, int device) - { - int result = PluginSetDevice(animationId, deviceType, device); - return result; - } - /// - /// SetEffect will display the referenced effect id. - /// - public static int SetEffect(Guid effectId) - { - int result = PluginSetEffect(effectId); - return result; - } - /// - /// SetEffectCustom1D will display the referenced colors immediately - /// - public static int SetEffectCustom1D(int device, int[] colors) - { - int result = PluginSetEffectCustom1D(device, colors); - return result; - } - /// - /// SetEffectCustom2D will display the referenced colors immediately. - /// - public static int SetEffectCustom2D(int device, int[] colors) - { - int result = PluginSetEffectCustom2D(device, colors); - return result; - } - /// - /// SetEffectKeyboardCustom2D will display the referenced custom keyboard colors - /// immediately. Colors represent a visual grid layout. Keys represent the - /// hotkeys for any layout. - /// - public static int SetEffectKeyboardCustom2D(int device, int[] colors, int[] keys) - { - int result = PluginSetEffectKeyboardCustom2D(device, colors, keys); - return result; - } - /// - /// When the idle animation is used, the named animation will play when no other - /// animations are playing. Reference the animation by id. - /// - public static void SetIdleAnimation(int animationId) - { - PluginSetIdleAnimation(animationId); - } - /// - /// When the idle animation is used, the named animation will play when no other - /// animations are playing. Reference the animation by name. - /// - public static void SetIdleAnimationName(string path) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginSetIdleAnimationName(lp_Path); - FreeIntPtr(lp_Path); - } - /// - /// Set animation key to a static color for the given frame. - /// - public static void SetKeyColor(int animationId, int frameId, int rzkey, int color) - { - PluginSetKeyColor(animationId, frameId, rzkey, color); - } - /// - /// Set the key to the specified key color for all frames. Animation is referenced - /// by id. - /// - public static void SetKeyColorAllFrames(int animationId, int rzkey, int color) - { - PluginSetKeyColorAllFrames(animationId, rzkey, color); - } - /// - /// Set the key to the specified key color for all frames. Animation is referenced - /// by name. - /// - public static void SetKeyColorAllFramesName(string path, int rzkey, int color) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginSetKeyColorAllFramesName(lp_Path, rzkey, color); - FreeIntPtr(lp_Path); - } - /// - /// D suffix for limited data types. - /// - public static double SetKeyColorAllFramesNameD(string path, double rzkey, double color) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - double result = PluginSetKeyColorAllFramesNameD(lp_Path, rzkey, color); - FreeIntPtr(lp_Path); - return result; - } - /// - /// Set the key to the specified key color for all frames. Animation is referenced - /// by id. - /// - public static void SetKeyColorAllFramesRGB(int animationId, int rzkey, int red, int green, int blue) - { - PluginSetKeyColorAllFramesRGB(animationId, rzkey, red, green, blue); - } - /// - /// Set the key to the specified key color for all frames. Animation is referenced - /// by name. - /// - public static void SetKeyColorAllFramesRGBName(string path, int rzkey, int red, int green, int blue) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginSetKeyColorAllFramesRGBName(lp_Path, rzkey, red, green, blue); - FreeIntPtr(lp_Path); - } - /// - /// D suffix for limited data types. - /// - public static double SetKeyColorAllFramesRGBNameD(string path, double rzkey, double red, double green, double blue) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - double result = PluginSetKeyColorAllFramesRGBNameD(lp_Path, rzkey, red, green, blue); - FreeIntPtr(lp_Path); - return result; - } - /// - /// Set animation key to a static color for the given frame. - /// - public static void SetKeyColorName(string path, int frameId, int rzkey, int color) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginSetKeyColorName(lp_Path, frameId, rzkey, color); - FreeIntPtr(lp_Path); - } - /// - /// D suffix for limited data types. - /// - public static double SetKeyColorNameD(string path, double frameId, double rzkey, double color) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - double result = PluginSetKeyColorNameD(lp_Path, frameId, rzkey, color); - FreeIntPtr(lp_Path); - return result; - } - /// - /// Set the key to the specified key color for the specified frame. Animation - /// is referenced by id. - /// - public static void SetKeyColorRGB(int animationId, int frameId, int rzkey, int red, int green, int blue) - { - PluginSetKeyColorRGB(animationId, frameId, rzkey, red, green, blue); - } - /// - /// Set the key to the specified key color for the specified frame. Animation - /// is referenced by name. - /// - public static void SetKeyColorRGBName(string path, int frameId, int rzkey, int red, int green, int blue) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginSetKeyColorRGBName(lp_Path, frameId, rzkey, red, green, blue); - FreeIntPtr(lp_Path); - } - /// - /// D suffix for limited data types. - /// - public static double SetKeyColorRGBNameD(string path, double frameId, double rzkey, double red, double green, double blue) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - double result = PluginSetKeyColorRGBNameD(lp_Path, frameId, rzkey, red, green, blue); - FreeIntPtr(lp_Path); - return result; - } - /// - /// Set animation key to a static color for the given frame if the existing - /// color is not already black. - /// - public static void SetKeyNonZeroColor(int animationId, int frameId, int rzkey, int color) - { - PluginSetKeyNonZeroColor(animationId, frameId, rzkey, color); - } - /// - /// Set animation key to a static color for the given frame if the existing - /// color is not already black. - /// - public static void SetKeyNonZeroColorName(string path, int frameId, int rzkey, int color) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginSetKeyNonZeroColorName(lp_Path, frameId, rzkey, color); - FreeIntPtr(lp_Path); - } - /// - /// D suffix for limited data types. - /// - public static double SetKeyNonZeroColorNameD(string path, double frameId, double rzkey, double color) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - double result = PluginSetKeyNonZeroColorNameD(lp_Path, frameId, rzkey, color); - FreeIntPtr(lp_Path); - return result; - } - /// - /// Set the key to the specified key color for the specified frame where color - /// is not black. Animation is referenced by id. - /// - public static void SetKeyNonZeroColorRGB(int animationId, int frameId, int rzkey, int red, int green, int blue) - { - PluginSetKeyNonZeroColorRGB(animationId, frameId, rzkey, red, green, blue); - } - /// - /// Set the key to the specified key color for the specified frame where color - /// is not black. Animation is referenced by name. - /// - public static void SetKeyNonZeroColorRGBName(string path, int frameId, int rzkey, int red, int green, int blue) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginSetKeyNonZeroColorRGBName(lp_Path, frameId, rzkey, red, green, blue); - FreeIntPtr(lp_Path); - } - /// - /// D suffix for limited data types. - /// - public static double SetKeyNonZeroColorRGBNameD(string path, double frameId, double rzkey, double red, double green, double blue) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - double result = PluginSetKeyNonZeroColorRGBNameD(lp_Path, frameId, rzkey, red, green, blue); - FreeIntPtr(lp_Path); - return result; - } - /// - /// Set animation key by row and column to a static color for the given frame. - /// - /// - public static void SetKeyRowColumnColorName(string path, int frameId, int row, int column, int color) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginSetKeyRowColumnColorName(lp_Path, frameId, row, column, color); - FreeIntPtr(lp_Path); - } - /// - /// Set an array of animation keys to a static color for the given frame. Animation - /// is referenced by id. - /// - public static void SetKeysColor(int animationId, int frameId, int[] rzkeys, int keyCount, int color) - { - PluginSetKeysColor(animationId, frameId, rzkeys, keyCount, color); - } - /// - /// Set an array of animation keys to a static color for all frames. Animation - /// is referenced by id. - /// - public static void SetKeysColorAllFrames(int animationId, int[] rzkeys, int keyCount, int color) - { - PluginSetKeysColorAllFrames(animationId, rzkeys, keyCount, color); - } - /// - /// Set an array of animation keys to a static color for all frames. Animation - /// is referenced by name. - /// - public static void SetKeysColorAllFramesName(string path, int[] rzkeys, int keyCount, int color) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginSetKeysColorAllFramesName(lp_Path, rzkeys, keyCount, color); - FreeIntPtr(lp_Path); - } - /// - /// Set an array of animation keys to a static color for all frames. Animation - /// is referenced by id. - /// - public static void SetKeysColorAllFramesRGB(int animationId, int[] rzkeys, int keyCount, int red, int green, int blue) - { - PluginSetKeysColorAllFramesRGB(animationId, rzkeys, keyCount, red, green, blue); - } - /// - /// Set an array of animation keys to a static color for all frames. Animation - /// is referenced by name. - /// - public static void SetKeysColorAllFramesRGBName(string path, int[] rzkeys, int keyCount, int red, int green, int blue) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginSetKeysColorAllFramesRGBName(lp_Path, rzkeys, keyCount, red, green, blue); - FreeIntPtr(lp_Path); - } - /// - /// Set an array of animation keys to a static color for the given frame. - /// - public static void SetKeysColorName(string path, int frameId, int[] rzkeys, int keyCount, int color) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginSetKeysColorName(lp_Path, frameId, rzkeys, keyCount, color); - FreeIntPtr(lp_Path); - } - /// - /// Set an array of animation keys to a static color for the given frame. Animation - /// is referenced by id. - /// - public static void SetKeysColorRGB(int animationId, int frameId, int[] rzkeys, int keyCount, int red, int green, int blue) - { - PluginSetKeysColorRGB(animationId, frameId, rzkeys, keyCount, red, green, blue); - } - /// - /// Set an array of animation keys to a static color for the given frame. Animation - /// is referenced by name. - /// - public static void SetKeysColorRGBName(string path, int frameId, int[] rzkeys, int keyCount, int red, int green, int blue) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginSetKeysColorRGBName(lp_Path, frameId, rzkeys, keyCount, red, green, blue); - FreeIntPtr(lp_Path); - } - /// - /// Set an array of animation keys to a static color for the given frame if - /// the existing color is not already black. - /// - public static void SetKeysNonZeroColor(int animationId, int frameId, int[] rzkeys, int keyCount, int color) - { - PluginSetKeysNonZeroColor(animationId, frameId, rzkeys, keyCount, color); - } - /// - /// Set an array of animation keys to a static color for the given frame where - /// the color is not black. Animation is referenced by id. - /// - public static void SetKeysNonZeroColorAllFrames(int animationId, int[] rzkeys, int keyCount, int color) - { - PluginSetKeysNonZeroColorAllFrames(animationId, rzkeys, keyCount, color); - } - /// - /// Set an array of animation keys to a static color for all frames if the existing - /// color is not already black. Reference animation by name. - /// - public static void SetKeysNonZeroColorAllFramesName(string path, int[] rzkeys, int keyCount, int color) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginSetKeysNonZeroColorAllFramesName(lp_Path, rzkeys, keyCount, color); - FreeIntPtr(lp_Path); - } - /// - /// Set an array of animation keys to a static color for the given frame if - /// the existing color is not already black. Reference animation by name. - /// - public static void SetKeysNonZeroColorName(string path, int frameId, int[] rzkeys, int keyCount, int color) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginSetKeysNonZeroColorName(lp_Path, frameId, rzkeys, keyCount, color); - FreeIntPtr(lp_Path); - } - /// - /// Set an array of animation keys to a static color for the given frame where - /// the color is not black. Animation is referenced by id. - /// - public static void SetKeysNonZeroColorRGB(int animationId, int frameId, int[] rzkeys, int keyCount, int red, int green, int blue) - { - PluginSetKeysNonZeroColorRGB(animationId, frameId, rzkeys, keyCount, red, green, blue); - } - /// - /// Set an array of animation keys to a static color for the given frame where - /// the color is not black. Animation is referenced by name. - /// - public static void SetKeysNonZeroColorRGBName(string path, int frameId, int[] rzkeys, int keyCount, int red, int green, int blue) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginSetKeysNonZeroColorRGBName(lp_Path, frameId, rzkeys, keyCount, red, green, blue); - FreeIntPtr(lp_Path); - } - /// - /// Set an array of animation keys to a static color for the given frame where - /// the color is black. Animation is referenced by id. - /// - public static void SetKeysZeroColor(int animationId, int frameId, int[] rzkeys, int keyCount, int color) - { - PluginSetKeysZeroColor(animationId, frameId, rzkeys, keyCount, color); - } - /// - /// Set an array of animation keys to a static color for all frames where the - /// color is black. Animation is referenced by id. - /// - public static void SetKeysZeroColorAllFrames(int animationId, int[] rzkeys, int keyCount, int color) - { - PluginSetKeysZeroColorAllFrames(animationId, rzkeys, keyCount, color); - } - /// - /// Set an array of animation keys to a static color for all frames where the - /// color is black. Animation is referenced by name. - /// - public static void SetKeysZeroColorAllFramesName(string path, int[] rzkeys, int keyCount, int color) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginSetKeysZeroColorAllFramesName(lp_Path, rzkeys, keyCount, color); - FreeIntPtr(lp_Path); - } - /// - /// Set an array of animation keys to a static color for all frames where the - /// color is black. Animation is referenced by id. - /// - public static void SetKeysZeroColorAllFramesRGB(int animationId, int[] rzkeys, int keyCount, int red, int green, int blue) - { - PluginSetKeysZeroColorAllFramesRGB(animationId, rzkeys, keyCount, red, green, blue); - } - /// - /// Set an array of animation keys to a static color for all frames where the - /// color is black. Animation is referenced by name. - /// - public static void SetKeysZeroColorAllFramesRGBName(string path, int[] rzkeys, int keyCount, int red, int green, int blue) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginSetKeysZeroColorAllFramesRGBName(lp_Path, rzkeys, keyCount, red, green, blue); - FreeIntPtr(lp_Path); - } - /// - /// Set an array of animation keys to a static color for the given frame where - /// the color is black. Animation is referenced by name. - /// - public static void SetKeysZeroColorName(string path, int frameId, int[] rzkeys, int keyCount, int color) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginSetKeysZeroColorName(lp_Path, frameId, rzkeys, keyCount, color); - FreeIntPtr(lp_Path); - } - /// - /// Set an array of animation keys to a static color for the given frame where - /// the color is black. Animation is referenced by id. - /// - public static void SetKeysZeroColorRGB(int animationId, int frameId, int[] rzkeys, int keyCount, int red, int green, int blue) - { - PluginSetKeysZeroColorRGB(animationId, frameId, rzkeys, keyCount, red, green, blue); - } - /// - /// Set an array of animation keys to a static color for the given frame where - /// the color is black. Animation is referenced by name. - /// - public static void SetKeysZeroColorRGBName(string path, int frameId, int[] rzkeys, int keyCount, int red, int green, int blue) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginSetKeysZeroColorRGBName(lp_Path, frameId, rzkeys, keyCount, red, green, blue); - FreeIntPtr(lp_Path); - } - /// - /// Set animation key to a static color for the given frame where the color - /// is black. Animation is referenced by id. - /// - public static void SetKeyZeroColor(int animationId, int frameId, int rzkey, int color) - { - PluginSetKeyZeroColor(animationId, frameId, rzkey, color); - } - /// - /// Set animation key to a static color for the given frame where the color - /// is black. Animation is referenced by name. - /// - public static void SetKeyZeroColorName(string path, int frameId, int rzkey, int color) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginSetKeyZeroColorName(lp_Path, frameId, rzkey, color); - FreeIntPtr(lp_Path); - } - /// - /// D suffix for limited data types. - /// - public static double SetKeyZeroColorNameD(string path, double frameId, double rzkey, double color) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - double result = PluginSetKeyZeroColorNameD(lp_Path, frameId, rzkey, color); - FreeIntPtr(lp_Path); - return result; - } - /// - /// Set animation key to a static color for the given frame where the color - /// is black. Animation is referenced by id. - /// - public static void SetKeyZeroColorRGB(int animationId, int frameId, int rzkey, int red, int green, int blue) - { - PluginSetKeyZeroColorRGB(animationId, frameId, rzkey, red, green, blue); - } - /// - /// Set animation key to a static color for the given frame where the color - /// is black. Animation is referenced by name. - /// - public static void SetKeyZeroColorRGBName(string path, int frameId, int rzkey, int red, int green, int blue) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginSetKeyZeroColorRGBName(lp_Path, frameId, rzkey, red, green, blue); - FreeIntPtr(lp_Path); - } - /// - /// D suffix for limited data types. - /// - public static double SetKeyZeroColorRGBNameD(string path, double frameId, double rzkey, double red, double green, double blue) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - double result = PluginSetKeyZeroColorRGBNameD(lp_Path, frameId, rzkey, red, green, blue); - FreeIntPtr(lp_Path); - return result; - } - /// - /// Invokes the setup for a debug logging callback so that `stdout` is redirected - /// to the callback. This is used by `Unity` so that debug messages can appear - /// in the console window. - /// - public static void SetLogDelegate(IntPtr fp) - { - PluginSetLogDelegate(fp); - } - /// - /// Sets the target device to the static color. - /// - public static void SetStaticColor(int deviceType, int device, int color) - { - PluginSetStaticColor(deviceType, device, color); - } - /// - /// Sets all devices to the static color. - /// - public static void SetStaticColorAll(int color) - { - PluginSetStaticColorAll(color); - } - /// - /// Sets the target device to the static color. - /// - public static void StaticColor(int deviceType, int device, int color) - { - PluginStaticColor(deviceType, device, color); - } - /// - /// Sets all devices to the static color. - /// - public static void StaticColorAll(int color) - { - PluginStaticColorAll(color); - } - /// - /// D suffix for limited data types. - /// - public static double StaticColorD(double deviceType, double device, double color) - { - double result = PluginStaticColorD(deviceType, device, color); - return result; - } - /// - /// `PluginStopAll` will automatically stop all animations that are playing. - /// - /// - public static void StopAll() - { - PluginStopAll(); - } - /// - /// Stops animation playback if in progress. Returns the animation id upon success. - /// Returns negative one upon failure. - /// - public static int StopAnimation(int animationId) - { - int result = PluginStopAnimation(animationId); - return result; - } - /// - /// D suffix for limited data types. - /// - public static double StopAnimationD(double animationId) - { - double result = PluginStopAnimationD(animationId); - return result; - } - /// - /// `PluginStopAnimationName` automatically handles initializing the `ChromaSDK`. - /// The named `.chroma` animation file will be automatically opened. The animation - /// will stop if playing. - /// - public static void StopAnimationName(string path) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginStopAnimationName(lp_Path); - FreeIntPtr(lp_Path); - } - /// - /// D suffix for limited data types. - /// - public static double StopAnimationNameD(string path) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - double result = PluginStopAnimationNameD(lp_Path); - FreeIntPtr(lp_Path); - return result; - } - /// - /// `PluginStopAnimationType` automatically handles initializing the `ChromaSDK`. - /// If any animation is playing for the `deviceType` and `device` combination, - /// it will be stopped. - /// - public static void StopAnimationType(int deviceType, int device) - { - PluginStopAnimationType(deviceType, device); - } - /// - /// D suffix for limited data types. - /// - public static double StopAnimationTypeD(double deviceType, double device) - { - double result = PluginStopAnimationTypeD(deviceType, device); - return result; - } - /// - /// `PluginStopComposite` automatically handles initializing the `ChromaSDK`. - /// The named animation files for the `.chroma` set will be automatically opened. - /// The set of animations will be stopped if playing. - /// - public static void StopComposite(string name) - { - string str_Name = name; - IntPtr lp_Name = GetPathIntPtr(str_Name); - PluginStopComposite(lp_Name); - FreeIntPtr(lp_Name); - } - /// - /// D suffix for limited data types. - /// - public static double StopCompositeD(string name) - { - string str_Name = name; - IntPtr lp_Name = GetPathIntPtr(str_Name); - double result = PluginStopCompositeD(lp_Name); - FreeIntPtr(lp_Name); - return result; - } - /// - /// Return color1 - color2 - /// - public static int SubtractColor(int color1, int color2) - { - int result = PluginSubtractColor(color1, color2); - return result; - } - /// - /// Subtract the source color from the target color for the frame where the - /// target color is not black. Source and target are referenced by id. - /// - public static void SubtractNonZeroAllKeys(int sourceAnimationId, int targetAnimationId, int frameId) - { - PluginSubtractNonZeroAllKeys(sourceAnimationId, targetAnimationId, frameId); - } - /// - /// Subtract the source color from the target color for all frames where the - /// target color is not black. Source and target are referenced by id. - /// - public static void SubtractNonZeroAllKeysAllFrames(int sourceAnimationId, int targetAnimationId) - { - PluginSubtractNonZeroAllKeysAllFrames(sourceAnimationId, targetAnimationId); - } - /// - /// Subtract the source color from the target color for all frames where the - /// target color is not black. Source and target are referenced by name. - /// - public static void SubtractNonZeroAllKeysAllFramesName(string sourceAnimation, string targetAnimation) - { - string str_SourceAnimation = sourceAnimation; - IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); - string str_TargetAnimation = targetAnimation; - IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); - PluginSubtractNonZeroAllKeysAllFramesName(lp_SourceAnimation, lp_TargetAnimation); - FreeIntPtr(lp_SourceAnimation); - FreeIntPtr(lp_TargetAnimation); - } - /// - /// D suffix for limited data types. - /// - public static double SubtractNonZeroAllKeysAllFramesNameD(string sourceAnimation, string targetAnimation) - { - string str_SourceAnimation = sourceAnimation; - IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); - string str_TargetAnimation = targetAnimation; - IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); - double result = PluginSubtractNonZeroAllKeysAllFramesNameD(lp_SourceAnimation, lp_TargetAnimation); - FreeIntPtr(lp_SourceAnimation); - FreeIntPtr(lp_TargetAnimation); - return result; - } - /// - /// Subtract the source color from the target color for all frames where the - /// target color is not black starting at offset for the length of the source. - /// Source and target are referenced by id. - /// - public static void SubtractNonZeroAllKeysAllFramesOffset(int sourceAnimationId, int targetAnimationId, int offset) - { - PluginSubtractNonZeroAllKeysAllFramesOffset(sourceAnimationId, targetAnimationId, offset); - } - /// - /// Subtract the source color from the target color for all frames where the - /// target color is not black starting at offset for the length of the source. - /// Source and target are referenced by name. - /// - public static void SubtractNonZeroAllKeysAllFramesOffsetName(string sourceAnimation, string targetAnimation, int offset) - { - string str_SourceAnimation = sourceAnimation; - IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); - string str_TargetAnimation = targetAnimation; - IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); - PluginSubtractNonZeroAllKeysAllFramesOffsetName(lp_SourceAnimation, lp_TargetAnimation, offset); - FreeIntPtr(lp_SourceAnimation); - FreeIntPtr(lp_TargetAnimation); - } - /// - /// D suffix for limited data types. - /// - public static double SubtractNonZeroAllKeysAllFramesOffsetNameD(string sourceAnimation, string targetAnimation, double offset) - { - string str_SourceAnimation = sourceAnimation; - IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); - string str_TargetAnimation = targetAnimation; - IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); - double result = PluginSubtractNonZeroAllKeysAllFramesOffsetNameD(lp_SourceAnimation, lp_TargetAnimation, offset); - FreeIntPtr(lp_SourceAnimation); - FreeIntPtr(lp_TargetAnimation); - return result; - } - /// - /// Subtract the source color from the target color for the frame where the - /// target color is not black. Source and target are referenced by name. - /// - public static void SubtractNonZeroAllKeysName(string sourceAnimation, string targetAnimation, int frameId) - { - string str_SourceAnimation = sourceAnimation; - IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); - string str_TargetAnimation = targetAnimation; - IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); - PluginSubtractNonZeroAllKeysName(lp_SourceAnimation, lp_TargetAnimation, frameId); - FreeIntPtr(lp_SourceAnimation); - FreeIntPtr(lp_TargetAnimation); - } - /// - /// Subtract the source color from the target where color is not black for the - /// source frame and target offset frame, reference source and target by id. - /// - /// - public static void SubtractNonZeroAllKeysOffset(int sourceAnimationId, int targetAnimationId, int frameId, int offset) - { - PluginSubtractNonZeroAllKeysOffset(sourceAnimationId, targetAnimationId, frameId, offset); - } - /// - /// Subtract the source color from the target where color is not black for the - /// source frame and target offset frame, reference source and target by name. - /// - /// - public static void SubtractNonZeroAllKeysOffsetName(string sourceAnimation, string targetAnimation, int frameId, int offset) - { - string str_SourceAnimation = sourceAnimation; - IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); - string str_TargetAnimation = targetAnimation; - IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); - PluginSubtractNonZeroAllKeysOffsetName(lp_SourceAnimation, lp_TargetAnimation, frameId, offset); - FreeIntPtr(lp_SourceAnimation); - FreeIntPtr(lp_TargetAnimation); - } - /// - /// D suffix for limited data types. - /// - public static double SubtractNonZeroAllKeysOffsetNameD(string sourceAnimation, string targetAnimation, double frameId, double offset) - { - string str_SourceAnimation = sourceAnimation; - IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); - string str_TargetAnimation = targetAnimation; - IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); - double result = PluginSubtractNonZeroAllKeysOffsetNameD(lp_SourceAnimation, lp_TargetAnimation, frameId, offset); - FreeIntPtr(lp_SourceAnimation); - FreeIntPtr(lp_TargetAnimation); - return result; - } - /// - /// Subtract the source color from the target color where the target color is - /// not black for all frames. Reference source and target by id. - /// - public static void SubtractNonZeroTargetAllKeysAllFrames(int sourceAnimationId, int targetAnimationId) - { - PluginSubtractNonZeroTargetAllKeysAllFrames(sourceAnimationId, targetAnimationId); - } - /// - /// Subtract the source color from the target color where the target color is - /// not black for all frames. Reference source and target by name. - /// - public static void SubtractNonZeroTargetAllKeysAllFramesName(string sourceAnimation, string targetAnimation) - { - string str_SourceAnimation = sourceAnimation; - IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); - string str_TargetAnimation = targetAnimation; - IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); - PluginSubtractNonZeroTargetAllKeysAllFramesName(lp_SourceAnimation, lp_TargetAnimation); - FreeIntPtr(lp_SourceAnimation); - FreeIntPtr(lp_TargetAnimation); - } - /// - /// D suffix for limited data types. - /// - public static double SubtractNonZeroTargetAllKeysAllFramesNameD(string sourceAnimation, string targetAnimation) - { - string str_SourceAnimation = sourceAnimation; - IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); - string str_TargetAnimation = targetAnimation; - IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); - double result = PluginSubtractNonZeroTargetAllKeysAllFramesNameD(lp_SourceAnimation, lp_TargetAnimation); - FreeIntPtr(lp_SourceAnimation); - FreeIntPtr(lp_TargetAnimation); - return result; - } - /// - /// Subtract the source color from the target color where the target color is - /// not black for all frames starting at the target offset for the length of - /// the source. Reference source and target by id. - /// - public static void SubtractNonZeroTargetAllKeysAllFramesOffset(int sourceAnimationId, int targetAnimationId, int offset) - { - PluginSubtractNonZeroTargetAllKeysAllFramesOffset(sourceAnimationId, targetAnimationId, offset); - } - /// - /// Subtract the source color from the target color where the target color is - /// not black for all frames starting at the target offset for the length of - /// the source. Reference source and target by name. - /// - public static void SubtractNonZeroTargetAllKeysAllFramesOffsetName(string sourceAnimation, string targetAnimation, int offset) - { - string str_SourceAnimation = sourceAnimation; - IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); - string str_TargetAnimation = targetAnimation; - IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); - PluginSubtractNonZeroTargetAllKeysAllFramesOffsetName(lp_SourceAnimation, lp_TargetAnimation, offset); - FreeIntPtr(lp_SourceAnimation); - FreeIntPtr(lp_TargetAnimation); - } - /// - /// D suffix for limited data types. - /// - public static double SubtractNonZeroTargetAllKeysAllFramesOffsetNameD(string sourceAnimation, string targetAnimation, double offset) - { - string str_SourceAnimation = sourceAnimation; - IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); - string str_TargetAnimation = targetAnimation; - IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); - double result = PluginSubtractNonZeroTargetAllKeysAllFramesOffsetNameD(lp_SourceAnimation, lp_TargetAnimation, offset); - FreeIntPtr(lp_SourceAnimation); - FreeIntPtr(lp_TargetAnimation); - return result; - } - /// - /// Subtract the source color from the target color where the target color is - /// not black from the source frame to the target offset frame. Reference source - /// and target by id. - /// - public static void SubtractNonZeroTargetAllKeysOffset(int sourceAnimationId, int targetAnimationId, int frameId, int offset) - { - PluginSubtractNonZeroTargetAllKeysOffset(sourceAnimationId, targetAnimationId, frameId, offset); - } - /// - /// Subtract the source color from the target color where the target color is - /// not black from the source frame to the target offset frame. Reference source - /// and target by name. - /// - public static void SubtractNonZeroTargetAllKeysOffsetName(string sourceAnimation, string targetAnimation, int frameId, int offset) - { - string str_SourceAnimation = sourceAnimation; - IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); - string str_TargetAnimation = targetAnimation; - IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); - PluginSubtractNonZeroTargetAllKeysOffsetName(lp_SourceAnimation, lp_TargetAnimation, frameId, offset); - FreeIntPtr(lp_SourceAnimation); - FreeIntPtr(lp_TargetAnimation); - } - /// - /// D suffix for limited data types. - /// - public static double SubtractNonZeroTargetAllKeysOffsetNameD(string sourceAnimation, string targetAnimation, double frameId, double offset) - { - string str_SourceAnimation = sourceAnimation; - IntPtr lp_SourceAnimation = GetPathIntPtr(str_SourceAnimation); - string str_TargetAnimation = targetAnimation; - IntPtr lp_TargetAnimation = GetPathIntPtr(str_TargetAnimation); - double result = PluginSubtractNonZeroTargetAllKeysOffsetNameD(lp_SourceAnimation, lp_TargetAnimation, frameId, offset); - FreeIntPtr(lp_SourceAnimation); - FreeIntPtr(lp_TargetAnimation); - return result; - } - /// - /// Subtract all frames with the min RGB color where the animation color is - /// less than the min threshold AND with the max RGB color where the animation - /// is more than the max threshold. Animation is referenced by id. - /// - public static void SubtractThresholdColorsMinMaxAllFramesRGB(int animationId, int minThreshold, int minRed, int minGreen, int minBlue, int maxThreshold, int maxRed, int maxGreen, int maxBlue) - { - PluginSubtractThresholdColorsMinMaxAllFramesRGB(animationId, minThreshold, minRed, minGreen, minBlue, maxThreshold, maxRed, maxGreen, maxBlue); - } - /// - /// Subtract all frames with the min RGB color where the animation color is - /// less than the min threshold AND with the max RGB color where the animation - /// is more than the max threshold. Animation is referenced by name. - /// - public static void SubtractThresholdColorsMinMaxAllFramesRGBName(string path, int minThreshold, int minRed, int minGreen, int minBlue, int maxThreshold, int maxRed, int maxGreen, int maxBlue) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginSubtractThresholdColorsMinMaxAllFramesRGBName(lp_Path, minThreshold, minRed, minGreen, minBlue, maxThreshold, maxRed, maxGreen, maxBlue); - FreeIntPtr(lp_Path); - } - /// - /// D suffix for limited data types. - /// - public static double SubtractThresholdColorsMinMaxAllFramesRGBNameD(string path, double minThreshold, double minRed, double minGreen, double minBlue, double maxThreshold, double maxRed, double maxGreen, double maxBlue) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - double result = PluginSubtractThresholdColorsMinMaxAllFramesRGBNameD(lp_Path, minThreshold, minRed, minGreen, minBlue, maxThreshold, maxRed, maxGreen, maxBlue); - FreeIntPtr(lp_Path); - return result; - } - /// - /// Subtract the specified frame with the min RGB color where the animation - /// color is less than the min threshold AND with the max RGB color where the - /// animation is more than the max threshold. Animation is referenced by id. - /// - /// - public static void SubtractThresholdColorsMinMaxRGB(int animationId, int frameId, int minThreshold, int minRed, int minGreen, int minBlue, int maxThreshold, int maxRed, int maxGreen, int maxBlue) - { - PluginSubtractThresholdColorsMinMaxRGB(animationId, frameId, minThreshold, minRed, minGreen, minBlue, maxThreshold, maxRed, maxGreen, maxBlue); - } - /// - /// Subtract the specified frame with the min RGB color where the animation - /// color is less than the min threshold AND with the max RGB color where the - /// animation is more than the max threshold. Animation is referenced by name. - /// - /// - public static void SubtractThresholdColorsMinMaxRGBName(string path, int frameId, int minThreshold, int minRed, int minGreen, int minBlue, int maxThreshold, int maxRed, int maxGreen, int maxBlue) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginSubtractThresholdColorsMinMaxRGBName(lp_Path, frameId, minThreshold, minRed, minGreen, minBlue, maxThreshold, maxRed, maxGreen, maxBlue); - FreeIntPtr(lp_Path); - } - /// - /// D suffix for limited data types. - /// - public static double SubtractThresholdColorsMinMaxRGBNameD(string path, int frameId, int minThreshold, int minRed, int minGreen, int minBlue, int maxThreshold, int maxRed, int maxGreen, int maxBlue) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - double result = PluginSubtractThresholdColorsMinMaxRGBNameD(lp_Path, frameId, minThreshold, minRed, minGreen, minBlue, maxThreshold, maxRed, maxGreen, maxBlue); - FreeIntPtr(lp_Path); - return result; - } - /// - /// Trim the end of the animation. The length of the animation will be the lastFrameId - /// plus one. Reference the animation by id. - /// - public static void TrimEndFrames(int animationId, int lastFrameId) - { - PluginTrimEndFrames(animationId, lastFrameId); - } - /// - /// Trim the end of the animation. The length of the animation will be the lastFrameId - /// plus one. Reference the animation by name. - /// - public static void TrimEndFramesName(string path, int lastFrameId) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginTrimEndFramesName(lp_Path, lastFrameId); - FreeIntPtr(lp_Path); - } - /// - /// D suffix for limited data types. - /// - public static double TrimEndFramesNameD(string path, double lastFrameId) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - double result = PluginTrimEndFramesNameD(lp_Path, lastFrameId); - FreeIntPtr(lp_Path); - return result; - } - /// - /// Remove the frame from the animation. Reference animation by id. - /// - public static void TrimFrame(int animationId, int frameId) - { - PluginTrimFrame(animationId, frameId); - } - /// - /// Remove the frame from the animation. Reference animation by name. - /// - public static void TrimFrameName(string path, int frameId) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginTrimFrameName(lp_Path, frameId); - FreeIntPtr(lp_Path); - } - /// - /// D suffix for limited data types. - /// - public static double TrimFrameNameD(string path, double frameId) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - double result = PluginTrimFrameNameD(lp_Path, frameId); - FreeIntPtr(lp_Path); - return result; - } - /// - /// Trim the start of the animation starting at frame 0 for the number of frames. - /// Reference the animation by id. - /// - public static void TrimStartFrames(int animationId, int numberOfFrames) - { - PluginTrimStartFrames(animationId, numberOfFrames); - } - /// - /// Trim the start of the animation starting at frame 0 for the number of frames. - /// Reference the animation by name. - /// - public static void TrimStartFramesName(string path, int numberOfFrames) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginTrimStartFramesName(lp_Path, numberOfFrames); - FreeIntPtr(lp_Path); - } - /// - /// D suffix for limited data types. - /// - public static double TrimStartFramesNameD(string path, double numberOfFrames) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - double result = PluginTrimStartFramesNameD(lp_Path, numberOfFrames); - FreeIntPtr(lp_Path); - return result; - } - /// - /// Uninitializes the `ChromaSDK`. Returns 0 upon success. Returns negative - /// one upon failure. - /// - public static int Uninit() - { - int result = PluginUninit(); - return result; - } - /// - /// D suffix for limited data types. - /// - public static double UninitD() - { - double result = PluginUninitD(); - return result; - } - /// - /// Unloads `Chroma` effects to free up resources. Returns the animation id - /// upon success. Returns negative one upon failure. Reference the animation - /// by id. - /// - public static int UnloadAnimation(int animationId) - { - int result = PluginUnloadAnimation(animationId); - return result; - } - /// - /// D suffix for limited data types. - /// - public static double UnloadAnimationD(double animationId) - { - double result = PluginUnloadAnimationD(animationId); - return result; - } - /// - /// Unload the animation effects. Reference the animation by name. - /// - public static void UnloadAnimationName(string path) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginUnloadAnimationName(lp_Path); - FreeIntPtr(lp_Path); - } - /// - /// Unload the the composite set of animation effects. Reference the animation - /// by name. - /// - public static void UnloadComposite(string name) - { - string str_Name = name; - IntPtr lp_Name = GetPathIntPtr(str_Name); - PluginUnloadComposite(lp_Name); - FreeIntPtr(lp_Name); - } - /// - /// Unload the Razer Chroma SDK Library before exiting the application. - /// - public static void UnloadLibrarySDK() - { - PluginUnloadLibrarySDK(); - } - /// - /// Unload the Razer Chroma Streaming Plugin Library before exiting the application. - /// - /// - public static void UnloadLibraryStreamingPlugin() - { - PluginUnloadLibraryStreamingPlugin(); - } - /// - /// Updates the `frameIndex` of the `Chroma` animation referenced by id and - /// sets the `duration` (in seconds). The `color` is expected to be an array - /// of the dimensions for the `deviceType/device`. The `length` parameter is - /// the size of the `color` array. For `EChromaSDKDevice1DEnum` the array size - /// should be `MAX LEDS`. For `EChromaSDKDevice2DEnum` the array size should - /// be `MAX ROW` times `MAX COLUMN`. Keys are populated only for EChromaSDKDevice2DEnum::DE_Keyboard - /// and EChromaSDKDevice2DEnum::DE_KeyboardExtended. Keys will only use the - /// EChromaSDKDevice2DEnum::DE_Keyboard `MAX_ROW` times `MAX_COLUMN` keysLength. - /// - /// - public static int UpdateFrame(int animationId, int frameIndex, float duration, int[] colors, int length, int[] keys, int keysLength) - { - int result = PluginUpdateFrame(animationId, frameIndex, duration, colors, length, keys, keysLength); - return result; - } - /// - /// Update the `frameIndex` of the `Chroma` animation referenced by name and - /// sets the `duration` (in seconds). The `color` is expected to be an array - /// of the dimensions for the `deviceType/device`. The `length` parameter is - /// the size of the `color` array. For `EChromaSDKDevice1DEnum` the array size - /// should be `MAX LEDS`. For `EChromaSDKDevice2DEnum` the array size should - /// be `MAX ROW` times `MAX COLUMN`. Keys are populated only for EChromaSDKDevice2DEnum::DE_Keyboard - /// and EChromaSDKDevice2DEnum::DE_KeyboardExtended. Keys will only use the - /// EChromaSDKDevice2DEnum::DE_Keyboard `MAX_ROW` times `MAX_COLUMN` keysLength. - /// Returns the animation id upon success. Returns negative one upon failure. - /// - /// - public static int UpdateFrameName(string path, int frameIndex, float duration, int[] colors, int length, int[] keys, int keysLength) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - int result = PluginUpdateFrameName(lp_Path, frameIndex, duration, colors, length, keys, keysLength); - FreeIntPtr(lp_Path); - return result; - } - /// - /// When the idle animation flag is true, when no other animations are playing, - /// the idle animation will be used. The idle animation will not be affected - /// by the API calls to PluginIsPlaying, PluginStopAnimationType, PluginGetPlayingAnimationId, - /// and PluginGetPlayingAnimationCount. Then the idle animation flag is false, - /// the idle animation is disabled. `Device` uses `EChromaSDKDeviceEnum` enums. - /// - /// - public static void UseIdleAnimation(int device, bool flag) - { - PluginUseIdleAnimation(device, flag); - } - /// - /// Set idle animation flag for all devices. - /// - public static void UseIdleAnimations(bool flag) - { - PluginUseIdleAnimations(flag); - } - /// - /// Set preloading animation flag, which is set to true by default. Reference - /// animation by id. - /// - public static void UsePreloading(int animationId, bool flag) - { - PluginUsePreloading(animationId, flag); - } - /// - /// Set preloading animation flag, which is set to true by default. Reference - /// animation by name. - /// - public static void UsePreloadingName(string path, bool flag) - { - string str_Path = path; - IntPtr lp_Path = GetPathIntPtr(str_Path); - PluginUsePreloadingName(lp_Path, flag); - FreeIntPtr(lp_Path); - } - #endregion - - #region Private DLL Hooks - /// - /// Return the sum of colors - /// EXPORT_API int PluginAddColor(const int color1, const int color2); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern int PluginAddColor(int color1, int color2); - /// - /// Adds a frame to the `Chroma` animation and sets the `duration` (in seconds). - /// The `color` is expected to be an array of the dimensions for the `deviceType/device`. - /// The `length` parameter is the size of the `color` array. For `EChromaSDKDevice1DEnum` - /// the array size should be `MAX LEDS`. For `EChromaSDKDevice2DEnum` the array - /// size should be `MAX ROW` times `MAX COLUMN`. Returns the animation id upon - /// success. Returns negative one upon failure. - /// EXPORT_API int PluginAddFrame(int animationId, float duration, int* colors, int length); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern int PluginAddFrame(int animationId, float duration, int[] colors, int length); - /// - /// Add source color to target where color is not black for frame id, reference - /// source and target by id. - /// EXPORT_API void PluginAddNonZeroAllKeys(int sourceAnimationId, int targetAnimationId, int frameId); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginAddNonZeroAllKeys(int sourceAnimationId, int targetAnimationId, int frameId); - /// - /// Add source color to target where color is not black for all frames, reference - /// source and target by id. - /// EXPORT_API void PluginAddNonZeroAllKeysAllFrames(int sourceAnimationId, int targetAnimationId); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginAddNonZeroAllKeysAllFrames(int sourceAnimationId, int targetAnimationId); - /// - /// Add source color to target where color is not black for all frames, reference - /// source and target by name. - /// EXPORT_API void PluginAddNonZeroAllKeysAllFramesName(const char* sourceAnimation, const char* targetAnimation); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginAddNonZeroAllKeysAllFramesName(IntPtr sourceAnimation, IntPtr targetAnimation); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginAddNonZeroAllKeysAllFramesNameD(const char* sourceAnimation, const char* targetAnimation); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginAddNonZeroAllKeysAllFramesNameD(IntPtr sourceAnimation, IntPtr targetAnimation); - /// - /// Add source color to target where color is not black for all frames starting - /// at offset for the length of the source, reference source and target by - /// id. - /// EXPORT_API void PluginAddNonZeroAllKeysAllFramesOffset(int sourceAnimationId, int targetAnimationId, int offset); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginAddNonZeroAllKeysAllFramesOffset(int sourceAnimationId, int targetAnimationId, int offset); - /// - /// Add source color to target where color is not black for all frames starting - /// at offset for the length of the source, reference source and target by - /// name. - /// EXPORT_API void PluginAddNonZeroAllKeysAllFramesOffsetName(const char* sourceAnimation, const char* targetAnimation, int offset); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginAddNonZeroAllKeysAllFramesOffsetName(IntPtr sourceAnimation, IntPtr targetAnimation, int offset); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginAddNonZeroAllKeysAllFramesOffsetNameD(const char* sourceAnimation, const char* targetAnimation, double offset); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginAddNonZeroAllKeysAllFramesOffsetNameD(IntPtr sourceAnimation, IntPtr targetAnimation, double offset); - /// - /// Add source color to target where color is not black for frame id, reference - /// source and target by name. - /// EXPORT_API void PluginAddNonZeroAllKeysName(const char* sourceAnimation, const char* targetAnimation, int frameId); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginAddNonZeroAllKeysName(IntPtr sourceAnimation, IntPtr targetAnimation, int frameId); - /// - /// Add source color to target where color is not black for the source frame - /// and target offset frame, reference source and target by id. - /// EXPORT_API void PluginAddNonZeroAllKeysOffset(int sourceAnimationId, int targetAnimationId, int frameId, int offset); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginAddNonZeroAllKeysOffset(int sourceAnimationId, int targetAnimationId, int frameId, int offset); - /// - /// Add source color to target where color is not black for the source frame - /// and target offset frame, reference source and target by name. - /// EXPORT_API void PluginAddNonZeroAllKeysOffsetName(const char* sourceAnimation, const char* targetAnimation, int frameId, int offset); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginAddNonZeroAllKeysOffsetName(IntPtr sourceAnimation, IntPtr targetAnimation, int frameId, int offset); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginAddNonZeroAllKeysOffsetNameD(const char* sourceAnimation, const char* targetAnimation, double frameId, double offset); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginAddNonZeroAllKeysOffsetNameD(IntPtr sourceAnimation, IntPtr targetAnimation, double frameId, double offset); - /// - /// Add source color to target where the target color is not black for all frames, - /// reference source and target by id. - /// EXPORT_API void PluginAddNonZeroTargetAllKeysAllFrames(int sourceAnimationId, int targetAnimationId); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginAddNonZeroTargetAllKeysAllFrames(int sourceAnimationId, int targetAnimationId); - /// - /// Add source color to target where the target color is not black for all frames, - /// reference source and target by name. - /// EXPORT_API void PluginAddNonZeroTargetAllKeysAllFramesName(const char* sourceAnimation, const char* targetAnimation); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginAddNonZeroTargetAllKeysAllFramesName(IntPtr sourceAnimation, IntPtr targetAnimation); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginAddNonZeroTargetAllKeysAllFramesNameD(const char* sourceAnimation, const char* targetAnimation); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginAddNonZeroTargetAllKeysAllFramesNameD(IntPtr sourceAnimation, IntPtr targetAnimation); - /// - /// Add source color to target where the target color is not black for all frames - /// starting at offset for the length of the source, reference source and target - /// by id. - /// EXPORT_API void PluginAddNonZeroTargetAllKeysAllFramesOffset(int sourceAnimationId, int targetAnimationId, int offset); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginAddNonZeroTargetAllKeysAllFramesOffset(int sourceAnimationId, int targetAnimationId, int offset); - /// - /// Add source color to target where the target color is not black for all frames - /// starting at offset for the length of the source, reference source and target - /// by name. - /// EXPORT_API void PluginAddNonZeroTargetAllKeysAllFramesOffsetName(const char* sourceAnimation, const char* targetAnimation, int offset); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginAddNonZeroTargetAllKeysAllFramesOffsetName(IntPtr sourceAnimation, IntPtr targetAnimation, int offset); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginAddNonZeroTargetAllKeysAllFramesOffsetNameD(const char* sourceAnimation, const char* targetAnimation, double offset); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginAddNonZeroTargetAllKeysAllFramesOffsetNameD(IntPtr sourceAnimation, IntPtr targetAnimation, double offset); - /// - /// Add source color to target where target color is not blank from the source - /// frame to the target offset frame, reference source and target by id. - /// EXPORT_API void PluginAddNonZeroTargetAllKeysOffset(int sourceAnimationId, int targetAnimationId, int frameId, int offset); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginAddNonZeroTargetAllKeysOffset(int sourceAnimationId, int targetAnimationId, int frameId, int offset); - /// - /// Add source color to target where target color is not blank from the source - /// frame to the target offset frame, reference source and target by name. - /// - /// EXPORT_API void PluginAddNonZeroTargetAllKeysOffsetName(const char* sourceAnimation, const char* targetAnimation, int frameId, int offset); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginAddNonZeroTargetAllKeysOffsetName(IntPtr sourceAnimation, IntPtr targetAnimation, int frameId, int offset); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginAddNonZeroTargetAllKeysOffsetNameD(const char* sourceAnimation, const char* targetAnimation, double frameId, double offset); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginAddNonZeroTargetAllKeysOffsetNameD(IntPtr sourceAnimation, IntPtr targetAnimation, double frameId, double offset); - /// - /// Append all source frames to the target animation, reference source and target - /// by id. - /// EXPORT_API void PluginAppendAllFrames(int sourceAnimationId, int targetAnimationId); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginAppendAllFrames(int sourceAnimationId, int targetAnimationId); - /// - /// Append all source frames to the target animation, reference source and target - /// by name. - /// EXPORT_API void PluginAppendAllFramesName(const char* sourceAnimation, const char* targetAnimation); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginAppendAllFramesName(IntPtr sourceAnimation, IntPtr targetAnimation); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginAppendAllFramesNameD(const char* sourceAnimation, const char* targetAnimation); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginAppendAllFramesNameD(IntPtr sourceAnimation, IntPtr targetAnimation); - /// - /// `PluginClearAll` will issue a `CLEAR` effect for all devices. - /// EXPORT_API void PluginClearAll(); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginClearAll(); - /// - /// `PluginClearAnimationType` will issue a `CLEAR` effect for the given device. - /// - /// EXPORT_API void PluginClearAnimationType(int deviceType, int device); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginClearAnimationType(int deviceType, int device); - /// - /// `PluginCloseAll` closes all open animations so they can be reloaded from - /// disk. The set of animations will be stopped if playing. - /// EXPORT_API void PluginCloseAll(); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginCloseAll(); - /// - /// Closes the `Chroma` animation to free up resources referenced by id. Returns - /// the animation id upon success. Returns negative one upon failure. This - /// might be used while authoring effects if there was a change necessitating - /// re-opening the animation. The animation id can no longer be used once closed. - /// - /// EXPORT_API int PluginCloseAnimation(int animationId); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern int PluginCloseAnimation(int animationId); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginCloseAnimationD(double animationId); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginCloseAnimationD(double animationId); - /// - /// Closes the `Chroma` animation referenced by name so that the animation can - /// be reloaded from disk. - /// EXPORT_API void PluginCloseAnimationName(const char* path); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginCloseAnimationName(IntPtr path); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginCloseAnimationNameD(const char* path); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginCloseAnimationNameD(IntPtr path); - /// - /// `PluginCloseComposite` closes a set of animations so they can be reloaded - /// from disk. The set of animations will be stopped if playing. - /// EXPORT_API void PluginCloseComposite(const char* name); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginCloseComposite(IntPtr name); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginCloseCompositeD(const char* name); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginCloseCompositeD(IntPtr name); - /// - /// Copy source animation to target animation for the given frame. Source and - /// target are referenced by id. - /// EXPORT_API void PluginCopyAllKeys(int sourceAnimationId, int targetAnimationId, int frameId); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginCopyAllKeys(int sourceAnimationId, int targetAnimationId, int frameId); - /// - /// Copy source animation to target animation for the given frame. Source and - /// target are referenced by id. - /// EXPORT_API void PluginCopyAllKeysName(const char* sourceAnimation, const char* targetAnimation, int frameId); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginCopyAllKeysName(IntPtr sourceAnimation, IntPtr targetAnimation, int frameId); - /// - /// Copy animation to named target animation in memory. If target animation - /// exists, close first. Source is referenced by id. - /// EXPORT_API int PluginCopyAnimation(int sourceAnimationId, const char* targetAnimation); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern int PluginCopyAnimation(int sourceAnimationId, IntPtr targetAnimation); - /// - /// Copy animation to named target animation in memory. If target animation - /// exists, close first. Source is referenced by name. - /// EXPORT_API void PluginCopyAnimationName(const char* sourceAnimation, const char* targetAnimation); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginCopyAnimationName(IntPtr sourceAnimation, IntPtr targetAnimation); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginCopyAnimationNameD(const char* sourceAnimation, const char* targetAnimation); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginCopyAnimationNameD(IntPtr sourceAnimation, IntPtr targetAnimation); - /// - /// Copy blue channel to other channels for all frames. Intensity range is 0.0 - /// to 1.0. Reference the animation by id. - /// EXPORT_API void PluginCopyBlueChannelAllFrames(int animationId, float redIntensity, float greenIntensity); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginCopyBlueChannelAllFrames(int animationId, float redIntensity, float greenIntensity); - /// - /// Copy blue channel to other channels for all frames. Intensity range is 0.0 - /// to 1.0. Reference the animation by name. - /// EXPORT_API void PluginCopyBlueChannelAllFramesName(const char* path, float redIntensity, float greenIntensity); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginCopyBlueChannelAllFramesName(IntPtr path, float redIntensity, float greenIntensity); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginCopyBlueChannelAllFramesNameD(const char* path, double redIntensity, double greenIntensity); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginCopyBlueChannelAllFramesNameD(IntPtr path, double redIntensity, double greenIntensity); - /// - /// Copy green channel to other channels for all frames. Intensity range is - /// 0.0 to 1.0. Reference the animation by id. - /// EXPORT_API void PluginCopyGreenChannelAllFrames(int animationId, float redIntensity, float blueIntensity); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginCopyGreenChannelAllFrames(int animationId, float redIntensity, float blueIntensity); - /// - /// Copy green channel to other channels for all frames. Intensity range is - /// 0.0 to 1.0. Reference the animation by name. - /// EXPORT_API void PluginCopyGreenChannelAllFramesName(const char* path, float redIntensity, float blueIntensity); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginCopyGreenChannelAllFramesName(IntPtr path, float redIntensity, float blueIntensity); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginCopyGreenChannelAllFramesNameD(const char* path, double redIntensity, double blueIntensity); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginCopyGreenChannelAllFramesNameD(IntPtr path, double redIntensity, double blueIntensity); - /// - /// Copy animation key color from the source animation to the target animation - /// for the given frame. Reference the source and target by id. - /// EXPORT_API void PluginCopyKeyColor(int sourceAnimationId, int targetAnimationId, int frameId, int rzkey); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginCopyKeyColor(int sourceAnimationId, int targetAnimationId, int frameId, int rzkey); - /// - /// Copy animation key color from the source animation to the target animation - /// for all frames. Reference the source and target by id. - /// EXPORT_API void PluginCopyKeyColorAllFrames(int sourceAnimationId, int targetAnimationId, int rzkey); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginCopyKeyColorAllFrames(int sourceAnimationId, int targetAnimationId, int rzkey); - /// - /// Copy animation key color from the source animation to the target animation - /// for all frames. Reference the source and target by name. - /// EXPORT_API void PluginCopyKeyColorAllFramesName(const char* sourceAnimation, const char* targetAnimation, int rzkey); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginCopyKeyColorAllFramesName(IntPtr sourceAnimation, IntPtr targetAnimation, int rzkey); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginCopyKeyColorAllFramesNameD(const char* sourceAnimation, const char* targetAnimation, double rzkey); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginCopyKeyColorAllFramesNameD(IntPtr sourceAnimation, IntPtr targetAnimation, double rzkey); - /// - /// Copy animation key color from the source animation to the target animation - /// for all frames, starting at the offset for the length of the source animation. - /// Source and target are referenced by id. - /// EXPORT_API void PluginCopyKeyColorAllFramesOffset(int sourceAnimationId, int targetAnimationId, int rzkey, int offset); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginCopyKeyColorAllFramesOffset(int sourceAnimationId, int targetAnimationId, int rzkey, int offset); - /// - /// Copy animation key color from the source animation to the target animation - /// for all frames, starting at the offset for the length of the source animation. - /// Source and target are referenced by name. - /// EXPORT_API void PluginCopyKeyColorAllFramesOffsetName(const char* sourceAnimation, const char* targetAnimation, int rzkey, int offset); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginCopyKeyColorAllFramesOffsetName(IntPtr sourceAnimation, IntPtr targetAnimation, int rzkey, int offset); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginCopyKeyColorAllFramesOffsetNameD(const char* sourceAnimation, const char* targetAnimation, double rzkey, double offset); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginCopyKeyColorAllFramesOffsetNameD(IntPtr sourceAnimation, IntPtr targetAnimation, double rzkey, double offset); - /// - /// Copy animation key color from the source animation to the target animation - /// for the given frame. - /// EXPORT_API void PluginCopyKeyColorName(const char* sourceAnimation, const char* targetAnimation, int frameId, int rzkey); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginCopyKeyColorName(IntPtr sourceAnimation, IntPtr targetAnimation, int frameId, int rzkey); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginCopyKeyColorNameD(const char* sourceAnimation, const char* targetAnimation, double frameId, double rzkey); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginCopyKeyColorNameD(IntPtr sourceAnimation, IntPtr targetAnimation, double frameId, double rzkey); - /// - /// Copy animation color for a set of keys from the source animation to the - /// target animation for the given frame. Reference the source and target by - /// id. - /// EXPORT_API void PluginCopyKeysColor(int sourceAnimationId, int targetAnimationId, int frameId, const int* keys, int size); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginCopyKeysColor(int sourceAnimationId, int targetAnimationId, int frameId, int[] keys, int size); - /// - /// Copy animation color for a set of keys from the source animation to the - /// target animation for all frames. Reference the source and target by id. - /// - /// EXPORT_API void PluginCopyKeysColorAllFrames(int sourceAnimationId, int targetAnimationId, const int* keys, int size); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginCopyKeysColorAllFrames(int sourceAnimationId, int targetAnimationId, int[] keys, int size); - /// - /// Copy animation color for a set of keys from the source animation to the - /// target animation for all frames. Reference the source and target by name. - /// - /// EXPORT_API void PluginCopyKeysColorAllFramesName(const char* sourceAnimation, const char* targetAnimation, const int* keys, int size); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginCopyKeysColorAllFramesName(IntPtr sourceAnimation, IntPtr targetAnimation, int[] keys, int size); - /// - /// Copy animation color for a set of keys from the source animation to the - /// target animation for the given frame. Reference the source and target by - /// name. - /// EXPORT_API void PluginCopyKeysColorName(const char* sourceAnimation, const char* targetAnimation, int frameId, const int* keys, int size); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginCopyKeysColorName(IntPtr sourceAnimation, IntPtr targetAnimation, int frameId, int[] keys, int size); - /// - /// Copy animation color for a set of keys from the source animation to the - /// target animation from the source frame to the target frame. Reference the - /// source and target by id. - /// EXPORT_API void PluginCopyKeysColorOffset(int sourceAnimationId, int targetAnimationId, int sourceFrameId, int targetFrameId, const int* keys, int size); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginCopyKeysColorOffset(int sourceAnimationId, int targetAnimationId, int sourceFrameId, int targetFrameId, int[] keys, int size); - /// - /// Copy animation color for a set of keys from the source animation to the - /// target animation from the source frame to the target frame. Reference the - /// source and target by name. - /// EXPORT_API void PluginCopyKeysColorOffsetName(const char* sourceAnimation, const char* targetAnimation, int sourceFrameId, int targetFrameId, const int* keys, int size); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginCopyKeysColorOffsetName(IntPtr sourceAnimation, IntPtr targetAnimation, int sourceFrameId, int targetFrameId, int[] keys, int size); - /// - /// Copy source animation to target animation for the given frame. Source and - /// target are referenced by id. - /// EXPORT_API void PluginCopyNonZeroAllKeys(int sourceAnimationId, int targetAnimationId, int frameId); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginCopyNonZeroAllKeys(int sourceAnimationId, int targetAnimationId, int frameId); - /// - /// Copy nonzero colors from a source animation to a target animation for all - /// frames. Reference source and target by id. - /// EXPORT_API void PluginCopyNonZeroAllKeysAllFrames(int sourceAnimationId, int targetAnimationId); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginCopyNonZeroAllKeysAllFrames(int sourceAnimationId, int targetAnimationId); - /// - /// Copy nonzero colors from a source animation to a target animation for all - /// frames. Reference source and target by name. - /// EXPORT_API void PluginCopyNonZeroAllKeysAllFramesName(const char* sourceAnimation, const char* targetAnimation); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginCopyNonZeroAllKeysAllFramesName(IntPtr sourceAnimation, IntPtr targetAnimation); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginCopyNonZeroAllKeysAllFramesNameD(const char* sourceAnimation, const char* targetAnimation); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginCopyNonZeroAllKeysAllFramesNameD(IntPtr sourceAnimation, IntPtr targetAnimation); - /// - /// Copy nonzero colors from a source animation to a target animation for all - /// frames starting at the offset for the length of the source animation. The - /// source and target are referenced by id. - /// EXPORT_API void PluginCopyNonZeroAllKeysAllFramesOffset(int sourceAnimationId, int targetAnimationId, int offset); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginCopyNonZeroAllKeysAllFramesOffset(int sourceAnimationId, int targetAnimationId, int offset); - /// - /// Copy nonzero colors from a source animation to a target animation for all - /// frames starting at the offset for the length of the source animation. The - /// source and target are referenced by name. - /// EXPORT_API void PluginCopyNonZeroAllKeysAllFramesOffsetName(const char* sourceAnimation, const char* targetAnimation, int offset); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginCopyNonZeroAllKeysAllFramesOffsetName(IntPtr sourceAnimation, IntPtr targetAnimation, int offset); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginCopyNonZeroAllKeysAllFramesOffsetNameD(const char* sourceAnimation, const char* targetAnimation, double offset); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginCopyNonZeroAllKeysAllFramesOffsetNameD(IntPtr sourceAnimation, IntPtr targetAnimation, double offset); - /// - /// Copy nonzero colors from source animation to target animation for the specified - /// frame. Source and target are referenced by id. - /// EXPORT_API void PluginCopyNonZeroAllKeysName(const char* sourceAnimation, const char* targetAnimation, int frameId); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginCopyNonZeroAllKeysName(IntPtr sourceAnimation, IntPtr targetAnimation, int frameId); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginCopyNonZeroAllKeysNameD(const char* sourceAnimation, const char* targetAnimation, double frameId); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginCopyNonZeroAllKeysNameD(IntPtr sourceAnimation, IntPtr targetAnimation, double frameId); - /// - /// Copy nonzero colors from the source animation to the target animation from - /// the source frame to the target offset frame. Source and target are referenced - /// by id. - /// EXPORT_API void PluginCopyNonZeroAllKeysOffset(int sourceAnimationId, int targetAnimationId, int frameId, int offset); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginCopyNonZeroAllKeysOffset(int sourceAnimationId, int targetAnimationId, int frameId, int offset); - /// - /// Copy nonzero colors from the source animation to the target animation from - /// the source frame to the target offset frame. Source and target are referenced - /// by name. - /// EXPORT_API void PluginCopyNonZeroAllKeysOffsetName(const char* sourceAnimation, const char* targetAnimation, int frameId, int offset); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginCopyNonZeroAllKeysOffsetName(IntPtr sourceAnimation, IntPtr targetAnimation, int frameId, int offset); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginCopyNonZeroAllKeysOffsetNameD(const char* sourceAnimation, const char* targetAnimation, double frameId, double offset); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginCopyNonZeroAllKeysOffsetNameD(IntPtr sourceAnimation, IntPtr targetAnimation, double frameId, double offset); - /// - /// Copy animation key color from the source animation to the target animation - /// for the given frame where color is not zero. - /// EXPORT_API void PluginCopyNonZeroKeyColor(int sourceAnimationId, int targetAnimationId, int frameId, int rzkey); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginCopyNonZeroKeyColor(int sourceAnimationId, int targetAnimationId, int frameId, int rzkey); - /// - /// Copy animation key color from the source animation to the target animation - /// for the given frame where color is not zero. - /// EXPORT_API void PluginCopyNonZeroKeyColorName(const char* sourceAnimation, const char* targetAnimation, int frameId, int rzkey); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginCopyNonZeroKeyColorName(IntPtr sourceAnimation, IntPtr targetAnimation, int frameId, int rzkey); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginCopyNonZeroKeyColorNameD(const char* sourceAnimation, const char* targetAnimation, double frameId, double rzkey); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginCopyNonZeroKeyColorNameD(IntPtr sourceAnimation, IntPtr targetAnimation, double frameId, double rzkey); - /// - /// Copy nonzero colors from the source animation to the target animation where - /// the target color is nonzero for the specified frame. Source and target - /// are referenced by id. - /// EXPORT_API void PluginCopyNonZeroTargetAllKeys(int sourceAnimationId, int targetAnimationId, int frameId); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginCopyNonZeroTargetAllKeys(int sourceAnimationId, int targetAnimationId, int frameId); - /// - /// Copy nonzero colors from the source animation to the target animation where - /// the target color is nonzero for all frames. Source and target are referenced - /// by id. - /// EXPORT_API void PluginCopyNonZeroTargetAllKeysAllFrames(int sourceAnimationId, int targetAnimationId); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginCopyNonZeroTargetAllKeysAllFrames(int sourceAnimationId, int targetAnimationId); - /// - /// Copy nonzero colors from the source animation to the target animation where - /// the target color is nonzero for all frames. Source and target are referenced - /// by name. - /// EXPORT_API void PluginCopyNonZeroTargetAllKeysAllFramesName(const char* sourceAnimation, const char* targetAnimation); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginCopyNonZeroTargetAllKeysAllFramesName(IntPtr sourceAnimation, IntPtr targetAnimation); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginCopyNonZeroTargetAllKeysAllFramesNameD(const char* sourceAnimation, const char* targetAnimation); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginCopyNonZeroTargetAllKeysAllFramesNameD(IntPtr sourceAnimation, IntPtr targetAnimation); - /// - /// Copy nonzero colors from the source animation to the target animation where - /// the target color is nonzero for all frames. Source and target are referenced - /// by name. - /// EXPORT_API void PluginCopyNonZeroTargetAllKeysAllFramesOffset(int sourceAnimationId, int targetAnimationId, int offset); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginCopyNonZeroTargetAllKeysAllFramesOffset(int sourceAnimationId, int targetAnimationId, int offset); - /// - /// Copy nonzero colors from the source animation to the target animation where - /// the target color is nonzero for all frames starting at the target offset - /// for the length of the source animation. Source and target animations are - /// referenced by name. - /// EXPORT_API void PluginCopyNonZeroTargetAllKeysAllFramesOffsetName(const char* sourceAnimation, const char* targetAnimation, int offset); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginCopyNonZeroTargetAllKeysAllFramesOffsetName(IntPtr sourceAnimation, IntPtr targetAnimation, int offset); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginCopyNonZeroTargetAllKeysAllFramesOffsetNameD(const char* sourceAnimation, const char* targetAnimation, double offset); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginCopyNonZeroTargetAllKeysAllFramesOffsetNameD(IntPtr sourceAnimation, IntPtr targetAnimation, double offset); - /// - /// Copy nonzero colors from the source animation to the target animation where - /// the target color is nonzero for the specified frame. The source and target - /// are referenced by name. - /// EXPORT_API void PluginCopyNonZeroTargetAllKeysName(const char* sourceAnimation, const char* targetAnimation, int frameId); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginCopyNonZeroTargetAllKeysName(IntPtr sourceAnimation, IntPtr targetAnimation, int frameId); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginCopyNonZeroTargetAllKeysNameD(const char* sourceAnimation, const char* targetAnimation, double frameId); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginCopyNonZeroTargetAllKeysNameD(IntPtr sourceAnimation, IntPtr targetAnimation, double frameId); - /// - /// Copy nonzero colors from the source animation to the target animation where - /// the target color is nonzero for the specified source frame and target offset - /// frame. The source and target are referenced by id. - /// EXPORT_API void PluginCopyNonZeroTargetAllKeysOffset(int sourceAnimationId, int targetAnimationId, int frameId, int offset); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginCopyNonZeroTargetAllKeysOffset(int sourceAnimationId, int targetAnimationId, int frameId, int offset); - /// - /// Copy nonzero colors from the source animation to the target animation where - /// the target color is nonzero for the specified source frame and target offset - /// frame. The source and target are referenced by name. - /// EXPORT_API void PluginCopyNonZeroTargetAllKeysOffsetName(const char* sourceAnimation, const char* targetAnimation, int frameId, int offset); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginCopyNonZeroTargetAllKeysOffsetName(IntPtr sourceAnimation, IntPtr targetAnimation, int frameId, int offset); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginCopyNonZeroTargetAllKeysOffsetNameD(const char* sourceAnimation, const char* targetAnimation, double frameId, double offset); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginCopyNonZeroTargetAllKeysOffsetNameD(IntPtr sourceAnimation, IntPtr targetAnimation, double frameId, double offset); - /// - /// Copy nonzero colors from the source animation to the target animation where - /// the target color is zero for all frames. Source and target are referenced - /// by id. - /// EXPORT_API void PluginCopyNonZeroTargetZeroAllKeysAllFrames(int sourceAnimationId, int targetAnimationId); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginCopyNonZeroTargetZeroAllKeysAllFrames(int sourceAnimationId, int targetAnimationId); - /// - /// Copy nonzero colors from the source animation to the target animation where - /// the target color is zero for all frames. Source and target are referenced - /// by name. - /// EXPORT_API void PluginCopyNonZeroTargetZeroAllKeysAllFramesName(const char* sourceAnimation, const char* targetAnimation); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginCopyNonZeroTargetZeroAllKeysAllFramesName(IntPtr sourceAnimation, IntPtr targetAnimation); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginCopyNonZeroTargetZeroAllKeysAllFramesNameD(const char* sourceAnimation, const char* targetAnimation); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginCopyNonZeroTargetZeroAllKeysAllFramesNameD(IntPtr sourceAnimation, IntPtr targetAnimation); - /// - /// Copy red channel to other channels for all frames. Intensity range is 0.0 - /// to 1.0. Reference the animation by id. - /// EXPORT_API void PluginCopyRedChannelAllFrames(int animationId, float greenIntensity, float blueIntensity); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginCopyRedChannelAllFrames(int animationId, float greenIntensity, float blueIntensity); - /// - /// Copy green channel to other channels for all frames. Intensity range is - /// 0.0 to 1.0. Reference the animation by name. - /// EXPORT_API void PluginCopyRedChannelAllFramesName(const char* path, float greenIntensity, float blueIntensity); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginCopyRedChannelAllFramesName(IntPtr path, float greenIntensity, float blueIntensity); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginCopyRedChannelAllFramesNameD(const char* path, double greenIntensity, double blueIntensity); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginCopyRedChannelAllFramesNameD(IntPtr path, double greenIntensity, double blueIntensity); - /// - /// Copy zero colors from source animation to target animation for the frame. - /// Source and target are referenced by id. - /// EXPORT_API void PluginCopyZeroAllKeys(int sourceAnimationId, int targetAnimationId, int frameId); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginCopyZeroAllKeys(int sourceAnimationId, int targetAnimationId, int frameId); - /// - /// Copy zero colors from source animation to target animation for all frames. - /// Source and target are referenced by id. - /// EXPORT_API void PluginCopyZeroAllKeysAllFrames(int sourceAnimationId, int targetAnimationId); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginCopyZeroAllKeysAllFrames(int sourceAnimationId, int targetAnimationId); - /// - /// Copy zero colors from source animation to target animation for all frames. - /// Source and target are referenced by name. - /// EXPORT_API void PluginCopyZeroAllKeysAllFramesName(const char* sourceAnimation, const char* targetAnimation); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginCopyZeroAllKeysAllFramesName(IntPtr sourceAnimation, IntPtr targetAnimation); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginCopyZeroAllKeysAllFramesNameD(const char* sourceAnimation, const char* targetAnimation); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginCopyZeroAllKeysAllFramesNameD(IntPtr sourceAnimation, IntPtr targetAnimation); - /// - /// Copy zero colors from source animation to target animation for all frames - /// starting at the target offset for the length of the source animation. Source - /// and target are referenced by id. - /// EXPORT_API void PluginCopyZeroAllKeysAllFramesOffset(int sourceAnimationId, int targetAnimationId, int offset); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginCopyZeroAllKeysAllFramesOffset(int sourceAnimationId, int targetAnimationId, int offset); - /// - /// Copy zero colors from source animation to target animation for all frames - /// starting at the target offset for the length of the source animation. Source - /// and target are referenced by name. - /// EXPORT_API void PluginCopyZeroAllKeysAllFramesOffsetName(const char* sourceAnimation, const char* targetAnimation, int offset); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginCopyZeroAllKeysAllFramesOffsetName(IntPtr sourceAnimation, IntPtr targetAnimation, int offset); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginCopyZeroAllKeysAllFramesOffsetNameD(const char* sourceAnimation, const char* targetAnimation, double offset); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginCopyZeroAllKeysAllFramesOffsetNameD(IntPtr sourceAnimation, IntPtr targetAnimation, double offset); - /// - /// Copy zero colors from source animation to target animation for the frame. - /// Source and target are referenced by name. - /// EXPORT_API void PluginCopyZeroAllKeysName(const char* sourceAnimation, const char* targetAnimation, int frameId); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginCopyZeroAllKeysName(IntPtr sourceAnimation, IntPtr targetAnimation, int frameId); - /// - /// Copy zero colors from source animation to target animation for the frame - /// id starting at the target offset for the length of the source animation. - /// Source and target are referenced by id. - /// EXPORT_API void PluginCopyZeroAllKeysOffset(int sourceAnimationId, int targetAnimationId, int frameId, int offset); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginCopyZeroAllKeysOffset(int sourceAnimationId, int targetAnimationId, int frameId, int offset); - /// - /// Copy zero colors from source animation to target animation for the frame - /// id starting at the target offset for the length of the source animation. - /// Source and target are referenced by name. - /// EXPORT_API void PluginCopyZeroAllKeysOffsetName(const char* sourceAnimation, const char* targetAnimation, int frameId, int offset); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginCopyZeroAllKeysOffsetName(IntPtr sourceAnimation, IntPtr targetAnimation, int frameId, int offset); - /// - /// Copy zero key color from source animation to target animation for the specified - /// frame. Source and target are referenced by id. - /// EXPORT_API void PluginCopyZeroKeyColor(int sourceAnimationId, int targetAnimationId, int frameId, int rzkey); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginCopyZeroKeyColor(int sourceAnimationId, int targetAnimationId, int frameId, int rzkey); - /// - /// Copy zero key color from source animation to target animation for the specified - /// frame. Source and target are referenced by name. - /// EXPORT_API void PluginCopyZeroKeyColorName(const char* sourceAnimation, const char* targetAnimation, int frameId, int rzkey); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginCopyZeroKeyColorName(IntPtr sourceAnimation, IntPtr targetAnimation, int frameId, int rzkey); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginCopyZeroKeyColorNameD(const char* sourceAnimation, const char* targetAnimation, double frameId, double rzkey); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginCopyZeroKeyColorNameD(IntPtr sourceAnimation, IntPtr targetAnimation, double frameId, double rzkey); - /// - /// Copy nonzero color from source animation to target animation where target - /// is zero for the frame. Source and target are referenced by id. - /// EXPORT_API void PluginCopyZeroTargetAllKeys(int sourceAnimationId, int targetAnimationId, int frameId); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginCopyZeroTargetAllKeys(int sourceAnimationId, int targetAnimationId, int frameId); - /// - /// Copy nonzero color from source animation to target animation where target - /// is zero for all frames. Source and target are referenced by id. - /// EXPORT_API void PluginCopyZeroTargetAllKeysAllFrames(int sourceAnimationId, int targetAnimationId); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginCopyZeroTargetAllKeysAllFrames(int sourceAnimationId, int targetAnimationId); - /// - /// Copy nonzero color from source animation to target animation where target - /// is zero for all frames. Source and target are referenced by name. - /// EXPORT_API void PluginCopyZeroTargetAllKeysAllFramesName(const char* sourceAnimation, const char* targetAnimation); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginCopyZeroTargetAllKeysAllFramesName(IntPtr sourceAnimation, IntPtr targetAnimation); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginCopyZeroTargetAllKeysAllFramesNameD(const char* sourceAnimation, const char* targetAnimation); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginCopyZeroTargetAllKeysAllFramesNameD(IntPtr sourceAnimation, IntPtr targetAnimation); - /// - /// Copy nonzero color from source animation to target animation where target - /// is zero for the frame. Source and target are referenced by name. - /// EXPORT_API void PluginCopyZeroTargetAllKeysName(const char* sourceAnimation, const char* targetAnimation, int frameId); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginCopyZeroTargetAllKeysName(IntPtr sourceAnimation, IntPtr targetAnimation, int frameId); - /// - /// Direct access to low level API. - /// EXPORT_API RZRESULT PluginCoreCreateChromaLinkEffect(ChromaSDK::ChromaLink::EFFECT_TYPE Effect, PRZPARAM pParam, RZEFFECTID* pEffectId); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern int PluginCoreCreateChromaLinkEffect(int effect, IntPtr pParam, out Guid pEffectId); - /// - /// Direct access to low level API. - /// EXPORT_API RZRESULT PluginCoreCreateEffect(RZDEVICEID DeviceId, ChromaSDK::EFFECT_TYPE Effect, PRZPARAM pParam, RZEFFECTID* pEffectId); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern int PluginCoreCreateEffect(Guid deviceId, int effect, IntPtr pParam, out Guid pEffectId); - /// - /// Direct access to low level API. - /// EXPORT_API RZRESULT PluginCoreCreateHeadsetEffect(ChromaSDK::Headset::EFFECT_TYPE Effect, PRZPARAM pParam, RZEFFECTID* pEffectId); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern int PluginCoreCreateHeadsetEffect(int effect, IntPtr pParam, out Guid pEffectId); - /// - /// Direct access to low level API. - /// EXPORT_API RZRESULT PluginCoreCreateKeyboardEffect(ChromaSDK::Keyboard::EFFECT_TYPE Effect, PRZPARAM pParam, RZEFFECTID* pEffectId); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern int PluginCoreCreateKeyboardEffect(int effect, IntPtr pParam, out Guid pEffectId); - /// - /// Direct access to low level API. - /// EXPORT_API RZRESULT PluginCoreCreateKeypadEffect(ChromaSDK::Keypad::EFFECT_TYPE Effect, PRZPARAM pParam, RZEFFECTID* pEffectId); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern int PluginCoreCreateKeypadEffect(int effect, IntPtr pParam, out Guid pEffectId); - /// - /// Direct access to low level API. - /// EXPORT_API RZRESULT PluginCoreCreateMouseEffect(ChromaSDK::Mouse::EFFECT_TYPE Effect, PRZPARAM pParam, RZEFFECTID* pEffectId); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern int PluginCoreCreateMouseEffect(int effect, IntPtr pParam, out Guid pEffectId); - /// - /// Direct access to low level API. - /// EXPORT_API RZRESULT PluginCoreCreateMousepadEffect(ChromaSDK::Mousepad::EFFECT_TYPE Effect, PRZPARAM pParam, RZEFFECTID* pEffectId); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern int PluginCoreCreateMousepadEffect(int effect, IntPtr pParam, out Guid pEffectId); - /// - /// Direct access to low level API. - /// EXPORT_API RZRESULT PluginCoreDeleteEffect(RZEFFECTID EffectId); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern int PluginCoreDeleteEffect(Guid effectId); - /// - /// Direct access to low level API. - /// EXPORT_API RZRESULT PluginCoreInit(); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern int PluginCoreInit(); - /// - /// Direct access to low level API. - /// EXPORT_API RZRESULT PluginCoreInitSDK(ChromaSDK::APPINFOTYPE* AppInfo); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern int PluginCoreInitSDK(ref ChromaSDK.APPINFOTYPE appInfo); - /// - /// Direct access to low level API. - /// EXPORT_API RZRESULT PluginCoreQueryDevice(RZDEVICEID DeviceId, ChromaSDK::DEVICE_INFO_TYPE& DeviceInfo); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern int PluginCoreQueryDevice(Guid deviceId, out DEVICE_INFO_TYPE deviceInfo); - /// - /// Direct access to low level API. - /// EXPORT_API RZRESULT PluginCoreSetEffect(RZEFFECTID EffectId); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern int PluginCoreSetEffect(Guid effectId); - /// - /// Begin broadcasting Chroma RGB data using the stored stream key as the endpoint. - /// Intended for Cloud Gaming Platforms, restore the streaming key when the - /// game instance is launched to continue streaming. streamId is a null terminated - /// string streamKey is a null terminated string StreamGetStatus() should return - /// the READY status to use this method. - /// EXPORT_API bool PluginCoreStreamBroadcast(const char* streamId, const char* streamKey); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - private static extern bool PluginCoreStreamBroadcast(IntPtr streamId, IntPtr streamKey); - /// - /// End broadcasting Chroma RGB data. StreamGetStatus() should return the BROADCASTING - /// status to use this method. - /// EXPORT_API bool PluginCoreStreamBroadcastEnd(); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - private static extern bool PluginCoreStreamBroadcastEnd(); - /// - /// shortcode: Pass the address of a preallocated character buffer to get the - /// streaming auth code. The buffer should have a minimum length of 6. length: - /// Length will return as zero if the streaming auth code could not be obtained. - /// If length is greater than zero, it will be the length of the returned streaming - /// auth code. Once you have the shortcode, it should be shown to the user - /// so they can associate the stream with their Razer ID StreamGetStatus() - /// should return the READY status before invoking this method. platform: is - /// the null terminated string that identifies the source of the stream: { - /// GEFORCE_NOW, LUNA, STADIA, GAME_PASS } title: is the null terminated string - /// that identifies the application or game. - /// EXPORT_API void PluginCoreStreamGetAuthShortcode(char* shortcode, unsigned char* length, const wchar_t* platform, const wchar_t* title); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginCoreStreamGetAuthShortcode(IntPtr shortcode, out byte length, IntPtr platform, IntPtr title); - /// - /// focus: Pass the address of a preallocated character buffer to get the stream - /// focus. The buffer should have a length of 48 length: Length will return - /// as zero if the stream focus could not be obtained. If length is greater - /// than zero, it will be the length of the returned stream focus. - /// EXPORT_API bool PluginCoreStreamGetFocus(char* focus, unsigned char* length); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - private static extern bool PluginCoreStreamGetFocus(IntPtr focus, out byte length); - /// - /// Intended for Cloud Gaming Platforms, store the stream id to persist in user - /// preferences to continue streaming if the game is suspended or closed. shortcode: - /// The shortcode is a null terminated string. Use the shortcode that authorized - /// the stream to obtain the stream id. streamId should be a preallocated buffer - /// to get the stream key. The buffer should have a length of 48. length: Length - /// will return zero if the key could not be obtained. If the length is greater - /// than zero, it will be the length of the returned streaming id. Retrieve - /// the stream id after authorizing the shortcode. The authorization window - /// will expire in 5 minutes. Be sure to save the stream key before the window - /// expires. StreamGetStatus() should return the READY status to use this method. - /// - /// EXPORT_API void PluginCoreStreamGetId(const char* shortcode, char* streamId, unsigned char* length); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginCoreStreamGetId(IntPtr shortcode, IntPtr streamId, out byte length); - /// - /// Intended for Cloud Gaming Platforms, store the streaming key to persist - /// in user preferences to continue streaming if the game is suspended or closed. - /// shortcode: The shortcode is a null terminated string. Use the shortcode - /// that authorized the stream to obtain the stream key. If the status is in - /// the BROADCASTING or WATCHING state, passing a NULL shortcode will return - /// the active streamId. streamKey should be a preallocated buffer to get the - /// stream key. The buffer should have a length of 48. length: Length will - /// return zero if the key could not be obtained. If the length is greater - /// than zero, it will be the length of the returned streaming key. Retrieve - /// the stream key after authorizing the shortcode. The authorization window - /// will expire in 5 minutes. Be sure to save the stream key before the window - /// expires. StreamGetStatus() should return the READY status to use this method. - /// - /// EXPORT_API void PluginCoreStreamGetKey(const char* shortcode, char* streamKey, unsigned char* length); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginCoreStreamGetKey(IntPtr shortcode, IntPtr streamKey, out byte length); - /// - /// Returns StreamStatus, the current status of the service - /// EXPORT_API ChromaSDK::Stream::StreamStatusType PluginCoreStreamGetStatus(); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern ChromaSDK.Stream.StreamStatusType PluginCoreStreamGetStatus(); - /// - /// Convert StreamStatusType to a printable string - /// EXPORT_API const char* PluginCoreStreamGetStatusString(ChromaSDK::Stream::StreamStatusType status); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern IntPtr PluginCoreStreamGetStatusString(ChromaSDK.Stream.StreamStatusType status); - /// - /// This prevents the stream id and stream key from being obtained through the - /// shortcode. This closes the auth window. shortcode is a null terminated - /// string. StreamGetStatus() should return the READY status to use this method. - /// returns success when shortcode has been released - /// EXPORT_API bool PluginCoreStreamReleaseShortcode(const char* shortcode); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - private static extern bool PluginCoreStreamReleaseShortcode(IntPtr shortcode); - /// - /// The focus is a null terminated string. Set the focus identifer for the application - /// designated to automatically change the streaming state. Returns true on - /// success. - /// EXPORT_API bool PluginCoreStreamSetFocus(const char* focus); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - private static extern bool PluginCoreStreamSetFocus(IntPtr focus); - /// - /// Returns true if the Chroma streaming is supported. If false is returned, - /// avoid calling stream methods. - /// EXPORT_API bool PluginCoreStreamSupportsStreaming(); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - private static extern bool PluginCoreStreamSupportsStreaming(); - /// - /// Begin watching the Chroma RGB data using streamID parameter. streamId is - /// a null terminated string. StreamGetStatus() should return the READY status - /// to use this method. - /// EXPORT_API bool PluginCoreStreamWatch(const char* streamId, unsigned long long timestamp); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - private static extern bool PluginCoreStreamWatch(IntPtr streamId, ulong timestamp); - /// - /// End watching Chroma RGB data stream. StreamGetStatus() should return the - /// WATCHING status to use this method. - /// EXPORT_API bool PluginCoreStreamWatchEnd(); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - private static extern bool PluginCoreStreamWatchEnd(); - /// - /// Direct access to low level API. - /// EXPORT_API RZRESULT PluginCoreUnInit(); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern int PluginCoreUnInit(); - /// - /// Creates a `Chroma` animation at the given path. The `deviceType` parameter - /// uses `EChromaSDKDeviceTypeEnum` as an integer. The `device` parameter uses - /// `EChromaSDKDevice1DEnum` or `EChromaSDKDevice2DEnum` as an integer, respective - /// to the `deviceType`. Returns the animation id upon success. Returns negative - /// one upon failure. Saves a `Chroma` animation file with the `.chroma` extension - /// at the given path. Returns the animation id upon success. Returns negative - /// one upon failure. - /// EXPORT_API int PluginCreateAnimation(const char* path, int deviceType, int device); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern int PluginCreateAnimation(IntPtr path, int deviceType, int device); - /// - /// Creates a `Chroma` animation in memory without creating a file. The `deviceType` - /// parameter uses `EChromaSDKDeviceTypeEnum` as an integer. The `device` parameter - /// uses `EChromaSDKDevice1DEnum` or `EChromaSDKDevice2DEnum` as an integer, - /// respective to the `deviceType`. Returns the animation id upon success. - /// Returns negative one upon failure. Returns the animation id upon success. - /// Returns negative one upon failure. - /// EXPORT_API int PluginCreateAnimationInMemory(int deviceType, int device); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern int PluginCreateAnimationInMemory(int deviceType, int device); - /// - /// Create a device specific effect. - /// EXPORT_API RZRESULT PluginCreateEffect(RZDEVICEID deviceId, ChromaSDK::EFFECT_TYPE effect, int* colors, int size, ChromaSDK::FChromaSDKGuid* effectId); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern int PluginCreateEffect(Guid deviceId, int effect, int[] colors, int size, out FChromaSDKGuid effectId); - /// - /// Delete an effect given the effect id. - /// EXPORT_API RZRESULT PluginDeleteEffect(const ChromaSDK::FChromaSDKGuid& effectId); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern int PluginDeleteEffect(Guid effectId); - /// - /// Duplicate the first animation frame so that the animation length matches - /// the frame count. Animation is referenced by id. - /// EXPORT_API void PluginDuplicateFirstFrame(int animationId, int frameCount); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginDuplicateFirstFrame(int animationId, int frameCount); - /// - /// Duplicate the first animation frame so that the animation length matches - /// the frame count. Animation is referenced by name. - /// EXPORT_API void PluginDuplicateFirstFrameName(const char* path, int frameCount); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginDuplicateFirstFrameName(IntPtr path, int frameCount); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginDuplicateFirstFrameNameD(const char* path, double frameCount); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginDuplicateFirstFrameNameD(IntPtr path, double frameCount); - /// - /// Duplicate all the frames of the animation to double the animation length. - /// Frame 1 becomes frame 1 and 2. Frame 2 becomes frame 3 and 4. And so on. - /// The animation is referenced by id. - /// EXPORT_API void PluginDuplicateFrames(int animationId); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginDuplicateFrames(int animationId); - /// - /// Duplicate all the frames of the animation to double the animation length. - /// Frame 1 becomes frame 1 and 2. Frame 2 becomes frame 3 and 4. And so on. - /// The animation is referenced by name. - /// EXPORT_API void PluginDuplicateFramesName(const char* path); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginDuplicateFramesName(IntPtr path); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginDuplicateFramesNameD(const char* path); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginDuplicateFramesNameD(IntPtr path); - /// - /// Duplicate all the animation frames in reverse so that the animation plays - /// forwards and backwards. Animation is referenced by id. - /// EXPORT_API void PluginDuplicateMirrorFrames(int animationId); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginDuplicateMirrorFrames(int animationId); - /// - /// Duplicate all the animation frames in reverse so that the animation plays - /// forwards and backwards. Animation is referenced by name. - /// EXPORT_API void PluginDuplicateMirrorFramesName(const char* path); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginDuplicateMirrorFramesName(IntPtr path); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginDuplicateMirrorFramesNameD(const char* path); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginDuplicateMirrorFramesNameD(IntPtr path); - /// - /// Fade the animation to black starting at the fade frame index to the end - /// of the animation. Animation is referenced by id. - /// EXPORT_API void PluginFadeEndFrames(int animationId, int fade); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginFadeEndFrames(int animationId, int fade); - /// - /// Fade the animation to black starting at the fade frame index to the end - /// of the animation. Animation is referenced by name. - /// EXPORT_API void PluginFadeEndFramesName(const char* path, int fade); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginFadeEndFramesName(IntPtr path, int fade); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginFadeEndFramesNameD(const char* path, double fade); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginFadeEndFramesNameD(IntPtr path, double fade); - /// - /// Fade the animation from black to full color starting at 0 to the fade frame - /// index. Animation is referenced by id. - /// EXPORT_API void PluginFadeStartFrames(int animationId, int fade); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginFadeStartFrames(int animationId, int fade); - /// - /// Fade the animation from black to full color starting at 0 to the fade frame - /// index. Animation is referenced by name. - /// EXPORT_API void PluginFadeStartFramesName(const char* path, int fade); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginFadeStartFramesName(IntPtr path, int fade); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginFadeStartFramesNameD(const char* path, double fade); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginFadeStartFramesNameD(IntPtr path, double fade); - /// - /// Set the RGB value for all colors in the specified frame. Animation is referenced - /// by id. - /// EXPORT_API void PluginFillColor(int animationId, int frameId, int color); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginFillColor(int animationId, int frameId, int color); - /// - /// Set the RGB value for all colors for all frames. Animation is referenced - /// by id. - /// EXPORT_API void PluginFillColorAllFrames(int animationId, int color); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginFillColorAllFrames(int animationId, int color); - /// - /// Set the RGB value for all colors for all frames. Animation is referenced - /// by name. - /// EXPORT_API void PluginFillColorAllFramesName(const char* path, int color); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginFillColorAllFramesName(IntPtr path, int color); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginFillColorAllFramesNameD(const char* path, double color); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginFillColorAllFramesNameD(IntPtr path, double color); - /// - /// Set the RGB value for all colors for all frames. Use the range of 0 to 255 - /// for red, green, and blue parameters. Animation is referenced by id. - /// EXPORT_API void PluginFillColorAllFramesRGB(int animationId, int red, int green, int blue); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginFillColorAllFramesRGB(int animationId, int red, int green, int blue); - /// - /// Set the RGB value for all colors for all frames. Use the range of 0 to 255 - /// for red, green, and blue parameters. Animation is referenced by name. - /// EXPORT_API void PluginFillColorAllFramesRGBName(const char* path, int red, int green, int blue); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginFillColorAllFramesRGBName(IntPtr path, int red, int green, int blue); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginFillColorAllFramesRGBNameD(const char* path, double red, double green, double blue); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginFillColorAllFramesRGBNameD(IntPtr path, double red, double green, double blue); - /// - /// Set the RGB value for all colors in the specified frame. Animation is referenced - /// by name. - /// EXPORT_API void PluginFillColorName(const char* path, int frameId, int color); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginFillColorName(IntPtr path, int frameId, int color); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginFillColorNameD(const char* path, double frameId, double color); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginFillColorNameD(IntPtr path, double frameId, double color); - /// - /// Set the RGB value for all colors in the specified frame. Animation is referenced - /// by id. - /// EXPORT_API void PluginFillColorRGB(int animationId, int frameId, int red, int green, int blue); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginFillColorRGB(int animationId, int frameId, int red, int green, int blue); - /// - /// Set the RGB value for all colors in the specified frame. Animation is referenced - /// by name. - /// EXPORT_API void PluginFillColorRGBName(const char* path, int frameId, int red, int green, int blue); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginFillColorRGBName(IntPtr path, int frameId, int red, int green, int blue); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginFillColorRGBNameD(const char* path, double frameId, double red, double green, double blue); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginFillColorRGBNameD(IntPtr path, double frameId, double red, double green, double blue); - /// - /// This method will only update colors in the animation that are not already - /// set to black. Set the RGB value for a subset of colors in the specified - /// frame. Animation is referenced by id. - /// EXPORT_API void PluginFillNonZeroColor(int animationId, int frameId, int color); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginFillNonZeroColor(int animationId, int frameId, int color); - /// - /// This method will only update colors in the animation that are not already - /// set to black. Set the RGB value for a subset of colors for all frames. - /// Animation is referenced by id. - /// EXPORT_API void PluginFillNonZeroColorAllFrames(int animationId, int color); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginFillNonZeroColorAllFrames(int animationId, int color); - /// - /// This method will only update colors in the animation that are not already - /// set to black. Set the RGB value for a subset of colors for all frames. - /// Animation is referenced by name. - /// EXPORT_API void PluginFillNonZeroColorAllFramesName(const char* path, int color); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginFillNonZeroColorAllFramesName(IntPtr path, int color); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginFillNonZeroColorAllFramesNameD(const char* path, double color); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginFillNonZeroColorAllFramesNameD(IntPtr path, double color); - /// - /// This method will only update colors in the animation that are not already - /// set to black. Set the RGB value for a subset of colors for all frames. - /// Use the range of 0 to 255 for red, green, and blue parameters. Animation - /// is referenced by id. - /// EXPORT_API void PluginFillNonZeroColorAllFramesRGB(int animationId, int red, int green, int blue); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginFillNonZeroColorAllFramesRGB(int animationId, int red, int green, int blue); - /// - /// This method will only update colors in the animation that are not already - /// set to black. Set the RGB value for a subset of colors for all frames. - /// Use the range of 0 to 255 for red, green, and blue parameters. Animation - /// is referenced by name. - /// EXPORT_API void PluginFillNonZeroColorAllFramesRGBName(const char* path, int red, int green, int blue); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginFillNonZeroColorAllFramesRGBName(IntPtr path, int red, int green, int blue); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginFillNonZeroColorAllFramesRGBNameD(const char* path, double red, double green, double blue); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginFillNonZeroColorAllFramesRGBNameD(IntPtr path, double red, double green, double blue); - /// - /// This method will only update colors in the animation that are not already - /// set to black. Set the RGB value for a subset of colors in the specified - /// frame. Animation is referenced by name. - /// EXPORT_API void PluginFillNonZeroColorName(const char* path, int frameId, int color); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginFillNonZeroColorName(IntPtr path, int frameId, int color); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginFillNonZeroColorNameD(const char* path, double frameId, double color); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginFillNonZeroColorNameD(IntPtr path, double frameId, double color); - /// - /// This method will only update colors in the animation that are not already - /// set to black. Set the RGB value for a subset of colors in the specified - /// frame. Use the range of 0 to 255 for red, green, and blue parameters. Animation - /// is referenced by id. - /// EXPORT_API void PluginFillNonZeroColorRGB(int animationId, int frameId, int red, int green, int blue); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginFillNonZeroColorRGB(int animationId, int frameId, int red, int green, int blue); - /// - /// This method will only update colors in the animation that are not already - /// set to black. Set the RGB value for a subset of colors in the specified - /// frame. Use the range of 0 to 255 for red, green, and blue parameters. Animation - /// is referenced by name. - /// EXPORT_API void PluginFillNonZeroColorRGBName(const char* path, int frameId, int red, int green, int blue); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginFillNonZeroColorRGBName(IntPtr path, int frameId, int red, int green, int blue); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginFillNonZeroColorRGBNameD(const char* path, double frameId, double red, double green, double blue); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginFillNonZeroColorRGBNameD(IntPtr path, double frameId, double red, double green, double blue); - /// - /// Fill the frame with random RGB values for the given frame. Animation is - /// referenced by id. - /// EXPORT_API void PluginFillRandomColors(int animationId, int frameId); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginFillRandomColors(int animationId, int frameId); - /// - /// Fill the frame with random RGB values for all frames. Animation is referenced - /// by id. - /// EXPORT_API void PluginFillRandomColorsAllFrames(int animationId); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginFillRandomColorsAllFrames(int animationId); - /// - /// Fill the frame with random RGB values for all frames. Animation is referenced - /// by name. - /// EXPORT_API void PluginFillRandomColorsAllFramesName(const char* path); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginFillRandomColorsAllFramesName(IntPtr path); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginFillRandomColorsAllFramesNameD(const char* path); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginFillRandomColorsAllFramesNameD(IntPtr path); - /// - /// Fill the frame with random black and white values for the specified frame. - /// Animation is referenced by id. - /// EXPORT_API void PluginFillRandomColorsBlackAndWhite(int animationId, int frameId); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginFillRandomColorsBlackAndWhite(int animationId, int frameId); - /// - /// Fill the frame with random black and white values for all frames. Animation - /// is referenced by id. - /// EXPORT_API void PluginFillRandomColorsBlackAndWhiteAllFrames(int animationId); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginFillRandomColorsBlackAndWhiteAllFrames(int animationId); - /// - /// Fill the frame with random black and white values for all frames. Animation - /// is referenced by name. - /// EXPORT_API void PluginFillRandomColorsBlackAndWhiteAllFramesName(const char* path); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginFillRandomColorsBlackAndWhiteAllFramesName(IntPtr path); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginFillRandomColorsBlackAndWhiteAllFramesNameD(const char* path); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginFillRandomColorsBlackAndWhiteAllFramesNameD(IntPtr path); - /// - /// Fill the frame with random black and white values for the specified frame. - /// Animation is referenced by name. - /// EXPORT_API void PluginFillRandomColorsBlackAndWhiteName(const char* path, int frameId); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginFillRandomColorsBlackAndWhiteName(IntPtr path, int frameId); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginFillRandomColorsBlackAndWhiteNameD(const char* path, double frameId); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginFillRandomColorsBlackAndWhiteNameD(IntPtr path, double frameId); - /// - /// Fill the frame with random RGB values for the given frame. Animation is - /// referenced by name. - /// EXPORT_API void PluginFillRandomColorsName(const char* path, int frameId); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginFillRandomColorsName(IntPtr path, int frameId); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginFillRandomColorsNameD(const char* path, double frameId); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginFillRandomColorsNameD(IntPtr path, double frameId); - /// - /// Fill the specified frame with RGB color where the animation color is less - /// than the RGB threshold. Animation is referenced by id. - /// EXPORT_API void PluginFillThresholdColors(int animationId, int frameId, int threshold, int color); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginFillThresholdColors(int animationId, int frameId, int threshold, int color); - /// - /// Fill all frames with RGB color where the animation color is less than the - /// RGB threshold. Animation is referenced by id. - /// EXPORT_API void PluginFillThresholdColorsAllFrames(int animationId, int threshold, int color); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginFillThresholdColorsAllFrames(int animationId, int threshold, int color); - /// - /// Fill all frames with RGB color where the animation color is less than the - /// RGB threshold. Animation is referenced by name. - /// EXPORT_API void PluginFillThresholdColorsAllFramesName(const char* path, int threshold, int color); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginFillThresholdColorsAllFramesName(IntPtr path, int threshold, int color); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginFillThresholdColorsAllFramesNameD(const char* path, double threshold, double color); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginFillThresholdColorsAllFramesNameD(IntPtr path, double threshold, double color); - /// - /// Fill all frames with RGB color where the animation color is less than the - /// threshold. Animation is referenced by id. - /// EXPORT_API void PluginFillThresholdColorsAllFramesRGB(int animationId, int threshold, int red, int green, int blue); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginFillThresholdColorsAllFramesRGB(int animationId, int threshold, int red, int green, int blue); - /// - /// Fill all frames with RGB color where the animation color is less than the - /// threshold. Animation is referenced by name. - /// EXPORT_API void PluginFillThresholdColorsAllFramesRGBName(const char* path, int threshold, int red, int green, int blue); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginFillThresholdColorsAllFramesRGBName(IntPtr path, int threshold, int red, int green, int blue); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginFillThresholdColorsAllFramesRGBNameD(const char* path, double threshold, double red, double green, double blue); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginFillThresholdColorsAllFramesRGBNameD(IntPtr path, double threshold, double red, double green, double blue); - /// - /// Fill all frames with the min RGB color where the animation color is less - /// than the min threshold AND with the max RGB color where the animation is - /// more than the max threshold. Animation is referenced by id. - /// EXPORT_API void PluginFillThresholdColorsMinMaxAllFramesRGB(int animationId, int minThreshold, int minRed, int minGreen, int minBlue, int maxThreshold, int maxRed, int maxGreen, int maxBlue); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginFillThresholdColorsMinMaxAllFramesRGB(int animationId, int minThreshold, int minRed, int minGreen, int minBlue, int maxThreshold, int maxRed, int maxGreen, int maxBlue); - /// - /// Fill all frames with the min RGB color where the animation color is less - /// than the min threshold AND with the max RGB color where the animation is - /// more than the max threshold. Animation is referenced by name. - /// EXPORT_API void PluginFillThresholdColorsMinMaxAllFramesRGBName(const char* path, int minThreshold, int minRed, int minGreen, int minBlue, int maxThreshold, int maxRed, int maxGreen, int maxBlue); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginFillThresholdColorsMinMaxAllFramesRGBName(IntPtr path, int minThreshold, int minRed, int minGreen, int minBlue, int maxThreshold, int maxRed, int maxGreen, int maxBlue); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginFillThresholdColorsMinMaxAllFramesRGBNameD(const char* path, double minThreshold, double minRed, double minGreen, double minBlue, double maxThreshold, double maxRed, double maxGreen, double maxBlue); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginFillThresholdColorsMinMaxAllFramesRGBNameD(IntPtr path, double minThreshold, double minRed, double minGreen, double minBlue, double maxThreshold, double maxRed, double maxGreen, double maxBlue); - /// - /// Fill the specified frame with the min RGB color where the animation color - /// is less than the min threshold AND with the max RGB color where the animation - /// is more than the max threshold. Animation is referenced by id. - /// EXPORT_API void PluginFillThresholdColorsMinMaxRGB(int animationId, int frameId, int minThreshold, int minRed, int minGreen, int minBlue, int maxThreshold, int maxRed, int maxGreen, int maxBlue); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginFillThresholdColorsMinMaxRGB(int animationId, int frameId, int minThreshold, int minRed, int minGreen, int minBlue, int maxThreshold, int maxRed, int maxGreen, int maxBlue); - /// - /// Fill the specified frame with the min RGB color where the animation color - /// is less than the min threshold AND with the max RGB color where the animation - /// is more than the max threshold. Animation is referenced by name. - /// EXPORT_API void PluginFillThresholdColorsMinMaxRGBName(const char* path, int frameId, int minThreshold, int minRed, int minGreen, int minBlue, int maxThreshold, int maxRed, int maxGreen, int maxBlue); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginFillThresholdColorsMinMaxRGBName(IntPtr path, int frameId, int minThreshold, int minRed, int minGreen, int minBlue, int maxThreshold, int maxRed, int maxGreen, int maxBlue); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginFillThresholdColorsMinMaxRGBNameD(const char* path, double frameId, double minThreshold, double minRed, double minGreen, double minBlue, double maxThreshold, double maxRed, double maxGreen, double maxBlue); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginFillThresholdColorsMinMaxRGBNameD(IntPtr path, double frameId, double minThreshold, double minRed, double minGreen, double minBlue, double maxThreshold, double maxRed, double maxGreen, double maxBlue); - /// - /// Fill the specified frame with RGB color where the animation color is less - /// than the RGB threshold. Animation is referenced by name. - /// EXPORT_API void PluginFillThresholdColorsName(const char* path, int frameId, int threshold, int color); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginFillThresholdColorsName(IntPtr path, int frameId, int threshold, int color); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginFillThresholdColorsNameD(const char* path, double frameId, double threshold, double color); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginFillThresholdColorsNameD(IntPtr path, double frameId, double threshold, double color); - /// - /// Fill the specified frame with RGB color where the animation color is less - /// than the RGB threshold. Animation is referenced by id. - /// EXPORT_API void PluginFillThresholdColorsRGB(int animationId, int frameId, int threshold, int red, int green, int blue); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginFillThresholdColorsRGB(int animationId, int frameId, int threshold, int red, int green, int blue); - /// - /// Fill the specified frame with RGB color where the animation color is less - /// than the RGB threshold. Animation is referenced by name. - /// EXPORT_API void PluginFillThresholdColorsRGBName(const char* path, int frameId, int threshold, int red, int green, int blue); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginFillThresholdColorsRGBName(IntPtr path, int frameId, int threshold, int red, int green, int blue); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginFillThresholdColorsRGBNameD(const char* path, double frameId, double threshold, double red, double green, double blue); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginFillThresholdColorsRGBNameD(IntPtr path, double frameId, double threshold, double red, double green, double blue); - /// - /// Fill all frames with RGB color where the animation color is less than the - /// RGB threshold. Animation is referenced by id. - /// EXPORT_API void PluginFillThresholdRGBColorsAllFramesRGB(int animationId, int redThreshold, int greenThreshold, int blueThreshold, int red, int green, int blue); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginFillThresholdRGBColorsAllFramesRGB(int animationId, int redThreshold, int greenThreshold, int blueThreshold, int red, int green, int blue); - /// - /// Fill all frames with RGB color where the animation color is less than the - /// RGB threshold. Animation is referenced by name. - /// EXPORT_API void PluginFillThresholdRGBColorsAllFramesRGBName(const char* path, int redThreshold, int greenThreshold, int blueThreshold, int red, int green, int blue); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginFillThresholdRGBColorsAllFramesRGBName(IntPtr path, int redThreshold, int greenThreshold, int blueThreshold, int red, int green, int blue); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginFillThresholdRGBColorsAllFramesRGBNameD(const char* path, double redThreshold, double greenThreshold, double blueThreshold, double red, double green, double blue); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginFillThresholdRGBColorsAllFramesRGBNameD(IntPtr path, double redThreshold, double greenThreshold, double blueThreshold, double red, double green, double blue); - /// - /// Fill the specified frame with RGB color where the animation color is less - /// than the RGB threshold. Animation is referenced by id. - /// EXPORT_API void PluginFillThresholdRGBColorsRGB(int animationId, int frameId, int redThreshold, int greenThreshold, int blueThreshold, int red, int green, int blue); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginFillThresholdRGBColorsRGB(int animationId, int frameId, int redThreshold, int greenThreshold, int blueThreshold, int red, int green, int blue); - /// - /// Fill the specified frame with RGB color where the animation color is less - /// than the RGB threshold. Animation is referenced by name. - /// EXPORT_API void PluginFillThresholdRGBColorsRGBName(const char* path, int frameId, int redThreshold, int greenThreshold, int blueThreshold, int red, int green, int blue); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginFillThresholdRGBColorsRGBName(IntPtr path, int frameId, int redThreshold, int greenThreshold, int blueThreshold, int red, int green, int blue); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginFillThresholdRGBColorsRGBNameD(const char* path, double frameId, double redThreshold, double greenThreshold, double blueThreshold, double red, double green, double blue); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginFillThresholdRGBColorsRGBNameD(IntPtr path, double frameId, double redThreshold, double greenThreshold, double blueThreshold, double red, double green, double blue); - /// - /// Fill the specified frame with RGB color where the animation color is zero. - /// Animation is referenced by id. - /// EXPORT_API void PluginFillZeroColor(int animationId, int frameId, int color); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginFillZeroColor(int animationId, int frameId, int color); - /// - /// Fill all frames with RGB color where the animation color is zero. Animation - /// is referenced by id. - /// EXPORT_API void PluginFillZeroColorAllFrames(int animationId, int color); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginFillZeroColorAllFrames(int animationId, int color); - /// - /// Fill all frames with RGB color where the animation color is zero. Animation - /// is referenced by name. - /// EXPORT_API void PluginFillZeroColorAllFramesName(const char* path, int color); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginFillZeroColorAllFramesName(IntPtr path, int color); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginFillZeroColorAllFramesNameD(const char* path, double color); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginFillZeroColorAllFramesNameD(IntPtr path, double color); - /// - /// Fill all frames with RGB color where the animation color is zero. Animation - /// is referenced by id. - /// EXPORT_API void PluginFillZeroColorAllFramesRGB(int animationId, int red, int green, int blue); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginFillZeroColorAllFramesRGB(int animationId, int red, int green, int blue); - /// - /// Fill all frames with RGB color where the animation color is zero. Animation - /// is referenced by name. - /// EXPORT_API void PluginFillZeroColorAllFramesRGBName(const char* path, int red, int green, int blue); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginFillZeroColorAllFramesRGBName(IntPtr path, int red, int green, int blue); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginFillZeroColorAllFramesRGBNameD(const char* path, double red, double green, double blue); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginFillZeroColorAllFramesRGBNameD(IntPtr path, double red, double green, double blue); - /// - /// Fill the specified frame with RGB color where the animation color is zero. - /// Animation is referenced by name. - /// EXPORT_API void PluginFillZeroColorName(const char* path, int frameId, int color); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginFillZeroColorName(IntPtr path, int frameId, int color); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginFillZeroColorNameD(const char* path, double frameId, double color); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginFillZeroColorNameD(IntPtr path, double frameId, double color); - /// - /// Fill the specified frame with RGB color where the animation color is zero. - /// Animation is referenced by id. - /// EXPORT_API void PluginFillZeroColorRGB(int animationId, int frameId, int red, int green, int blue); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginFillZeroColorRGB(int animationId, int frameId, int red, int green, int blue); - /// - /// Fill the specified frame with RGB color where the animation color is zero. - /// Animation is referenced by name. - /// EXPORT_API void PluginFillZeroColorRGBName(const char* path, int frameId, int red, int green, int blue); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginFillZeroColorRGBName(IntPtr path, int frameId, int red, int green, int blue); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginFillZeroColorRGBNameD(const char* path, double frameId, double red, double green, double blue); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginFillZeroColorRGBNameD(IntPtr path, double frameId, double red, double green, double blue); - /// - /// Get the animation color for a frame given the `1D` `led`. The `led` should - /// be greater than or equal to 0 and less than the `MaxLeds`. Animation is - /// referenced by id. - /// EXPORT_API int PluginGet1DColor(int animationId, int frameId, int led); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern int PluginGet1DColor(int animationId, int frameId, int led); - /// - /// Get the animation color for a frame given the `1D` `led`. The `led` should - /// be greater than or equal to 0 and less than the `MaxLeds`. Animation is - /// referenced by name. - /// EXPORT_API int PluginGet1DColorName(const char* path, int frameId, int led); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern int PluginGet1DColorName(IntPtr path, int frameId, int led); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginGet1DColorNameD(const char* path, double frameId, double led); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginGet1DColorNameD(IntPtr path, double frameId, double led); - /// - /// Get the animation color for a frame given the `2D` `row` and `column`. The - /// `row` should be greater than or equal to 0 and less than the `MaxRow`. - /// The `column` should be greater than or equal to 0 and less than the `MaxColumn`. - /// Animation is referenced by id. - /// EXPORT_API int PluginGet2DColor(int animationId, int frameId, int row, int column); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern int PluginGet2DColor(int animationId, int frameId, int row, int column); - /// - /// Get the animation color for a frame given the `2D` `row` and `column`. The - /// `row` should be greater than or equal to 0 and less than the `MaxRow`. - /// The `column` should be greater than or equal to 0 and less than the `MaxColumn`. - /// Animation is referenced by name. - /// EXPORT_API int PluginGet2DColorName(const char* path, int frameId, int row, int column); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern int PluginGet2DColorName(IntPtr path, int frameId, int row, int column); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginGet2DColorNameD(const char* path, double frameId, double row, double column); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginGet2DColorNameD(IntPtr path, double frameId, double row, double column); - /// - /// Get the animation id for the named animation. - /// EXPORT_API int PluginGetAnimation(const char* name); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern int PluginGetAnimation(IntPtr name); - /// - /// `PluginGetAnimationCount` will return the number of loaded animations. - /// EXPORT_API int PluginGetAnimationCount(); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern int PluginGetAnimationCount(); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginGetAnimationD(const char* name); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginGetAnimationD(IntPtr name); - /// - /// `PluginGetAnimationId` will return the `animationId` given the `index` of - /// the loaded animation. The `index` is zero-based and less than the number - /// returned by `PluginGetAnimationCount`. Use `PluginGetAnimationName` to - /// get the name of the animation. - /// EXPORT_API int PluginGetAnimationId(int index); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern int PluginGetAnimationId(int index); - /// - /// `PluginGetAnimationName` takes an `animationId` and returns the name of - /// the animation of the `.chroma` animation file. If a name is not available - /// then an empty string will be returned. - /// EXPORT_API const char* PluginGetAnimationName(int animationId); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern IntPtr PluginGetAnimationName(int animationId); - /// - /// Get the current frame of the animation referenced by id. - /// EXPORT_API int PluginGetCurrentFrame(int animationId); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern int PluginGetCurrentFrame(int animationId); - /// - /// Get the current frame of the animation referenced by name. - /// EXPORT_API int PluginGetCurrentFrameName(const char* path); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern int PluginGetCurrentFrameName(IntPtr path); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginGetCurrentFrameNameD(const char* path); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginGetCurrentFrameNameD(IntPtr path); - /// - /// Returns the `EChromaSDKDevice1DEnum` or `EChromaSDKDevice2DEnum` of a `Chroma` - /// animation respective to the `deviceType`, as an integer upon success. Returns - /// negative one upon failure. - /// EXPORT_API int PluginGetDevice(int animationId); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern int PluginGetDevice(int animationId); - /// - /// Returns the `EChromaSDKDevice1DEnum` or `EChromaSDKDevice2DEnum` of a `Chroma` - /// animation respective to the `deviceType`, as an integer upon success. Returns - /// negative one upon failure. - /// EXPORT_API int PluginGetDeviceName(const char* path); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern int PluginGetDeviceName(IntPtr path); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginGetDeviceNameD(const char* path); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginGetDeviceNameD(IntPtr path); - /// - /// Returns the `EChromaSDKDeviceTypeEnum` of a `Chroma` animation as an integer - /// upon success. Returns negative one upon failure. - /// EXPORT_API int PluginGetDeviceType(int animationId); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern int PluginGetDeviceType(int animationId); - /// - /// Returns the `EChromaSDKDeviceTypeEnum` of a `Chroma` animation as an integer - /// upon success. Returns negative one upon failure. - /// EXPORT_API int PluginGetDeviceTypeName(const char* path); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern int PluginGetDeviceTypeName(IntPtr path); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginGetDeviceTypeNameD(const char* path); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginGetDeviceTypeNameD(IntPtr path); - /// - /// Get the frame colors and duration (in seconds) for a `Chroma` animation - /// referenced by id. The `color` is expected to be an array of the expected - /// dimensions for the `deviceType/device`. The `length` parameter is the size - /// of the `color` array. For `EChromaSDKDevice1DEnum` the array size should - /// be `MAX LEDS`. For `EChromaSDKDevice2DEnum` the array size should be `MAX - /// ROW` times `MAX COLUMN`. Keys are populated only for EChromaSDKDevice2DEnum::DE_Keyboard - /// and EChromaSDKDevice2DEnum::DE_KeyboardExtended. Keys will only use the - /// EChromaSDKDevice2DEnum::DE_Keyboard `MAX_ROW` times `MAX_COLUMN` keysLength. - /// Returns the animation id upon success. Returns negative one upon failure. - /// - /// EXPORT_API int PluginGetFrame(int animationId, int frameIndex, float* duration, int* colors, int length, int* keys, int keysLength); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern int PluginGetFrame(int animationId, int frameIndex, out float duration, int[] colors, int length, int[] keys, int keysLength); - /// - /// Returns the frame count of a `Chroma` animation upon success. Returns negative - /// one upon failure. - /// EXPORT_API int PluginGetFrameCount(int animationId); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern int PluginGetFrameCount(int animationId); - /// - /// Returns the frame count of a `Chroma` animation upon success. Returns negative - /// one upon failure. - /// EXPORT_API int PluginGetFrameCountName(const char* path); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern int PluginGetFrameCountName(IntPtr path); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginGetFrameCountNameD(const char* path); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginGetFrameCountNameD(IntPtr path); - /// - /// Get the frame colors and duration (in seconds) for a `Chroma` animation - /// referenced by name. The `color` is expected to be an array of the expected - /// dimensions for the `deviceType/device`. The `length` parameter is the size - /// of the `color` array. For `EChromaSDKDevice1DEnum` the array size should - /// be `MAX LEDS`. For `EChromaSDKDevice2DEnum` the array size should be `MAX - /// ROW` times `MAX COLUMN`. Keys are populated only for EChromaSDKDevice2DEnum::DE_Keyboard - /// and EChromaSDKDevice2DEnum::DE_KeyboardExtended. Keys will only use the - /// EChromaSDKDevice2DEnum::DE_Keyboard `MAX_ROW` times `MAX_COLUMN` keysLength. - /// Returns the animation id upon success. Returns negative one upon failure. - /// - /// EXPORT_API int PluginGetFrameName(const char* path, int frameIndex, float* duration, int* colors, int length, int* keys, int keysLength); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern int PluginGetFrameName(IntPtr path, int frameIndex, out float duration, int[] colors, int length, int[] keys, int keysLength); - /// - /// Get the color of an animation key for the given frame referenced by id. - /// - /// EXPORT_API int PluginGetKeyColor(int animationId, int frameId, int rzkey); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern int PluginGetKeyColor(int animationId, int frameId, int rzkey); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginGetKeyColorD(const char* path, double frameId, double rzkey); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginGetKeyColorD(IntPtr path, double frameId, double rzkey); - /// - /// Get the color of an animation key for the given frame referenced by name. - /// - /// EXPORT_API int PluginGetKeyColorName(const char* path, int frameId, int rzkey); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern int PluginGetKeyColorName(IntPtr path, int frameId, int rzkey); - /// - /// Returns `RZRESULT_SUCCESS` if the plugin has been initialized successfully. - /// Returns `RZRESULT_DLL_NOT_FOUND` if core Chroma library is not found. Returns - /// `RZRESULT_DLL_INVALID_SIGNATURE` if core Chroma library has an invalid - /// signature. - /// EXPORT_API RZRESULT PluginGetLibraryLoadedState(); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern int PluginGetLibraryLoadedState(); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginGetLibraryLoadedStateD(); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginGetLibraryLoadedStateD(); - /// - /// Returns the `MAX COLUMN` given the `EChromaSDKDevice2DEnum` device as an - /// integer upon success. Returns negative one upon failure. - /// EXPORT_API int PluginGetMaxColumn(int device); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern int PluginGetMaxColumn(int device); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginGetMaxColumnD(double device); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginGetMaxColumnD(double device); - /// - /// Returns the MAX LEDS given the `EChromaSDKDevice1DEnum` device as an integer - /// upon success. Returns negative one upon failure. - /// EXPORT_API int PluginGetMaxLeds(int device); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern int PluginGetMaxLeds(int device); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginGetMaxLedsD(double device); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginGetMaxLedsD(double device); - /// - /// Returns the `MAX ROW` given the `EChromaSDKDevice2DEnum` device as an integer - /// upon success. Returns negative one upon failure. - /// EXPORT_API int PluginGetMaxRow(int device); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern int PluginGetMaxRow(int device); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginGetMaxRowD(double device); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginGetMaxRowD(double device); - /// - /// `PluginGetPlayingAnimationCount` will return the number of playing animations. - /// - /// EXPORT_API int PluginGetPlayingAnimationCount(); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern int PluginGetPlayingAnimationCount(); - /// - /// `PluginGetPlayingAnimationId` will return the `animationId` given the `index` - /// of the playing animation. The `index` is zero-based and less than the number - /// returned by `PluginGetPlayingAnimationCount`. Use `PluginGetAnimationName` - /// to get the name of the animation. - /// EXPORT_API int PluginGetPlayingAnimationId(int index); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern int PluginGetPlayingAnimationId(int index); - /// - /// Get the RGB color given red, green, and blue. - /// EXPORT_API int PluginGetRGB(int red, int green, int blue); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern int PluginGetRGB(int red, int green, int blue); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginGetRGBD(double red, double green, double blue); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginGetRGBD(double red, double green, double blue); - /// - /// Check if the animation has loop enabled referenced by id. - /// EXPORT_API bool PluginHasAnimationLoop(int animationId); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - private static extern bool PluginHasAnimationLoop(int animationId); - /// - /// Check if the animation has loop enabled referenced by name. - /// EXPORT_API bool PluginHasAnimationLoopName(const char* path); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - private static extern bool PluginHasAnimationLoopName(IntPtr path); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginHasAnimationLoopNameD(const char* path); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginHasAnimationLoopNameD(IntPtr path); - /// - /// Initialize the ChromaSDK. Zero indicates success, otherwise failure. Many - /// API methods auto initialize the ChromaSDK if not already initialized. - /// EXPORT_API RZRESULT PluginInit(); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern int PluginInit(); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginInitD(); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginInitD(); - /// - /// Initialize the ChromaSDK. AppInfo populates the details in Synapse. Zero - /// indicates success, otherwise failure. Many API methods auto initialize - /// the ChromaSDK if not already initialized. - /// EXPORT_API RZRESULT PluginInitSDK(ChromaSDK::APPINFOTYPE* AppInfo); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern int PluginInitSDK(ref ChromaSDK.APPINFOTYPE appInfo); - /// - /// Insert an animation delay by duplicating the frame by the delay number of - /// times. Animation is referenced by id. - /// EXPORT_API void PluginInsertDelay(int animationId, int frameId, int delay); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginInsertDelay(int animationId, int frameId, int delay); - /// - /// Insert an animation delay by duplicating the frame by the delay number of - /// times. Animation is referenced by name. - /// EXPORT_API void PluginInsertDelayName(const char* path, int frameId, int delay); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginInsertDelayName(IntPtr path, int frameId, int delay); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginInsertDelayNameD(const char* path, double frameId, double delay); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginInsertDelayNameD(IntPtr path, double frameId, double delay); - /// - /// Duplicate the source frame index at the target frame index. Animation is - /// referenced by id. - /// EXPORT_API void PluginInsertFrame(int animationId, int sourceFrame, int targetFrame); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginInsertFrame(int animationId, int sourceFrame, int targetFrame); - /// - /// Duplicate the source frame index at the target frame index. Animation is - /// referenced by name. - /// EXPORT_API void PluginInsertFrameName(const char* path, int sourceFrame, int targetFrame); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginInsertFrameName(IntPtr path, int sourceFrame, int targetFrame); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginInsertFrameNameD(const char* path, double sourceFrame, double targetFrame); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginInsertFrameNameD(IntPtr path, double sourceFrame, double targetFrame); - /// - /// Invert all the colors at the specified frame. Animation is referenced by - /// id. - /// EXPORT_API void PluginInvertColors(int animationId, int frameId); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginInvertColors(int animationId, int frameId); - /// - /// Invert all the colors for all frames. Animation is referenced by id. - /// EXPORT_API void PluginInvertColorsAllFrames(int animationId); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginInvertColorsAllFrames(int animationId); - /// - /// Invert all the colors for all frames. Animation is referenced by name. - /// EXPORT_API void PluginInvertColorsAllFramesName(const char* path); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginInvertColorsAllFramesName(IntPtr path); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginInvertColorsAllFramesNameD(const char* path); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginInvertColorsAllFramesNameD(IntPtr path); - /// - /// Invert all the colors at the specified frame. Animation is referenced by - /// name. - /// EXPORT_API void PluginInvertColorsName(const char* path, int frameId); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginInvertColorsName(IntPtr path, int frameId); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginInvertColorsNameD(const char* path, double frameId); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginInvertColorsNameD(IntPtr path, double frameId); - /// - /// Check if the animation is paused referenced by id. - /// EXPORT_API bool PluginIsAnimationPaused(int animationId); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - private static extern bool PluginIsAnimationPaused(int animationId); - /// - /// Check if the animation is paused referenced by name. - /// EXPORT_API bool PluginIsAnimationPausedName(const char* path); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - private static extern bool PluginIsAnimationPausedName(IntPtr path); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginIsAnimationPausedNameD(const char* path); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginIsAnimationPausedNameD(IntPtr path); - /// - /// The editor dialog is a non-blocking modal window, this method returns true - /// if the modal window is open, otherwise false. - /// EXPORT_API bool PluginIsDialogOpen(); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - private static extern bool PluginIsDialogOpen(); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginIsDialogOpenD(); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginIsDialogOpenD(); - /// - /// Returns true if the plugin has been initialized. Returns false if the plugin - /// is uninitialized. - /// EXPORT_API bool PluginIsInitialized(); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - private static extern bool PluginIsInitialized(); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginIsInitializedD(); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginIsInitializedD(); - /// - /// If the method can be invoked the method returns true. - /// EXPORT_API bool PluginIsPlatformSupported(); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - private static extern bool PluginIsPlatformSupported(); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginIsPlatformSupportedD(); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginIsPlatformSupportedD(); - /// - /// `PluginIsPlayingName` automatically handles initializing the `ChromaSDK`. - /// The named `.chroma` animation file will be automatically opened. The method - /// will return whether the animation is playing or not. Animation is referenced - /// by id. - /// EXPORT_API bool PluginIsPlaying(int animationId); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - private static extern bool PluginIsPlaying(int animationId); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginIsPlayingD(double animationId); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginIsPlayingD(double animationId); - /// - /// `PluginIsPlayingName` automatically handles initializing the `ChromaSDK`. - /// The named `.chroma` animation file will be automatically opened. The method - /// will return whether the animation is playing or not. Animation is referenced - /// by name. - /// EXPORT_API bool PluginIsPlayingName(const char* path); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - private static extern bool PluginIsPlayingName(IntPtr path); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginIsPlayingNameD(const char* path); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginIsPlayingNameD(IntPtr path); - /// - /// `PluginIsPlayingType` automatically handles initializing the `ChromaSDK`. - /// If any animation is playing for the `deviceType` and `device` combination, - /// the method will return true, otherwise false. - /// EXPORT_API bool PluginIsPlayingType(int deviceType, int device); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - private static extern bool PluginIsPlayingType(int deviceType, int device); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginIsPlayingTypeD(double deviceType, double device); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginIsPlayingTypeD(double deviceType, double device); - /// - /// Do a lerp math operation on a float. - /// EXPORT_API float PluginLerp(float start, float end, float amt); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern float PluginLerp(float start, float end, float amt); - /// - /// Lerp from one color to another given t in the range 0.0 to 1.0. - /// EXPORT_API int PluginLerpColor(int from, int to, float t); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern int PluginLerpColor(int from, int to, float t); - /// - /// Loads `Chroma` effects so that the animation can be played immediately. - /// Returns the animation id upon success. Returns negative one upon failure. - /// - /// EXPORT_API int PluginLoadAnimation(int animationId); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern int PluginLoadAnimation(int animationId); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginLoadAnimationD(double animationId); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginLoadAnimationD(double animationId); - /// - /// Load the named animation. - /// EXPORT_API void PluginLoadAnimationName(const char* path); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginLoadAnimationName(IntPtr path); - /// - /// Load a composite set of animations. - /// EXPORT_API void PluginLoadComposite(const char* name); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginLoadComposite(IntPtr name); - /// - /// Make a blank animation for the length of the frame count. Frame duration - /// defaults to the duration. The frame color defaults to color. Animation - /// is referenced by id. - /// EXPORT_API void PluginMakeBlankFrames(int animationId, int frameCount, float duration, int color); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginMakeBlankFrames(int animationId, int frameCount, float duration, int color); - /// - /// Make a blank animation for the length of the frame count. Frame duration - /// defaults to the duration. The frame color defaults to color. Animation - /// is referenced by name. - /// EXPORT_API void PluginMakeBlankFramesName(const char* path, int frameCount, float duration, int color); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginMakeBlankFramesName(IntPtr path, int frameCount, float duration, int color); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginMakeBlankFramesNameD(const char* path, double frameCount, double duration, double color); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginMakeBlankFramesNameD(IntPtr path, double frameCount, double duration, double color); - /// - /// Make a blank animation for the length of the frame count. Frame duration - /// defaults to the duration. The frame color is random. Animation is referenced - /// by id. - /// EXPORT_API void PluginMakeBlankFramesRandom(int animationId, int frameCount, float duration); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginMakeBlankFramesRandom(int animationId, int frameCount, float duration); - /// - /// Make a blank animation for the length of the frame count. Frame duration - /// defaults to the duration. The frame color is random black and white. Animation - /// is referenced by id. - /// EXPORT_API void PluginMakeBlankFramesRandomBlackAndWhite(int animationId, int frameCount, float duration); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginMakeBlankFramesRandomBlackAndWhite(int animationId, int frameCount, float duration); - /// - /// Make a blank animation for the length of the frame count. Frame duration - /// defaults to the duration. The frame color is random black and white. Animation - /// is referenced by name. - /// EXPORT_API void PluginMakeBlankFramesRandomBlackAndWhiteName(const char* path, int frameCount, float duration); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginMakeBlankFramesRandomBlackAndWhiteName(IntPtr path, int frameCount, float duration); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginMakeBlankFramesRandomBlackAndWhiteNameD(const char* path, double frameCount, double duration); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginMakeBlankFramesRandomBlackAndWhiteNameD(IntPtr path, double frameCount, double duration); - /// - /// Make a blank animation for the length of the frame count. Frame duration - /// defaults to the duration. The frame color is random. Animation is referenced - /// by name. - /// EXPORT_API void PluginMakeBlankFramesRandomName(const char* path, int frameCount, float duration); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginMakeBlankFramesRandomName(IntPtr path, int frameCount, float duration); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginMakeBlankFramesRandomNameD(const char* path, double frameCount, double duration); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginMakeBlankFramesRandomNameD(IntPtr path, double frameCount, double duration); - /// - /// Make a blank animation for the length of the frame count. Frame duration - /// defaults to the duration. The frame color defaults to color. Animation - /// is referenced by id. - /// EXPORT_API void PluginMakeBlankFramesRGB(int animationId, int frameCount, float duration, int red, int green, int blue); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginMakeBlankFramesRGB(int animationId, int frameCount, float duration, int red, int green, int blue); - /// - /// Make a blank animation for the length of the frame count. Frame duration - /// defaults to the duration. The frame color defaults to color. Animation - /// is referenced by name. - /// EXPORT_API void PluginMakeBlankFramesRGBName(const char* path, int frameCount, float duration, int red, int green, int blue); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginMakeBlankFramesRGBName(IntPtr path, int frameCount, float duration, int red, int green, int blue); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginMakeBlankFramesRGBNameD(const char* path, double frameCount, double duration, double red, double green, double blue); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginMakeBlankFramesRGBNameD(IntPtr path, double frameCount, double duration, double red, double green, double blue); - /// - /// Flips the color grid horizontally for all `Chroma` animation frames. Returns - /// the animation id upon success. Returns negative one upon failure. - /// EXPORT_API int PluginMirrorHorizontally(int animationId); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern int PluginMirrorHorizontally(int animationId); - /// - /// Flips the color grid vertically for all `Chroma` animation frames. This - /// method has no effect for `EChromaSDKDevice1DEnum` devices. Returns the - /// animation id upon success. Returns negative one upon failure. - /// EXPORT_API int PluginMirrorVertically(int animationId); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern int PluginMirrorVertically(int animationId); - /// - /// Multiply the color intensity with the lerp result from color 1 to color - /// 2 using the frame index divided by the frame count for the `t` parameter. - /// Animation is referenced in id. - /// EXPORT_API void PluginMultiplyColorLerpAllFrames(int animationId, int color1, int color2); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginMultiplyColorLerpAllFrames(int animationId, int color1, int color2); - /// - /// Multiply the color intensity with the lerp result from color 1 to color - /// 2 using the frame index divided by the frame count for the `t` parameter. - /// Animation is referenced in name. - /// EXPORT_API void PluginMultiplyColorLerpAllFramesName(const char* path, int color1, int color2); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginMultiplyColorLerpAllFramesName(IntPtr path, int color1, int color2); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginMultiplyColorLerpAllFramesNameD(const char* path, double color1, double color2); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginMultiplyColorLerpAllFramesNameD(IntPtr path, double color1, double color2); - /// - /// Multiply all the colors in the frame by the intensity value. The valid the - /// intensity range is from 0.0 to 255.0. RGB components are multiplied equally. - /// An intensity of 0.5 would half the color value. Black colors in the frame - /// will not be affected by this method. - /// EXPORT_API void PluginMultiplyIntensity(int animationId, int frameId, float intensity); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginMultiplyIntensity(int animationId, int frameId, float intensity); - /// - /// Multiply all the colors for all frames by the intensity value. The valid - /// the intensity range is from 0.0 to 255.0. RGB components are multiplied - /// equally. An intensity of 0.5 would half the color value. Black colors in - /// the frame will not be affected by this method. - /// EXPORT_API void PluginMultiplyIntensityAllFrames(int animationId, float intensity); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginMultiplyIntensityAllFrames(int animationId, float intensity); - /// - /// Multiply all the colors for all frames by the intensity value. The valid - /// the intensity range is from 0.0 to 255.0. RGB components are multiplied - /// equally. An intensity of 0.5 would half the color value. Black colors in - /// the frame will not be affected by this method. - /// EXPORT_API void PluginMultiplyIntensityAllFramesName(const char* path, float intensity); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginMultiplyIntensityAllFramesName(IntPtr path, float intensity); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginMultiplyIntensityAllFramesNameD(const char* path, double intensity); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginMultiplyIntensityAllFramesNameD(IntPtr path, double intensity); - /// - /// Multiply all frames by the RBG color intensity. Animation is referenced - /// by id. - /// EXPORT_API void PluginMultiplyIntensityAllFramesRGB(int animationId, int red, int green, int blue); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginMultiplyIntensityAllFramesRGB(int animationId, int red, int green, int blue); - /// - /// Multiply all frames by the RBG color intensity. Animation is referenced - /// by name. - /// EXPORT_API void PluginMultiplyIntensityAllFramesRGBName(const char* path, int red, int green, int blue); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginMultiplyIntensityAllFramesRGBName(IntPtr path, int red, int green, int blue); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginMultiplyIntensityAllFramesRGBNameD(const char* path, double red, double green, double blue); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginMultiplyIntensityAllFramesRGBNameD(IntPtr path, double red, double green, double blue); - /// - /// Multiply the specific frame by the RBG color intensity. Animation is referenced - /// by id. - /// EXPORT_API void PluginMultiplyIntensityColor(int animationId, int frameId, int color); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginMultiplyIntensityColor(int animationId, int frameId, int color); - /// - /// Multiply all frames by the RBG color intensity. Animation is referenced - /// by id. - /// EXPORT_API void PluginMultiplyIntensityColorAllFrames(int animationId, int color); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginMultiplyIntensityColorAllFrames(int animationId, int color); - /// - /// Multiply all frames by the RBG color intensity. Animation is referenced - /// by name. - /// EXPORT_API void PluginMultiplyIntensityColorAllFramesName(const char* path, int color); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginMultiplyIntensityColorAllFramesName(IntPtr path, int color); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginMultiplyIntensityColorAllFramesNameD(const char* path, double color); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginMultiplyIntensityColorAllFramesNameD(IntPtr path, double color); - /// - /// Multiply the specific frame by the RBG color intensity. Animation is referenced - /// by name. - /// EXPORT_API void PluginMultiplyIntensityColorName(const char* path, int frameId, int color); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginMultiplyIntensityColorName(IntPtr path, int frameId, int color); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginMultiplyIntensityColorNameD(const char* path, double frameId, double color); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginMultiplyIntensityColorNameD(IntPtr path, double frameId, double color); - /// - /// Multiply all the colors in the frame by the intensity value. The valid the - /// intensity range is from 0.0 to 255.0. RGB components are multiplied equally. - /// An intensity of 0.5 would half the color value. Black colors in the frame - /// will not be affected by this method. - /// EXPORT_API void PluginMultiplyIntensityName(const char* path, int frameId, float intensity); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginMultiplyIntensityName(IntPtr path, int frameId, float intensity); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginMultiplyIntensityNameD(const char* path, double frameId, double intensity); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginMultiplyIntensityNameD(IntPtr path, double frameId, double intensity); - /// - /// Multiply the specific frame by the RBG color intensity. Animation is referenced - /// by id. - /// EXPORT_API void PluginMultiplyIntensityRGB(int animationId, int frameId, int red, int green, int blue); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginMultiplyIntensityRGB(int animationId, int frameId, int red, int green, int blue); - /// - /// Multiply the specific frame by the RBG color intensity. Animation is referenced - /// by name. - /// EXPORT_API void PluginMultiplyIntensityRGBName(const char* path, int frameId, int red, int green, int blue); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginMultiplyIntensityRGBName(IntPtr path, int frameId, int red, int green, int blue); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginMultiplyIntensityRGBNameD(const char* path, double frameId, double red, double green, double blue); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginMultiplyIntensityRGBNameD(IntPtr path, double frameId, double red, double green, double blue); - /// - /// Multiply the specific frame by the color lerp result between color 1 and - /// 2 using the frame color value as the `t` value. Animation is referenced - /// by id. - /// EXPORT_API void PluginMultiplyNonZeroTargetColorLerp(int animationId, int frameId, int color1, int color2); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginMultiplyNonZeroTargetColorLerp(int animationId, int frameId, int color1, int color2); - /// - /// Multiply all frames by the color lerp result between color 1 and 2 using - /// the frame color value as the `t` value. Animation is referenced by id. - /// - /// EXPORT_API void PluginMultiplyNonZeroTargetColorLerpAllFrames(int animationId, int color1, int color2); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginMultiplyNonZeroTargetColorLerpAllFrames(int animationId, int color1, int color2); - /// - /// Multiply all frames by the color lerp result between color 1 and 2 using - /// the frame color value as the `t` value. Animation is referenced by name. - /// - /// EXPORT_API void PluginMultiplyNonZeroTargetColorLerpAllFramesName(const char* path, int color1, int color2); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginMultiplyNonZeroTargetColorLerpAllFramesName(IntPtr path, int color1, int color2); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginMultiplyNonZeroTargetColorLerpAllFramesNameD(const char* path, double color1, double color2); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginMultiplyNonZeroTargetColorLerpAllFramesNameD(IntPtr path, double color1, double color2); - /// - /// Multiply the specific frame by the color lerp result between RGB 1 and 2 - /// using the frame color value as the `t` value. Animation is referenced by - /// id. - /// EXPORT_API void PluginMultiplyNonZeroTargetColorLerpAllFramesRGB(int animationId, int red1, int green1, int blue1, int red2, int green2, int blue2); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginMultiplyNonZeroTargetColorLerpAllFramesRGB(int animationId, int red1, int green1, int blue1, int red2, int green2, int blue2); - /// - /// Multiply the specific frame by the color lerp result between RGB 1 and 2 - /// using the frame color value as the `t` value. Animation is referenced by - /// name. - /// EXPORT_API void PluginMultiplyNonZeroTargetColorLerpAllFramesRGBName(const char* path, int red1, int green1, int blue1, int red2, int green2, int blue2); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginMultiplyNonZeroTargetColorLerpAllFramesRGBName(IntPtr path, int red1, int green1, int blue1, int red2, int green2, int blue2); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginMultiplyNonZeroTargetColorLerpAllFramesRGBNameD(const char* path, double red1, double green1, double blue1, double red2, double green2, double blue2); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginMultiplyNonZeroTargetColorLerpAllFramesRGBNameD(IntPtr path, double red1, double green1, double blue1, double red2, double green2, double blue2); - /// - /// Multiply the specific frame by the color lerp result between color 1 and - /// 2 using the frame color value as the `t` value. Animation is referenced - /// by id. - /// EXPORT_API void PluginMultiplyTargetColorLerp(int animationId, int frameId, int color1, int color2); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginMultiplyTargetColorLerp(int animationId, int frameId, int color1, int color2); - /// - /// Multiply all frames by the color lerp result between color 1 and 2 using - /// the frame color value as the `t` value. Animation is referenced by id. - /// - /// EXPORT_API void PluginMultiplyTargetColorLerpAllFrames(int animationId, int color1, int color2); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginMultiplyTargetColorLerpAllFrames(int animationId, int color1, int color2); - /// - /// Multiply all frames by the color lerp result between color 1 and 2 using - /// the frame color value as the `t` value. Animation is referenced by name. - /// - /// EXPORT_API void PluginMultiplyTargetColorLerpAllFramesName(const char* path, int color1, int color2); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginMultiplyTargetColorLerpAllFramesName(IntPtr path, int color1, int color2); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginMultiplyTargetColorLerpAllFramesNameD(const char* path, double color1, double color2); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginMultiplyTargetColorLerpAllFramesNameD(IntPtr path, double color1, double color2); - /// - /// Multiply all frames by the color lerp result between RGB 1 and 2 using the - /// frame color value as the `t` value. Animation is referenced by id. - /// EXPORT_API void PluginMultiplyTargetColorLerpAllFramesRGB(int animationId, int red1, int green1, int blue1, int red2, int green2, int blue2); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginMultiplyTargetColorLerpAllFramesRGB(int animationId, int red1, int green1, int blue1, int red2, int green2, int blue2); - /// - /// Multiply all frames by the color lerp result between RGB 1 and 2 using the - /// frame color value as the `t` value. Animation is referenced by name. - /// EXPORT_API void PluginMultiplyTargetColorLerpAllFramesRGBName(const char* path, int red1, int green1, int blue1, int red2, int green2, int blue2); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginMultiplyTargetColorLerpAllFramesRGBName(IntPtr path, int red1, int green1, int blue1, int red2, int green2, int blue2); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginMultiplyTargetColorLerpAllFramesRGBNameD(const char* path, double red1, double green1, double blue1, double red2, double green2, double blue2); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginMultiplyTargetColorLerpAllFramesRGBNameD(IntPtr path, double red1, double green1, double blue1, double red2, double green2, double blue2); - /// - /// Multiply the specific frame by the color lerp result between color 1 and - /// 2 using the frame color value as the `t` value. Animation is referenced - /// by name. - /// EXPORT_API void PluginMultiplyTargetColorLerpName(const char* path, int frameId, int color1, int color2); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginMultiplyTargetColorLerpName(IntPtr path, int frameId, int color1, int color2); - /// - /// Offset all colors in the frame using the RGB offset. Use the range of -255 - /// to 255 for red, green, and blue parameters. Negative values remove color. - /// Positive values add color. - /// EXPORT_API void PluginOffsetColors(int animationId, int frameId, int red, int green, int blue); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginOffsetColors(int animationId, int frameId, int red, int green, int blue); - /// - /// Offset all colors for all frames using the RGB offset. Use the range of - /// -255 to 255 for red, green, and blue parameters. Negative values remove - /// color. Positive values add color. - /// EXPORT_API void PluginOffsetColorsAllFrames(int animationId, int red, int green, int blue); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginOffsetColorsAllFrames(int animationId, int red, int green, int blue); - /// - /// Offset all colors for all frames using the RGB offset. Use the range of - /// -255 to 255 for red, green, and blue parameters. Negative values remove - /// color. Positive values add color. - /// EXPORT_API void PluginOffsetColorsAllFramesName(const char* path, int red, int green, int blue); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginOffsetColorsAllFramesName(IntPtr path, int red, int green, int blue); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginOffsetColorsAllFramesNameD(const char* path, double red, double green, double blue); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginOffsetColorsAllFramesNameD(IntPtr path, double red, double green, double blue); - /// - /// Offset all colors in the frame using the RGB offset. Use the range of -255 - /// to 255 for red, green, and blue parameters. Negative values remove color. - /// Positive values add color. - /// EXPORT_API void PluginOffsetColorsName(const char* path, int frameId, int red, int green, int blue); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginOffsetColorsName(IntPtr path, int frameId, int red, int green, int blue); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginOffsetColorsNameD(const char* path, double frameId, double red, double green, double blue); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginOffsetColorsNameD(IntPtr path, double frameId, double red, double green, double blue); - /// - /// This method will only update colors in the animation that are not already - /// set to black. Offset a subset of colors in the frame using the RGB offset. - /// Use the range of -255 to 255 for red, green, and blue parameters. Negative - /// values remove color. Positive values add color. - /// EXPORT_API void PluginOffsetNonZeroColors(int animationId, int frameId, int red, int green, int blue); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginOffsetNonZeroColors(int animationId, int frameId, int red, int green, int blue); - /// - /// This method will only update colors in the animation that are not already - /// set to black. Offset a subset of colors for all frames using the RGB offset. - /// Use the range of -255 to 255 for red, green, and blue parameters. Negative - /// values remove color. Positive values add color. - /// EXPORT_API void PluginOffsetNonZeroColorsAllFrames(int animationId, int red, int green, int blue); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginOffsetNonZeroColorsAllFrames(int animationId, int red, int green, int blue); - /// - /// This method will only update colors in the animation that are not already - /// set to black. Offset a subset of colors for all frames using the RGB offset. - /// Use the range of -255 to 255 for red, green, and blue parameters. Negative - /// values remove color. Positive values add color. - /// EXPORT_API void PluginOffsetNonZeroColorsAllFramesName(const char* path, int red, int green, int blue); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginOffsetNonZeroColorsAllFramesName(IntPtr path, int red, int green, int blue); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginOffsetNonZeroColorsAllFramesNameD(const char* path, double red, double green, double blue); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginOffsetNonZeroColorsAllFramesNameD(IntPtr path, double red, double green, double blue); - /// - /// This method will only update colors in the animation that are not already - /// set to black. Offset a subset of colors in the frame using the RGB offset. - /// Use the range of -255 to 255 for red, green, and blue parameters. Negative - /// values remove color. Positive values add color. - /// EXPORT_API void PluginOffsetNonZeroColorsName(const char* path, int frameId, int red, int green, int blue); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginOffsetNonZeroColorsName(IntPtr path, int frameId, int red, int green, int blue); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginOffsetNonZeroColorsNameD(const char* path, double frameId, double red, double green, double blue); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginOffsetNonZeroColorsNameD(IntPtr path, double frameId, double red, double green, double blue); - /// - /// Opens a `Chroma` animation file so that it can be played. Returns an animation - /// id >= 0 upon success. Returns negative one if there was a failure. The - /// animation id is used in most of the API methods. - /// EXPORT_API int PluginOpenAnimation(const char* path); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern int PluginOpenAnimation(IntPtr path); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginOpenAnimationD(const char* path); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginOpenAnimationD(IntPtr path); - /// - /// Opens a `Chroma` animation data from memory so that it can be played. `Data` - /// is a pointer to BYTE array of the loaded animation in memory. `Name` will - /// be assigned to the animation when loaded. Returns an animation id >= 0 - /// upon success. Returns negative one if there was a failure. The animation - /// id is used in most of the API methods. - /// EXPORT_API int PluginOpenAnimationFromMemory(const BYTE* data, const char* name); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern int PluginOpenAnimationFromMemory(byte[] data, IntPtr name); - /// - /// Opens a `Chroma` animation file with the `.chroma` extension. Returns zero - /// upon success. Returns negative one if there was a failure. - /// EXPORT_API int PluginOpenEditorDialog(const char* path); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern int PluginOpenEditorDialog(IntPtr path); - /// - /// Open the named animation in the editor dialog and play the animation at - /// start. - /// EXPORT_API int PluginOpenEditorDialogAndPlay(const char* path); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern int PluginOpenEditorDialogAndPlay(IntPtr path); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginOpenEditorDialogAndPlayD(const char* path); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginOpenEditorDialogAndPlayD(IntPtr path); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginOpenEditorDialogD(const char* path); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginOpenEditorDialogD(IntPtr path); - /// - /// Sets the `duration` for all grames in the `Chroma` animation to the `duration` - /// parameter. Returns the animation id upon success. Returns negative one - /// upon failure. - /// EXPORT_API int PluginOverrideFrameDuration(int animationId, float duration); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern int PluginOverrideFrameDuration(int animationId, float duration); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginOverrideFrameDurationD(double animationId, double duration); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginOverrideFrameDurationD(double animationId, double duration); - /// - /// Override the duration of all frames with the `duration` value. Animation - /// is referenced by name. - /// EXPORT_API void PluginOverrideFrameDurationName(const char* path, float duration); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginOverrideFrameDurationName(IntPtr path, float duration); - /// - /// Pause the current animation referenced by id. - /// EXPORT_API void PluginPauseAnimation(int animationId); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginPauseAnimation(int animationId); - /// - /// Pause the current animation referenced by name. - /// EXPORT_API void PluginPauseAnimationName(const char* path); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginPauseAnimationName(IntPtr path); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginPauseAnimationNameD(const char* path); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginPauseAnimationNameD(IntPtr path); - /// - /// Plays the `Chroma` animation. This will load the animation, if not loaded - /// previously. Returns the animation id upon success. Returns negative one - /// upon failure. - /// EXPORT_API int PluginPlayAnimation(int animationId); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern int PluginPlayAnimation(int animationId); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginPlayAnimationD(double animationId); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginPlayAnimationD(double animationId); - /// - /// `PluginPlayAnimationFrame` automatically handles initializing the `ChromaSDK`. - /// The method will play the animation given the `animationId` with looping - /// `on` or `off` starting at the `frameId`. - /// EXPORT_API void PluginPlayAnimationFrame(int animationId, int frameId, bool loop); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginPlayAnimationFrame(int animationId, int frameId, bool loop); - /// - /// `PluginPlayAnimationFrameName` automatically handles initializing the `ChromaSDK`. - /// The named `.chroma` animation file will be automatically opened. The animation - /// will play with looping `on` or `off` starting at the `frameId`. - /// EXPORT_API void PluginPlayAnimationFrameName(const char* path, int frameId, bool loop); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginPlayAnimationFrameName(IntPtr path, int frameId, bool loop); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginPlayAnimationFrameNameD(const char* path, double frameId, double loop); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginPlayAnimationFrameNameD(IntPtr path, double frameId, double loop); - /// - /// `PluginPlayAnimationLoop` automatically handles initializing the `ChromaSDK`. - /// The method will play the animation given the `animationId` with looping - /// `on` or `off`. - /// EXPORT_API void PluginPlayAnimationLoop(int animationId, bool loop); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginPlayAnimationLoop(int animationId, bool loop); - /// - /// `PluginPlayAnimationName` automatically handles initializing the `ChromaSDK`. - /// The named `.chroma` animation file will be automatically opened. The animation - /// will play with looping `on` or `off`. - /// EXPORT_API void PluginPlayAnimationName(const char* path, bool loop); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginPlayAnimationName(IntPtr path, bool loop); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginPlayAnimationNameD(const char* path, double loop); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginPlayAnimationNameD(IntPtr path, double loop); - /// - /// `PluginPlayComposite` automatically handles initializing the `ChromaSDK`. - /// The named animation files for the `.chroma` set will be automatically opened. - /// The set of animations will play with looping `on` or `off`. - /// EXPORT_API void PluginPlayComposite(const char* name, bool loop); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginPlayComposite(IntPtr name, bool loop); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginPlayCompositeD(const char* name, double loop); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginPlayCompositeD(IntPtr name, double loop); - /// - /// Displays the `Chroma` animation frame on `Chroma` hardware given the `frameIndex`. - /// Returns the animation id upon success. Returns negative one upon failure. - /// - /// EXPORT_API int PluginPreviewFrame(int animationId, int frameIndex); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern int PluginPreviewFrame(int animationId, int frameIndex); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginPreviewFrameD(double animationId, double frameIndex); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginPreviewFrameD(double animationId, double frameIndex); - /// - /// Displays the `Chroma` animation frame on `Chroma` hardware given the `frameIndex`. - /// Animaton is referenced by name. - /// EXPORT_API void PluginPreviewFrameName(const char* path, int frameIndex); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginPreviewFrameName(IntPtr path, int frameIndex); - /// - /// Reduce the frames of the animation by removing every nth element. Animation - /// is referenced by id. - /// EXPORT_API void PluginReduceFrames(int animationId, int n); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginReduceFrames(int animationId, int n); - /// - /// Reduce the frames of the animation by removing every nth element. Animation - /// is referenced by name. - /// EXPORT_API void PluginReduceFramesName(const char* path, int n); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginReduceFramesName(IntPtr path, int n); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginReduceFramesNameD(const char* path, double n); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginReduceFramesNameD(IntPtr path, double n); - /// - /// Resets the `Chroma` animation to 1 blank frame. Returns the animation id - /// upon success. Returns negative one upon failure. - /// EXPORT_API int PluginResetAnimation(int animationId); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern int PluginResetAnimation(int animationId); - /// - /// Resume the animation with loop `ON` or `OFF` referenced by id. - /// EXPORT_API void PluginResumeAnimation(int animationId, bool loop); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginResumeAnimation(int animationId, bool loop); - /// - /// Resume the animation with loop `ON` or `OFF` referenced by name. - /// EXPORT_API void PluginResumeAnimationName(const char* path, bool loop); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginResumeAnimationName(IntPtr path, bool loop); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginResumeAnimationNameD(const char* path, double loop); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginResumeAnimationNameD(IntPtr path, double loop); - /// - /// Reverse the animation frame order of the `Chroma` animation. Returns the - /// animation id upon success. Returns negative one upon failure. Animation - /// is referenced by id. - /// EXPORT_API int PluginReverse(int animationId); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern int PluginReverse(int animationId); - /// - /// Reverse the animation frame order of the `Chroma` animation. Animation is - /// referenced by id. - /// EXPORT_API void PluginReverseAllFrames(int animationId); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginReverseAllFrames(int animationId); - /// - /// Reverse the animation frame order of the `Chroma` animation. Animation is - /// referenced by name. - /// EXPORT_API void PluginReverseAllFramesName(const char* path); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginReverseAllFramesName(IntPtr path); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginReverseAllFramesNameD(const char* path); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginReverseAllFramesNameD(IntPtr path); - /// - /// Save the animation referenced by id to the path specified. - /// EXPORT_API int PluginSaveAnimation(int animationId, const char* path); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern int PluginSaveAnimation(int animationId, IntPtr path); - /// - /// Save the named animation to the target path specified. - /// EXPORT_API int PluginSaveAnimationName(const char* sourceAnimation, const char* targetAnimation); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern int PluginSaveAnimationName(IntPtr sourceAnimation, IntPtr targetAnimation); - /// - /// Set the animation color for a frame given the `1D` `led`. The `led` should - /// be greater than or equal to 0 and less than the `MaxLeds`. The animation - /// is referenced by id. - /// EXPORT_API void PluginSet1DColor(int animationId, int frameId, int led, int color); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginSet1DColor(int animationId, int frameId, int led, int color); - /// - /// Set the animation color for a frame given the `1D` `led`. The `led` should - /// be greater than or equal to 0 and less than the `MaxLeds`. The animation - /// is referenced by name. - /// EXPORT_API void PluginSet1DColorName(const char* path, int frameId, int led, int color); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginSet1DColorName(IntPtr path, int frameId, int led, int color); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginSet1DColorNameD(const char* path, double frameId, double led, double color); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginSet1DColorNameD(IntPtr path, double frameId, double led, double color); - /// - /// Set the animation color for a frame given the `2D` `row` and `column`. The - /// `row` should be greater than or equal to 0 and less than the `MaxRow`. - /// The `column` should be greater than or equal to 0 and less than the `MaxColumn`. - /// The animation is referenced by id. - /// EXPORT_API void PluginSet2DColor(int animationId, int frameId, int row, int column, int color); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginSet2DColor(int animationId, int frameId, int row, int column, int color); - /// - /// Set the animation color for a frame given the `2D` `row` and `column`. The - /// `row` should be greater than or equal to 0 and less than the `MaxRow`. - /// The `column` should be greater than or equal to 0 and less than the `MaxColumn`. - /// The animation is referenced by name. - /// EXPORT_API void PluginSet2DColorName(const char* path, int frameId, int row, int column, int color); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginSet2DColorName(IntPtr path, int frameId, int row, int column, int color); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginSet2DColorNameD(const char* path, double frameId, double rowColumnIndex, double color); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginSet2DColorNameD(IntPtr path, double frameId, double rowColumnIndex, double color); - /// - /// When custom color is set, the custom key mode will be used. The animation - /// is referenced by id. - /// EXPORT_API void PluginSetChromaCustomColorAllFrames(int animationId); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginSetChromaCustomColorAllFrames(int animationId); - /// - /// When custom color is set, the custom key mode will be used. The animation - /// is referenced by name. - /// EXPORT_API void PluginSetChromaCustomColorAllFramesName(const char* path); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginSetChromaCustomColorAllFramesName(IntPtr path); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginSetChromaCustomColorAllFramesNameD(const char* path); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginSetChromaCustomColorAllFramesNameD(IntPtr path); - /// - /// Set the Chroma custom key color flag on all frames. `True` changes the layout - /// from grid to key. `True` changes the layout from key to grid. Animation - /// is referenced by id. - /// EXPORT_API void PluginSetChromaCustomFlag(int animationId, bool flag); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginSetChromaCustomFlag(int animationId, bool flag); - /// - /// Set the Chroma custom key color flag on all frames. `True` changes the layout - /// from grid to key. `True` changes the layout from key to grid. Animation - /// is referenced by name. - /// EXPORT_API void PluginSetChromaCustomFlagName(const char* path, bool flag); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginSetChromaCustomFlagName(IntPtr path, bool flag); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginSetChromaCustomFlagNameD(const char* path, double flag); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginSetChromaCustomFlagNameD(IntPtr path, double flag); - /// - /// Set the current frame of the animation referenced by id. - /// EXPORT_API void PluginSetCurrentFrame(int animationId, int frameId); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginSetCurrentFrame(int animationId, int frameId); - /// - /// Set the current frame of the animation referenced by name. - /// EXPORT_API void PluginSetCurrentFrameName(const char* path, int frameId); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginSetCurrentFrameName(IntPtr path, int frameId); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginSetCurrentFrameNameD(const char* path, double frameId); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginSetCurrentFrameNameD(IntPtr path, double frameId); - /// - /// Set the custom alpha flag on the color array - /// EXPORT_API RZRESULT PluginSetCustomColorFlag2D(int device, int* colors); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern int PluginSetCustomColorFlag2D(int device, int[] colors); - /// - /// Changes the `deviceType` and `device` of a `Chroma` animation. If the device - /// is changed, the `Chroma` animation will be reset with 1 blank frame. Returns - /// the animation id upon success. Returns negative one upon failure. - /// EXPORT_API int PluginSetDevice(int animationId, int deviceType, int device); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern int PluginSetDevice(int animationId, int deviceType, int device); - /// - /// SetEffect will display the referenced effect id. - /// EXPORT_API RZRESULT PluginSetEffect(const ChromaSDK::FChromaSDKGuid& effectId); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern int PluginSetEffect(Guid effectId); - /// - /// SetEffectCustom1D will display the referenced colors immediately - /// EXPORT_API RZRESULT PluginSetEffectCustom1D(const int device, const int* colors); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern int PluginSetEffectCustom1D(int device, int[] colors); - /// - /// SetEffectCustom2D will display the referenced colors immediately. - /// EXPORT_API RZRESULT PluginSetEffectCustom2D(const int device, const int* colors); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern int PluginSetEffectCustom2D(int device, int[] colors); - /// - /// SetEffectKeyboardCustom2D will display the referenced custom keyboard colors - /// immediately. Colors represent a visual grid layout. Keys represent the - /// hotkeys for any layout. - /// EXPORT_API RZRESULT PluginSetEffectKeyboardCustom2D(const int device, const int* colors, const int* keys); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern int PluginSetEffectKeyboardCustom2D(int device, int[] colors, int[] keys); - /// - /// When the idle animation is used, the named animation will play when no other - /// animations are playing. Reference the animation by id. - /// EXPORT_API void PluginSetIdleAnimation(int animationId); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginSetIdleAnimation(int animationId); - /// - /// When the idle animation is used, the named animation will play when no other - /// animations are playing. Reference the animation by name. - /// EXPORT_API void PluginSetIdleAnimationName(const char* path); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginSetIdleAnimationName(IntPtr path); - /// - /// Set animation key to a static color for the given frame. - /// EXPORT_API void PluginSetKeyColor(int animationId, int frameId, int rzkey, int color); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginSetKeyColor(int animationId, int frameId, int rzkey, int color); - /// - /// Set the key to the specified key color for all frames. Animation is referenced - /// by id. - /// EXPORT_API void PluginSetKeyColorAllFrames(int animationId, int rzkey, int color); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginSetKeyColorAllFrames(int animationId, int rzkey, int color); - /// - /// Set the key to the specified key color for all frames. Animation is referenced - /// by name. - /// EXPORT_API void PluginSetKeyColorAllFramesName(const char* path, int rzkey, int color); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginSetKeyColorAllFramesName(IntPtr path, int rzkey, int color); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginSetKeyColorAllFramesNameD(const char* path, double rzkey, double color); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginSetKeyColorAllFramesNameD(IntPtr path, double rzkey, double color); - /// - /// Set the key to the specified key color for all frames. Animation is referenced - /// by id. - /// EXPORT_API void PluginSetKeyColorAllFramesRGB(int animationId, int rzkey, int red, int green, int blue); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginSetKeyColorAllFramesRGB(int animationId, int rzkey, int red, int green, int blue); - /// - /// Set the key to the specified key color for all frames. Animation is referenced - /// by name. - /// EXPORT_API void PluginSetKeyColorAllFramesRGBName(const char* path, int rzkey, int red, int green, int blue); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginSetKeyColorAllFramesRGBName(IntPtr path, int rzkey, int red, int green, int blue); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginSetKeyColorAllFramesRGBNameD(const char* path, double rzkey, double red, double green, double blue); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginSetKeyColorAllFramesRGBNameD(IntPtr path, double rzkey, double red, double green, double blue); - /// - /// Set animation key to a static color for the given frame. - /// EXPORT_API void PluginSetKeyColorName(const char* path, int frameId, int rzkey, int color); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginSetKeyColorName(IntPtr path, int frameId, int rzkey, int color); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginSetKeyColorNameD(const char* path, double frameId, double rzkey, double color); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginSetKeyColorNameD(IntPtr path, double frameId, double rzkey, double color); - /// - /// Set the key to the specified key color for the specified frame. Animation - /// is referenced by id. - /// EXPORT_API void PluginSetKeyColorRGB(int animationId, int frameId, int rzkey, int red, int green, int blue); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginSetKeyColorRGB(int animationId, int frameId, int rzkey, int red, int green, int blue); - /// - /// Set the key to the specified key color for the specified frame. Animation - /// is referenced by name. - /// EXPORT_API void PluginSetKeyColorRGBName(const char* path, int frameId, int rzkey, int red, int green, int blue); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginSetKeyColorRGBName(IntPtr path, int frameId, int rzkey, int red, int green, int blue); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginSetKeyColorRGBNameD(const char* path, double frameId, double rzkey, double red, double green, double blue); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginSetKeyColorRGBNameD(IntPtr path, double frameId, double rzkey, double red, double green, double blue); - /// - /// Set animation key to a static color for the given frame if the existing - /// color is not already black. - /// EXPORT_API void PluginSetKeyNonZeroColor(int animationId, int frameId, int rzkey, int color); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginSetKeyNonZeroColor(int animationId, int frameId, int rzkey, int color); - /// - /// Set animation key to a static color for the given frame if the existing - /// color is not already black. - /// EXPORT_API void PluginSetKeyNonZeroColorName(const char* path, int frameId, int rzkey, int color); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginSetKeyNonZeroColorName(IntPtr path, int frameId, int rzkey, int color); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginSetKeyNonZeroColorNameD(const char* path, double frameId, double rzkey, double color); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginSetKeyNonZeroColorNameD(IntPtr path, double frameId, double rzkey, double color); - /// - /// Set the key to the specified key color for the specified frame where color - /// is not black. Animation is referenced by id. - /// EXPORT_API void PluginSetKeyNonZeroColorRGB(int animationId, int frameId, int rzkey, int red, int green, int blue); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginSetKeyNonZeroColorRGB(int animationId, int frameId, int rzkey, int red, int green, int blue); - /// - /// Set the key to the specified key color for the specified frame where color - /// is not black. Animation is referenced by name. - /// EXPORT_API void PluginSetKeyNonZeroColorRGBName(const char* path, int frameId, int rzkey, int red, int green, int blue); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginSetKeyNonZeroColorRGBName(IntPtr path, int frameId, int rzkey, int red, int green, int blue); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginSetKeyNonZeroColorRGBNameD(const char* path, double frameId, double rzkey, double red, double green, double blue); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginSetKeyNonZeroColorRGBNameD(IntPtr path, double frameId, double rzkey, double red, double green, double blue); - /// - /// Set animation key by row and column to a static color for the given frame. - /// - /// EXPORT_API void PluginSetKeyRowColumnColorName(const char* path, int frameId, int row, int column, int color); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginSetKeyRowColumnColorName(IntPtr path, int frameId, int row, int column, int color); - /// - /// Set an array of animation keys to a static color for the given frame. Animation - /// is referenced by id. - /// EXPORT_API void PluginSetKeysColor(int animationId, int frameId, const int* rzkeys, int keyCount, int color); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginSetKeysColor(int animationId, int frameId, int[] rzkeys, int keyCount, int color); - /// - /// Set an array of animation keys to a static color for all frames. Animation - /// is referenced by id. - /// EXPORT_API void PluginSetKeysColorAllFrames(int animationId, const int* rzkeys, int keyCount, int color); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginSetKeysColorAllFrames(int animationId, int[] rzkeys, int keyCount, int color); - /// - /// Set an array of animation keys to a static color for all frames. Animation - /// is referenced by name. - /// EXPORT_API void PluginSetKeysColorAllFramesName(const char* path, const int* rzkeys, int keyCount, int color); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginSetKeysColorAllFramesName(IntPtr path, int[] rzkeys, int keyCount, int color); - /// - /// Set an array of animation keys to a static color for all frames. Animation - /// is referenced by id. - /// EXPORT_API void PluginSetKeysColorAllFramesRGB(int animationId, const int* rzkeys, int keyCount, int red, int green, int blue); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginSetKeysColorAllFramesRGB(int animationId, int[] rzkeys, int keyCount, int red, int green, int blue); - /// - /// Set an array of animation keys to a static color for all frames. Animation - /// is referenced by name. - /// EXPORT_API void PluginSetKeysColorAllFramesRGBName(const char* path, const int* rzkeys, int keyCount, int red, int green, int blue); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginSetKeysColorAllFramesRGBName(IntPtr path, int[] rzkeys, int keyCount, int red, int green, int blue); - /// - /// Set an array of animation keys to a static color for the given frame. - /// EXPORT_API void PluginSetKeysColorName(const char* path, int frameId, const int* rzkeys, int keyCount, int color); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginSetKeysColorName(IntPtr path, int frameId, int[] rzkeys, int keyCount, int color); - /// - /// Set an array of animation keys to a static color for the given frame. Animation - /// is referenced by id. - /// EXPORT_API void PluginSetKeysColorRGB(int animationId, int frameId, const int* rzkeys, int keyCount, int red, int green, int blue); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginSetKeysColorRGB(int animationId, int frameId, int[] rzkeys, int keyCount, int red, int green, int blue); - /// - /// Set an array of animation keys to a static color for the given frame. Animation - /// is referenced by name. - /// EXPORT_API void PluginSetKeysColorRGBName(const char* path, int frameId, const int* rzkeys, int keyCount, int red, int green, int blue); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginSetKeysColorRGBName(IntPtr path, int frameId, int[] rzkeys, int keyCount, int red, int green, int blue); - /// - /// Set an array of animation keys to a static color for the given frame if - /// the existing color is not already black. - /// EXPORT_API void PluginSetKeysNonZeroColor(int animationId, int frameId, const int* rzkeys, int keyCount, int color); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginSetKeysNonZeroColor(int animationId, int frameId, int[] rzkeys, int keyCount, int color); - /// - /// Set an array of animation keys to a static color for the given frame where - /// the color is not black. Animation is referenced by id. - /// EXPORT_API void PluginSetKeysNonZeroColorAllFrames(int animationId, const int* rzkeys, int keyCount, int color); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginSetKeysNonZeroColorAllFrames(int animationId, int[] rzkeys, int keyCount, int color); - /// - /// Set an array of animation keys to a static color for all frames if the existing - /// color is not already black. Reference animation by name. - /// EXPORT_API void PluginSetKeysNonZeroColorAllFramesName(const char* path, const int* rzkeys, int keyCount, int color); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginSetKeysNonZeroColorAllFramesName(IntPtr path, int[] rzkeys, int keyCount, int color); - /// - /// Set an array of animation keys to a static color for the given frame if - /// the existing color is not already black. Reference animation by name. - /// EXPORT_API void PluginSetKeysNonZeroColorName(const char* path, int frameId, const int* rzkeys, int keyCount, int color); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginSetKeysNonZeroColorName(IntPtr path, int frameId, int[] rzkeys, int keyCount, int color); - /// - /// Set an array of animation keys to a static color for the given frame where - /// the color is not black. Animation is referenced by id. - /// EXPORT_API void PluginSetKeysNonZeroColorRGB(int animationId, int frameId, const int* rzkeys, int keyCount, int red, int green, int blue); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginSetKeysNonZeroColorRGB(int animationId, int frameId, int[] rzkeys, int keyCount, int red, int green, int blue); - /// - /// Set an array of animation keys to a static color for the given frame where - /// the color is not black. Animation is referenced by name. - /// EXPORT_API void PluginSetKeysNonZeroColorRGBName(const char* path, int frameId, const int* rzkeys, int keyCount, int red, int green, int blue); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginSetKeysNonZeroColorRGBName(IntPtr path, int frameId, int[] rzkeys, int keyCount, int red, int green, int blue); - /// - /// Set an array of animation keys to a static color for the given frame where - /// the color is black. Animation is referenced by id. - /// EXPORT_API void PluginSetKeysZeroColor(int animationId, int frameId, const int* rzkeys, int keyCount, int color); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginSetKeysZeroColor(int animationId, int frameId, int[] rzkeys, int keyCount, int color); - /// - /// Set an array of animation keys to a static color for all frames where the - /// color is black. Animation is referenced by id. - /// EXPORT_API void PluginSetKeysZeroColorAllFrames(int animationId, const int* rzkeys, int keyCount, int color); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginSetKeysZeroColorAllFrames(int animationId, int[] rzkeys, int keyCount, int color); - /// - /// Set an array of animation keys to a static color for all frames where the - /// color is black. Animation is referenced by name. - /// EXPORT_API void PluginSetKeysZeroColorAllFramesName(const char* path, const int* rzkeys, int keyCount, int color); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginSetKeysZeroColorAllFramesName(IntPtr path, int[] rzkeys, int keyCount, int color); - /// - /// Set an array of animation keys to a static color for all frames where the - /// color is black. Animation is referenced by id. - /// EXPORT_API void PluginSetKeysZeroColorAllFramesRGB(int animationId, const int* rzkeys, int keyCount, int red, int green, int blue); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginSetKeysZeroColorAllFramesRGB(int animationId, int[] rzkeys, int keyCount, int red, int green, int blue); - /// - /// Set an array of animation keys to a static color for all frames where the - /// color is black. Animation is referenced by name. - /// EXPORT_API void PluginSetKeysZeroColorAllFramesRGBName(const char* path, const int* rzkeys, int keyCount, int red, int green, int blue); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginSetKeysZeroColorAllFramesRGBName(IntPtr path, int[] rzkeys, int keyCount, int red, int green, int blue); - /// - /// Set an array of animation keys to a static color for the given frame where - /// the color is black. Animation is referenced by name. - /// EXPORT_API void PluginSetKeysZeroColorName(const char* path, int frameId, const int* rzkeys, int keyCount, int color); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginSetKeysZeroColorName(IntPtr path, int frameId, int[] rzkeys, int keyCount, int color); - /// - /// Set an array of animation keys to a static color for the given frame where - /// the color is black. Animation is referenced by id. - /// EXPORT_API void PluginSetKeysZeroColorRGB(int animationId, int frameId, const int* rzkeys, int keyCount, int red, int green, int blue); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginSetKeysZeroColorRGB(int animationId, int frameId, int[] rzkeys, int keyCount, int red, int green, int blue); - /// - /// Set an array of animation keys to a static color for the given frame where - /// the color is black. Animation is referenced by name. - /// EXPORT_API void PluginSetKeysZeroColorRGBName(const char* path, int frameId, const int* rzkeys, int keyCount, int red, int green, int blue); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginSetKeysZeroColorRGBName(IntPtr path, int frameId, int[] rzkeys, int keyCount, int red, int green, int blue); - /// - /// Set animation key to a static color for the given frame where the color - /// is black. Animation is referenced by id. - /// EXPORT_API void PluginSetKeyZeroColor(int animationId, int frameId, int rzkey, int color); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginSetKeyZeroColor(int animationId, int frameId, int rzkey, int color); - /// - /// Set animation key to a static color for the given frame where the color - /// is black. Animation is referenced by name. - /// EXPORT_API void PluginSetKeyZeroColorName(const char* path, int frameId, int rzkey, int color); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginSetKeyZeroColorName(IntPtr path, int frameId, int rzkey, int color); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginSetKeyZeroColorNameD(const char* path, double frameId, double rzkey, double color); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginSetKeyZeroColorNameD(IntPtr path, double frameId, double rzkey, double color); - /// - /// Set animation key to a static color for the given frame where the color - /// is black. Animation is referenced by id. - /// EXPORT_API void PluginSetKeyZeroColorRGB(int animationId, int frameId, int rzkey, int red, int green, int blue); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginSetKeyZeroColorRGB(int animationId, int frameId, int rzkey, int red, int green, int blue); - /// - /// Set animation key to a static color for the given frame where the color - /// is black. Animation is referenced by name. - /// EXPORT_API void PluginSetKeyZeroColorRGBName(const char* path, int frameId, int rzkey, int red, int green, int blue); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginSetKeyZeroColorRGBName(IntPtr path, int frameId, int rzkey, int red, int green, int blue); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginSetKeyZeroColorRGBNameD(const char* path, double frameId, double rzkey, double red, double green, double blue); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginSetKeyZeroColorRGBNameD(IntPtr path, double frameId, double rzkey, double red, double green, double blue); - /// - /// Invokes the setup for a debug logging callback so that `stdout` is redirected - /// to the callback. This is used by `Unity` so that debug messages can appear - /// in the console window. - /// EXPORT_API void PluginSetLogDelegate(DebugLogPtr fp); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginSetLogDelegate(IntPtr fp); - /// - /// Sets the target device to the static color. - /// EXPORT_API void PluginSetStaticColor(int deviceType, int device, int color); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginSetStaticColor(int deviceType, int device, int color); - /// - /// Sets all devices to the static color. - /// EXPORT_API void PluginSetStaticColorAll(int color); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginSetStaticColorAll(int color); - /// - /// Sets the target device to the static color. - /// EXPORT_API void PluginStaticColor(int deviceType, int device, int color); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginStaticColor(int deviceType, int device, int color); - /// - /// Sets all devices to the static color. - /// EXPORT_API void PluginStaticColorAll(int color); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginStaticColorAll(int color); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginStaticColorD(double deviceType, double device, double color); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginStaticColorD(double deviceType, double device, double color); - /// - /// `PluginStopAll` will automatically stop all animations that are playing. - /// - /// EXPORT_API void PluginStopAll(); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginStopAll(); - /// - /// Stops animation playback if in progress. Returns the animation id upon success. - /// Returns negative one upon failure. - /// EXPORT_API int PluginStopAnimation(int animationId); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern int PluginStopAnimation(int animationId); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginStopAnimationD(double animationId); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginStopAnimationD(double animationId); - /// - /// `PluginStopAnimationName` automatically handles initializing the `ChromaSDK`. - /// The named `.chroma` animation file will be automatically opened. The animation - /// will stop if playing. - /// EXPORT_API void PluginStopAnimationName(const char* path); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginStopAnimationName(IntPtr path); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginStopAnimationNameD(const char* path); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginStopAnimationNameD(IntPtr path); - /// - /// `PluginStopAnimationType` automatically handles initializing the `ChromaSDK`. - /// If any animation is playing for the `deviceType` and `device` combination, - /// it will be stopped. - /// EXPORT_API void PluginStopAnimationType(int deviceType, int device); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginStopAnimationType(int deviceType, int device); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginStopAnimationTypeD(double deviceType, double device); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginStopAnimationTypeD(double deviceType, double device); - /// - /// `PluginStopComposite` automatically handles initializing the `ChromaSDK`. - /// The named animation files for the `.chroma` set will be automatically opened. - /// The set of animations will be stopped if playing. - /// EXPORT_API void PluginStopComposite(const char* name); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginStopComposite(IntPtr name); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginStopCompositeD(const char* name); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginStopCompositeD(IntPtr name); - /// - /// Return color1 - color2 - /// EXPORT_API int PluginSubtractColor(const int color1, const int color2); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern int PluginSubtractColor(int color1, int color2); - /// - /// Subtract the source color from the target color for the frame where the - /// target color is not black. Source and target are referenced by id. - /// EXPORT_API void PluginSubtractNonZeroAllKeys(int sourceAnimationId, int targetAnimationId, int frameId); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginSubtractNonZeroAllKeys(int sourceAnimationId, int targetAnimationId, int frameId); - /// - /// Subtract the source color from the target color for all frames where the - /// target color is not black. Source and target are referenced by id. - /// EXPORT_API void PluginSubtractNonZeroAllKeysAllFrames(int sourceAnimationId, int targetAnimationId); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginSubtractNonZeroAllKeysAllFrames(int sourceAnimationId, int targetAnimationId); - /// - /// Subtract the source color from the target color for all frames where the - /// target color is not black. Source and target are referenced by name. - /// EXPORT_API void PluginSubtractNonZeroAllKeysAllFramesName(const char* sourceAnimation, const char* targetAnimation); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginSubtractNonZeroAllKeysAllFramesName(IntPtr sourceAnimation, IntPtr targetAnimation); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginSubtractNonZeroAllKeysAllFramesNameD(const char* sourceAnimation, const char* targetAnimation); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginSubtractNonZeroAllKeysAllFramesNameD(IntPtr sourceAnimation, IntPtr targetAnimation); - /// - /// Subtract the source color from the target color for all frames where the - /// target color is not black starting at offset for the length of the source. - /// Source and target are referenced by id. - /// EXPORT_API void PluginSubtractNonZeroAllKeysAllFramesOffset(int sourceAnimationId, int targetAnimationId, int offset); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginSubtractNonZeroAllKeysAllFramesOffset(int sourceAnimationId, int targetAnimationId, int offset); - /// - /// Subtract the source color from the target color for all frames where the - /// target color is not black starting at offset for the length of the source. - /// Source and target are referenced by name. - /// EXPORT_API void PluginSubtractNonZeroAllKeysAllFramesOffsetName(const char* sourceAnimation, const char* targetAnimation, int offset); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginSubtractNonZeroAllKeysAllFramesOffsetName(IntPtr sourceAnimation, IntPtr targetAnimation, int offset); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginSubtractNonZeroAllKeysAllFramesOffsetNameD(const char* sourceAnimation, const char* targetAnimation, double offset); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginSubtractNonZeroAllKeysAllFramesOffsetNameD(IntPtr sourceAnimation, IntPtr targetAnimation, double offset); - /// - /// Subtract the source color from the target color for the frame where the - /// target color is not black. Source and target are referenced by name. - /// EXPORT_API void PluginSubtractNonZeroAllKeysName(const char* sourceAnimation, const char* targetAnimation, int frameId); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginSubtractNonZeroAllKeysName(IntPtr sourceAnimation, IntPtr targetAnimation, int frameId); - /// - /// Subtract the source color from the target where color is not black for the - /// source frame and target offset frame, reference source and target by id. - /// - /// EXPORT_API void PluginSubtractNonZeroAllKeysOffset(int sourceAnimationId, int targetAnimationId, int frameId, int offset); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginSubtractNonZeroAllKeysOffset(int sourceAnimationId, int targetAnimationId, int frameId, int offset); - /// - /// Subtract the source color from the target where color is not black for the - /// source frame and target offset frame, reference source and target by name. - /// - /// EXPORT_API void PluginSubtractNonZeroAllKeysOffsetName(const char* sourceAnimation, const char* targetAnimation, int frameId, int offset); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginSubtractNonZeroAllKeysOffsetName(IntPtr sourceAnimation, IntPtr targetAnimation, int frameId, int offset); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginSubtractNonZeroAllKeysOffsetNameD(const char* sourceAnimation, const char* targetAnimation, double frameId, double offset); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginSubtractNonZeroAllKeysOffsetNameD(IntPtr sourceAnimation, IntPtr targetAnimation, double frameId, double offset); - /// - /// Subtract the source color from the target color where the target color is - /// not black for all frames. Reference source and target by id. - /// EXPORT_API void PluginSubtractNonZeroTargetAllKeysAllFrames(int sourceAnimationId, int targetAnimationId); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginSubtractNonZeroTargetAllKeysAllFrames(int sourceAnimationId, int targetAnimationId); - /// - /// Subtract the source color from the target color where the target color is - /// not black for all frames. Reference source and target by name. - /// EXPORT_API void PluginSubtractNonZeroTargetAllKeysAllFramesName(const char* sourceAnimation, const char* targetAnimation); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginSubtractNonZeroTargetAllKeysAllFramesName(IntPtr sourceAnimation, IntPtr targetAnimation); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginSubtractNonZeroTargetAllKeysAllFramesNameD(const char* sourceAnimation, const char* targetAnimation); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginSubtractNonZeroTargetAllKeysAllFramesNameD(IntPtr sourceAnimation, IntPtr targetAnimation); - /// - /// Subtract the source color from the target color where the target color is - /// not black for all frames starting at the target offset for the length of - /// the source. Reference source and target by id. - /// EXPORT_API void PluginSubtractNonZeroTargetAllKeysAllFramesOffset(int sourceAnimationId, int targetAnimationId, int offset); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginSubtractNonZeroTargetAllKeysAllFramesOffset(int sourceAnimationId, int targetAnimationId, int offset); - /// - /// Subtract the source color from the target color where the target color is - /// not black for all frames starting at the target offset for the length of - /// the source. Reference source and target by name. - /// EXPORT_API void PluginSubtractNonZeroTargetAllKeysAllFramesOffsetName(const char* sourceAnimation, const char* targetAnimation, int offset); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginSubtractNonZeroTargetAllKeysAllFramesOffsetName(IntPtr sourceAnimation, IntPtr targetAnimation, int offset); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginSubtractNonZeroTargetAllKeysAllFramesOffsetNameD(const char* sourceAnimation, const char* targetAnimation, double offset); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginSubtractNonZeroTargetAllKeysAllFramesOffsetNameD(IntPtr sourceAnimation, IntPtr targetAnimation, double offset); - /// - /// Subtract the source color from the target color where the target color is - /// not black from the source frame to the target offset frame. Reference source - /// and target by id. - /// EXPORT_API void PluginSubtractNonZeroTargetAllKeysOffset(int sourceAnimationId, int targetAnimationId, int frameId, int offset); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginSubtractNonZeroTargetAllKeysOffset(int sourceAnimationId, int targetAnimationId, int frameId, int offset); - /// - /// Subtract the source color from the target color where the target color is - /// not black from the source frame to the target offset frame. Reference source - /// and target by name. - /// EXPORT_API void PluginSubtractNonZeroTargetAllKeysOffsetName(const char* sourceAnimation, const char* targetAnimation, int frameId, int offset); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginSubtractNonZeroTargetAllKeysOffsetName(IntPtr sourceAnimation, IntPtr targetAnimation, int frameId, int offset); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginSubtractNonZeroTargetAllKeysOffsetNameD(const char* sourceAnimation, const char* targetAnimation, double frameId, double offset); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginSubtractNonZeroTargetAllKeysOffsetNameD(IntPtr sourceAnimation, IntPtr targetAnimation, double frameId, double offset); - /// - /// Subtract all frames with the min RGB color where the animation color is - /// less than the min threshold AND with the max RGB color where the animation - /// is more than the max threshold. Animation is referenced by id. - /// EXPORT_API void PluginSubtractThresholdColorsMinMaxAllFramesRGB(const int animationId, const int minThreshold, const int minRed, const int minGreen, const int minBlue, const int maxThreshold, const int maxRed, const int maxGreen, const int maxBlue); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginSubtractThresholdColorsMinMaxAllFramesRGB(int animationId, int minThreshold, int minRed, int minGreen, int minBlue, int maxThreshold, int maxRed, int maxGreen, int maxBlue); - /// - /// Subtract all frames with the min RGB color where the animation color is - /// less than the min threshold AND with the max RGB color where the animation - /// is more than the max threshold. Animation is referenced by name. - /// EXPORT_API void PluginSubtractThresholdColorsMinMaxAllFramesRGBName(const char* path, const int minThreshold, const int minRed, const int minGreen, const int minBlue, const int maxThreshold, const int maxRed, const int maxGreen, const int maxBlue); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginSubtractThresholdColorsMinMaxAllFramesRGBName(IntPtr path, int minThreshold, int minRed, int minGreen, int minBlue, int maxThreshold, int maxRed, int maxGreen, int maxBlue); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginSubtractThresholdColorsMinMaxAllFramesRGBNameD(const char* path, double minThreshold, double minRed, double minGreen, double minBlue, double maxThreshold, double maxRed, double maxGreen, double maxBlue); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginSubtractThresholdColorsMinMaxAllFramesRGBNameD(IntPtr path, double minThreshold, double minRed, double minGreen, double minBlue, double maxThreshold, double maxRed, double maxGreen, double maxBlue); - /// - /// Subtract the specified frame with the min RGB color where the animation - /// color is less than the min threshold AND with the max RGB color where the - /// animation is more than the max threshold. Animation is referenced by id. - /// - /// EXPORT_API void PluginSubtractThresholdColorsMinMaxRGB(const int animationId, const int frameId, const int minThreshold, const int minRed, const int minGreen, const int minBlue, const int maxThreshold, const int maxRed, const int maxGreen, const int maxBlue); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginSubtractThresholdColorsMinMaxRGB(int animationId, int frameId, int minThreshold, int minRed, int minGreen, int minBlue, int maxThreshold, int maxRed, int maxGreen, int maxBlue); - /// - /// Subtract the specified frame with the min RGB color where the animation - /// color is less than the min threshold AND with the max RGB color where the - /// animation is more than the max threshold. Animation is referenced by name. - /// - /// EXPORT_API void PluginSubtractThresholdColorsMinMaxRGBName(const char* path, const int frameId, const int minThreshold, const int minRed, const int minGreen, const int minBlue, const int maxThreshold, const int maxRed, const int maxGreen, const int maxBlue); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginSubtractThresholdColorsMinMaxRGBName(IntPtr path, int frameId, int minThreshold, int minRed, int minGreen, int minBlue, int maxThreshold, int maxRed, int maxGreen, int maxBlue); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginSubtractThresholdColorsMinMaxRGBNameD(const char* path, const int frameId, const int minThreshold, const int minRed, const int minGreen, const int minBlue, const int maxThreshold, const int maxRed, const int maxGreen, const int maxBlue); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginSubtractThresholdColorsMinMaxRGBNameD(IntPtr path, int frameId, int minThreshold, int minRed, int minGreen, int minBlue, int maxThreshold, int maxRed, int maxGreen, int maxBlue); - /// - /// Trim the end of the animation. The length of the animation will be the lastFrameId - /// plus one. Reference the animation by id. - /// EXPORT_API void PluginTrimEndFrames(int animationId, int lastFrameId); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginTrimEndFrames(int animationId, int lastFrameId); - /// - /// Trim the end of the animation. The length of the animation will be the lastFrameId - /// plus one. Reference the animation by name. - /// EXPORT_API void PluginTrimEndFramesName(const char* path, int lastFrameId); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginTrimEndFramesName(IntPtr path, int lastFrameId); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginTrimEndFramesNameD(const char* path, double lastFrameId); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginTrimEndFramesNameD(IntPtr path, double lastFrameId); - /// - /// Remove the frame from the animation. Reference animation by id. - /// EXPORT_API void PluginTrimFrame(int animationId, int frameId); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginTrimFrame(int animationId, int frameId); - /// - /// Remove the frame from the animation. Reference animation by name. - /// EXPORT_API void PluginTrimFrameName(const char* path, int frameId); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginTrimFrameName(IntPtr path, int frameId); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginTrimFrameNameD(const char* path, double frameId); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginTrimFrameNameD(IntPtr path, double frameId); - /// - /// Trim the start of the animation starting at frame 0 for the number of frames. - /// Reference the animation by id. - /// EXPORT_API void PluginTrimStartFrames(int animationId, int numberOfFrames); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginTrimStartFrames(int animationId, int numberOfFrames); - /// - /// Trim the start of the animation starting at frame 0 for the number of frames. - /// Reference the animation by name. - /// EXPORT_API void PluginTrimStartFramesName(const char* path, int numberOfFrames); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginTrimStartFramesName(IntPtr path, int numberOfFrames); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginTrimStartFramesNameD(const char* path, double numberOfFrames); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginTrimStartFramesNameD(IntPtr path, double numberOfFrames); - /// - /// Uninitializes the `ChromaSDK`. Returns 0 upon success. Returns negative - /// one upon failure. - /// EXPORT_API RZRESULT PluginUninit(); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern int PluginUninit(); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginUninitD(); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginUninitD(); - /// - /// Unloads `Chroma` effects to free up resources. Returns the animation id - /// upon success. Returns negative one upon failure. Reference the animation - /// by id. - /// EXPORT_API int PluginUnloadAnimation(int animationId); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern int PluginUnloadAnimation(int animationId); - /// - /// D suffix for limited data types. - /// EXPORT_API double PluginUnloadAnimationD(double animationId); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern double PluginUnloadAnimationD(double animationId); - /// - /// Unload the animation effects. Reference the animation by name. - /// EXPORT_API void PluginUnloadAnimationName(const char* path); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginUnloadAnimationName(IntPtr path); - /// - /// Unload the the composite set of animation effects. Reference the animation - /// by name. - /// EXPORT_API void PluginUnloadComposite(const char* name); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginUnloadComposite(IntPtr name); - /// - /// Unload the Razer Chroma SDK Library before exiting the application. - /// EXPORT_API void PluginUnloadLibrarySDK(); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginUnloadLibrarySDK(); - /// - /// Unload the Razer Chroma Streaming Plugin Library before exiting the application. - /// - /// EXPORT_API void PluginUnloadLibraryStreamingPlugin(); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginUnloadLibraryStreamingPlugin(); - /// - /// Updates the `frameIndex` of the `Chroma` animation referenced by id and - /// sets the `duration` (in seconds). The `color` is expected to be an array - /// of the dimensions for the `deviceType/device`. The `length` parameter is - /// the size of the `color` array. For `EChromaSDKDevice1DEnum` the array size - /// should be `MAX LEDS`. For `EChromaSDKDevice2DEnum` the array size should - /// be `MAX ROW` times `MAX COLUMN`. Keys are populated only for EChromaSDKDevice2DEnum::DE_Keyboard - /// and EChromaSDKDevice2DEnum::DE_KeyboardExtended. Keys will only use the - /// EChromaSDKDevice2DEnum::DE_Keyboard `MAX_ROW` times `MAX_COLUMN` keysLength. - /// - /// EXPORT_API int PluginUpdateFrame(int animationId, int frameIndex, float duration, int* colors, int length, int* keys, int keysLength); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern int PluginUpdateFrame(int animationId, int frameIndex, float duration, int[] colors, int length, int[] keys, int keysLength); - /// - /// Update the `frameIndex` of the `Chroma` animation referenced by name and - /// sets the `duration` (in seconds). The `color` is expected to be an array - /// of the dimensions for the `deviceType/device`. The `length` parameter is - /// the size of the `color` array. For `EChromaSDKDevice1DEnum` the array size - /// should be `MAX LEDS`. For `EChromaSDKDevice2DEnum` the array size should - /// be `MAX ROW` times `MAX COLUMN`. Keys are populated only for EChromaSDKDevice2DEnum::DE_Keyboard - /// and EChromaSDKDevice2DEnum::DE_KeyboardExtended. Keys will only use the - /// EChromaSDKDevice2DEnum::DE_Keyboard `MAX_ROW` times `MAX_COLUMN` keysLength. - /// Returns the animation id upon success. Returns negative one upon failure. - /// - /// EXPORT_API int PluginUpdateFrameName(const char* path, int frameIndex, float duration, int* colors, int length, int* keys, int keysLength); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern int PluginUpdateFrameName(IntPtr path, int frameIndex, float duration, int[] colors, int length, int[] keys, int keysLength); - /// - /// When the idle animation flag is true, when no other animations are playing, - /// the idle animation will be used. The idle animation will not be affected - /// by the API calls to PluginIsPlaying, PluginStopAnimationType, PluginGetPlayingAnimationId, - /// and PluginGetPlayingAnimationCount. Then the idle animation flag is false, - /// the idle animation is disabled. `Device` uses `EChromaSDKDeviceEnum` enums. - /// - /// EXPORT_API void PluginUseIdleAnimation(int device, bool flag); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginUseIdleAnimation(int device, bool flag); - /// - /// Set idle animation flag for all devices. - /// EXPORT_API void PluginUseIdleAnimations(bool flag); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginUseIdleAnimations(bool flag); - /// - /// Set preloading animation flag, which is set to true by default. Reference - /// animation by id. - /// EXPORT_API void PluginUsePreloading(int animationId, bool flag); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginUsePreloading(int animationId, bool flag); - /// - /// Set preloading animation flag, which is set to true by default. Reference - /// animation by name. - /// EXPORT_API void PluginUsePreloadingName(const char* path, bool flag); - /// - [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] - private static extern void PluginUsePreloadingName(IntPtr path, bool flag); - #endregion - } } diff --git a/FMODCoreAPI/Assets/AMD64/fmod.dll b/FMODCoreAPI/Assets/AMD64/fmod.dll index 7c2baf7..b587a68 100644 --- a/FMODCoreAPI/Assets/AMD64/fmod.dll +++ b/FMODCoreAPI/Assets/AMD64/fmod.dll @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ba58dfbdd1f3dee7a4e818f5812fee345d096224f50f347dc44d9f444ae2a295 +oid sha256:d563ad96042c096985735b0d1fdab80fe5c7f27663171ff1550ac8ebf4c7eba6 size 1852416 diff --git a/FMODCoreAPI/Assets/ARM64/fmod.dll b/FMODCoreAPI/Assets/ARM64/fmod.dll index f6b46fa..c1c7c14 100644 --- a/FMODCoreAPI/Assets/ARM64/fmod.dll +++ b/FMODCoreAPI/Assets/ARM64/fmod.dll @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d609ed06c46953e4240f4871e634034a9359d35b036b2543d9bb6d4c511073a0 +oid sha256:47768e5f50040f79e6182ddfdeb8aba3bc3e1b15571cfb337a0f5236a3d6c371 size 1419776 diff --git a/FMODCoreAPI/fmod.cs b/FMODCoreAPI/fmod.cs index 2f9e90e..a32ddc1 100644 --- a/FMODCoreAPI/fmod.cs +++ b/FMODCoreAPI/fmod.cs @@ -7,9 +7,9 @@ /* ======================================================================================== */ using System; -using System.Text; -using System.Runtime.InteropServices; using System.Collections.Generic; +using System.Runtime.InteropServices; +using System.Text; namespace FMOD { @@ -19,9 +19,9 @@ */ public partial class VERSION { - public const int number = 0x00020222; + public const int number = 0x00020223; #if !UNITY_2019_4_OR_NEWER - public const string dll = "fmod"; + public const string dll = "fmod"; #endif } @@ -158,14 +158,14 @@ [StructLayout(LayoutKind.Sequential)] public struct ASYNCREADINFO { - public IntPtr handle; - public uint offset; - public uint sizebytes; - public int priority; + public IntPtr handle; + public uint offset; + public uint sizebytes; + public int priority; - public IntPtr userdata; - public IntPtr buffer; - public uint bytesread; + public IntPtr userdata; + public IntPtr buffer; + public uint bytesread; public FILE_ASYNCDONE_FUNC done; } @@ -222,32 +222,32 @@ [Flags] public enum DEBUG_FLAGS : uint { - NONE = 0x00000000, - ERROR = 0x00000001, - WARNING = 0x00000002, - LOG = 0x00000004, + NONE = 0x00000000, + ERROR = 0x00000001, + WARNING = 0x00000002, + LOG = 0x00000004, - TYPE_MEMORY = 0x00000100, - TYPE_FILE = 0x00000200, - TYPE_CODEC = 0x00000400, - TYPE_TRACE = 0x00000800, + TYPE_MEMORY = 0x00000100, + TYPE_FILE = 0x00000200, + TYPE_CODEC = 0x00000400, + TYPE_TRACE = 0x00000800, - DISPLAY_TIMESTAMPS = 0x00010000, - DISPLAY_LINENUMBERS = 0x00020000, - DISPLAY_THREAD = 0x00040000, + DISPLAY_TIMESTAMPS = 0x00010000, + DISPLAY_LINENUMBERS = 0x00020000, + DISPLAY_THREAD = 0x00040000, } [Flags] public enum MEMORY_TYPE : uint { - NORMAL = 0x00000000, - STREAM_FILE = 0x00000001, - STREAM_DECODE = 0x00000002, - SAMPLEDATA = 0x00000004, - DSP_BUFFER = 0x00000008, - PLUGIN = 0x00000010, - PERSISTENT = 0x00200000, - ALL = 0xFFFFFFFF + NORMAL = 0x00000000, + STREAM_FILE = 0x00000001, + STREAM_DECODE = 0x00000002, + SAMPLEDATA = 0x00000004, + DSP_BUFFER = 0x00000008, + PLUGIN = 0x00000010, + PERSISTENT = 0x00200000, + ALL = 0xFFFFFFFF } public enum SPEAKERMODE : int @@ -287,25 +287,25 @@ [Flags] public enum CHANNELMASK : uint { - FRONT_LEFT = 0x00000001, - FRONT_RIGHT = 0x00000002, - FRONT_CENTER = 0x00000004, - LOW_FREQUENCY = 0x00000008, - SURROUND_LEFT = 0x00000010, - SURROUND_RIGHT = 0x00000020, - BACK_LEFT = 0x00000040, - BACK_RIGHT = 0x00000080, - BACK_CENTER = 0x00000100, + FRONT_LEFT = 0x00000001, + FRONT_RIGHT = 0x00000002, + FRONT_CENTER = 0x00000004, + LOW_FREQUENCY = 0x00000008, + SURROUND_LEFT = 0x00000010, + SURROUND_RIGHT = 0x00000020, + BACK_LEFT = 0x00000040, + BACK_RIGHT = 0x00000080, + BACK_CENTER = 0x00000100, - MONO = (FRONT_LEFT), - STEREO = (FRONT_LEFT | FRONT_RIGHT), - LRC = (FRONT_LEFT | FRONT_RIGHT | FRONT_CENTER), - QUAD = (FRONT_LEFT | FRONT_RIGHT | SURROUND_LEFT | SURROUND_RIGHT), - SURROUND = (FRONT_LEFT | FRONT_RIGHT | FRONT_CENTER | SURROUND_LEFT | SURROUND_RIGHT), - _5POINT1 = (FRONT_LEFT | FRONT_RIGHT | FRONT_CENTER | LOW_FREQUENCY | SURROUND_LEFT | SURROUND_RIGHT), - _5POINT1_REARS = (FRONT_LEFT | FRONT_RIGHT | FRONT_CENTER | LOW_FREQUENCY | BACK_LEFT | BACK_RIGHT), - _7POINT0 = (FRONT_LEFT | FRONT_RIGHT | FRONT_CENTER | SURROUND_LEFT | SURROUND_RIGHT | BACK_LEFT | BACK_RIGHT), - _7POINT1 = (FRONT_LEFT | FRONT_RIGHT | FRONT_CENTER | LOW_FREQUENCY | SURROUND_LEFT | SURROUND_RIGHT | BACK_LEFT | BACK_RIGHT) + MONO = (FRONT_LEFT), + STEREO = (FRONT_LEFT | FRONT_RIGHT), + LRC = (FRONT_LEFT | FRONT_RIGHT | FRONT_CENTER), + QUAD = (FRONT_LEFT | FRONT_RIGHT | SURROUND_LEFT | SURROUND_RIGHT), + SURROUND = (FRONT_LEFT | FRONT_RIGHT | FRONT_CENTER | SURROUND_LEFT | SURROUND_RIGHT), + _5POINT1 = (FRONT_LEFT | FRONT_RIGHT | FRONT_CENTER | LOW_FREQUENCY | SURROUND_LEFT | SURROUND_RIGHT), + _5POINT1_REARS = (FRONT_LEFT | FRONT_RIGHT | FRONT_CENTER | LOW_FREQUENCY | BACK_LEFT | BACK_RIGHT), + _7POINT0 = (FRONT_LEFT | FRONT_RIGHT | FRONT_CENTER | SURROUND_LEFT | SURROUND_RIGHT | BACK_LEFT | BACK_RIGHT), + _7POINT1 = (FRONT_LEFT | FRONT_RIGHT | FRONT_CENTER | LOW_FREQUENCY | SURROUND_LEFT | SURROUND_RIGHT | BACK_LEFT | BACK_RIGHT) } public enum CHANNELORDER : int @@ -339,20 +339,20 @@ [Flags] public enum INITFLAGS : uint { - NORMAL = 0x00000000, - STREAM_FROM_UPDATE = 0x00000001, - MIX_FROM_UPDATE = 0x00000002, - _3D_RIGHTHANDED = 0x00000004, - CLIP_OUTPUT = 0x00000008, - CHANNEL_LOWPASS = 0x00000100, - CHANNEL_DISTANCEFILTER = 0x00000200, - PROFILE_ENABLE = 0x00010000, - VOL0_BECOMES_VIRTUAL = 0x00020000, - GEOMETRY_USECLOSEST = 0x00040000, - PREFER_DOLBY_DOWNMIX = 0x00080000, - THREAD_UNSAFE = 0x00100000, - PROFILE_METER_ALL = 0x00200000, - MEMORY_TRACKING = 0x00400000, + NORMAL = 0x00000000, + STREAM_FROM_UPDATE = 0x00000001, + MIX_FROM_UPDATE = 0x00000002, + _3D_RIGHTHANDED = 0x00000004, + CLIP_OUTPUT = 0x00000008, + CHANNEL_LOWPASS = 0x00000100, + CHANNEL_DISTANCEFILTER = 0x00000200, + PROFILE_ENABLE = 0x00010000, + VOL0_BECOMES_VIRTUAL = 0x00020000, + GEOMETRY_USECLOSEST = 0x00040000, + PREFER_DOLBY_DOWNMIX = 0x00080000, + THREAD_UNSAFE = 0x00100000, + PROFILE_METER_ALL = 0x00200000, + MEMORY_TRACKING = 0x00400000, } public enum SOUND_TYPE : int @@ -402,35 +402,35 @@ [Flags] public enum MODE : uint { - DEFAULT = 0x00000000, - LOOP_OFF = 0x00000001, - LOOP_NORMAL = 0x00000002, - LOOP_BIDI = 0x00000004, - _2D = 0x00000008, - _3D = 0x00000010, - CREATESTREAM = 0x00000080, - CREATESAMPLE = 0x00000100, - CREATECOMPRESSEDSAMPLE = 0x00000200, - OPENUSER = 0x00000400, - OPENMEMORY = 0x00000800, - OPENMEMORY_POINT = 0x10000000, - OPENRAW = 0x00001000, - OPENONLY = 0x00002000, - ACCURATETIME = 0x00004000, - MPEGSEARCH = 0x00008000, - NONBLOCKING = 0x00010000, - UNIQUE = 0x00020000, - _3D_HEADRELATIVE = 0x00040000, - _3D_WORLDRELATIVE = 0x00080000, - _3D_INVERSEROLLOFF = 0x00100000, - _3D_LINEARROLLOFF = 0x00200000, - _3D_LINEARSQUAREROLLOFF = 0x00400000, - _3D_INVERSETAPEREDROLLOFF = 0x00800000, - _3D_CUSTOMROLLOFF = 0x04000000, - _3D_IGNOREGEOMETRY = 0x40000000, - IGNORETAGS = 0x02000000, - LOWMEM = 0x08000000, - VIRTUAL_PLAYFROMSTART = 0x80000000 + DEFAULT = 0x00000000, + LOOP_OFF = 0x00000001, + LOOP_NORMAL = 0x00000002, + LOOP_BIDI = 0x00000004, + _2D = 0x00000008, + _3D = 0x00000010, + CREATESTREAM = 0x00000080, + CREATESAMPLE = 0x00000100, + CREATECOMPRESSEDSAMPLE = 0x00000200, + OPENUSER = 0x00000400, + OPENMEMORY = 0x00000800, + OPENMEMORY_POINT = 0x10000000, + OPENRAW = 0x00001000, + OPENONLY = 0x00002000, + ACCURATETIME = 0x00004000, + MPEGSEARCH = 0x00008000, + NONBLOCKING = 0x00010000, + UNIQUE = 0x00020000, + _3D_HEADRELATIVE = 0x00040000, + _3D_WORLDRELATIVE = 0x00080000, + _3D_INVERSEROLLOFF = 0x00100000, + _3D_LINEARROLLOFF = 0x00200000, + _3D_LINEARSQUAREROLLOFF = 0x00400000, + _3D_INVERSETAPEREDROLLOFF = 0x00800000, + _3D_CUSTOMROLLOFF = 0x04000000, + _3D_IGNOREGEOMETRY = 0x40000000, + IGNORETAGS = 0x02000000, + LOWMEM = 0x08000000, + VIRTUAL_PLAYFROMSTART = 0x80000000 } public enum OPENSTATE : int @@ -468,9 +468,9 @@ public struct CHANNELCONTROL_DSP_INDEX { - public const int HEAD = -1; - public const int FADER = -2; - public const int TAIL = -3; + public const int HEAD = -1; + public const int FADER = -2; + public const int TAIL = -3; } public enum ERRORCALLBACK_INSTANCETYPE : int @@ -499,76 +499,76 @@ [StructLayout(LayoutKind.Sequential)] public struct ERRORCALLBACK_INFO { - public RESULT result; - public ERRORCALLBACK_INSTANCETYPE instancetype; - public IntPtr instance; - public StringWrapper functionname; - public StringWrapper functionparams; + public RESULT result; + public ERRORCALLBACK_INSTANCETYPE instancetype; + public IntPtr instance; + public StringWrapper functionname; + public StringWrapper functionparams; } [StructLayout(LayoutKind.Sequential)] public struct CPU_USAGE { - public float dsp; /* DSP mixing CPU usage. */ - public float stream; /* Streaming engine CPU usage. */ - public float geometry; /* Geometry engine CPU usage. */ - public float update; /* System::update CPU usage. */ - public float convolution1; /* Convolution reverb processing thread #1 CPU usage */ - public float convolution2; /* Convolution reverb processing thread #2 CPU usage */ + public float dsp; /* DSP mixing CPU usage. */ + public float stream; /* Streaming engine CPU usage. */ + public float geometry; /* Geometry engine CPU usage. */ + public float update; /* System::update CPU usage. */ + public float convolution1; /* Convolution reverb processing thread #1 CPU usage */ + public float convolution2; /* Convolution reverb processing thread #2 CPU usage */ } [StructLayout(LayoutKind.Sequential)] public struct DSP_DATA_PARAMETER_INFO { - public IntPtr data; - public uint length; - public int index; + public IntPtr data; + public uint length; + public int index; } [Flags] public enum SYSTEM_CALLBACK_TYPE : uint { - DEVICELISTCHANGED = 0x00000001, - DEVICELOST = 0x00000002, + DEVICELISTCHANGED = 0x00000001, + DEVICELOST = 0x00000002, MEMORYALLOCATIONFAILED = 0x00000004, - THREADCREATED = 0x00000008, - BADDSPCONNECTION = 0x00000010, - PREMIX = 0x00000020, - POSTMIX = 0x00000040, - ERROR = 0x00000080, - MIDMIX = 0x00000100, - THREADDESTROYED = 0x00000200, - PREUPDATE = 0x00000400, - POSTUPDATE = 0x00000800, - RECORDLISTCHANGED = 0x00001000, - BUFFEREDNOMIX = 0x00002000, - DEVICEREINITIALIZE = 0x00004000, - OUTPUTUNDERRUN = 0x00008000, - RECORDPOSITIONCHANGED = 0x00010000, - ALL = 0xFFFFFFFF, + THREADCREATED = 0x00000008, + BADDSPCONNECTION = 0x00000010, + PREMIX = 0x00000020, + POSTMIX = 0x00000040, + ERROR = 0x00000080, + MIDMIX = 0x00000100, + THREADDESTROYED = 0x00000200, + PREUPDATE = 0x00000400, + POSTUPDATE = 0x00000800, + RECORDLISTCHANGED = 0x00001000, + BUFFEREDNOMIX = 0x00002000, + DEVICEREINITIALIZE = 0x00004000, + OUTPUTUNDERRUN = 0x00008000, + RECORDPOSITIONCHANGED = 0x00010000, + ALL = 0xFFFFFFFF, } /* FMOD Callbacks */ - public delegate RESULT DEBUG_CALLBACK (DEBUG_FLAGS flags, IntPtr file, int line, IntPtr func, IntPtr message); - public delegate RESULT SYSTEM_CALLBACK (IntPtr system, SYSTEM_CALLBACK_TYPE type, IntPtr commanddata1, IntPtr commanddata2, IntPtr userdata); - public delegate RESULT CHANNELCONTROL_CALLBACK (IntPtr channelcontrol, CHANNELCONTROL_TYPE controltype, CHANNELCONTROL_CALLBACK_TYPE callbacktype, IntPtr commanddata1, IntPtr commanddata2); - public delegate RESULT DSP_CALLBACK (IntPtr dsp, DSP_CALLBACK_TYPE type, IntPtr data); - public delegate RESULT SOUND_NONBLOCK_CALLBACK (IntPtr sound, RESULT result); - public delegate RESULT SOUND_PCMREAD_CALLBACK (IntPtr sound, IntPtr data, uint datalen); - public delegate RESULT SOUND_PCMSETPOS_CALLBACK (IntPtr sound, int subsound, uint position, TIMEUNIT postype); - public delegate RESULT FILE_OPEN_CALLBACK (IntPtr name, ref uint filesize, ref IntPtr handle, IntPtr userdata); - public delegate RESULT FILE_CLOSE_CALLBACK (IntPtr handle, IntPtr userdata); - public delegate RESULT FILE_READ_CALLBACK (IntPtr handle, IntPtr buffer, uint sizebytes, ref uint bytesread, IntPtr userdata); - public delegate RESULT FILE_SEEK_CALLBACK (IntPtr handle, uint pos, IntPtr userdata); - public delegate RESULT FILE_ASYNCREAD_CALLBACK (IntPtr info, IntPtr userdata); + public delegate RESULT DEBUG_CALLBACK(DEBUG_FLAGS flags, IntPtr file, int line, IntPtr func, IntPtr message); + public delegate RESULT SYSTEM_CALLBACK(IntPtr system, SYSTEM_CALLBACK_TYPE type, IntPtr commanddata1, IntPtr commanddata2, IntPtr userdata); + public delegate RESULT CHANNELCONTROL_CALLBACK(IntPtr channelcontrol, CHANNELCONTROL_TYPE controltype, CHANNELCONTROL_CALLBACK_TYPE callbacktype, IntPtr commanddata1, IntPtr commanddata2); + public delegate RESULT DSP_CALLBACK(IntPtr dsp, DSP_CALLBACK_TYPE type, IntPtr data); + public delegate RESULT SOUND_NONBLOCK_CALLBACK(IntPtr sound, RESULT result); + public delegate RESULT SOUND_PCMREAD_CALLBACK(IntPtr sound, IntPtr data, uint datalen); + public delegate RESULT SOUND_PCMSETPOS_CALLBACK(IntPtr sound, int subsound, uint position, TIMEUNIT postype); + public delegate RESULT FILE_OPEN_CALLBACK(IntPtr name, ref uint filesize, ref IntPtr handle, IntPtr userdata); + public delegate RESULT FILE_CLOSE_CALLBACK(IntPtr handle, IntPtr userdata); + public delegate RESULT FILE_READ_CALLBACK(IntPtr handle, IntPtr buffer, uint sizebytes, ref uint bytesread, IntPtr userdata); + public delegate RESULT FILE_SEEK_CALLBACK(IntPtr handle, uint pos, IntPtr userdata); + public delegate RESULT FILE_ASYNCREAD_CALLBACK(IntPtr info, IntPtr userdata); public delegate RESULT FILE_ASYNCCANCEL_CALLBACK(IntPtr info, IntPtr userdata); - public delegate void FILE_ASYNCDONE_FUNC (IntPtr info, RESULT result); - public delegate IntPtr MEMORY_ALLOC_CALLBACK (uint size, MEMORY_TYPE type, IntPtr sourcestr); - public delegate IntPtr MEMORY_REALLOC_CALLBACK (IntPtr ptr, uint size, MEMORY_TYPE type, IntPtr sourcestr); - public delegate void MEMORY_FREE_CALLBACK (IntPtr ptr, MEMORY_TYPE type, IntPtr sourcestr); - public delegate float CB_3D_ROLLOFF_CALLBACK (IntPtr channelcontrol, float distance); + public delegate void FILE_ASYNCDONE_FUNC(IntPtr info, RESULT result); + public delegate IntPtr MEMORY_ALLOC_CALLBACK(uint size, MEMORY_TYPE type, IntPtr sourcestr); + public delegate IntPtr MEMORY_REALLOC_CALLBACK(IntPtr ptr, uint size, MEMORY_TYPE type, IntPtr sourcestr); + public delegate void MEMORY_FREE_CALLBACK(IntPtr ptr, MEMORY_TYPE type, IntPtr sourcestr); + public delegate float CB_3D_ROLLOFF_CALLBACK(IntPtr channelcontrol, float distance); public enum DSP_RESAMPLER : int { @@ -631,72 +631,72 @@ [StructLayout(LayoutKind.Sequential)] public struct TAG { - public TAGTYPE type; - public TAGDATATYPE datatype; - public StringWrapper name; - public IntPtr data; - public uint datalen; - public bool updated; + public TAGTYPE type; + public TAGDATATYPE datatype; + public StringWrapper name; + public IntPtr data; + public uint datalen; + public bool updated; } [Flags] public enum TIMEUNIT : uint { - MS = 0x00000001, - PCM = 0x00000002, - PCMBYTES = 0x00000004, - RAWBYTES = 0x00000008, + MS = 0x00000001, + PCM = 0x00000002, + PCMBYTES = 0x00000004, + RAWBYTES = 0x00000008, PCMFRACTION = 0x00000010, - MODORDER = 0x00000100, - MODROW = 0x00000200, - MODPATTERN = 0x00000400, + MODORDER = 0x00000100, + MODROW = 0x00000200, + MODPATTERN = 0x00000400, } public struct PORT_INDEX { - public const ulong NONE = 0xFFFFFFFFFFFFFFFF; + public const ulong NONE = 0xFFFFFFFFFFFFFFFF; public const ulong FLAG_VR_CONTROLLER = 0x1000000000000000; } [StructLayout(LayoutKind.Sequential)] public struct CREATESOUNDEXINFO { - public int cbsize; - public uint length; - public uint fileoffset; - public int numchannels; - public int defaultfrequency; - public SOUND_FORMAT format; - public uint decodebuffersize; - public int initialsubsound; - public int numsubsounds; - public IntPtr inclusionlist; - public int inclusionlistnum; - public IntPtr pcmreadcallback_internal; - public IntPtr pcmsetposcallback_internal; - public IntPtr nonblockcallback_internal; - public IntPtr dlsname; - public IntPtr encryptionkey; - public int maxpolyphony; - public IntPtr userdata; - public SOUND_TYPE suggestedsoundtype; - public IntPtr fileuseropen_internal; - public IntPtr fileuserclose_internal; - public IntPtr fileuserread_internal; - public IntPtr fileuserseek_internal; - public IntPtr fileuserasyncread_internal; - public IntPtr fileuserasynccancel_internal; - public IntPtr fileuserdata; - public int filebuffersize; - public CHANNELORDER channelorder; - public IntPtr initialsoundgroup; - public uint initialseekposition; - public TIMEUNIT initialseekpostype; - public int ignoresetfilesystem; - public uint audioqueuepolicy; - public uint minmidigranularity; - public int nonblockthreadid; - public IntPtr fsbguid; + public int cbsize; + public uint length; + public uint fileoffset; + public int numchannels; + public int defaultfrequency; + public SOUND_FORMAT format; + public uint decodebuffersize; + public int initialsubsound; + public int numsubsounds; + public IntPtr inclusionlist; + public int inclusionlistnum; + public IntPtr pcmreadcallback_internal; + public IntPtr pcmsetposcallback_internal; + public IntPtr nonblockcallback_internal; + public IntPtr dlsname; + public IntPtr encryptionkey; + public int maxpolyphony; + public IntPtr userdata; + public SOUND_TYPE suggestedsoundtype; + public IntPtr fileuseropen_internal; + public IntPtr fileuserclose_internal; + public IntPtr fileuserread_internal; + public IntPtr fileuserseek_internal; + public IntPtr fileuserasyncread_internal; + public IntPtr fileuserasynccancel_internal; + public IntPtr fileuserdata; + public int filebuffersize; + public CHANNELORDER channelorder; + public IntPtr initialsoundgroup; + public uint initialseekposition; + public TIMEUNIT initialseekpostype; + public int ignoresetfilesystem; + public uint audioqueuepolicy; + public uint minmidigranularity; + public int nonblockthreadid; + public IntPtr fsbguid; public SOUND_PCMREAD_CALLBACK pcmreadcallback { @@ -787,159 +787,159 @@ public class PRESET { - public static REVERB_PROPERTIES OFF() { return new REVERB_PROPERTIES( 1000, 7, 11, 5000, 100, 100, 100, 250, 0, 20, 96, -80.0f );} - public static REVERB_PROPERTIES GENERIC() { return new REVERB_PROPERTIES( 1500, 7, 11, 5000, 83, 100, 100, 250, 0, 14500, 96, -8.0f );} - public static REVERB_PROPERTIES PADDEDCELL() { return new REVERB_PROPERTIES( 170, 1, 2, 5000, 10, 100, 100, 250, 0, 160, 84, -7.8f );} - public static REVERB_PROPERTIES ROOM() { return new REVERB_PROPERTIES( 400, 2, 3, 5000, 83, 100, 100, 250, 0, 6050, 88, -9.4f );} - public static REVERB_PROPERTIES BATHROOM() { return new REVERB_PROPERTIES( 1500, 7, 11, 5000, 54, 100, 60, 250, 0, 2900, 83, 0.5f );} - public static REVERB_PROPERTIES LIVINGROOM() { return new REVERB_PROPERTIES( 500, 3, 4, 5000, 10, 100, 100, 250, 0, 160, 58, -19.0f );} - public static REVERB_PROPERTIES STONEROOM() { return new REVERB_PROPERTIES( 2300, 12, 17, 5000, 64, 100, 100, 250, 0, 7800, 71, -8.5f );} - public static REVERB_PROPERTIES AUDITORIUM() { return new REVERB_PROPERTIES( 4300, 20, 30, 5000, 59, 100, 100, 250, 0, 5850, 64, -11.7f );} - public static REVERB_PROPERTIES CONCERTHALL() { return new REVERB_PROPERTIES( 3900, 20, 29, 5000, 70, 100, 100, 250, 0, 5650, 80, -9.8f );} - public static REVERB_PROPERTIES CAVE() { return new REVERB_PROPERTIES( 2900, 15, 22, 5000, 100, 100, 100, 250, 0, 20000, 59, -11.3f );} - public static REVERB_PROPERTIES ARENA() { return new REVERB_PROPERTIES( 7200, 20, 30, 5000, 33, 100, 100, 250, 0, 4500, 80, -9.6f );} - public static REVERB_PROPERTIES HANGAR() { return new REVERB_PROPERTIES( 10000, 20, 30, 5000, 23, 100, 100, 250, 0, 3400, 72, -7.4f );} - public static REVERB_PROPERTIES CARPETTEDHALLWAY() { return new REVERB_PROPERTIES( 300, 2, 30, 5000, 10, 100, 100, 250, 0, 500, 56, -24.0f );} - public static REVERB_PROPERTIES HALLWAY() { return new REVERB_PROPERTIES( 1500, 7, 11, 5000, 59, 100, 100, 250, 0, 7800, 87, -5.5f );} - public static REVERB_PROPERTIES STONECORRIDOR() { return new REVERB_PROPERTIES( 270, 13, 20, 5000, 79, 100, 100, 250, 0, 9000, 86, -6.0f );} - public static REVERB_PROPERTIES ALLEY() { return new REVERB_PROPERTIES( 1500, 7, 11, 5000, 86, 100, 100, 250, 0, 8300, 80, -9.8f );} - public static REVERB_PROPERTIES FOREST() { return new REVERB_PROPERTIES( 1500, 162, 88, 5000, 54, 79, 100, 250, 0, 760, 94, -12.3f );} - public static REVERB_PROPERTIES CITY() { return new REVERB_PROPERTIES( 1500, 7, 11, 5000, 67, 50, 100, 250, 0, 4050, 66, -26.0f );} - public static REVERB_PROPERTIES MOUNTAINS() { return new REVERB_PROPERTIES( 1500, 300, 100, 5000, 21, 27, 100, 250, 0, 1220, 82, -24.0f );} - public static REVERB_PROPERTIES QUARRY() { return new REVERB_PROPERTIES( 1500, 61, 25, 5000, 83, 100, 100, 250, 0, 3400, 100, -5.0f );} - public static REVERB_PROPERTIES PLAIN() { return new REVERB_PROPERTIES( 1500, 179, 100, 5000, 50, 21, 100, 250, 0, 1670, 65, -28.0f );} - public static REVERB_PROPERTIES PARKINGLOT() { return new REVERB_PROPERTIES( 1700, 8, 12, 5000, 100, 100, 100, 250, 0, 20000, 56, -19.5f );} - public static REVERB_PROPERTIES SEWERPIPE() { return new REVERB_PROPERTIES( 2800, 14, 21, 5000, 14, 80, 60, 250, 0, 3400, 66, 1.2f );} - public static REVERB_PROPERTIES UNDERWATER() { return new REVERB_PROPERTIES( 1500, 7, 11, 5000, 10, 100, 100, 250, 0, 500, 92, 7.0f );} + public static REVERB_PROPERTIES OFF() { return new REVERB_PROPERTIES(1000, 7, 11, 5000, 100, 100, 100, 250, 0, 20, 96, -80.0f); } + public static REVERB_PROPERTIES GENERIC() { return new REVERB_PROPERTIES(1500, 7, 11, 5000, 83, 100, 100, 250, 0, 14500, 96, -8.0f); } + public static REVERB_PROPERTIES PADDEDCELL() { return new REVERB_PROPERTIES(170, 1, 2, 5000, 10, 100, 100, 250, 0, 160, 84, -7.8f); } + public static REVERB_PROPERTIES ROOM() { return new REVERB_PROPERTIES(400, 2, 3, 5000, 83, 100, 100, 250, 0, 6050, 88, -9.4f); } + public static REVERB_PROPERTIES BATHROOM() { return new REVERB_PROPERTIES(1500, 7, 11, 5000, 54, 100, 60, 250, 0, 2900, 83, 0.5f); } + public static REVERB_PROPERTIES LIVINGROOM() { return new REVERB_PROPERTIES(500, 3, 4, 5000, 10, 100, 100, 250, 0, 160, 58, -19.0f); } + public static REVERB_PROPERTIES STONEROOM() { return new REVERB_PROPERTIES(2300, 12, 17, 5000, 64, 100, 100, 250, 0, 7800, 71, -8.5f); } + public static REVERB_PROPERTIES AUDITORIUM() { return new REVERB_PROPERTIES(4300, 20, 30, 5000, 59, 100, 100, 250, 0, 5850, 64, -11.7f); } + public static REVERB_PROPERTIES CONCERTHALL() { return new REVERB_PROPERTIES(3900, 20, 29, 5000, 70, 100, 100, 250, 0, 5650, 80, -9.8f); } + public static REVERB_PROPERTIES CAVE() { return new REVERB_PROPERTIES(2900, 15, 22, 5000, 100, 100, 100, 250, 0, 20000, 59, -11.3f); } + public static REVERB_PROPERTIES ARENA() { return new REVERB_PROPERTIES(7200, 20, 30, 5000, 33, 100, 100, 250, 0, 4500, 80, -9.6f); } + public static REVERB_PROPERTIES HANGAR() { return new REVERB_PROPERTIES(10000, 20, 30, 5000, 23, 100, 100, 250, 0, 3400, 72, -7.4f); } + public static REVERB_PROPERTIES CARPETTEDHALLWAY() { return new REVERB_PROPERTIES(300, 2, 30, 5000, 10, 100, 100, 250, 0, 500, 56, -24.0f); } + public static REVERB_PROPERTIES HALLWAY() { return new REVERB_PROPERTIES(1500, 7, 11, 5000, 59, 100, 100, 250, 0, 7800, 87, -5.5f); } + public static REVERB_PROPERTIES STONECORRIDOR() { return new REVERB_PROPERTIES(270, 13, 20, 5000, 79, 100, 100, 250, 0, 9000, 86, -6.0f); } + public static REVERB_PROPERTIES ALLEY() { return new REVERB_PROPERTIES(1500, 7, 11, 5000, 86, 100, 100, 250, 0, 8300, 80, -9.8f); } + public static REVERB_PROPERTIES FOREST() { return new REVERB_PROPERTIES(1500, 162, 88, 5000, 54, 79, 100, 250, 0, 760, 94, -12.3f); } + public static REVERB_PROPERTIES CITY() { return new REVERB_PROPERTIES(1500, 7, 11, 5000, 67, 50, 100, 250, 0, 4050, 66, -26.0f); } + public static REVERB_PROPERTIES MOUNTAINS() { return new REVERB_PROPERTIES(1500, 300, 100, 5000, 21, 27, 100, 250, 0, 1220, 82, -24.0f); } + public static REVERB_PROPERTIES QUARRY() { return new REVERB_PROPERTIES(1500, 61, 25, 5000, 83, 100, 100, 250, 0, 3400, 100, -5.0f); } + public static REVERB_PROPERTIES PLAIN() { return new REVERB_PROPERTIES(1500, 179, 100, 5000, 50, 21, 100, 250, 0, 1670, 65, -28.0f); } + public static REVERB_PROPERTIES PARKINGLOT() { return new REVERB_PROPERTIES(1700, 8, 12, 5000, 100, 100, 100, 250, 0, 20000, 56, -19.5f); } + public static REVERB_PROPERTIES SEWERPIPE() { return new REVERB_PROPERTIES(2800, 14, 21, 5000, 14, 80, 60, 250, 0, 3400, 66, 1.2f); } + public static REVERB_PROPERTIES UNDERWATER() { return new REVERB_PROPERTIES(1500, 7, 11, 5000, 10, 100, 100, 250, 0, 500, 92, 7.0f); } } [StructLayout(LayoutKind.Sequential)] public struct ADVANCEDSETTINGS { - public int cbSize; - public int maxMPEGCodecs; - public int maxADPCMCodecs; - public int maxXMACodecs; - public int maxVorbisCodecs; - public int maxAT9Codecs; - public int maxFADPCMCodecs; - public int maxPCMCodecs; - public int ASIONumChannels; - public IntPtr ASIOChannelList; - public IntPtr ASIOSpeakerList; - public float vol0virtualvol; - public uint defaultDecodeBufferSize; - public ushort profilePort; - public uint geometryMaxFadeTime; - public float distanceFilterCenterFreq; - public int reverb3Dinstance; - public int DSPBufferPoolSize; - public DSP_RESAMPLER resamplerMethod; - public uint randomSeed; - public int maxConvolutionThreads; - public int maxOpusCodecs; - public int maxSpatialObjects; + public int cbSize; + public int maxMPEGCodecs; + public int maxADPCMCodecs; + public int maxXMACodecs; + public int maxVorbisCodecs; + public int maxAT9Codecs; + public int maxFADPCMCodecs; + public int maxPCMCodecs; + public int ASIONumChannels; + public IntPtr ASIOChannelList; + public IntPtr ASIOSpeakerList; + public float vol0virtualvol; + public uint defaultDecodeBufferSize; + public ushort profilePort; + public uint geometryMaxFadeTime; + public float distanceFilterCenterFreq; + public int reverb3Dinstance; + public int DSPBufferPoolSize; + public DSP_RESAMPLER resamplerMethod; + public uint randomSeed; + public int maxConvolutionThreads; + public int maxOpusCodecs; + public int maxSpatialObjects; } [Flags] public enum DRIVER_STATE : uint { CONNECTED = 0x00000001, - DEFAULT = 0x00000002, + DEFAULT = 0x00000002, } public enum THREAD_PRIORITY : int { /* Platform specific priority range */ - PLATFORM_MIN = -32 * 1024, - PLATFORM_MAX = 32 * 1024, + PLATFORM_MIN = -32 * 1024, + PLATFORM_MAX = 32 * 1024, /* Platform agnostic priorities, maps internally to platform specific value */ - DEFAULT = PLATFORM_MIN - 1, - LOW = PLATFORM_MIN - 2, - MEDIUM = PLATFORM_MIN - 3, - HIGH = PLATFORM_MIN - 4, - VERY_HIGH = PLATFORM_MIN - 5, - EXTREME = PLATFORM_MIN - 6, - CRITICAL = PLATFORM_MIN - 7, + DEFAULT = PLATFORM_MIN - 1, + LOW = PLATFORM_MIN - 2, + MEDIUM = PLATFORM_MIN - 3, + HIGH = PLATFORM_MIN - 4, + VERY_HIGH = PLATFORM_MIN - 5, + EXTREME = PLATFORM_MIN - 6, + CRITICAL = PLATFORM_MIN - 7, /* Thread defaults */ - MIXER = EXTREME, - FEEDER = CRITICAL, - STREAM = VERY_HIGH, - FILE = HIGH, - NONBLOCKING = HIGH, - RECORD = HIGH, - GEOMETRY = LOW, - PROFILER = MEDIUM, - STUDIO_UPDATE = MEDIUM, - STUDIO_LOAD_BANK = MEDIUM, - STUDIO_LOAD_SAMPLE = MEDIUM, - CONVOLUTION1 = VERY_HIGH, - CONVOLUTION2 = VERY_HIGH + MIXER = EXTREME, + FEEDER = CRITICAL, + STREAM = VERY_HIGH, + FILE = HIGH, + NONBLOCKING = HIGH, + RECORD = HIGH, + GEOMETRY = LOW, + PROFILER = MEDIUM, + STUDIO_UPDATE = MEDIUM, + STUDIO_LOAD_BANK = MEDIUM, + STUDIO_LOAD_SAMPLE = MEDIUM, + CONVOLUTION1 = VERY_HIGH, + CONVOLUTION2 = VERY_HIGH } public enum THREAD_STACK_SIZE : uint { - DEFAULT = 0, - MIXER = 80 * 1024, - FEEDER = 16 * 1024, - STREAM = 96 * 1024, - FILE = 64 * 1024, - NONBLOCKING = 112 * 1024, - RECORD = 16 * 1024, - GEOMETRY = 48 * 1024, - PROFILER = 128 * 1024, - STUDIO_UPDATE = 96 * 1024, - STUDIO_LOAD_BANK = 96 * 1024, - STUDIO_LOAD_SAMPLE = 96 * 1024, - CONVOLUTION1 = 16 * 1024, - CONVOLUTION2 = 16 * 1024 + DEFAULT = 0, + MIXER = 80 * 1024, + FEEDER = 16 * 1024, + STREAM = 96 * 1024, + FILE = 64 * 1024, + NONBLOCKING = 112 * 1024, + RECORD = 16 * 1024, + GEOMETRY = 48 * 1024, + PROFILER = 128 * 1024, + STUDIO_UPDATE = 96 * 1024, + STUDIO_LOAD_BANK = 96 * 1024, + STUDIO_LOAD_SAMPLE = 96 * 1024, + CONVOLUTION1 = 16 * 1024, + CONVOLUTION2 = 16 * 1024 } [Flags] public enum THREAD_AFFINITY : long { /* Platform agnostic thread groupings */ - GROUP_DEFAULT = 0x4000000000000000, - GROUP_A = 0x4000000000000001, - GROUP_B = 0x4000000000000002, - GROUP_C = 0x4000000000000003, + GROUP_DEFAULT = 0x4000000000000000, + GROUP_A = 0x4000000000000001, + GROUP_B = 0x4000000000000002, + GROUP_C = 0x4000000000000003, /* Thread defaults */ - MIXER = GROUP_A, - FEEDER = GROUP_C, - STREAM = GROUP_C, - FILE = GROUP_C, - NONBLOCKING = GROUP_C, - RECORD = GROUP_C, - GEOMETRY = GROUP_C, - PROFILER = GROUP_C, - STUDIO_UPDATE = GROUP_B, - STUDIO_LOAD_BANK = GROUP_C, - STUDIO_LOAD_SAMPLE = GROUP_C, - CONVOLUTION1 = GROUP_C, - CONVOLUTION2 = GROUP_C, + MIXER = GROUP_A, + FEEDER = GROUP_C, + STREAM = GROUP_C, + FILE = GROUP_C, + NONBLOCKING = GROUP_C, + RECORD = GROUP_C, + GEOMETRY = GROUP_C, + PROFILER = GROUP_C, + STUDIO_UPDATE = GROUP_B, + STUDIO_LOAD_BANK = GROUP_C, + STUDIO_LOAD_SAMPLE = GROUP_C, + CONVOLUTION1 = GROUP_C, + CONVOLUTION2 = GROUP_C, /* Core mask, valid up to 1 << 61 */ - CORE_ALL = 0, - CORE_0 = 1 << 0, - CORE_1 = 1 << 1, - CORE_2 = 1 << 2, - CORE_3 = 1 << 3, - CORE_4 = 1 << 4, - CORE_5 = 1 << 5, - CORE_6 = 1 << 6, - CORE_7 = 1 << 7, - CORE_8 = 1 << 8, - CORE_9 = 1 << 9, - CORE_10 = 1 << 10, - CORE_11 = 1 << 11, - CORE_12 = 1 << 12, - CORE_13 = 1 << 13, - CORE_14 = 1 << 14, - CORE_15 = 1 << 15 + CORE_ALL = 0, + CORE_0 = 1 << 0, + CORE_1 = 1 << 1, + CORE_2 = 1 << 2, + CORE_3 = 1 << 3, + CORE_4 = 1 << 4, + CORE_5 = 1 << 5, + CORE_6 = 1 << 6, + CORE_7 = 1 << 7, + CORE_8 = 1 << 8, + CORE_9 = 1 << 9, + CORE_10 = 1 << 10, + CORE_11 = 1 << 11, + CORE_12 = 1 << 12, + CORE_13 = 1 << 13, + CORE_14 = 1 << 14, + CORE_15 = 1 << 15 } public enum THREAD_TYPE : int @@ -997,7 +997,7 @@ [DllImport(VERSION.dll)] private static extern RESULT FMOD5_Memory_Initialize(IntPtr poolmem, int poollen, MEMORY_ALLOC_CALLBACK useralloc, MEMORY_REALLOC_CALLBACK userrealloc, MEMORY_FREE_CALLBACK userfree, MEMORY_TYPE memtypeflags); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Memory_GetStats (out int currentalloced, out int maxalloced, bool blocking); + private static extern RESULT FMOD5_Memory_GetStats(out int currentalloced, out int maxalloced, bool blocking); #endregion } @@ -1307,7 +1307,7 @@ { using (StringHelper.ThreadSafeEncoding encoder = StringHelper.GetFreeHelper()) { - return FMOD5_System_CreateSound(this.handle, encoder.byteFromStringUTF8(name), mode, ref exinfo, out sound.handle); + return FMOD5_System_CreateSound(this.handle, encoder.byteFromStringUTF8(name), mode, ref exinfo, out sound.handle); } } public RESULT createSound(byte[] data, MODE mode, ref CREATESOUNDEXINFO exinfo, out Sound sound) @@ -1532,200 +1532,200 @@ #region importfunctions [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_Release (IntPtr system); + private static extern RESULT FMOD5_System_Release(IntPtr system); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_SetOutput (IntPtr system, OUTPUTTYPE output); + private static extern RESULT FMOD5_System_SetOutput(IntPtr system, OUTPUTTYPE output); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_GetOutput (IntPtr system, out OUTPUTTYPE output); + private static extern RESULT FMOD5_System_GetOutput(IntPtr system, out OUTPUTTYPE output); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_GetNumDrivers (IntPtr system, out int numdrivers); + private static extern RESULT FMOD5_System_GetNumDrivers(IntPtr system, out int numdrivers); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_GetDriverInfo (IntPtr system, int id, IntPtr name, int namelen, out Guid guid, out int systemrate, out SPEAKERMODE speakermode, out int speakermodechannels); + private static extern RESULT FMOD5_System_GetDriverInfo(IntPtr system, int id, IntPtr name, int namelen, out Guid guid, out int systemrate, out SPEAKERMODE speakermode, out int speakermodechannels); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_SetDriver (IntPtr system, int driver); + private static extern RESULT FMOD5_System_SetDriver(IntPtr system, int driver); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_GetDriver (IntPtr system, out int driver); + private static extern RESULT FMOD5_System_GetDriver(IntPtr system, out int driver); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_SetSoftwareChannels (IntPtr system, int numsoftwarechannels); + private static extern RESULT FMOD5_System_SetSoftwareChannels(IntPtr system, int numsoftwarechannels); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_GetSoftwareChannels (IntPtr system, out int numsoftwarechannels); + private static extern RESULT FMOD5_System_GetSoftwareChannels(IntPtr system, out int numsoftwarechannels); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_SetSoftwareFormat (IntPtr system, int samplerate, SPEAKERMODE speakermode, int numrawspeakers); + private static extern RESULT FMOD5_System_SetSoftwareFormat(IntPtr system, int samplerate, SPEAKERMODE speakermode, int numrawspeakers); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_GetSoftwareFormat (IntPtr system, out int samplerate, out SPEAKERMODE speakermode, out int numrawspeakers); + private static extern RESULT FMOD5_System_GetSoftwareFormat(IntPtr system, out int samplerate, out SPEAKERMODE speakermode, out int numrawspeakers); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_SetDSPBufferSize (IntPtr system, uint bufferlength, int numbuffers); + private static extern RESULT FMOD5_System_SetDSPBufferSize(IntPtr system, uint bufferlength, int numbuffers); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_GetDSPBufferSize (IntPtr system, out uint bufferlength, out int numbuffers); + private static extern RESULT FMOD5_System_GetDSPBufferSize(IntPtr system, out uint bufferlength, out int numbuffers); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_SetFileSystem (IntPtr system, FILE_OPEN_CALLBACK useropen, FILE_CLOSE_CALLBACK userclose, FILE_READ_CALLBACK userread, FILE_SEEK_CALLBACK userseek, FILE_ASYNCREAD_CALLBACK userasyncread, FILE_ASYNCCANCEL_CALLBACK userasynccancel, int blockalign); + private static extern RESULT FMOD5_System_SetFileSystem(IntPtr system, FILE_OPEN_CALLBACK useropen, FILE_CLOSE_CALLBACK userclose, FILE_READ_CALLBACK userread, FILE_SEEK_CALLBACK userseek, FILE_ASYNCREAD_CALLBACK userasyncread, FILE_ASYNCCANCEL_CALLBACK userasynccancel, int blockalign); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_AttachFileSystem (IntPtr system, FILE_OPEN_CALLBACK useropen, FILE_CLOSE_CALLBACK userclose, FILE_READ_CALLBACK userread, FILE_SEEK_CALLBACK userseek); + private static extern RESULT FMOD5_System_AttachFileSystem(IntPtr system, FILE_OPEN_CALLBACK useropen, FILE_CLOSE_CALLBACK userclose, FILE_READ_CALLBACK userread, FILE_SEEK_CALLBACK userseek); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_SetAdvancedSettings (IntPtr system, ref ADVANCEDSETTINGS settings); + private static extern RESULT FMOD5_System_SetAdvancedSettings(IntPtr system, ref ADVANCEDSETTINGS settings); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_GetAdvancedSettings (IntPtr system, ref ADVANCEDSETTINGS settings); + private static extern RESULT FMOD5_System_GetAdvancedSettings(IntPtr system, ref ADVANCEDSETTINGS settings); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_SetCallback (IntPtr system, SYSTEM_CALLBACK callback, SYSTEM_CALLBACK_TYPE callbackmask); + private static extern RESULT FMOD5_System_SetCallback(IntPtr system, SYSTEM_CALLBACK callback, SYSTEM_CALLBACK_TYPE callbackmask); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_SetPluginPath (IntPtr system, byte[] path); + private static extern RESULT FMOD5_System_SetPluginPath(IntPtr system, byte[] path); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_LoadPlugin (IntPtr system, byte[] filename, out uint handle, uint priority); + private static extern RESULT FMOD5_System_LoadPlugin(IntPtr system, byte[] filename, out uint handle, uint priority); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_UnloadPlugin (IntPtr system, uint handle); + private static extern RESULT FMOD5_System_UnloadPlugin(IntPtr system, uint handle); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_GetNumNestedPlugins (IntPtr system, uint handle, out int count); + private static extern RESULT FMOD5_System_GetNumNestedPlugins(IntPtr system, uint handle, out int count); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_GetNestedPlugin (IntPtr system, uint handle, int index, out uint nestedhandle); + private static extern RESULT FMOD5_System_GetNestedPlugin(IntPtr system, uint handle, int index, out uint nestedhandle); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_GetNumPlugins (IntPtr system, PLUGINTYPE plugintype, out int numplugins); + private static extern RESULT FMOD5_System_GetNumPlugins(IntPtr system, PLUGINTYPE plugintype, out int numplugins); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_GetPluginHandle (IntPtr system, PLUGINTYPE plugintype, int index, out uint handle); + private static extern RESULT FMOD5_System_GetPluginHandle(IntPtr system, PLUGINTYPE plugintype, int index, out uint handle); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_GetPluginInfo (IntPtr system, uint handle, out PLUGINTYPE plugintype, IntPtr name, int namelen, out uint version); + private static extern RESULT FMOD5_System_GetPluginInfo(IntPtr system, uint handle, out PLUGINTYPE plugintype, IntPtr name, int namelen, out uint version); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_SetOutputByPlugin (IntPtr system, uint handle); + private static extern RESULT FMOD5_System_SetOutputByPlugin(IntPtr system, uint handle); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_GetOutputByPlugin (IntPtr system, out uint handle); + private static extern RESULT FMOD5_System_GetOutputByPlugin(IntPtr system, out uint handle); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_CreateDSPByPlugin (IntPtr system, uint handle, out IntPtr dsp); + private static extern RESULT FMOD5_System_CreateDSPByPlugin(IntPtr system, uint handle, out IntPtr dsp); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_GetDSPInfoByPlugin (IntPtr system, uint handle, out IntPtr description); + private static extern RESULT FMOD5_System_GetDSPInfoByPlugin(IntPtr system, uint handle, out IntPtr description); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_RegisterDSP (IntPtr system, ref DSP_DESCRIPTION description, out uint handle); + private static extern RESULT FMOD5_System_RegisterDSP(IntPtr system, ref DSP_DESCRIPTION description, out uint handle); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_Init (IntPtr system, int maxchannels, INITFLAGS flags, IntPtr extradriverdata); + private static extern RESULT FMOD5_System_Init(IntPtr system, int maxchannels, INITFLAGS flags, IntPtr extradriverdata); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_Close (IntPtr system); + private static extern RESULT FMOD5_System_Close(IntPtr system); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_Update (IntPtr system); + private static extern RESULT FMOD5_System_Update(IntPtr system); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_SetSpeakerPosition (IntPtr system, SPEAKER speaker, float x, float y, bool active); + private static extern RESULT FMOD5_System_SetSpeakerPosition(IntPtr system, SPEAKER speaker, float x, float y, bool active); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_GetSpeakerPosition (IntPtr system, SPEAKER speaker, out float x, out float y, out bool active); + private static extern RESULT FMOD5_System_GetSpeakerPosition(IntPtr system, SPEAKER speaker, out float x, out float y, out bool active); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_SetStreamBufferSize (IntPtr system, uint filebuffersize, TIMEUNIT filebuffersizetype); + private static extern RESULT FMOD5_System_SetStreamBufferSize(IntPtr system, uint filebuffersize, TIMEUNIT filebuffersizetype); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_GetStreamBufferSize (IntPtr system, out uint filebuffersize, out TIMEUNIT filebuffersizetype); + private static extern RESULT FMOD5_System_GetStreamBufferSize(IntPtr system, out uint filebuffersize, out TIMEUNIT filebuffersizetype); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_Set3DSettings (IntPtr system, float dopplerscale, float distancefactor, float rolloffscale); + private static extern RESULT FMOD5_System_Set3DSettings(IntPtr system, float dopplerscale, float distancefactor, float rolloffscale); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_Get3DSettings (IntPtr system, out float dopplerscale, out float distancefactor, out float rolloffscale); + private static extern RESULT FMOD5_System_Get3DSettings(IntPtr system, out float dopplerscale, out float distancefactor, out float rolloffscale); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_Set3DNumListeners (IntPtr system, int numlisteners); + private static extern RESULT FMOD5_System_Set3DNumListeners(IntPtr system, int numlisteners); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_Get3DNumListeners (IntPtr system, out int numlisteners); + private static extern RESULT FMOD5_System_Get3DNumListeners(IntPtr system, out int numlisteners); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_Set3DListenerAttributes (IntPtr system, int listener, ref VECTOR pos, ref VECTOR vel, ref VECTOR forward, ref VECTOR up); + private static extern RESULT FMOD5_System_Set3DListenerAttributes(IntPtr system, int listener, ref VECTOR pos, ref VECTOR vel, ref VECTOR forward, ref VECTOR up); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_Get3DListenerAttributes (IntPtr system, int listener, out VECTOR pos, out VECTOR vel, out VECTOR forward, out VECTOR up); + private static extern RESULT FMOD5_System_Get3DListenerAttributes(IntPtr system, int listener, out VECTOR pos, out VECTOR vel, out VECTOR forward, out VECTOR up); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_Set3DRolloffCallback (IntPtr system, CB_3D_ROLLOFF_CALLBACK callback); + private static extern RESULT FMOD5_System_Set3DRolloffCallback(IntPtr system, CB_3D_ROLLOFF_CALLBACK callback); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_MixerSuspend (IntPtr system); + private static extern RESULT FMOD5_System_MixerSuspend(IntPtr system); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_MixerResume (IntPtr system); + private static extern RESULT FMOD5_System_MixerResume(IntPtr system); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_GetDefaultMixMatrix (IntPtr system, SPEAKERMODE sourcespeakermode, SPEAKERMODE targetspeakermode, float[] matrix, int matrixhop); + private static extern RESULT FMOD5_System_GetDefaultMixMatrix(IntPtr system, SPEAKERMODE sourcespeakermode, SPEAKERMODE targetspeakermode, float[] matrix, int matrixhop); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_GetSpeakerModeChannels (IntPtr system, SPEAKERMODE mode, out int channels); + private static extern RESULT FMOD5_System_GetSpeakerModeChannels(IntPtr system, SPEAKERMODE mode, out int channels); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_GetVersion (IntPtr system, out uint version); + private static extern RESULT FMOD5_System_GetVersion(IntPtr system, out uint version); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_GetOutputHandle (IntPtr system, out IntPtr handle); + private static extern RESULT FMOD5_System_GetOutputHandle(IntPtr system, out IntPtr handle); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_GetChannelsPlaying (IntPtr system, out int channels, IntPtr zero); + private static extern RESULT FMOD5_System_GetChannelsPlaying(IntPtr system, out int channels, IntPtr zero); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_GetChannelsPlaying (IntPtr system, out int channels, out int realchannels); + private static extern RESULT FMOD5_System_GetChannelsPlaying(IntPtr system, out int channels, out int realchannels); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_GetCPUUsage (IntPtr system, out CPU_USAGE usage); + private static extern RESULT FMOD5_System_GetCPUUsage(IntPtr system, out CPU_USAGE usage); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_GetFileUsage (IntPtr system, out Int64 sampleBytesRead, out Int64 streamBytesRead, out Int64 otherBytesRead); + private static extern RESULT FMOD5_System_GetFileUsage(IntPtr system, out Int64 sampleBytesRead, out Int64 streamBytesRead, out Int64 otherBytesRead); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_CreateSound (IntPtr system, byte[] name_or_data, MODE mode, ref CREATESOUNDEXINFO exinfo, out IntPtr sound); + private static extern RESULT FMOD5_System_CreateSound(IntPtr system, byte[] name_or_data, MODE mode, ref CREATESOUNDEXINFO exinfo, out IntPtr sound); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_CreateSound (IntPtr system, IntPtr name_or_data, MODE mode, ref CREATESOUNDEXINFO exinfo, out IntPtr sound); + private static extern RESULT FMOD5_System_CreateSound(IntPtr system, IntPtr name_or_data, MODE mode, ref CREATESOUNDEXINFO exinfo, out IntPtr sound); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_CreateStream (IntPtr system, byte[] name_or_data, MODE mode, ref CREATESOUNDEXINFO exinfo, out IntPtr sound); + private static extern RESULT FMOD5_System_CreateStream(IntPtr system, byte[] name_or_data, MODE mode, ref CREATESOUNDEXINFO exinfo, out IntPtr sound); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_CreateStream (IntPtr system, IntPtr name_or_data, MODE mode, ref CREATESOUNDEXINFO exinfo, out IntPtr sound); + private static extern RESULT FMOD5_System_CreateStream(IntPtr system, IntPtr name_or_data, MODE mode, ref CREATESOUNDEXINFO exinfo, out IntPtr sound); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_CreateDSP (IntPtr system, ref DSP_DESCRIPTION description, out IntPtr dsp); + private static extern RESULT FMOD5_System_CreateDSP(IntPtr system, ref DSP_DESCRIPTION description, out IntPtr dsp); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_CreateDSPByType (IntPtr system, DSP_TYPE type, out IntPtr dsp); + private static extern RESULT FMOD5_System_CreateDSPByType(IntPtr system, DSP_TYPE type, out IntPtr dsp); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_CreateChannelGroup (IntPtr system, byte[] name, out IntPtr channelgroup); + private static extern RESULT FMOD5_System_CreateChannelGroup(IntPtr system, byte[] name, out IntPtr channelgroup); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_CreateSoundGroup (IntPtr system, byte[] name, out IntPtr soundgroup); + private static extern RESULT FMOD5_System_CreateSoundGroup(IntPtr system, byte[] name, out IntPtr soundgroup); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_CreateReverb3D (IntPtr system, out IntPtr reverb); + private static extern RESULT FMOD5_System_CreateReverb3D(IntPtr system, out IntPtr reverb); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_PlaySound (IntPtr system, IntPtr sound, IntPtr channelgroup, bool paused, out IntPtr channel); + private static extern RESULT FMOD5_System_PlaySound(IntPtr system, IntPtr sound, IntPtr channelgroup, bool paused, out IntPtr channel); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_PlayDSP (IntPtr system, IntPtr dsp, IntPtr channelgroup, bool paused, out IntPtr channel); + private static extern RESULT FMOD5_System_PlayDSP(IntPtr system, IntPtr dsp, IntPtr channelgroup, bool paused, out IntPtr channel); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_GetChannel (IntPtr system, int channelid, out IntPtr channel); + private static extern RESULT FMOD5_System_GetChannel(IntPtr system, int channelid, out IntPtr channel); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_GetDSPInfoByType (IntPtr system, DSP_TYPE type, out IntPtr description); + private static extern RESULT FMOD5_System_GetDSPInfoByType(IntPtr system, DSP_TYPE type, out IntPtr description); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_GetMasterChannelGroup (IntPtr system, out IntPtr channelgroup); + private static extern RESULT FMOD5_System_GetMasterChannelGroup(IntPtr system, out IntPtr channelgroup); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_GetMasterSoundGroup (IntPtr system, out IntPtr soundgroup); + private static extern RESULT FMOD5_System_GetMasterSoundGroup(IntPtr system, out IntPtr soundgroup); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_AttachChannelGroupToPort (IntPtr system, PORT_TYPE portType, ulong portIndex, IntPtr channelgroup, bool passThru); + private static extern RESULT FMOD5_System_AttachChannelGroupToPort(IntPtr system, PORT_TYPE portType, ulong portIndex, IntPtr channelgroup, bool passThru); [DllImport(VERSION.dll)] private static extern RESULT FMOD5_System_DetachChannelGroupFromPort(IntPtr system, IntPtr channelgroup); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_SetReverbProperties (IntPtr system, int instance, ref REVERB_PROPERTIES prop); + private static extern RESULT FMOD5_System_SetReverbProperties(IntPtr system, int instance, ref REVERB_PROPERTIES prop); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_GetReverbProperties (IntPtr system, int instance, out REVERB_PROPERTIES prop); + private static extern RESULT FMOD5_System_GetReverbProperties(IntPtr system, int instance, out REVERB_PROPERTIES prop); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_LockDSP (IntPtr system); + private static extern RESULT FMOD5_System_LockDSP(IntPtr system); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_UnlockDSP (IntPtr system); + private static extern RESULT FMOD5_System_UnlockDSP(IntPtr system); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_GetRecordNumDrivers (IntPtr system, out int numdrivers, out int numconnected); + private static extern RESULT FMOD5_System_GetRecordNumDrivers(IntPtr system, out int numdrivers, out int numconnected); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_GetRecordDriverInfo (IntPtr system, int id, IntPtr name, int namelen, out Guid guid, out int systemrate, out SPEAKERMODE speakermode, out int speakermodechannels, out DRIVER_STATE state); + private static extern RESULT FMOD5_System_GetRecordDriverInfo(IntPtr system, int id, IntPtr name, int namelen, out Guid guid, out int systemrate, out SPEAKERMODE speakermode, out int speakermodechannels, out DRIVER_STATE state); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_GetRecordPosition (IntPtr system, int id, out uint position); + private static extern RESULT FMOD5_System_GetRecordPosition(IntPtr system, int id, out uint position); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_RecordStart (IntPtr system, int id, IntPtr sound, bool loop); + private static extern RESULT FMOD5_System_RecordStart(IntPtr system, int id, IntPtr sound, bool loop); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_RecordStop (IntPtr system, int id); + private static extern RESULT FMOD5_System_RecordStop(IntPtr system, int id); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_IsRecording (IntPtr system, int id, out bool recording); + private static extern RESULT FMOD5_System_IsRecording(IntPtr system, int id, out bool recording); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_CreateGeometry (IntPtr system, int maxpolygons, int maxvertices, out IntPtr geometry); + private static extern RESULT FMOD5_System_CreateGeometry(IntPtr system, int maxpolygons, int maxvertices, out IntPtr geometry); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_SetGeometrySettings (IntPtr system, float maxworldsize); + private static extern RESULT FMOD5_System_SetGeometrySettings(IntPtr system, float maxworldsize); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_GetGeometrySettings (IntPtr system, out float maxworldsize); + private static extern RESULT FMOD5_System_GetGeometrySettings(IntPtr system, out float maxworldsize); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_LoadGeometry (IntPtr system, IntPtr data, int datasize, out IntPtr geometry); + private static extern RESULT FMOD5_System_LoadGeometry(IntPtr system, IntPtr data, int datasize, out IntPtr geometry); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_GetGeometryOcclusion (IntPtr system, ref VECTOR listener, ref VECTOR source, out float direct, out float reverb); + private static extern RESULT FMOD5_System_GetGeometryOcclusion(IntPtr system, ref VECTOR listener, ref VECTOR source, out float direct, out float reverb); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_SetNetworkProxy (IntPtr system, byte[] proxy); + private static extern RESULT FMOD5_System_SetNetworkProxy(IntPtr system, byte[] proxy); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_GetNetworkProxy (IntPtr system, IntPtr proxy, int proxylen); + private static extern RESULT FMOD5_System_GetNetworkProxy(IntPtr system, IntPtr proxy, int proxylen); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_SetNetworkTimeout (IntPtr system, int timeout); + private static extern RESULT FMOD5_System_SetNetworkTimeout(IntPtr system, int timeout); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_GetNetworkTimeout (IntPtr system, out int timeout); + private static extern RESULT FMOD5_System_GetNetworkTimeout(IntPtr system, out int timeout); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_SetUserData (IntPtr system, IntPtr userdata); + private static extern RESULT FMOD5_System_SetUserData(IntPtr system, IntPtr userdata); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_System_GetUserData (IntPtr system, out IntPtr userdata); + private static extern RESULT FMOD5_System_GetUserData(IntPtr system, out IntPtr userdata); #endregion #region wrapperinternal public IntPtr handle; - public System(IntPtr ptr) { this.handle = ptr; } - public bool hasHandle() { return this.handle != IntPtr.Zero; } - public void clearHandle() { this.handle = IntPtr.Zero; } + public System(IntPtr ptr) { this.handle = ptr; } + public bool hasHandle() { return this.handle != IntPtr.Zero; } + public void clearHandle() { this.handle = IntPtr.Zero; } #endregion } @@ -1959,104 +1959,104 @@ #region importfunctions [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Sound_Release (IntPtr sound); + private static extern RESULT FMOD5_Sound_Release(IntPtr sound); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Sound_GetSystemObject (IntPtr sound, out IntPtr system); + private static extern RESULT FMOD5_Sound_GetSystemObject(IntPtr sound, out IntPtr system); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Sound_Lock (IntPtr sound, uint offset, uint length, out IntPtr ptr1, out IntPtr ptr2, out uint len1, out uint len2); + private static extern RESULT FMOD5_Sound_Lock(IntPtr sound, uint offset, uint length, out IntPtr ptr1, out IntPtr ptr2, out uint len1, out uint len2); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Sound_Unlock (IntPtr sound, IntPtr ptr1, IntPtr ptr2, uint len1, uint len2); + private static extern RESULT FMOD5_Sound_Unlock(IntPtr sound, IntPtr ptr1, IntPtr ptr2, uint len1, uint len2); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Sound_SetDefaults (IntPtr sound, float frequency, int priority); + private static extern RESULT FMOD5_Sound_SetDefaults(IntPtr sound, float frequency, int priority); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Sound_GetDefaults (IntPtr sound, out float frequency, out int priority); + private static extern RESULT FMOD5_Sound_GetDefaults(IntPtr sound, out float frequency, out int priority); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Sound_Set3DMinMaxDistance (IntPtr sound, float min, float max); + private static extern RESULT FMOD5_Sound_Set3DMinMaxDistance(IntPtr sound, float min, float max); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Sound_Get3DMinMaxDistance (IntPtr sound, out float min, out float max); + private static extern RESULT FMOD5_Sound_Get3DMinMaxDistance(IntPtr sound, out float min, out float max); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Sound_Set3DConeSettings (IntPtr sound, float insideconeangle, float outsideconeangle, float outsidevolume); + private static extern RESULT FMOD5_Sound_Set3DConeSettings(IntPtr sound, float insideconeangle, float outsideconeangle, float outsidevolume); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Sound_Get3DConeSettings (IntPtr sound, out float insideconeangle, out float outsideconeangle, out float outsidevolume); + private static extern RESULT FMOD5_Sound_Get3DConeSettings(IntPtr sound, out float insideconeangle, out float outsideconeangle, out float outsidevolume); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Sound_Set3DCustomRolloff (IntPtr sound, ref VECTOR points, int numpoints); + private static extern RESULT FMOD5_Sound_Set3DCustomRolloff(IntPtr sound, ref VECTOR points, int numpoints); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Sound_Get3DCustomRolloff (IntPtr sound, out IntPtr points, out int numpoints); + private static extern RESULT FMOD5_Sound_Get3DCustomRolloff(IntPtr sound, out IntPtr points, out int numpoints); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Sound_GetSubSound (IntPtr sound, int index, out IntPtr subsound); + private static extern RESULT FMOD5_Sound_GetSubSound(IntPtr sound, int index, out IntPtr subsound); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Sound_GetSubSoundParent (IntPtr sound, out IntPtr parentsound); + private static extern RESULT FMOD5_Sound_GetSubSoundParent(IntPtr sound, out IntPtr parentsound); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Sound_GetName (IntPtr sound, IntPtr name, int namelen); + private static extern RESULT FMOD5_Sound_GetName(IntPtr sound, IntPtr name, int namelen); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Sound_GetLength (IntPtr sound, out uint length, TIMEUNIT lengthtype); + private static extern RESULT FMOD5_Sound_GetLength(IntPtr sound, out uint length, TIMEUNIT lengthtype); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Sound_GetFormat (IntPtr sound, out SOUND_TYPE type, out SOUND_FORMAT format, out int channels, out int bits); + private static extern RESULT FMOD5_Sound_GetFormat(IntPtr sound, out SOUND_TYPE type, out SOUND_FORMAT format, out int channels, out int bits); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Sound_GetNumSubSounds (IntPtr sound, out int numsubsounds); + private static extern RESULT FMOD5_Sound_GetNumSubSounds(IntPtr sound, out int numsubsounds); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Sound_GetNumTags (IntPtr sound, out int numtags, out int numtagsupdated); + private static extern RESULT FMOD5_Sound_GetNumTags(IntPtr sound, out int numtags, out int numtagsupdated); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Sound_GetTag (IntPtr sound, byte[] name, int index, out TAG tag); + private static extern RESULT FMOD5_Sound_GetTag(IntPtr sound, byte[] name, int index, out TAG tag); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Sound_GetOpenState (IntPtr sound, out OPENSTATE openstate, out uint percentbuffered, out bool starving, out bool diskbusy); + private static extern RESULT FMOD5_Sound_GetOpenState(IntPtr sound, out OPENSTATE openstate, out uint percentbuffered, out bool starving, out bool diskbusy); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Sound_ReadData (IntPtr sound, byte[] buffer, uint length, IntPtr zero); + private static extern RESULT FMOD5_Sound_ReadData(IntPtr sound, byte[] buffer, uint length, IntPtr zero); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Sound_ReadData (IntPtr sound, byte[] buffer, uint length, out uint read); + private static extern RESULT FMOD5_Sound_ReadData(IntPtr sound, byte[] buffer, uint length, out uint read); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Sound_ReadData (IntPtr sound, IntPtr buffer, uint length, out uint read); + private static extern RESULT FMOD5_Sound_ReadData(IntPtr sound, IntPtr buffer, uint length, out uint read); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Sound_SeekData (IntPtr sound, uint pcm); + private static extern RESULT FMOD5_Sound_SeekData(IntPtr sound, uint pcm); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Sound_SetSoundGroup (IntPtr sound, IntPtr soundgroup); + private static extern RESULT FMOD5_Sound_SetSoundGroup(IntPtr sound, IntPtr soundgroup); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Sound_GetSoundGroup (IntPtr sound, out IntPtr soundgroup); + private static extern RESULT FMOD5_Sound_GetSoundGroup(IntPtr sound, out IntPtr soundgroup); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Sound_GetNumSyncPoints (IntPtr sound, out int numsyncpoints); + private static extern RESULT FMOD5_Sound_GetNumSyncPoints(IntPtr sound, out int numsyncpoints); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Sound_GetSyncPoint (IntPtr sound, int index, out IntPtr point); + private static extern RESULT FMOD5_Sound_GetSyncPoint(IntPtr sound, int index, out IntPtr point); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Sound_GetSyncPointInfo (IntPtr sound, IntPtr point, IntPtr name, int namelen, out uint offset, TIMEUNIT offsettype); + private static extern RESULT FMOD5_Sound_GetSyncPointInfo(IntPtr sound, IntPtr point, IntPtr name, int namelen, out uint offset, TIMEUNIT offsettype); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Sound_AddSyncPoint (IntPtr sound, uint offset, TIMEUNIT offsettype, byte[] name, out IntPtr point); + private static extern RESULT FMOD5_Sound_AddSyncPoint(IntPtr sound, uint offset, TIMEUNIT offsettype, byte[] name, out IntPtr point); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Sound_DeleteSyncPoint (IntPtr sound, IntPtr point); + private static extern RESULT FMOD5_Sound_DeleteSyncPoint(IntPtr sound, IntPtr point); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Sound_SetMode (IntPtr sound, MODE mode); + private static extern RESULT FMOD5_Sound_SetMode(IntPtr sound, MODE mode); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Sound_GetMode (IntPtr sound, out MODE mode); + private static extern RESULT FMOD5_Sound_GetMode(IntPtr sound, out MODE mode); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Sound_SetLoopCount (IntPtr sound, int loopcount); + private static extern RESULT FMOD5_Sound_SetLoopCount(IntPtr sound, int loopcount); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Sound_GetLoopCount (IntPtr sound, out int loopcount); + private static extern RESULT FMOD5_Sound_GetLoopCount(IntPtr sound, out int loopcount); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Sound_SetLoopPoints (IntPtr sound, uint loopstart, TIMEUNIT loopstarttype, uint loopend, TIMEUNIT loopendtype); + private static extern RESULT FMOD5_Sound_SetLoopPoints(IntPtr sound, uint loopstart, TIMEUNIT loopstarttype, uint loopend, TIMEUNIT loopendtype); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Sound_GetLoopPoints (IntPtr sound, out uint loopstart, TIMEUNIT loopstarttype, out uint loopend, TIMEUNIT loopendtype); + private static extern RESULT FMOD5_Sound_GetLoopPoints(IntPtr sound, out uint loopstart, TIMEUNIT loopstarttype, out uint loopend, TIMEUNIT loopendtype); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Sound_GetMusicNumChannels (IntPtr sound, out int numchannels); + private static extern RESULT FMOD5_Sound_GetMusicNumChannels(IntPtr sound, out int numchannels); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Sound_SetMusicChannelVolume (IntPtr sound, int channel, float volume); + private static extern RESULT FMOD5_Sound_SetMusicChannelVolume(IntPtr sound, int channel, float volume); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Sound_GetMusicChannelVolume (IntPtr sound, int channel, out float volume); + private static extern RESULT FMOD5_Sound_GetMusicChannelVolume(IntPtr sound, int channel, out float volume); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Sound_SetMusicSpeed (IntPtr sound, float speed); + private static extern RESULT FMOD5_Sound_SetMusicSpeed(IntPtr sound, float speed); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Sound_GetMusicSpeed (IntPtr sound, out float speed); + private static extern RESULT FMOD5_Sound_GetMusicSpeed(IntPtr sound, out float speed); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Sound_SetUserData (IntPtr sound, IntPtr userdata); + private static extern RESULT FMOD5_Sound_SetUserData(IntPtr sound, IntPtr userdata); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Sound_GetUserData (IntPtr sound, out IntPtr userdata); + private static extern RESULT FMOD5_Sound_GetUserData(IntPtr sound, out IntPtr userdata); #endregion #region wrapperinternal public IntPtr handle; - public Sound(IntPtr ptr) { this.handle = ptr; } - public bool hasHandle() { return this.handle != IntPtr.Zero; } - public void clearHandle() { this.handle = IntPtr.Zero; } + public Sound(IntPtr ptr) { this.handle = ptr; } + public bool hasHandle() { return this.handle != IntPtr.Zero; } + public void clearHandle() { this.handle = IntPtr.Zero; } #endregion } @@ -2066,80 +2066,80 @@ */ interface IChannelControl { - RESULT getSystemObject (out System system); + RESULT getSystemObject(out System system); // General control functionality for Channels and ChannelGroups. - RESULT stop (); - RESULT setPaused (bool paused); - RESULT getPaused (out bool paused); - RESULT setVolume (float volume); - RESULT getVolume (out float volume); - RESULT setVolumeRamp (bool ramp); - RESULT getVolumeRamp (out bool ramp); - RESULT getAudibility (out float audibility); - RESULT setPitch (float pitch); - RESULT getPitch (out float pitch); - RESULT setMute (bool mute); - RESULT getMute (out bool mute); - RESULT setReverbProperties (int instance, float wet); - RESULT getReverbProperties (int instance, out float wet); - RESULT setLowPassGain (float gain); - RESULT getLowPassGain (out float gain); - RESULT setMode (MODE mode); - RESULT getMode (out MODE mode); - RESULT setCallback (CHANNELCONTROL_CALLBACK callback); - RESULT isPlaying (out bool isplaying); + RESULT stop(); + RESULT setPaused(bool paused); + RESULT getPaused(out bool paused); + RESULT setVolume(float volume); + RESULT getVolume(out float volume); + RESULT setVolumeRamp(bool ramp); + RESULT getVolumeRamp(out bool ramp); + RESULT getAudibility(out float audibility); + RESULT setPitch(float pitch); + RESULT getPitch(out float pitch); + RESULT setMute(bool mute); + RESULT getMute(out bool mute); + RESULT setReverbProperties(int instance, float wet); + RESULT getReverbProperties(int instance, out float wet); + RESULT setLowPassGain(float gain); + RESULT getLowPassGain(out float gain); + RESULT setMode(MODE mode); + RESULT getMode(out MODE mode); + RESULT setCallback(CHANNELCONTROL_CALLBACK callback); + RESULT isPlaying(out bool isplaying); // Note all 'set' functions alter a final matrix, this is why the only get function is getMixMatrix, to avoid other get functions returning incorrect/obsolete values. - RESULT setPan (float pan); - RESULT setMixLevelsOutput (float frontleft, float frontright, float center, float lfe, float surroundleft, float surroundright, float backleft, float backright); - RESULT setMixLevelsInput (float[] levels, int numlevels); - RESULT setMixMatrix (float[] matrix, int outchannels, int inchannels, int inchannel_hop); - RESULT getMixMatrix (float[] matrix, out int outchannels, out int inchannels, int inchannel_hop); + RESULT setPan(float pan); + RESULT setMixLevelsOutput(float frontleft, float frontright, float center, float lfe, float surroundleft, float surroundright, float backleft, float backright); + RESULT setMixLevelsInput(float[] levels, int numlevels); + RESULT setMixMatrix(float[] matrix, int outchannels, int inchannels, int inchannel_hop); + RESULT getMixMatrix(float[] matrix, out int outchannels, out int inchannels, int inchannel_hop); // Clock based functionality. - RESULT getDSPClock (out ulong dspclock, out ulong parentclock); - RESULT setDelay (ulong dspclock_start, ulong dspclock_end, bool stopchannels); - RESULT getDelay (out ulong dspclock_start, out ulong dspclock_end); - RESULT getDelay (out ulong dspclock_start, out ulong dspclock_end, out bool stopchannels); - RESULT addFadePoint (ulong dspclock, float volume); - RESULT setFadePointRamp (ulong dspclock, float volume); - RESULT removeFadePoints (ulong dspclock_start, ulong dspclock_end); - RESULT getFadePoints (ref uint numpoints, ulong[] point_dspclock, float[] point_volume); + RESULT getDSPClock(out ulong dspclock, out ulong parentclock); + RESULT setDelay(ulong dspclock_start, ulong dspclock_end, bool stopchannels); + RESULT getDelay(out ulong dspclock_start, out ulong dspclock_end); + RESULT getDelay(out ulong dspclock_start, out ulong dspclock_end, out bool stopchannels); + RESULT addFadePoint(ulong dspclock, float volume); + RESULT setFadePointRamp(ulong dspclock, float volume); + RESULT removeFadePoints(ulong dspclock_start, ulong dspclock_end); + RESULT getFadePoints(ref uint numpoints, ulong[] point_dspclock, float[] point_volume); // DSP effects. - RESULT getDSP (int index, out DSP dsp); - RESULT addDSP (int index, DSP dsp); - RESULT removeDSP (DSP dsp); - RESULT getNumDSPs (out int numdsps); - RESULT setDSPIndex (DSP dsp, int index); - RESULT getDSPIndex (DSP dsp, out int index); + RESULT getDSP(int index, out DSP dsp); + RESULT addDSP(int index, DSP dsp); + RESULT removeDSP(DSP dsp); + RESULT getNumDSPs(out int numdsps); + RESULT setDSPIndex(DSP dsp, int index); + RESULT getDSPIndex(DSP dsp, out int index); // 3D functionality. - RESULT set3DAttributes (ref VECTOR pos, ref VECTOR vel); - RESULT get3DAttributes (out VECTOR pos, out VECTOR vel); - RESULT set3DMinMaxDistance (float mindistance, float maxdistance); - RESULT get3DMinMaxDistance (out float mindistance, out float maxdistance); - RESULT set3DConeSettings (float insideconeangle, float outsideconeangle, float outsidevolume); - RESULT get3DConeSettings (out float insideconeangle, out float outsideconeangle, out float outsidevolume); - RESULT set3DConeOrientation (ref VECTOR orientation); - RESULT get3DConeOrientation (out VECTOR orientation); - RESULT set3DCustomRolloff (ref VECTOR points, int numpoints); - RESULT get3DCustomRolloff (out IntPtr points, out int numpoints); - RESULT set3DOcclusion (float directocclusion, float reverbocclusion); - RESULT get3DOcclusion (out float directocclusion, out float reverbocclusion); - RESULT set3DSpread (float angle); - RESULT get3DSpread (out float angle); - RESULT set3DLevel (float level); - RESULT get3DLevel (out float level); - RESULT set3DDopplerLevel (float level); - RESULT get3DDopplerLevel (out float level); - RESULT set3DDistanceFilter (bool custom, float customLevel, float centerFreq); - RESULT get3DDistanceFilter (out bool custom, out float customLevel, out float centerFreq); + RESULT set3DAttributes(ref VECTOR pos, ref VECTOR vel); + RESULT get3DAttributes(out VECTOR pos, out VECTOR vel); + RESULT set3DMinMaxDistance(float mindistance, float maxdistance); + RESULT get3DMinMaxDistance(out float mindistance, out float maxdistance); + RESULT set3DConeSettings(float insideconeangle, float outsideconeangle, float outsidevolume); + RESULT get3DConeSettings(out float insideconeangle, out float outsideconeangle, out float outsidevolume); + RESULT set3DConeOrientation(ref VECTOR orientation); + RESULT get3DConeOrientation(out VECTOR orientation); + RESULT set3DCustomRolloff(ref VECTOR points, int numpoints); + RESULT get3DCustomRolloff(out IntPtr points, out int numpoints); + RESULT set3DOcclusion(float directocclusion, float reverbocclusion); + RESULT get3DOcclusion(out float directocclusion, out float reverbocclusion); + RESULT set3DSpread(float angle); + RESULT get3DSpread(out float angle); + RESULT set3DLevel(float level); + RESULT get3DLevel(out float level); + RESULT set3DDopplerLevel(float level); + RESULT get3DDopplerLevel(out float level); + RESULT set3DDistanceFilter(bool custom, float customLevel, float centerFreq); + RESULT get3DDistanceFilter(out bool custom, out float customLevel, out float centerFreq); // Userdata set/get. - RESULT setUserData (IntPtr userdata); - RESULT getUserData (out IntPtr userdata); + RESULT setUserData(IntPtr userdata); + RESULT getUserData(out IntPtr userdata); } /* @@ -2474,168 +2474,168 @@ #region importfunctions [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Channel_SetFrequency (IntPtr channel, float frequency); + private static extern RESULT FMOD5_Channel_SetFrequency(IntPtr channel, float frequency); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Channel_GetFrequency (IntPtr channel, out float frequency); + private static extern RESULT FMOD5_Channel_GetFrequency(IntPtr channel, out float frequency); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Channel_SetPriority (IntPtr channel, int priority); + private static extern RESULT FMOD5_Channel_SetPriority(IntPtr channel, int priority); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Channel_GetPriority (IntPtr channel, out int priority); + private static extern RESULT FMOD5_Channel_GetPriority(IntPtr channel, out int priority); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Channel_SetPosition (IntPtr channel, uint position, TIMEUNIT postype); + private static extern RESULT FMOD5_Channel_SetPosition(IntPtr channel, uint position, TIMEUNIT postype); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Channel_GetPosition (IntPtr channel, out uint position, TIMEUNIT postype); + private static extern RESULT FMOD5_Channel_GetPosition(IntPtr channel, out uint position, TIMEUNIT postype); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Channel_SetChannelGroup (IntPtr channel, IntPtr channelgroup); + private static extern RESULT FMOD5_Channel_SetChannelGroup(IntPtr channel, IntPtr channelgroup); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Channel_GetChannelGroup (IntPtr channel, out IntPtr channelgroup); + private static extern RESULT FMOD5_Channel_GetChannelGroup(IntPtr channel, out IntPtr channelgroup); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Channel_SetLoopCount (IntPtr channel, int loopcount); + private static extern RESULT FMOD5_Channel_SetLoopCount(IntPtr channel, int loopcount); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Channel_GetLoopCount (IntPtr channel, out int loopcount); + private static extern RESULT FMOD5_Channel_GetLoopCount(IntPtr channel, out int loopcount); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Channel_SetLoopPoints (IntPtr channel, uint loopstart, TIMEUNIT loopstarttype, uint loopend, TIMEUNIT loopendtype); + private static extern RESULT FMOD5_Channel_SetLoopPoints(IntPtr channel, uint loopstart, TIMEUNIT loopstarttype, uint loopend, TIMEUNIT loopendtype); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Channel_GetLoopPoints (IntPtr channel, out uint loopstart, TIMEUNIT loopstarttype, out uint loopend, TIMEUNIT loopendtype); + private static extern RESULT FMOD5_Channel_GetLoopPoints(IntPtr channel, out uint loopstart, TIMEUNIT loopstarttype, out uint loopend, TIMEUNIT loopendtype); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Channel_IsVirtual (IntPtr channel, out bool isvirtual); + private static extern RESULT FMOD5_Channel_IsVirtual(IntPtr channel, out bool isvirtual); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Channel_GetCurrentSound (IntPtr channel, out IntPtr sound); + private static extern RESULT FMOD5_Channel_GetCurrentSound(IntPtr channel, out IntPtr sound); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Channel_GetIndex (IntPtr channel, out int index); + private static extern RESULT FMOD5_Channel_GetIndex(IntPtr channel, out int index); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Channel_GetSystemObject (IntPtr channel, out IntPtr system); + private static extern RESULT FMOD5_Channel_GetSystemObject(IntPtr channel, out IntPtr system); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Channel_Stop (IntPtr channel); + private static extern RESULT FMOD5_Channel_Stop(IntPtr channel); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Channel_SetPaused (IntPtr channel, bool paused); + private static extern RESULT FMOD5_Channel_SetPaused(IntPtr channel, bool paused); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Channel_GetPaused (IntPtr channel, out bool paused); + private static extern RESULT FMOD5_Channel_GetPaused(IntPtr channel, out bool paused); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Channel_SetVolume (IntPtr channel, float volume); + private static extern RESULT FMOD5_Channel_SetVolume(IntPtr channel, float volume); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Channel_GetVolume (IntPtr channel, out float volume); + private static extern RESULT FMOD5_Channel_GetVolume(IntPtr channel, out float volume); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Channel_SetVolumeRamp (IntPtr channel, bool ramp); + private static extern RESULT FMOD5_Channel_SetVolumeRamp(IntPtr channel, bool ramp); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Channel_GetVolumeRamp (IntPtr channel, out bool ramp); + private static extern RESULT FMOD5_Channel_GetVolumeRamp(IntPtr channel, out bool ramp); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Channel_GetAudibility (IntPtr channel, out float audibility); + private static extern RESULT FMOD5_Channel_GetAudibility(IntPtr channel, out float audibility); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Channel_SetPitch (IntPtr channel, float pitch); + private static extern RESULT FMOD5_Channel_SetPitch(IntPtr channel, float pitch); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Channel_GetPitch (IntPtr channel, out float pitch); + private static extern RESULT FMOD5_Channel_GetPitch(IntPtr channel, out float pitch); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Channel_SetMute (IntPtr channel, bool mute); + private static extern RESULT FMOD5_Channel_SetMute(IntPtr channel, bool mute); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Channel_GetMute (IntPtr channel, out bool mute); + private static extern RESULT FMOD5_Channel_GetMute(IntPtr channel, out bool mute); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Channel_SetReverbProperties (IntPtr channel, int instance, float wet); + private static extern RESULT FMOD5_Channel_SetReverbProperties(IntPtr channel, int instance, float wet); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Channel_GetReverbProperties (IntPtr channel, int instance, out float wet); + private static extern RESULT FMOD5_Channel_GetReverbProperties(IntPtr channel, int instance, out float wet); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Channel_SetLowPassGain (IntPtr channel, float gain); + private static extern RESULT FMOD5_Channel_SetLowPassGain(IntPtr channel, float gain); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Channel_GetLowPassGain (IntPtr channel, out float gain); + private static extern RESULT FMOD5_Channel_GetLowPassGain(IntPtr channel, out float gain); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Channel_SetMode (IntPtr channel, MODE mode); + private static extern RESULT FMOD5_Channel_SetMode(IntPtr channel, MODE mode); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Channel_GetMode (IntPtr channel, out MODE mode); + private static extern RESULT FMOD5_Channel_GetMode(IntPtr channel, out MODE mode); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Channel_SetCallback (IntPtr channel, CHANNELCONTROL_CALLBACK callback); + private static extern RESULT FMOD5_Channel_SetCallback(IntPtr channel, CHANNELCONTROL_CALLBACK callback); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Channel_IsPlaying (IntPtr channel, out bool isplaying); + private static extern RESULT FMOD5_Channel_IsPlaying(IntPtr channel, out bool isplaying); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Channel_SetPan (IntPtr channel, float pan); + private static extern RESULT FMOD5_Channel_SetPan(IntPtr channel, float pan); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Channel_SetMixLevelsOutput (IntPtr channel, float frontleft, float frontright, float center, float lfe, float surroundleft, float surroundright, float backleft, float backright); + private static extern RESULT FMOD5_Channel_SetMixLevelsOutput(IntPtr channel, float frontleft, float frontright, float center, float lfe, float surroundleft, float surroundright, float backleft, float backright); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Channel_SetMixLevelsInput (IntPtr channel, float[] levels, int numlevels); + private static extern RESULT FMOD5_Channel_SetMixLevelsInput(IntPtr channel, float[] levels, int numlevels); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Channel_SetMixMatrix (IntPtr channel, float[] matrix, int outchannels, int inchannels, int inchannel_hop); + private static extern RESULT FMOD5_Channel_SetMixMatrix(IntPtr channel, float[] matrix, int outchannels, int inchannels, int inchannel_hop); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Channel_GetMixMatrix (IntPtr channel, float[] matrix, out int outchannels, out int inchannels, int inchannel_hop); + private static extern RESULT FMOD5_Channel_GetMixMatrix(IntPtr channel, float[] matrix, out int outchannels, out int inchannels, int inchannel_hop); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Channel_GetDSPClock (IntPtr channel, out ulong dspclock, out ulong parentclock); + private static extern RESULT FMOD5_Channel_GetDSPClock(IntPtr channel, out ulong dspclock, out ulong parentclock); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Channel_SetDelay (IntPtr channel, ulong dspclock_start, ulong dspclock_end, bool stopchannels); + private static extern RESULT FMOD5_Channel_SetDelay(IntPtr channel, ulong dspclock_start, ulong dspclock_end, bool stopchannels); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Channel_GetDelay (IntPtr channel, out ulong dspclock_start, out ulong dspclock_end, IntPtr zero); + private static extern RESULT FMOD5_Channel_GetDelay(IntPtr channel, out ulong dspclock_start, out ulong dspclock_end, IntPtr zero); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Channel_GetDelay (IntPtr channel, out ulong dspclock_start, out ulong dspclock_end, out bool stopchannels); + private static extern RESULT FMOD5_Channel_GetDelay(IntPtr channel, out ulong dspclock_start, out ulong dspclock_end, out bool stopchannels); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Channel_AddFadePoint (IntPtr channel, ulong dspclock, float volume); + private static extern RESULT FMOD5_Channel_AddFadePoint(IntPtr channel, ulong dspclock, float volume); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Channel_SetFadePointRamp (IntPtr channel, ulong dspclock, float volume); + private static extern RESULT FMOD5_Channel_SetFadePointRamp(IntPtr channel, ulong dspclock, float volume); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Channel_RemoveFadePoints (IntPtr channel, ulong dspclock_start, ulong dspclock_end); + private static extern RESULT FMOD5_Channel_RemoveFadePoints(IntPtr channel, ulong dspclock_start, ulong dspclock_end); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Channel_GetFadePoints (IntPtr channel, ref uint numpoints, ulong[] point_dspclock, float[] point_volume); + private static extern RESULT FMOD5_Channel_GetFadePoints(IntPtr channel, ref uint numpoints, ulong[] point_dspclock, float[] point_volume); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Channel_GetDSP (IntPtr channel, int index, out IntPtr dsp); + private static extern RESULT FMOD5_Channel_GetDSP(IntPtr channel, int index, out IntPtr dsp); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Channel_AddDSP (IntPtr channel, int index, IntPtr dsp); + private static extern RESULT FMOD5_Channel_AddDSP(IntPtr channel, int index, IntPtr dsp); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Channel_RemoveDSP (IntPtr channel, IntPtr dsp); + private static extern RESULT FMOD5_Channel_RemoveDSP(IntPtr channel, IntPtr dsp); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Channel_GetNumDSPs (IntPtr channel, out int numdsps); + private static extern RESULT FMOD5_Channel_GetNumDSPs(IntPtr channel, out int numdsps); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Channel_SetDSPIndex (IntPtr channel, IntPtr dsp, int index); + private static extern RESULT FMOD5_Channel_SetDSPIndex(IntPtr channel, IntPtr dsp, int index); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Channel_GetDSPIndex (IntPtr channel, IntPtr dsp, out int index); + private static extern RESULT FMOD5_Channel_GetDSPIndex(IntPtr channel, IntPtr dsp, out int index); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Channel_Set3DAttributes (IntPtr channel, ref VECTOR pos, ref VECTOR vel); + private static extern RESULT FMOD5_Channel_Set3DAttributes(IntPtr channel, ref VECTOR pos, ref VECTOR vel); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Channel_Get3DAttributes (IntPtr channel, out VECTOR pos, out VECTOR vel); + private static extern RESULT FMOD5_Channel_Get3DAttributes(IntPtr channel, out VECTOR pos, out VECTOR vel); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Channel_Set3DMinMaxDistance (IntPtr channel, float mindistance, float maxdistance); + private static extern RESULT FMOD5_Channel_Set3DMinMaxDistance(IntPtr channel, float mindistance, float maxdistance); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Channel_Get3DMinMaxDistance (IntPtr channel, out float mindistance, out float maxdistance); + private static extern RESULT FMOD5_Channel_Get3DMinMaxDistance(IntPtr channel, out float mindistance, out float maxdistance); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Channel_Set3DConeSettings (IntPtr channel, float insideconeangle, float outsideconeangle, float outsidevolume); + private static extern RESULT FMOD5_Channel_Set3DConeSettings(IntPtr channel, float insideconeangle, float outsideconeangle, float outsidevolume); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Channel_Get3DConeSettings (IntPtr channel, out float insideconeangle, out float outsideconeangle, out float outsidevolume); + private static extern RESULT FMOD5_Channel_Get3DConeSettings(IntPtr channel, out float insideconeangle, out float outsideconeangle, out float outsidevolume); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Channel_Set3DConeOrientation (IntPtr channel, ref VECTOR orientation); + private static extern RESULT FMOD5_Channel_Set3DConeOrientation(IntPtr channel, ref VECTOR orientation); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Channel_Get3DConeOrientation (IntPtr channel, out VECTOR orientation); + private static extern RESULT FMOD5_Channel_Get3DConeOrientation(IntPtr channel, out VECTOR orientation); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Channel_Set3DCustomRolloff (IntPtr channel, ref VECTOR points, int numpoints); + private static extern RESULT FMOD5_Channel_Set3DCustomRolloff(IntPtr channel, ref VECTOR points, int numpoints); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Channel_Get3DCustomRolloff (IntPtr channel, out IntPtr points, out int numpoints); + private static extern RESULT FMOD5_Channel_Get3DCustomRolloff(IntPtr channel, out IntPtr points, out int numpoints); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Channel_Set3DOcclusion (IntPtr channel, float directocclusion, float reverbocclusion); + private static extern RESULT FMOD5_Channel_Set3DOcclusion(IntPtr channel, float directocclusion, float reverbocclusion); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Channel_Get3DOcclusion (IntPtr channel, out float directocclusion, out float reverbocclusion); + private static extern RESULT FMOD5_Channel_Get3DOcclusion(IntPtr channel, out float directocclusion, out float reverbocclusion); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Channel_Set3DSpread (IntPtr channel, float angle); + private static extern RESULT FMOD5_Channel_Set3DSpread(IntPtr channel, float angle); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Channel_Get3DSpread (IntPtr channel, out float angle); + private static extern RESULT FMOD5_Channel_Get3DSpread(IntPtr channel, out float angle); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Channel_Set3DLevel (IntPtr channel, float level); + private static extern RESULT FMOD5_Channel_Set3DLevel(IntPtr channel, float level); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Channel_Get3DLevel (IntPtr channel, out float level); + private static extern RESULT FMOD5_Channel_Get3DLevel(IntPtr channel, out float level); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Channel_Set3DDopplerLevel (IntPtr channel, float level); + private static extern RESULT FMOD5_Channel_Set3DDopplerLevel(IntPtr channel, float level); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Channel_Get3DDopplerLevel (IntPtr channel, out float level); + private static extern RESULT FMOD5_Channel_Get3DDopplerLevel(IntPtr channel, out float level); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Channel_Set3DDistanceFilter (IntPtr channel, bool custom, float customLevel, float centerFreq); + private static extern RESULT FMOD5_Channel_Set3DDistanceFilter(IntPtr channel, bool custom, float customLevel, float centerFreq); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Channel_Get3DDistanceFilter (IntPtr channel, out bool custom, out float customLevel, out float centerFreq); + private static extern RESULT FMOD5_Channel_Get3DDistanceFilter(IntPtr channel, out bool custom, out float customLevel, out float centerFreq); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Channel_SetUserData (IntPtr channel, IntPtr userdata); + private static extern RESULT FMOD5_Channel_SetUserData(IntPtr channel, IntPtr userdata); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Channel_GetUserData (IntPtr channel, out IntPtr userdata); + private static extern RESULT FMOD5_Channel_GetUserData(IntPtr channel, out IntPtr userdata); #endregion #region wrapperinternal public IntPtr handle; - public Channel(IntPtr ptr) { this.handle = ptr; } - public bool hasHandle() { return this.handle != IntPtr.Zero; } - public void clearHandle() { this.handle = IntPtr.Zero; } + public Channel(IntPtr ptr) { this.handle = ptr; } + public bool hasHandle() { return this.handle != IntPtr.Zero; } + public void clearHandle() { this.handle = IntPtr.Zero; } #endregion } @@ -2958,147 +2958,147 @@ #region importfunctions [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_ChannelGroup_Release (IntPtr channelgroup); + private static extern RESULT FMOD5_ChannelGroup_Release(IntPtr channelgroup); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_ChannelGroup_AddGroup (IntPtr channelgroup, IntPtr group, bool propagatedspclock, IntPtr zero); + private static extern RESULT FMOD5_ChannelGroup_AddGroup(IntPtr channelgroup, IntPtr group, bool propagatedspclock, IntPtr zero); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_ChannelGroup_AddGroup (IntPtr channelgroup, IntPtr group, bool propagatedspclock, out IntPtr connection); + private static extern RESULT FMOD5_ChannelGroup_AddGroup(IntPtr channelgroup, IntPtr group, bool propagatedspclock, out IntPtr connection); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_ChannelGroup_GetNumGroups (IntPtr channelgroup, out int numgroups); + private static extern RESULT FMOD5_ChannelGroup_GetNumGroups(IntPtr channelgroup, out int numgroups); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_ChannelGroup_GetGroup (IntPtr channelgroup, int index, out IntPtr group); + private static extern RESULT FMOD5_ChannelGroup_GetGroup(IntPtr channelgroup, int index, out IntPtr group); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_ChannelGroup_GetParentGroup (IntPtr channelgroup, out IntPtr group); + private static extern RESULT FMOD5_ChannelGroup_GetParentGroup(IntPtr channelgroup, out IntPtr group); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_ChannelGroup_GetName (IntPtr channelgroup, IntPtr name, int namelen); + private static extern RESULT FMOD5_ChannelGroup_GetName(IntPtr channelgroup, IntPtr name, int namelen); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_ChannelGroup_GetNumChannels (IntPtr channelgroup, out int numchannels); + private static extern RESULT FMOD5_ChannelGroup_GetNumChannels(IntPtr channelgroup, out int numchannels); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_ChannelGroup_GetChannel (IntPtr channelgroup, int index, out IntPtr channel); + private static extern RESULT FMOD5_ChannelGroup_GetChannel(IntPtr channelgroup, int index, out IntPtr channel); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_ChannelGroup_GetSystemObject (IntPtr channelgroup, out IntPtr system); + private static extern RESULT FMOD5_ChannelGroup_GetSystemObject(IntPtr channelgroup, out IntPtr system); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_ChannelGroup_Stop (IntPtr channelgroup); + private static extern RESULT FMOD5_ChannelGroup_Stop(IntPtr channelgroup); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_ChannelGroup_SetPaused (IntPtr channelgroup, bool paused); + private static extern RESULT FMOD5_ChannelGroup_SetPaused(IntPtr channelgroup, bool paused); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_ChannelGroup_GetPaused (IntPtr channelgroup, out bool paused); + private static extern RESULT FMOD5_ChannelGroup_GetPaused(IntPtr channelgroup, out bool paused); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_ChannelGroup_SetVolume (IntPtr channelgroup, float volume); + private static extern RESULT FMOD5_ChannelGroup_SetVolume(IntPtr channelgroup, float volume); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_ChannelGroup_GetVolume (IntPtr channelgroup, out float volume); + private static extern RESULT FMOD5_ChannelGroup_GetVolume(IntPtr channelgroup, out float volume); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_ChannelGroup_SetVolumeRamp (IntPtr channelgroup, bool ramp); + private static extern RESULT FMOD5_ChannelGroup_SetVolumeRamp(IntPtr channelgroup, bool ramp); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_ChannelGroup_GetVolumeRamp (IntPtr channelgroup, out bool ramp); + private static extern RESULT FMOD5_ChannelGroup_GetVolumeRamp(IntPtr channelgroup, out bool ramp); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_ChannelGroup_GetAudibility (IntPtr channelgroup, out float audibility); + private static extern RESULT FMOD5_ChannelGroup_GetAudibility(IntPtr channelgroup, out float audibility); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_ChannelGroup_SetPitch (IntPtr channelgroup, float pitch); + private static extern RESULT FMOD5_ChannelGroup_SetPitch(IntPtr channelgroup, float pitch); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_ChannelGroup_GetPitch (IntPtr channelgroup, out float pitch); + private static extern RESULT FMOD5_ChannelGroup_GetPitch(IntPtr channelgroup, out float pitch); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_ChannelGroup_SetMute (IntPtr channelgroup, bool mute); + private static extern RESULT FMOD5_ChannelGroup_SetMute(IntPtr channelgroup, bool mute); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_ChannelGroup_GetMute (IntPtr channelgroup, out bool mute); + private static extern RESULT FMOD5_ChannelGroup_GetMute(IntPtr channelgroup, out bool mute); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_ChannelGroup_SetReverbProperties (IntPtr channelgroup, int instance, float wet); + private static extern RESULT FMOD5_ChannelGroup_SetReverbProperties(IntPtr channelgroup, int instance, float wet); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_ChannelGroup_GetReverbProperties (IntPtr channelgroup, int instance, out float wet); + private static extern RESULT FMOD5_ChannelGroup_GetReverbProperties(IntPtr channelgroup, int instance, out float wet); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_ChannelGroup_SetLowPassGain (IntPtr channelgroup, float gain); + private static extern RESULT FMOD5_ChannelGroup_SetLowPassGain(IntPtr channelgroup, float gain); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_ChannelGroup_GetLowPassGain (IntPtr channelgroup, out float gain); + private static extern RESULT FMOD5_ChannelGroup_GetLowPassGain(IntPtr channelgroup, out float gain); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_ChannelGroup_SetMode (IntPtr channelgroup, MODE mode); + private static extern RESULT FMOD5_ChannelGroup_SetMode(IntPtr channelgroup, MODE mode); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_ChannelGroup_GetMode (IntPtr channelgroup, out MODE mode); + private static extern RESULT FMOD5_ChannelGroup_GetMode(IntPtr channelgroup, out MODE mode); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_ChannelGroup_SetCallback (IntPtr channelgroup, CHANNELCONTROL_CALLBACK callback); + private static extern RESULT FMOD5_ChannelGroup_SetCallback(IntPtr channelgroup, CHANNELCONTROL_CALLBACK callback); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_ChannelGroup_IsPlaying (IntPtr channelgroup, out bool isplaying); + private static extern RESULT FMOD5_ChannelGroup_IsPlaying(IntPtr channelgroup, out bool isplaying); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_ChannelGroup_SetPan (IntPtr channelgroup, float pan); + private static extern RESULT FMOD5_ChannelGroup_SetPan(IntPtr channelgroup, float pan); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_ChannelGroup_SetMixLevelsOutput (IntPtr channelgroup, float frontleft, float frontright, float center, float lfe, float surroundleft, float surroundright, float backleft, float backright); + private static extern RESULT FMOD5_ChannelGroup_SetMixLevelsOutput(IntPtr channelgroup, float frontleft, float frontright, float center, float lfe, float surroundleft, float surroundright, float backleft, float backright); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_ChannelGroup_SetMixLevelsInput (IntPtr channelgroup, float[] levels, int numlevels); + private static extern RESULT FMOD5_ChannelGroup_SetMixLevelsInput(IntPtr channelgroup, float[] levels, int numlevels); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_ChannelGroup_SetMixMatrix (IntPtr channelgroup, float[] matrix, int outchannels, int inchannels, int inchannel_hop); + private static extern RESULT FMOD5_ChannelGroup_SetMixMatrix(IntPtr channelgroup, float[] matrix, int outchannels, int inchannels, int inchannel_hop); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_ChannelGroup_GetMixMatrix (IntPtr channelgroup, float[] matrix, out int outchannels, out int inchannels, int inchannel_hop); + private static extern RESULT FMOD5_ChannelGroup_GetMixMatrix(IntPtr channelgroup, float[] matrix, out int outchannels, out int inchannels, int inchannel_hop); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_ChannelGroup_GetDSPClock (IntPtr channelgroup, out ulong dspclock, out ulong parentclock); + private static extern RESULT FMOD5_ChannelGroup_GetDSPClock(IntPtr channelgroup, out ulong dspclock, out ulong parentclock); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_ChannelGroup_SetDelay (IntPtr channelgroup, ulong dspclock_start, ulong dspclock_end, bool stopchannels); + private static extern RESULT FMOD5_ChannelGroup_SetDelay(IntPtr channelgroup, ulong dspclock_start, ulong dspclock_end, bool stopchannels); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_ChannelGroup_GetDelay (IntPtr channelgroup, out ulong dspclock_start, out ulong dspclock_end, IntPtr zero); + private static extern RESULT FMOD5_ChannelGroup_GetDelay(IntPtr channelgroup, out ulong dspclock_start, out ulong dspclock_end, IntPtr zero); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_ChannelGroup_GetDelay (IntPtr channelgroup, out ulong dspclock_start, out ulong dspclock_end, out bool stopchannels); + private static extern RESULT FMOD5_ChannelGroup_GetDelay(IntPtr channelgroup, out ulong dspclock_start, out ulong dspclock_end, out bool stopchannels); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_ChannelGroup_AddFadePoint (IntPtr channelgroup, ulong dspclock, float volume); + private static extern RESULT FMOD5_ChannelGroup_AddFadePoint(IntPtr channelgroup, ulong dspclock, float volume); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_ChannelGroup_SetFadePointRamp (IntPtr channelgroup, ulong dspclock, float volume); + private static extern RESULT FMOD5_ChannelGroup_SetFadePointRamp(IntPtr channelgroup, ulong dspclock, float volume); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_ChannelGroup_RemoveFadePoints (IntPtr channelgroup, ulong dspclock_start, ulong dspclock_end); + private static extern RESULT FMOD5_ChannelGroup_RemoveFadePoints(IntPtr channelgroup, ulong dspclock_start, ulong dspclock_end); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_ChannelGroup_GetFadePoints (IntPtr channelgroup, ref uint numpoints, ulong[] point_dspclock, float[] point_volume); + private static extern RESULT FMOD5_ChannelGroup_GetFadePoints(IntPtr channelgroup, ref uint numpoints, ulong[] point_dspclock, float[] point_volume); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_ChannelGroup_GetDSP (IntPtr channelgroup, int index, out IntPtr dsp); + private static extern RESULT FMOD5_ChannelGroup_GetDSP(IntPtr channelgroup, int index, out IntPtr dsp); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_ChannelGroup_AddDSP (IntPtr channelgroup, int index, IntPtr dsp); + private static extern RESULT FMOD5_ChannelGroup_AddDSP(IntPtr channelgroup, int index, IntPtr dsp); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_ChannelGroup_RemoveDSP (IntPtr channelgroup, IntPtr dsp); + private static extern RESULT FMOD5_ChannelGroup_RemoveDSP(IntPtr channelgroup, IntPtr dsp); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_ChannelGroup_GetNumDSPs (IntPtr channelgroup, out int numdsps); + private static extern RESULT FMOD5_ChannelGroup_GetNumDSPs(IntPtr channelgroup, out int numdsps); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_ChannelGroup_SetDSPIndex (IntPtr channelgroup, IntPtr dsp, int index); + private static extern RESULT FMOD5_ChannelGroup_SetDSPIndex(IntPtr channelgroup, IntPtr dsp, int index); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_ChannelGroup_GetDSPIndex (IntPtr channelgroup, IntPtr dsp, out int index); + private static extern RESULT FMOD5_ChannelGroup_GetDSPIndex(IntPtr channelgroup, IntPtr dsp, out int index); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_ChannelGroup_Set3DAttributes (IntPtr channelgroup, ref VECTOR pos, ref VECTOR vel); + private static extern RESULT FMOD5_ChannelGroup_Set3DAttributes(IntPtr channelgroup, ref VECTOR pos, ref VECTOR vel); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_ChannelGroup_Get3DAttributes (IntPtr channelgroup, out VECTOR pos, out VECTOR vel); + private static extern RESULT FMOD5_ChannelGroup_Get3DAttributes(IntPtr channelgroup, out VECTOR pos, out VECTOR vel); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_ChannelGroup_Set3DMinMaxDistance (IntPtr channelgroup, float mindistance, float maxdistance); + private static extern RESULT FMOD5_ChannelGroup_Set3DMinMaxDistance(IntPtr channelgroup, float mindistance, float maxdistance); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_ChannelGroup_Get3DMinMaxDistance (IntPtr channelgroup, out float mindistance, out float maxdistance); + private static extern RESULT FMOD5_ChannelGroup_Get3DMinMaxDistance(IntPtr channelgroup, out float mindistance, out float maxdistance); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_ChannelGroup_Set3DConeSettings (IntPtr channelgroup, float insideconeangle, float outsideconeangle, float outsidevolume); + private static extern RESULT FMOD5_ChannelGroup_Set3DConeSettings(IntPtr channelgroup, float insideconeangle, float outsideconeangle, float outsidevolume); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_ChannelGroup_Get3DConeSettings (IntPtr channelgroup, out float insideconeangle, out float outsideconeangle, out float outsidevolume); + private static extern RESULT FMOD5_ChannelGroup_Get3DConeSettings(IntPtr channelgroup, out float insideconeangle, out float outsideconeangle, out float outsidevolume); [DllImport(VERSION.dll)] private static extern RESULT FMOD5_ChannelGroup_Set3DConeOrientation(IntPtr channelgroup, ref VECTOR orientation); [DllImport(VERSION.dll)] private static extern RESULT FMOD5_ChannelGroup_Get3DConeOrientation(IntPtr channelgroup, out VECTOR orientation); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_ChannelGroup_Set3DCustomRolloff (IntPtr channelgroup, ref VECTOR points, int numpoints); + private static extern RESULT FMOD5_ChannelGroup_Set3DCustomRolloff(IntPtr channelgroup, ref VECTOR points, int numpoints); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_ChannelGroup_Get3DCustomRolloff (IntPtr channelgroup, out IntPtr points, out int numpoints); + private static extern RESULT FMOD5_ChannelGroup_Get3DCustomRolloff(IntPtr channelgroup, out IntPtr points, out int numpoints); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_ChannelGroup_Set3DOcclusion (IntPtr channelgroup, float directocclusion, float reverbocclusion); + private static extern RESULT FMOD5_ChannelGroup_Set3DOcclusion(IntPtr channelgroup, float directocclusion, float reverbocclusion); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_ChannelGroup_Get3DOcclusion (IntPtr channelgroup, out float directocclusion, out float reverbocclusion); + private static extern RESULT FMOD5_ChannelGroup_Get3DOcclusion(IntPtr channelgroup, out float directocclusion, out float reverbocclusion); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_ChannelGroup_Set3DSpread (IntPtr channelgroup, float angle); + private static extern RESULT FMOD5_ChannelGroup_Set3DSpread(IntPtr channelgroup, float angle); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_ChannelGroup_Get3DSpread (IntPtr channelgroup, out float angle); + private static extern RESULT FMOD5_ChannelGroup_Get3DSpread(IntPtr channelgroup, out float angle); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_ChannelGroup_Set3DLevel (IntPtr channelgroup, float level); + private static extern RESULT FMOD5_ChannelGroup_Set3DLevel(IntPtr channelgroup, float level); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_ChannelGroup_Get3DLevel (IntPtr channelgroup, out float level); + private static extern RESULT FMOD5_ChannelGroup_Get3DLevel(IntPtr channelgroup, out float level); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_ChannelGroup_Set3DDopplerLevel (IntPtr channelgroup, float level); + private static extern RESULT FMOD5_ChannelGroup_Set3DDopplerLevel(IntPtr channelgroup, float level); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_ChannelGroup_Get3DDopplerLevel (IntPtr channelgroup, out float level); + private static extern RESULT FMOD5_ChannelGroup_Get3DDopplerLevel(IntPtr channelgroup, out float level); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_ChannelGroup_Set3DDistanceFilter (IntPtr channelgroup, bool custom, float customLevel, float centerFreq); + private static extern RESULT FMOD5_ChannelGroup_Set3DDistanceFilter(IntPtr channelgroup, bool custom, float customLevel, float centerFreq); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_ChannelGroup_Get3DDistanceFilter (IntPtr channelgroup, out bool custom, out float customLevel, out float centerFreq); + private static extern RESULT FMOD5_ChannelGroup_Get3DDistanceFilter(IntPtr channelgroup, out bool custom, out float customLevel, out float centerFreq); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_ChannelGroup_SetUserData (IntPtr channelgroup, IntPtr userdata); + private static extern RESULT FMOD5_ChannelGroup_SetUserData(IntPtr channelgroup, IntPtr userdata); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_ChannelGroup_GetUserData (IntPtr channelgroup, out IntPtr userdata); + private static extern RESULT FMOD5_ChannelGroup_GetUserData(IntPtr channelgroup, out IntPtr userdata); #endregion #region wrapperinternal @@ -3106,8 +3106,8 @@ public IntPtr handle; public ChannelGroup(IntPtr ptr) { this.handle = ptr; } - public bool hasHandle() { return this.handle != IntPtr.Zero; } - public void clearHandle() { this.handle = IntPtr.Zero; } + public bool hasHandle() { return this.handle != IntPtr.Zero; } + public void clearHandle() { this.handle = IntPtr.Zero; } #endregion } @@ -3204,39 +3204,39 @@ #region importfunctions [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_SoundGroup_Release (IntPtr soundgroup); + private static extern RESULT FMOD5_SoundGroup_Release(IntPtr soundgroup); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_SoundGroup_GetSystemObject (IntPtr soundgroup, out IntPtr system); + private static extern RESULT FMOD5_SoundGroup_GetSystemObject(IntPtr soundgroup, out IntPtr system); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_SoundGroup_SetMaxAudible (IntPtr soundgroup, int maxaudible); + private static extern RESULT FMOD5_SoundGroup_SetMaxAudible(IntPtr soundgroup, int maxaudible); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_SoundGroup_GetMaxAudible (IntPtr soundgroup, out int maxaudible); + private static extern RESULT FMOD5_SoundGroup_GetMaxAudible(IntPtr soundgroup, out int maxaudible); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_SoundGroup_SetMaxAudibleBehavior (IntPtr soundgroup, SOUNDGROUP_BEHAVIOR behavior); + private static extern RESULT FMOD5_SoundGroup_SetMaxAudibleBehavior(IntPtr soundgroup, SOUNDGROUP_BEHAVIOR behavior); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_SoundGroup_GetMaxAudibleBehavior (IntPtr soundgroup, out SOUNDGROUP_BEHAVIOR behavior); + private static extern RESULT FMOD5_SoundGroup_GetMaxAudibleBehavior(IntPtr soundgroup, out SOUNDGROUP_BEHAVIOR behavior); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_SoundGroup_SetMuteFadeSpeed (IntPtr soundgroup, float speed); + private static extern RESULT FMOD5_SoundGroup_SetMuteFadeSpeed(IntPtr soundgroup, float speed); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_SoundGroup_GetMuteFadeSpeed (IntPtr soundgroup, out float speed); + private static extern RESULT FMOD5_SoundGroup_GetMuteFadeSpeed(IntPtr soundgroup, out float speed); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_SoundGroup_SetVolume (IntPtr soundgroup, float volume); + private static extern RESULT FMOD5_SoundGroup_SetVolume(IntPtr soundgroup, float volume); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_SoundGroup_GetVolume (IntPtr soundgroup, out float volume); + private static extern RESULT FMOD5_SoundGroup_GetVolume(IntPtr soundgroup, out float volume); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_SoundGroup_Stop (IntPtr soundgroup); + private static extern RESULT FMOD5_SoundGroup_Stop(IntPtr soundgroup); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_SoundGroup_GetName (IntPtr soundgroup, IntPtr name, int namelen); + private static extern RESULT FMOD5_SoundGroup_GetName(IntPtr soundgroup, IntPtr name, int namelen); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_SoundGroup_GetNumSounds (IntPtr soundgroup, out int numsounds); + private static extern RESULT FMOD5_SoundGroup_GetNumSounds(IntPtr soundgroup, out int numsounds); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_SoundGroup_GetSound (IntPtr soundgroup, int index, out IntPtr sound); + private static extern RESULT FMOD5_SoundGroup_GetSound(IntPtr soundgroup, int index, out IntPtr sound); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_SoundGroup_GetNumPlaying (IntPtr soundgroup, out int numplaying); + private static extern RESULT FMOD5_SoundGroup_GetNumPlaying(IntPtr soundgroup, out int numplaying); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_SoundGroup_SetUserData (IntPtr soundgroup, IntPtr userdata); + private static extern RESULT FMOD5_SoundGroup_SetUserData(IntPtr soundgroup, IntPtr userdata); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_SoundGroup_GetUserData (IntPtr soundgroup, out IntPtr userdata); + private static extern RESULT FMOD5_SoundGroup_GetUserData(IntPtr soundgroup, out IntPtr userdata); #endregion #region wrapperinternal @@ -3244,8 +3244,8 @@ public IntPtr handle; public SoundGroup(IntPtr ptr) { this.handle = ptr; } - public bool hasHandle() { return this.handle != IntPtr.Zero; } - public void clearHandle() { this.handle = IntPtr.Zero; } + public bool hasHandle() { return this.handle != IntPtr.Zero; } + public void clearHandle() { this.handle = IntPtr.Zero; } #endregion } @@ -3463,102 +3463,102 @@ #region importfunctions [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_DSP_Release (IntPtr dsp); + private static extern RESULT FMOD5_DSP_Release(IntPtr dsp); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_DSP_GetSystemObject (IntPtr dsp, out IntPtr system); + private static extern RESULT FMOD5_DSP_GetSystemObject(IntPtr dsp, out IntPtr system); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_DSP_AddInput (IntPtr dsp, IntPtr input, IntPtr zero, DSPCONNECTION_TYPE type); + private static extern RESULT FMOD5_DSP_AddInput(IntPtr dsp, IntPtr input, IntPtr zero, DSPCONNECTION_TYPE type); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_DSP_AddInput (IntPtr dsp, IntPtr input, out IntPtr connection, DSPCONNECTION_TYPE type); + private static extern RESULT FMOD5_DSP_AddInput(IntPtr dsp, IntPtr input, out IntPtr connection, DSPCONNECTION_TYPE type); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_DSP_DisconnectFrom (IntPtr dsp, IntPtr target, IntPtr connection); + private static extern RESULT FMOD5_DSP_DisconnectFrom(IntPtr dsp, IntPtr target, IntPtr connection); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_DSP_DisconnectAll (IntPtr dsp, bool inputs, bool outputs); + private static extern RESULT FMOD5_DSP_DisconnectAll(IntPtr dsp, bool inputs, bool outputs); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_DSP_GetNumInputs (IntPtr dsp, out int numinputs); + private static extern RESULT FMOD5_DSP_GetNumInputs(IntPtr dsp, out int numinputs); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_DSP_GetNumOutputs (IntPtr dsp, out int numoutputs); + private static extern RESULT FMOD5_DSP_GetNumOutputs(IntPtr dsp, out int numoutputs); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_DSP_GetInput (IntPtr dsp, int index, out IntPtr input, out IntPtr inputconnection); + private static extern RESULT FMOD5_DSP_GetInput(IntPtr dsp, int index, out IntPtr input, out IntPtr inputconnection); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_DSP_GetOutput (IntPtr dsp, int index, out IntPtr output, out IntPtr outputconnection); + private static extern RESULT FMOD5_DSP_GetOutput(IntPtr dsp, int index, out IntPtr output, out IntPtr outputconnection); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_DSP_SetActive (IntPtr dsp, bool active); + private static extern RESULT FMOD5_DSP_SetActive(IntPtr dsp, bool active); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_DSP_GetActive (IntPtr dsp, out bool active); + private static extern RESULT FMOD5_DSP_GetActive(IntPtr dsp, out bool active); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_DSP_SetBypass (IntPtr dsp, bool bypass); + private static extern RESULT FMOD5_DSP_SetBypass(IntPtr dsp, bool bypass); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_DSP_GetBypass (IntPtr dsp, out bool bypass); + private static extern RESULT FMOD5_DSP_GetBypass(IntPtr dsp, out bool bypass); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_DSP_SetWetDryMix (IntPtr dsp, float prewet, float postwet, float dry); + private static extern RESULT FMOD5_DSP_SetWetDryMix(IntPtr dsp, float prewet, float postwet, float dry); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_DSP_GetWetDryMix (IntPtr dsp, out float prewet, out float postwet, out float dry); + private static extern RESULT FMOD5_DSP_GetWetDryMix(IntPtr dsp, out float prewet, out float postwet, out float dry); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_DSP_SetChannelFormat (IntPtr dsp, CHANNELMASK channelmask, int numchannels, SPEAKERMODE source_speakermode); + private static extern RESULT FMOD5_DSP_SetChannelFormat(IntPtr dsp, CHANNELMASK channelmask, int numchannels, SPEAKERMODE source_speakermode); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_DSP_GetChannelFormat (IntPtr dsp, out CHANNELMASK channelmask, out int numchannels, out SPEAKERMODE source_speakermode); + private static extern RESULT FMOD5_DSP_GetChannelFormat(IntPtr dsp, out CHANNELMASK channelmask, out int numchannels, out SPEAKERMODE source_speakermode); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_DSP_GetOutputChannelFormat (IntPtr dsp, CHANNELMASK inmask, int inchannels, SPEAKERMODE inspeakermode, out CHANNELMASK outmask, out int outchannels, out SPEAKERMODE outspeakermode); + private static extern RESULT FMOD5_DSP_GetOutputChannelFormat(IntPtr dsp, CHANNELMASK inmask, int inchannels, SPEAKERMODE inspeakermode, out CHANNELMASK outmask, out int outchannels, out SPEAKERMODE outspeakermode); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_DSP_Reset (IntPtr dsp); + private static extern RESULT FMOD5_DSP_Reset(IntPtr dsp); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_DSP_SetCallback (IntPtr dsp, DSP_CALLBACK callback); + private static extern RESULT FMOD5_DSP_SetCallback(IntPtr dsp, DSP_CALLBACK callback); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_DSP_SetParameterFloat (IntPtr dsp, int index, float value); + private static extern RESULT FMOD5_DSP_SetParameterFloat(IntPtr dsp, int index, float value); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_DSP_SetParameterInt (IntPtr dsp, int index, int value); + private static extern RESULT FMOD5_DSP_SetParameterInt(IntPtr dsp, int index, int value); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_DSP_SetParameterBool (IntPtr dsp, int index, bool value); + private static extern RESULT FMOD5_DSP_SetParameterBool(IntPtr dsp, int index, bool value); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_DSP_SetParameterData (IntPtr dsp, int index, IntPtr data, uint length); + private static extern RESULT FMOD5_DSP_SetParameterData(IntPtr dsp, int index, IntPtr data, uint length); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_DSP_GetParameterFloat (IntPtr dsp, int index, out float value, IntPtr valuestr, int valuestrlen); + private static extern RESULT FMOD5_DSP_GetParameterFloat(IntPtr dsp, int index, out float value, IntPtr valuestr, int valuestrlen); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_DSP_GetParameterInt (IntPtr dsp, int index, out int value, IntPtr valuestr, int valuestrlen); + private static extern RESULT FMOD5_DSP_GetParameterInt(IntPtr dsp, int index, out int value, IntPtr valuestr, int valuestrlen); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_DSP_GetParameterBool (IntPtr dsp, int index, out bool value, IntPtr valuestr, int valuestrlen); + private static extern RESULT FMOD5_DSP_GetParameterBool(IntPtr dsp, int index, out bool value, IntPtr valuestr, int valuestrlen); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_DSP_GetParameterData (IntPtr dsp, int index, out IntPtr data, out uint length, IntPtr valuestr, int valuestrlen); + private static extern RESULT FMOD5_DSP_GetParameterData(IntPtr dsp, int index, out IntPtr data, out uint length, IntPtr valuestr, int valuestrlen); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_DSP_GetNumParameters (IntPtr dsp, out int numparams); + private static extern RESULT FMOD5_DSP_GetNumParameters(IntPtr dsp, out int numparams); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_DSP_GetParameterInfo (IntPtr dsp, int index, out IntPtr desc); + private static extern RESULT FMOD5_DSP_GetParameterInfo(IntPtr dsp, int index, out IntPtr desc); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_DSP_GetDataParameterIndex (IntPtr dsp, int datatype, out int index); + private static extern RESULT FMOD5_DSP_GetDataParameterIndex(IntPtr dsp, int datatype, out int index); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_DSP_ShowConfigDialog (IntPtr dsp, IntPtr hwnd, bool show); + private static extern RESULT FMOD5_DSP_ShowConfigDialog(IntPtr dsp, IntPtr hwnd, bool show); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_DSP_GetInfo (IntPtr dsp, IntPtr name, out uint version, out int channels, out int configwidth, out int configheight); + private static extern RESULT FMOD5_DSP_GetInfo(IntPtr dsp, IntPtr name, out uint version, out int channels, out int configwidth, out int configheight); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_DSP_GetType (IntPtr dsp, out DSP_TYPE type); + private static extern RESULT FMOD5_DSP_GetType(IntPtr dsp, out DSP_TYPE type); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_DSP_GetIdle (IntPtr dsp, out bool idle); + private static extern RESULT FMOD5_DSP_GetIdle(IntPtr dsp, out bool idle); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_DSP_SetUserData (IntPtr dsp, IntPtr userdata); + private static extern RESULT FMOD5_DSP_SetUserData(IntPtr dsp, IntPtr userdata); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_DSP_GetUserData (IntPtr dsp, out IntPtr userdata); + private static extern RESULT FMOD5_DSP_GetUserData(IntPtr dsp, out IntPtr userdata); [DllImport(VERSION.dll)] - public static extern RESULT FMOD5_DSP_SetMeteringEnabled (IntPtr dsp, bool inputEnabled, bool outputEnabled); + public static extern RESULT FMOD5_DSP_SetMeteringEnabled(IntPtr dsp, bool inputEnabled, bool outputEnabled); [DllImport(VERSION.dll)] - public static extern RESULT FMOD5_DSP_GetMeteringEnabled (IntPtr dsp, out bool inputEnabled, out bool outputEnabled); + public static extern RESULT FMOD5_DSP_GetMeteringEnabled(IntPtr dsp, out bool inputEnabled, out bool outputEnabled); [DllImport(VERSION.dll)] - public static extern RESULT FMOD5_DSP_GetMeteringInfo (IntPtr dsp, IntPtr zero, out DSP_METERING_INFO outputInfo); + public static extern RESULT FMOD5_DSP_GetMeteringInfo(IntPtr dsp, IntPtr zero, out DSP_METERING_INFO outputInfo); [DllImport(VERSION.dll)] - public static extern RESULT FMOD5_DSP_GetMeteringInfo (IntPtr dsp, out DSP_METERING_INFO inputInfo, IntPtr zero); + public static extern RESULT FMOD5_DSP_GetMeteringInfo(IntPtr dsp, out DSP_METERING_INFO inputInfo, IntPtr zero); [DllImport(VERSION.dll)] - public static extern RESULT FMOD5_DSP_GetMeteringInfo (IntPtr dsp, out DSP_METERING_INFO inputInfo, out DSP_METERING_INFO outputInfo); + public static extern RESULT FMOD5_DSP_GetMeteringInfo(IntPtr dsp, out DSP_METERING_INFO inputInfo, out DSP_METERING_INFO outputInfo); [DllImport(VERSION.dll)] - public static extern RESULT FMOD5_DSP_GetCPUUsage (IntPtr dsp, out uint exclusive, out uint inclusive); + public static extern RESULT FMOD5_DSP_GetCPUUsage(IntPtr dsp, out uint exclusive, out uint inclusive); #endregion #region wrapperinternal public IntPtr handle; - public DSP(IntPtr ptr) { this.handle = ptr; } - public bool hasHandle() { return this.handle != IntPtr.Zero; } - public void clearHandle() { this.handle = IntPtr.Zero; } + public DSP(IntPtr ptr) { this.handle = ptr; } + public bool hasHandle() { return this.handle != IntPtr.Zero; } + public void clearHandle() { this.handle = IntPtr.Zero; } #endregion } @@ -3609,23 +3609,23 @@ #region importfunctions [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_DSPConnection_GetInput (IntPtr dspconnection, out IntPtr input); + private static extern RESULT FMOD5_DSPConnection_GetInput(IntPtr dspconnection, out IntPtr input); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_DSPConnection_GetOutput (IntPtr dspconnection, out IntPtr output); + private static extern RESULT FMOD5_DSPConnection_GetOutput(IntPtr dspconnection, out IntPtr output); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_DSPConnection_SetMix (IntPtr dspconnection, float volume); + private static extern RESULT FMOD5_DSPConnection_SetMix(IntPtr dspconnection, float volume); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_DSPConnection_GetMix (IntPtr dspconnection, out float volume); + private static extern RESULT FMOD5_DSPConnection_GetMix(IntPtr dspconnection, out float volume); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_DSPConnection_SetMixMatrix (IntPtr dspconnection, float[] matrix, int outchannels, int inchannels, int inchannel_hop); + private static extern RESULT FMOD5_DSPConnection_SetMixMatrix(IntPtr dspconnection, float[] matrix, int outchannels, int inchannels, int inchannel_hop); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_DSPConnection_GetMixMatrix (IntPtr dspconnection, float[] matrix, out int outchannels, out int inchannels, int inchannel_hop); + private static extern RESULT FMOD5_DSPConnection_GetMixMatrix(IntPtr dspconnection, float[] matrix, out int outchannels, out int inchannels, int inchannel_hop); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_DSPConnection_GetType (IntPtr dspconnection, out DSPCONNECTION_TYPE type); + private static extern RESULT FMOD5_DSPConnection_GetType(IntPtr dspconnection, out DSPCONNECTION_TYPE type); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_DSPConnection_SetUserData (IntPtr dspconnection, IntPtr userdata); + private static extern RESULT FMOD5_DSPConnection_SetUserData(IntPtr dspconnection, IntPtr userdata); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_DSPConnection_GetUserData (IntPtr dspconnection, out IntPtr userdata); + private static extern RESULT FMOD5_DSPConnection_GetUserData(IntPtr dspconnection, out IntPtr userdata); #endregion #region wrapperinternal @@ -3633,8 +3633,8 @@ public IntPtr handle; public DSPConnection(IntPtr ptr) { this.handle = ptr; } - public bool hasHandle() { return this.handle != IntPtr.Zero; } - public void clearHandle() { this.handle = IntPtr.Zero; } + public bool hasHandle() { return this.handle != IntPtr.Zero; } + public void clearHandle() { this.handle = IntPtr.Zero; } #endregion } @@ -3733,45 +3733,45 @@ #region importfunctions [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Geometry_Release (IntPtr geometry); + private static extern RESULT FMOD5_Geometry_Release(IntPtr geometry); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Geometry_AddPolygon (IntPtr geometry, float directocclusion, float reverbocclusion, bool doublesided, int numvertices, VECTOR[] vertices, out int polygonindex); + private static extern RESULT FMOD5_Geometry_AddPolygon(IntPtr geometry, float directocclusion, float reverbocclusion, bool doublesided, int numvertices, VECTOR[] vertices, out int polygonindex); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Geometry_GetNumPolygons (IntPtr geometry, out int numpolygons); + private static extern RESULT FMOD5_Geometry_GetNumPolygons(IntPtr geometry, out int numpolygons); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Geometry_GetMaxPolygons (IntPtr geometry, out int maxpolygons, out int maxvertices); + private static extern RESULT FMOD5_Geometry_GetMaxPolygons(IntPtr geometry, out int maxpolygons, out int maxvertices); [DllImport(VERSION.dll)] private static extern RESULT FMOD5_Geometry_GetPolygonNumVertices(IntPtr geometry, int index, out int numvertices); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Geometry_SetPolygonVertex (IntPtr geometry, int index, int vertexindex, ref VECTOR vertex); + private static extern RESULT FMOD5_Geometry_SetPolygonVertex(IntPtr geometry, int index, int vertexindex, ref VECTOR vertex); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Geometry_GetPolygonVertex (IntPtr geometry, int index, int vertexindex, out VECTOR vertex); + private static extern RESULT FMOD5_Geometry_GetPolygonVertex(IntPtr geometry, int index, int vertexindex, out VECTOR vertex); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Geometry_SetPolygonAttributes (IntPtr geometry, int index, float directocclusion, float reverbocclusion, bool doublesided); + private static extern RESULT FMOD5_Geometry_SetPolygonAttributes(IntPtr geometry, int index, float directocclusion, float reverbocclusion, bool doublesided); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Geometry_GetPolygonAttributes (IntPtr geometry, int index, out float directocclusion, out float reverbocclusion, out bool doublesided); + private static extern RESULT FMOD5_Geometry_GetPolygonAttributes(IntPtr geometry, int index, out float directocclusion, out float reverbocclusion, out bool doublesided); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Geometry_SetActive (IntPtr geometry, bool active); + private static extern RESULT FMOD5_Geometry_SetActive(IntPtr geometry, bool active); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Geometry_GetActive (IntPtr geometry, out bool active); + private static extern RESULT FMOD5_Geometry_GetActive(IntPtr geometry, out bool active); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Geometry_SetRotation (IntPtr geometry, ref VECTOR forward, ref VECTOR up); + private static extern RESULT FMOD5_Geometry_SetRotation(IntPtr geometry, ref VECTOR forward, ref VECTOR up); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Geometry_GetRotation (IntPtr geometry, out VECTOR forward, out VECTOR up); + private static extern RESULT FMOD5_Geometry_GetRotation(IntPtr geometry, out VECTOR forward, out VECTOR up); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Geometry_SetPosition (IntPtr geometry, ref VECTOR position); + private static extern RESULT FMOD5_Geometry_SetPosition(IntPtr geometry, ref VECTOR position); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Geometry_GetPosition (IntPtr geometry, out VECTOR position); + private static extern RESULT FMOD5_Geometry_GetPosition(IntPtr geometry, out VECTOR position); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Geometry_SetScale (IntPtr geometry, ref VECTOR scale); + private static extern RESULT FMOD5_Geometry_SetScale(IntPtr geometry, ref VECTOR scale); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Geometry_GetScale (IntPtr geometry, out VECTOR scale); + private static extern RESULT FMOD5_Geometry_GetScale(IntPtr geometry, out VECTOR scale); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Geometry_Save (IntPtr geometry, IntPtr data, out int datasize); + private static extern RESULT FMOD5_Geometry_Save(IntPtr geometry, IntPtr data, out int datasize); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Geometry_SetUserData (IntPtr geometry, IntPtr userdata); + private static extern RESULT FMOD5_Geometry_SetUserData(IntPtr geometry, IntPtr userdata); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Geometry_GetUserData (IntPtr geometry, out IntPtr userdata); + private static extern RESULT FMOD5_Geometry_GetUserData(IntPtr geometry, out IntPtr userdata); #endregion #region wrapperinternal @@ -3779,8 +3779,8 @@ public IntPtr handle; public Geometry(IntPtr ptr) { this.handle = ptr; } - public bool hasHandle() { return this.handle != IntPtr.Zero; } - public void clearHandle() { this.handle = IntPtr.Zero; } + public bool hasHandle() { return this.handle != IntPtr.Zero; } + public void clearHandle() { this.handle = IntPtr.Zero; } #endregion } @@ -3833,23 +3833,23 @@ #region importfunctions [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Reverb3D_Release (IntPtr reverb3d); + private static extern RESULT FMOD5_Reverb3D_Release(IntPtr reverb3d); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Reverb3D_Set3DAttributes (IntPtr reverb3d, ref VECTOR position, float mindistance, float maxdistance); + private static extern RESULT FMOD5_Reverb3D_Set3DAttributes(IntPtr reverb3d, ref VECTOR position, float mindistance, float maxdistance); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Reverb3D_Get3DAttributes (IntPtr reverb3d, ref VECTOR position, ref float mindistance, ref float maxdistance); + private static extern RESULT FMOD5_Reverb3D_Get3DAttributes(IntPtr reverb3d, ref VECTOR position, ref float mindistance, ref float maxdistance); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Reverb3D_SetProperties (IntPtr reverb3d, ref REVERB_PROPERTIES properties); + private static extern RESULT FMOD5_Reverb3D_SetProperties(IntPtr reverb3d, ref REVERB_PROPERTIES properties); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Reverb3D_GetProperties (IntPtr reverb3d, ref REVERB_PROPERTIES properties); + private static extern RESULT FMOD5_Reverb3D_GetProperties(IntPtr reverb3d, ref REVERB_PROPERTIES properties); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Reverb3D_SetActive (IntPtr reverb3d, bool active); + private static extern RESULT FMOD5_Reverb3D_SetActive(IntPtr reverb3d, bool active); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Reverb3D_GetActive (IntPtr reverb3d, out bool active); + private static extern RESULT FMOD5_Reverb3D_GetActive(IntPtr reverb3d, out bool active); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Reverb3D_SetUserData (IntPtr reverb3d, IntPtr userdata); + private static extern RESULT FMOD5_Reverb3D_SetUserData(IntPtr reverb3d, IntPtr userdata); [DllImport(VERSION.dll)] - private static extern RESULT FMOD5_Reverb3D_GetUserData (IntPtr reverb3d, out IntPtr userdata); + private static extern RESULT FMOD5_Reverb3D_GetUserData(IntPtr reverb3d, out IntPtr userdata); #endregion #region wrapperinternal @@ -3857,8 +3857,8 @@ public IntPtr handle; public Reverb3D(IntPtr ptr) { this.handle = ptr; } - public bool hasHandle() { return this.handle != IntPtr.Zero; } - public void clearHandle() { this.handle = IntPtr.Zero; } + public bool hasHandle() { return this.handle != IntPtr.Zero; } + public void clearHandle() { this.handle = IntPtr.Zero; } #endregion } @@ -3934,7 +3934,7 @@ bool inUse; GCHandle gcHandle; - public bool InUse() { return inUse; } + public bool InUse() { return inUse; } public void SetInUse() { inUse = true; } private int roundUpPowerTwo(int number) diff --git a/FMODCoreAPI/fmod_dsp.cs b/FMODCoreAPI/fmod_dsp.cs index 804f97f..7ad60be 100644 --- a/FMODCoreAPI/fmod_dsp.cs +++ b/FMODCoreAPI/fmod_dsp.cs @@ -11,7 +11,6 @@ /* =========================================================================================*/ using System; -using System.Text; using System.Runtime.InteropServices; namespace FMOD @@ -19,11 +18,11 @@ [StructLayout(LayoutKind.Sequential)] public struct DSP_BUFFER_ARRAY { - public int numbuffers; - public int[] buffernumchannels; - public CHANNELMASK[] bufferchannelmask; - public IntPtr[] buffers; - public SPEAKERMODE speakermode; + public int numbuffers; + public int[] buffernumchannels; + public CHANNELMASK[] bufferchannelmask; + public IntPtr[] buffers; + public SPEAKERMODE speakermode; } public enum DSP_PROCESS_OPERATION @@ -49,47 +48,47 @@ /* DSP callbacks */ - public delegate RESULT DSP_CREATE_CALLBACK (ref DSP_STATE dsp_state); - public delegate RESULT DSP_RELEASE_CALLBACK (ref DSP_STATE dsp_state); - public delegate RESULT DSP_RESET_CALLBACK (ref DSP_STATE dsp_state); - public delegate RESULT DSP_SETPOSITION_CALLBACK (ref DSP_STATE dsp_state, uint pos); - public delegate RESULT DSP_READ_CALLBACK (ref DSP_STATE dsp_state, IntPtr inbuffer, IntPtr outbuffer, uint length, int inchannels, ref int outchannels); - public delegate RESULT DSP_SHOULDIPROCESS_CALLBACK (ref DSP_STATE dsp_state, bool inputsidle, uint length, CHANNELMASK inmask, int inchannels, SPEAKERMODE speakermode); - public delegate RESULT DSP_PROCESS_CALLBACK (ref DSP_STATE dsp_state, uint length, ref DSP_BUFFER_ARRAY inbufferarray, ref DSP_BUFFER_ARRAY outbufferarray, bool inputsidle, DSP_PROCESS_OPERATION op); - public delegate RESULT DSP_SETPARAM_FLOAT_CALLBACK (ref DSP_STATE dsp_state, int index, float value); - public delegate RESULT DSP_SETPARAM_INT_CALLBACK (ref DSP_STATE dsp_state, int index, int value); - public delegate RESULT DSP_SETPARAM_BOOL_CALLBACK (ref DSP_STATE dsp_state, int index, bool value); - public delegate RESULT DSP_SETPARAM_DATA_CALLBACK (ref DSP_STATE dsp_state, int index, IntPtr data, uint length); - public delegate RESULT DSP_GETPARAM_FLOAT_CALLBACK (ref DSP_STATE dsp_state, int index, ref float value, IntPtr valuestr); - public delegate RESULT DSP_GETPARAM_INT_CALLBACK (ref DSP_STATE dsp_state, int index, ref int value, IntPtr valuestr); - public delegate RESULT DSP_GETPARAM_BOOL_CALLBACK (ref DSP_STATE dsp_state, int index, ref bool value, IntPtr valuestr); - public delegate RESULT DSP_GETPARAM_DATA_CALLBACK (ref DSP_STATE dsp_state, int index, ref IntPtr data, ref uint length, IntPtr valuestr); - public delegate RESULT DSP_SYSTEM_REGISTER_CALLBACK (ref DSP_STATE dsp_state); - public delegate RESULT DSP_SYSTEM_DEREGISTER_CALLBACK (ref DSP_STATE dsp_state); - public delegate RESULT DSP_SYSTEM_MIX_CALLBACK (ref DSP_STATE dsp_state, int stage); + public delegate RESULT DSP_CREATE_CALLBACK(ref DSP_STATE dsp_state); + public delegate RESULT DSP_RELEASE_CALLBACK(ref DSP_STATE dsp_state); + public delegate RESULT DSP_RESET_CALLBACK(ref DSP_STATE dsp_state); + public delegate RESULT DSP_SETPOSITION_CALLBACK(ref DSP_STATE dsp_state, uint pos); + public delegate RESULT DSP_READ_CALLBACK(ref DSP_STATE dsp_state, IntPtr inbuffer, IntPtr outbuffer, uint length, int inchannels, ref int outchannels); + public delegate RESULT DSP_SHOULDIPROCESS_CALLBACK(ref DSP_STATE dsp_state, bool inputsidle, uint length, CHANNELMASK inmask, int inchannels, SPEAKERMODE speakermode); + public delegate RESULT DSP_PROCESS_CALLBACK(ref DSP_STATE dsp_state, uint length, ref DSP_BUFFER_ARRAY inbufferarray, ref DSP_BUFFER_ARRAY outbufferarray, bool inputsidle, DSP_PROCESS_OPERATION op); + public delegate RESULT DSP_SETPARAM_FLOAT_CALLBACK(ref DSP_STATE dsp_state, int index, float value); + public delegate RESULT DSP_SETPARAM_INT_CALLBACK(ref DSP_STATE dsp_state, int index, int value); + public delegate RESULT DSP_SETPARAM_BOOL_CALLBACK(ref DSP_STATE dsp_state, int index, bool value); + public delegate RESULT DSP_SETPARAM_DATA_CALLBACK(ref DSP_STATE dsp_state, int index, IntPtr data, uint length); + public delegate RESULT DSP_GETPARAM_FLOAT_CALLBACK(ref DSP_STATE dsp_state, int index, ref float value, IntPtr valuestr); + public delegate RESULT DSP_GETPARAM_INT_CALLBACK(ref DSP_STATE dsp_state, int index, ref int value, IntPtr valuestr); + public delegate RESULT DSP_GETPARAM_BOOL_CALLBACK(ref DSP_STATE dsp_state, int index, ref bool value, IntPtr valuestr); + public delegate RESULT DSP_GETPARAM_DATA_CALLBACK(ref DSP_STATE dsp_state, int index, ref IntPtr data, ref uint length, IntPtr valuestr); + public delegate RESULT DSP_SYSTEM_REGISTER_CALLBACK(ref DSP_STATE dsp_state); + public delegate RESULT DSP_SYSTEM_DEREGISTER_CALLBACK(ref DSP_STATE dsp_state); + public delegate RESULT DSP_SYSTEM_MIX_CALLBACK(ref DSP_STATE dsp_state, int stage); /* DSP functions */ - public delegate IntPtr DSP_ALLOC_FUNC (uint size, MEMORY_TYPE type, IntPtr sourcestr); - public delegate IntPtr DSP_REALLOC_FUNC (IntPtr ptr, uint size, MEMORY_TYPE type, IntPtr sourcestr); - public delegate void DSP_FREE_FUNC (IntPtr ptr, MEMORY_TYPE type, IntPtr sourcestr); - public delegate void DSP_LOG_FUNC (DEBUG_FLAGS level, IntPtr file, int line, IntPtr function, IntPtr str); - public delegate RESULT DSP_GETSAMPLERATE_FUNC (ref DSP_STATE dsp_state, ref int rate); - public delegate RESULT DSP_GETBLOCKSIZE_FUNC (ref DSP_STATE dsp_state, ref uint blocksize); - public delegate RESULT DSP_GETSPEAKERMODE_FUNC (ref DSP_STATE dsp_state, ref int speakermode_mixer, ref int speakermode_output); - public delegate RESULT DSP_GETCLOCK_FUNC (ref DSP_STATE dsp_state, out ulong clock, out uint offset, out uint length); - public delegate RESULT DSP_GETLISTENERATTRIBUTES_FUNC (ref DSP_STATE dsp_state, ref int numlisteners, IntPtr attributes); - public delegate RESULT DSP_GETUSERDATA_FUNC (ref DSP_STATE dsp_state, out IntPtr userdata); - public delegate RESULT DSP_DFT_FFTREAL_FUNC (ref DSP_STATE dsp_state, int size, IntPtr signal, IntPtr dft, IntPtr window, int signalhop); - public delegate RESULT DSP_DFT_IFFTREAL_FUNC (ref DSP_STATE dsp_state, int size, IntPtr dft, IntPtr signal, IntPtr window, int signalhop); - public delegate RESULT DSP_PAN_SUMMONOMATRIX_FUNC (ref DSP_STATE dsp_state, int sourceSpeakerMode, float lowFrequencyGain, float overallGain, IntPtr matrix); - public delegate RESULT DSP_PAN_SUMSTEREOMATRIX_FUNC (ref DSP_STATE dsp_state, int sourceSpeakerMode, float pan, float lowFrequencyGain, float overallGain, int matrixHop, IntPtr matrix); - public delegate RESULT DSP_PAN_SUMSURROUNDMATRIX_FUNC (ref DSP_STATE dsp_state, int sourceSpeakerMode, int targetSpeakerMode, float direction, float extent, float rotation, float lowFrequencyGain, float overallGain, int matrixHop, IntPtr matrix, DSP_PAN_SURROUND_FLAGS flags); - public delegate RESULT DSP_PAN_SUMMONOTOSURROUNDMATRIX_FUNC (ref DSP_STATE dsp_state, int targetSpeakerMode, float direction, float extent, float lowFrequencyGain, float overallGain, int matrixHop, IntPtr matrix); - public delegate RESULT DSP_PAN_SUMSTEREOTOSURROUNDMATRIX_FUNC (ref DSP_STATE dsp_state, int targetSpeakerMode, float direction, float extent, float rotation, float lowFrequencyGain, float overallGain, int matrixHop, IntPtr matrix); - public delegate RESULT DSP_PAN_GETROLLOFFGAIN_FUNC (ref DSP_STATE dsp_state, DSP_PAN_3D_ROLLOFF_TYPE rolloff, float distance, float mindistance, float maxdistance, out float gain); + public delegate IntPtr DSP_ALLOC_FUNC(uint size, MEMORY_TYPE type, IntPtr sourcestr); + public delegate IntPtr DSP_REALLOC_FUNC(IntPtr ptr, uint size, MEMORY_TYPE type, IntPtr sourcestr); + public delegate void DSP_FREE_FUNC(IntPtr ptr, MEMORY_TYPE type, IntPtr sourcestr); + public delegate void DSP_LOG_FUNC(DEBUG_FLAGS level, IntPtr file, int line, IntPtr function, IntPtr str); + public delegate RESULT DSP_GETSAMPLERATE_FUNC(ref DSP_STATE dsp_state, ref int rate); + public delegate RESULT DSP_GETBLOCKSIZE_FUNC(ref DSP_STATE dsp_state, ref uint blocksize); + public delegate RESULT DSP_GETSPEAKERMODE_FUNC(ref DSP_STATE dsp_state, ref int speakermode_mixer, ref int speakermode_output); + public delegate RESULT DSP_GETCLOCK_FUNC(ref DSP_STATE dsp_state, out ulong clock, out uint offset, out uint length); + public delegate RESULT DSP_GETLISTENERATTRIBUTES_FUNC(ref DSP_STATE dsp_state, ref int numlisteners, IntPtr attributes); + public delegate RESULT DSP_GETUSERDATA_FUNC(ref DSP_STATE dsp_state, out IntPtr userdata); + public delegate RESULT DSP_DFT_FFTREAL_FUNC(ref DSP_STATE dsp_state, int size, IntPtr signal, IntPtr dft, IntPtr window, int signalhop); + public delegate RESULT DSP_DFT_IFFTREAL_FUNC(ref DSP_STATE dsp_state, int size, IntPtr dft, IntPtr signal, IntPtr window, int signalhop); + public delegate RESULT DSP_PAN_SUMMONOMATRIX_FUNC(ref DSP_STATE dsp_state, int sourceSpeakerMode, float lowFrequencyGain, float overallGain, IntPtr matrix); + public delegate RESULT DSP_PAN_SUMSTEREOMATRIX_FUNC(ref DSP_STATE dsp_state, int sourceSpeakerMode, float pan, float lowFrequencyGain, float overallGain, int matrixHop, IntPtr matrix); + public delegate RESULT DSP_PAN_SUMSURROUNDMATRIX_FUNC(ref DSP_STATE dsp_state, int sourceSpeakerMode, int targetSpeakerMode, float direction, float extent, float rotation, float lowFrequencyGain, float overallGain, int matrixHop, IntPtr matrix, DSP_PAN_SURROUND_FLAGS flags); + public delegate RESULT DSP_PAN_SUMMONOTOSURROUNDMATRIX_FUNC(ref DSP_STATE dsp_state, int targetSpeakerMode, float direction, float extent, float lowFrequencyGain, float overallGain, int matrixHop, IntPtr matrix); + public delegate RESULT DSP_PAN_SUMSTEREOTOSURROUNDMATRIX_FUNC(ref DSP_STATE dsp_state, int targetSpeakerMode, float direction, float extent, float rotation, float lowFrequencyGain, float overallGain, int matrixHop, IntPtr matrix); + public delegate RESULT DSP_PAN_GETROLLOFFGAIN_FUNC(ref DSP_STATE dsp_state, DSP_PAN_3D_ROLLOFF_TYPE rolloff, float distance, float mindistance, float maxdistance, out float gain); public enum DSP_TYPE : int @@ -169,70 +168,70 @@ [StructLayout(LayoutKind.Sequential)] public struct DSP_PARAMETER_DESC_FLOAT { - public float min; - public float max; - public float defaultval; + public float min; + public float max; + public float defaultval; public DSP_PARAMETER_FLOAT_MAPPING mapping; } [StructLayout(LayoutKind.Sequential)] public struct DSP_PARAMETER_DESC_INT { - public int min; - public int max; - public int defaultval; - public bool goestoinf; - public IntPtr valuenames; + public int min; + public int max; + public int defaultval; + public bool goestoinf; + public IntPtr valuenames; } [StructLayout(LayoutKind.Sequential)] public struct DSP_PARAMETER_DESC_BOOL { - public bool defaultval; - public IntPtr valuenames; + public bool defaultval; + public IntPtr valuenames; } [StructLayout(LayoutKind.Sequential)] public struct DSP_PARAMETER_DESC_DATA { - public int datatype; + public int datatype; } [StructLayout(LayoutKind.Explicit)] public struct DSP_PARAMETER_DESC_UNION { [FieldOffset(0)] - public DSP_PARAMETER_DESC_FLOAT floatdesc; + public DSP_PARAMETER_DESC_FLOAT floatdesc; [FieldOffset(0)] - public DSP_PARAMETER_DESC_INT intdesc; + public DSP_PARAMETER_DESC_INT intdesc; [FieldOffset(0)] - public DSP_PARAMETER_DESC_BOOL booldesc; + public DSP_PARAMETER_DESC_BOOL booldesc; [FieldOffset(0)] - public DSP_PARAMETER_DESC_DATA datadesc; + public DSP_PARAMETER_DESC_DATA datadesc; } [StructLayout(LayoutKind.Sequential)] public struct DSP_PARAMETER_DESC { - public DSP_PARAMETER_TYPE type; + public DSP_PARAMETER_TYPE type; [MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)] - public byte[] name; + public byte[] name; [MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)] - public byte[] label; - public string description; + public byte[] label; + public string description; public DSP_PARAMETER_DESC_UNION desc; } public enum DSP_PARAMETER_DATA_TYPE { - DSP_PARAMETER_DATA_TYPE_USER = 0, - DSP_PARAMETER_DATA_TYPE_OVERALLGAIN = -1, - DSP_PARAMETER_DATA_TYPE_3DATTRIBUTES = -2, - DSP_PARAMETER_DATA_TYPE_SIDECHAIN = -3, - DSP_PARAMETER_DATA_TYPE_FFT = -4, - DSP_PARAMETER_DATA_TYPE_3DATTRIBUTES_MULTI = -5, - DSP_PARAMETER_DATA_TYPE_ATTENUATION_RANGE = -6 + DSP_PARAMETER_DATA_TYPE_USER = 0, + DSP_PARAMETER_DATA_TYPE_OVERALLGAIN = -1, + DSP_PARAMETER_DATA_TYPE_3DATTRIBUTES = -2, + DSP_PARAMETER_DATA_TYPE_SIDECHAIN = -3, + DSP_PARAMETER_DATA_TYPE_FFT = -4, + DSP_PARAMETER_DATA_TYPE_3DATTRIBUTES_MULTI = -5, + DSP_PARAMETER_DATA_TYPE_ATTENUATION_RANGE = -6 } [StructLayout(LayoutKind.Sequential)] @@ -241,38 +240,38 @@ public float linear_gain; public float linear_gain_additive; } - + [StructLayout(LayoutKind.Sequential)] public struct DSP_PARAMETER_3DATTRIBUTES { public ATTRIBUTES_3D relative; public ATTRIBUTES_3D absolute; } - + [StructLayout(LayoutKind.Sequential)] public struct DSP_PARAMETER_3DATTRIBUTES_MULTI { - public int numlisteners; + public int numlisteners; [MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)] public ATTRIBUTES_3D[] relative; [MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)] public float[] weight; public ATTRIBUTES_3D absolute; } - + [StructLayout(LayoutKind.Sequential)] public struct DSP_PARAMETER_SIDECHAIN { public int sidechainenable; } - + [StructLayout(LayoutKind.Sequential)] public struct DSP_PARAMETER_FFT { - public int length; - public int numchannels; - - [MarshalAs(UnmanagedType.ByValArray,SizeConst=32)] + public int length; + public int numchannels; + + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)] private IntPtr[] spectrum_internal; public float[][] spectrum @@ -280,13 +279,13 @@ get { var buffer = new float[numchannels][]; - + for (int i = 0; i < numchannels; ++i) { buffer[i] = new float[length]; Marshal.Copy(spectrum_internal[i], buffer[i], 0, length); } - + return buffer; } } @@ -338,92 +337,92 @@ [StructLayout(LayoutKind.Sequential)] public struct DSP_DESCRIPTION { - public uint pluginsdkversion; + public uint pluginsdkversion; [MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)] - public byte[] name; - public uint version; - public int numinputbuffers; - public int numoutputbuffers; - public DSP_CREATE_CALLBACK create; - public DSP_RELEASE_CALLBACK release; - public DSP_RESET_CALLBACK reset; - public DSP_READ_CALLBACK read; - public DSP_PROCESS_CALLBACK process; - public DSP_SETPOSITION_CALLBACK setposition; + public byte[] name; + public uint version; + public int numinputbuffers; + public int numoutputbuffers; + public DSP_CREATE_CALLBACK create; + public DSP_RELEASE_CALLBACK release; + public DSP_RESET_CALLBACK reset; + public DSP_READ_CALLBACK read; + public DSP_PROCESS_CALLBACK process; + public DSP_SETPOSITION_CALLBACK setposition; - public int numparameters; - public IntPtr paramdesc; - public DSP_SETPARAM_FLOAT_CALLBACK setparameterfloat; - public DSP_SETPARAM_INT_CALLBACK setparameterint; - public DSP_SETPARAM_BOOL_CALLBACK setparameterbool; - public DSP_SETPARAM_DATA_CALLBACK setparameterdata; - public DSP_GETPARAM_FLOAT_CALLBACK getparameterfloat; - public DSP_GETPARAM_INT_CALLBACK getparameterint; - public DSP_GETPARAM_BOOL_CALLBACK getparameterbool; - public DSP_GETPARAM_DATA_CALLBACK getparameterdata; - public DSP_SHOULDIPROCESS_CALLBACK shouldiprocess; - public IntPtr userdata; + public int numparameters; + public IntPtr paramdesc; + public DSP_SETPARAM_FLOAT_CALLBACK setparameterfloat; + public DSP_SETPARAM_INT_CALLBACK setparameterint; + public DSP_SETPARAM_BOOL_CALLBACK setparameterbool; + public DSP_SETPARAM_DATA_CALLBACK setparameterdata; + public DSP_GETPARAM_FLOAT_CALLBACK getparameterfloat; + public DSP_GETPARAM_INT_CALLBACK getparameterint; + public DSP_GETPARAM_BOOL_CALLBACK getparameterbool; + public DSP_GETPARAM_DATA_CALLBACK getparameterdata; + public DSP_SHOULDIPROCESS_CALLBACK shouldiprocess; + public IntPtr userdata; - public DSP_SYSTEM_REGISTER_CALLBACK sys_register; + public DSP_SYSTEM_REGISTER_CALLBACK sys_register; public DSP_SYSTEM_DEREGISTER_CALLBACK sys_deregister; - public DSP_SYSTEM_MIX_CALLBACK sys_mix; + public DSP_SYSTEM_MIX_CALLBACK sys_mix; } [StructLayout(LayoutKind.Sequential)] public struct DSP_STATE_DFT_FUNCTIONS { - public DSP_DFT_FFTREAL_FUNC fftreal; + public DSP_DFT_FFTREAL_FUNC fftreal; public DSP_DFT_IFFTREAL_FUNC inversefftreal; } [StructLayout(LayoutKind.Sequential)] public struct DSP_STATE_PAN_FUNCTIONS { - public DSP_PAN_SUMMONOMATRIX_FUNC summonomatrix; - public DSP_PAN_SUMSTEREOMATRIX_FUNC sumstereomatrix; - public DSP_PAN_SUMSURROUNDMATRIX_FUNC sumsurroundmatrix; - public DSP_PAN_SUMMONOTOSURROUNDMATRIX_FUNC summonotosurroundmatrix; + public DSP_PAN_SUMMONOMATRIX_FUNC summonomatrix; + public DSP_PAN_SUMSTEREOMATRIX_FUNC sumstereomatrix; + public DSP_PAN_SUMSURROUNDMATRIX_FUNC sumsurroundmatrix; + public DSP_PAN_SUMMONOTOSURROUNDMATRIX_FUNC summonotosurroundmatrix; public DSP_PAN_SUMSTEREOTOSURROUNDMATRIX_FUNC sumstereotosurroundmatrix; - public DSP_PAN_GETROLLOFFGAIN_FUNC getrolloffgain; + public DSP_PAN_GETROLLOFFGAIN_FUNC getrolloffgain; } [StructLayout(LayoutKind.Sequential)] public struct DSP_STATE_FUNCTIONS { - public DSP_ALLOC_FUNC alloc; - public DSP_REALLOC_FUNC realloc; - public DSP_FREE_FUNC free; - public DSP_GETSAMPLERATE_FUNC getsamplerate; - public DSP_GETBLOCKSIZE_FUNC getblocksize; - public IntPtr dft; - public IntPtr pan; - public DSP_GETSPEAKERMODE_FUNC getspeakermode; - public DSP_GETCLOCK_FUNC getclock; - public DSP_GETLISTENERATTRIBUTES_FUNC getlistenerattributes; - public DSP_LOG_FUNC log; - public DSP_GETUSERDATA_FUNC getuserdata; + public DSP_ALLOC_FUNC alloc; + public DSP_REALLOC_FUNC realloc; + public DSP_FREE_FUNC free; + public DSP_GETSAMPLERATE_FUNC getsamplerate; + public DSP_GETBLOCKSIZE_FUNC getblocksize; + public IntPtr dft; + public IntPtr pan; + public DSP_GETSPEAKERMODE_FUNC getspeakermode; + public DSP_GETCLOCK_FUNC getclock; + public DSP_GETLISTENERATTRIBUTES_FUNC getlistenerattributes; + public DSP_LOG_FUNC log; + public DSP_GETUSERDATA_FUNC getuserdata; } [StructLayout(LayoutKind.Sequential)] public struct DSP_STATE { - public IntPtr instance; - public IntPtr plugindata; - public uint channelmask; - public int source_speakermode; - public IntPtr sidechaindata; - public int sidechainchannels; - public IntPtr functions; - public int systemobject; + public IntPtr instance; + public IntPtr plugindata; + public uint channelmask; + public int source_speakermode; + public IntPtr sidechaindata; + public int sidechainchannels; + public IntPtr functions; + public int systemobject; } [StructLayout(LayoutKind.Sequential)] public struct DSP_METERING_INFO { - public int numsamples; - [MarshalAs(UnmanagedType.ByValArray, SizeConst=32)] + public int numsamples; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)] public float[] peaklevel; - [MarshalAs(UnmanagedType.ByValArray, SizeConst=32)] + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)] public float[] rmslevel; public short numchannels; } diff --git a/FMODCoreAPI/fmod_errors.cs b/FMODCoreAPI/fmod_errors.cs index 5276112..6428941 100644 --- a/FMODCoreAPI/fmod_errors.cs +++ b/FMODCoreAPI/fmod_errors.cs @@ -17,89 +17,89 @@ { switch (errcode) { - case FMOD.RESULT.OK: return "No errors."; - case FMOD.RESULT.ERR_BADCOMMAND: return "Tried to call a function on a data type that does not allow this type of functionality (ie calling Sound::lock on a streaming sound)."; - case FMOD.RESULT.ERR_CHANNEL_ALLOC: return "Error trying to allocate a channel."; - case FMOD.RESULT.ERR_CHANNEL_STOLEN: return "The specified channel has been reused to play another sound."; - case FMOD.RESULT.ERR_DMA: return "DMA Failure. See debug output for more information."; - case FMOD.RESULT.ERR_DSP_CONNECTION: return "DSP connection error. Connection possibly caused a cyclic dependency or connected dsps with incompatible buffer counts."; - case FMOD.RESULT.ERR_DSP_DONTPROCESS: return "DSP return code from a DSP process query callback. Tells mixer not to call the process callback and therefore not consume CPU. Use this to optimize the DSP graph."; - case FMOD.RESULT.ERR_DSP_FORMAT: return "DSP Format error. A DSP unit may have attempted to connect to this network with the wrong format, or a matrix may have been set with the wrong size if the target unit has a specified channel map."; - case FMOD.RESULT.ERR_DSP_INUSE: return "DSP is already in the mixer's DSP network. It must be removed before being reinserted or released."; - case FMOD.RESULT.ERR_DSP_NOTFOUND: return "DSP connection error. Couldn't find the DSP unit specified."; - case FMOD.RESULT.ERR_DSP_RESERVED: return "DSP operation error. Cannot perform operation on this DSP as it is reserved by the system."; - case FMOD.RESULT.ERR_DSP_SILENCE: return "DSP return code from a DSP process query callback. Tells mixer silence would be produced from read, so go idle and not consume CPU. Use this to optimize the DSP graph."; - case FMOD.RESULT.ERR_DSP_TYPE: return "DSP operation cannot be performed on a DSP of this type."; - case FMOD.RESULT.ERR_FILE_BAD: return "Error loading file."; - case FMOD.RESULT.ERR_FILE_COULDNOTSEEK: return "Couldn't perform seek operation. This is a limitation of the medium (ie netstreams) or the file format."; - case FMOD.RESULT.ERR_FILE_DISKEJECTED: return "Media was ejected while reading."; - case FMOD.RESULT.ERR_FILE_EOF: return "End of file unexpectedly reached while trying to read essential data (truncated?)."; - case FMOD.RESULT.ERR_FILE_ENDOFDATA: return "End of current chunk reached while trying to read data."; - case FMOD.RESULT.ERR_FILE_NOTFOUND: return "File not found."; - case FMOD.RESULT.ERR_FORMAT: return "Unsupported file or audio format."; - case FMOD.RESULT.ERR_HEADER_MISMATCH: return "There is a version mismatch between the FMOD header and either the FMOD Studio library or the FMOD Low Level library."; - case FMOD.RESULT.ERR_HTTP: return "A HTTP error occurred. This is a catch-all for HTTP errors not listed elsewhere."; - case FMOD.RESULT.ERR_HTTP_ACCESS: return "The specified resource requires authentication or is forbidden."; - case FMOD.RESULT.ERR_HTTP_PROXY_AUTH: return "Proxy authentication is required to access the specified resource."; - case FMOD.RESULT.ERR_HTTP_SERVER_ERROR: return "A HTTP server error occurred."; - case FMOD.RESULT.ERR_HTTP_TIMEOUT: return "The HTTP request timed out."; - case FMOD.RESULT.ERR_INITIALIZATION: return "FMOD was not initialized correctly to support this function."; - case FMOD.RESULT.ERR_INITIALIZED: return "Cannot call this command after System::init."; - case FMOD.RESULT.ERR_INTERNAL: return "An error occured in the FMOD system. Use the logging version of FMOD for more information."; - case FMOD.RESULT.ERR_INVALID_FLOAT: return "Value passed in was a NaN, Inf or denormalized float."; - case FMOD.RESULT.ERR_INVALID_HANDLE: return "An invalid object handle was used."; - case FMOD.RESULT.ERR_INVALID_PARAM: return "An invalid parameter was passed to this function."; - case FMOD.RESULT.ERR_INVALID_POSITION: return "An invalid seek position was passed to this function."; - case FMOD.RESULT.ERR_INVALID_SPEAKER: return "An invalid speaker was passed to this function based on the current speaker mode."; - case FMOD.RESULT.ERR_INVALID_SYNCPOINT: return "The syncpoint did not come from this sound handle."; - case FMOD.RESULT.ERR_INVALID_THREAD: return "Tried to call a function on a thread that is not supported."; - case FMOD.RESULT.ERR_INVALID_VECTOR: return "The vectors passed in are not unit length, or perpendicular."; - case FMOD.RESULT.ERR_MAXAUDIBLE: return "Reached maximum audible playback count for this sound's soundgroup."; - case FMOD.RESULT.ERR_MEMORY: return "Not enough memory or resources."; - case FMOD.RESULT.ERR_MEMORY_CANTPOINT: return "Can't use FMOD_OPENMEMORY_POINT on non PCM source data, or non mp3/xma/adpcm data if FMOD_CREATECOMPRESSEDSAMPLE was used."; - case FMOD.RESULT.ERR_NEEDS3D: return "Tried to call a command on a 2d sound when the command was meant for 3d sound."; - case FMOD.RESULT.ERR_NEEDSHARDWARE: return "Tried to use a feature that requires hardware support."; - case FMOD.RESULT.ERR_NET_CONNECT: return "Couldn't connect to the specified host."; - case FMOD.RESULT.ERR_NET_SOCKET_ERROR: return "A socket error occurred. This is a catch-all for socket-related errors not listed elsewhere."; - case FMOD.RESULT.ERR_NET_URL: return "The specified URL couldn't be resolved."; - case FMOD.RESULT.ERR_NET_WOULD_BLOCK: return "Operation on a non-blocking socket could not complete immediately."; - case FMOD.RESULT.ERR_NOTREADY: return "Operation could not be performed because specified sound/DSP connection is not ready."; - case FMOD.RESULT.ERR_OUTPUT_ALLOCATED: return "Error initializing output device, but more specifically, the output device is already in use and cannot be reused."; - case FMOD.RESULT.ERR_OUTPUT_CREATEBUFFER: return "Error creating hardware sound buffer."; - case FMOD.RESULT.ERR_OUTPUT_DRIVERCALL: return "A call to a standard soundcard driver failed, which could possibly mean a bug in the driver or resources were missing or exhausted."; - case FMOD.RESULT.ERR_OUTPUT_FORMAT: return "Soundcard does not support the specified format."; - case FMOD.RESULT.ERR_OUTPUT_INIT: return "Error initializing output device."; - case FMOD.RESULT.ERR_OUTPUT_NODRIVERS: return "The output device has no drivers installed. If pre-init, FMOD_OUTPUT_NOSOUND is selected as the output mode. If post-init, the function just fails."; - case FMOD.RESULT.ERR_PLUGIN: return "An unspecified error has been returned from a plugin."; - case FMOD.RESULT.ERR_PLUGIN_MISSING: return "A requested output, dsp unit type or codec was not available."; - case FMOD.RESULT.ERR_PLUGIN_RESOURCE: return "A resource that the plugin requires cannot be allocated or found. (ie the DLS file for MIDI playback)"; - case FMOD.RESULT.ERR_PLUGIN_VERSION: return "A plugin was built with an unsupported SDK version."; - case FMOD.RESULT.ERR_RECORD: return "An error occurred trying to initialize the recording device."; - case FMOD.RESULT.ERR_REVERB_CHANNELGROUP: return "Reverb properties cannot be set on this channel because a parent channelgroup owns the reverb connection."; - case FMOD.RESULT.ERR_REVERB_INSTANCE: return "Specified instance in FMOD_REVERB_PROPERTIES couldn't be set. Most likely because it is an invalid instance number or the reverb doesn't exist."; - case FMOD.RESULT.ERR_SUBSOUNDS: return "The error occurred because the sound referenced contains subsounds when it shouldn't have, or it doesn't contain subsounds when it should have. The operation may also not be able to be performed on a parent sound."; - case FMOD.RESULT.ERR_SUBSOUND_ALLOCATED: return "This subsound is already being used by another sound, you cannot have more than one parent to a sound. Null out the other parent's entry first."; - case FMOD.RESULT.ERR_SUBSOUND_CANTMOVE: return "Shared subsounds cannot be replaced or moved from their parent stream, such as when the parent stream is an FSB file."; - case FMOD.RESULT.ERR_TAGNOTFOUND: return "The specified tag could not be found or there are no tags."; - case FMOD.RESULT.ERR_TOOMANYCHANNELS: return "The sound created exceeds the allowable input channel count. This can be increased using the 'maxinputchannels' parameter in System::setSoftwareFormat."; - case FMOD.RESULT.ERR_TRUNCATED: return "The retrieved string is too long to fit in the supplied buffer and has been truncated."; - case FMOD.RESULT.ERR_UNIMPLEMENTED: return "Something in FMOD hasn't been implemented when it should be. Contact support."; - case FMOD.RESULT.ERR_UNINITIALIZED: return "This command failed because System::init or System::setDriver was not called."; - case FMOD.RESULT.ERR_UNSUPPORTED: return "A command issued was not supported by this object. Possibly a plugin without certain callbacks specified."; - case FMOD.RESULT.ERR_VERSION: return "The version number of this file format is not supported."; - case FMOD.RESULT.ERR_EVENT_ALREADY_LOADED: return "The specified bank has already been loaded."; - case FMOD.RESULT.ERR_EVENT_LIVEUPDATE_BUSY: return "The live update connection failed due to the game already being connected."; + case FMOD.RESULT.OK: return "No errors."; + case FMOD.RESULT.ERR_BADCOMMAND: return "Tried to call a function on a data type that does not allow this type of functionality (ie calling Sound::lock on a streaming sound)."; + case FMOD.RESULT.ERR_CHANNEL_ALLOC: return "Error trying to allocate a channel."; + case FMOD.RESULT.ERR_CHANNEL_STOLEN: return "The specified channel has been reused to play another sound."; + case FMOD.RESULT.ERR_DMA: return "DMA Failure. See debug output for more information."; + case FMOD.RESULT.ERR_DSP_CONNECTION: return "DSP connection error. Connection possibly caused a cyclic dependency or connected dsps with incompatible buffer counts."; + case FMOD.RESULT.ERR_DSP_DONTPROCESS: return "DSP return code from a DSP process query callback. Tells mixer not to call the process callback and therefore not consume CPU. Use this to optimize the DSP graph."; + case FMOD.RESULT.ERR_DSP_FORMAT: return "DSP Format error. A DSP unit may have attempted to connect to this network with the wrong format, or a matrix may have been set with the wrong size if the target unit has a specified channel map."; + case FMOD.RESULT.ERR_DSP_INUSE: return "DSP is already in the mixer's DSP network. It must be removed before being reinserted or released."; + case FMOD.RESULT.ERR_DSP_NOTFOUND: return "DSP connection error. Couldn't find the DSP unit specified."; + case FMOD.RESULT.ERR_DSP_RESERVED: return "DSP operation error. Cannot perform operation on this DSP as it is reserved by the system."; + case FMOD.RESULT.ERR_DSP_SILENCE: return "DSP return code from a DSP process query callback. Tells mixer silence would be produced from read, so go idle and not consume CPU. Use this to optimize the DSP graph."; + case FMOD.RESULT.ERR_DSP_TYPE: return "DSP operation cannot be performed on a DSP of this type."; + case FMOD.RESULT.ERR_FILE_BAD: return "Error loading file."; + case FMOD.RESULT.ERR_FILE_COULDNOTSEEK: return "Couldn't perform seek operation. This is a limitation of the medium (ie netstreams) or the file format."; + case FMOD.RESULT.ERR_FILE_DISKEJECTED: return "Media was ejected while reading."; + case FMOD.RESULT.ERR_FILE_EOF: return "End of file unexpectedly reached while trying to read essential data (truncated?)."; + case FMOD.RESULT.ERR_FILE_ENDOFDATA: return "End of current chunk reached while trying to read data."; + case FMOD.RESULT.ERR_FILE_NOTFOUND: return "File not found."; + case FMOD.RESULT.ERR_FORMAT: return "Unsupported file or audio format."; + case FMOD.RESULT.ERR_HEADER_MISMATCH: return "There is a version mismatch between the FMOD header and either the FMOD Studio library or the FMOD Low Level library."; + case FMOD.RESULT.ERR_HTTP: return "A HTTP error occurred. This is a catch-all for HTTP errors not listed elsewhere."; + case FMOD.RESULT.ERR_HTTP_ACCESS: return "The specified resource requires authentication or is forbidden."; + case FMOD.RESULT.ERR_HTTP_PROXY_AUTH: return "Proxy authentication is required to access the specified resource."; + case FMOD.RESULT.ERR_HTTP_SERVER_ERROR: return "A HTTP server error occurred."; + case FMOD.RESULT.ERR_HTTP_TIMEOUT: return "The HTTP request timed out."; + case FMOD.RESULT.ERR_INITIALIZATION: return "FMOD was not initialized correctly to support this function."; + case FMOD.RESULT.ERR_INITIALIZED: return "Cannot call this command after System::init."; + case FMOD.RESULT.ERR_INTERNAL: return "An error occured in the FMOD system. Use the logging version of FMOD for more information."; + case FMOD.RESULT.ERR_INVALID_FLOAT: return "Value passed in was a NaN, Inf or denormalized float."; + case FMOD.RESULT.ERR_INVALID_HANDLE: return "An invalid object handle was used."; + case FMOD.RESULT.ERR_INVALID_PARAM: return "An invalid parameter was passed to this function."; + case FMOD.RESULT.ERR_INVALID_POSITION: return "An invalid seek position was passed to this function."; + case FMOD.RESULT.ERR_INVALID_SPEAKER: return "An invalid speaker was passed to this function based on the current speaker mode."; + case FMOD.RESULT.ERR_INVALID_SYNCPOINT: return "The syncpoint did not come from this sound handle."; + case FMOD.RESULT.ERR_INVALID_THREAD: return "Tried to call a function on a thread that is not supported."; + case FMOD.RESULT.ERR_INVALID_VECTOR: return "The vectors passed in are not unit length, or perpendicular."; + case FMOD.RESULT.ERR_MAXAUDIBLE: return "Reached maximum audible playback count for this sound's soundgroup."; + case FMOD.RESULT.ERR_MEMORY: return "Not enough memory or resources."; + case FMOD.RESULT.ERR_MEMORY_CANTPOINT: return "Can't use FMOD_OPENMEMORY_POINT on non PCM source data, or non mp3/xma/adpcm data if FMOD_CREATECOMPRESSEDSAMPLE was used."; + case FMOD.RESULT.ERR_NEEDS3D: return "Tried to call a command on a 2d sound when the command was meant for 3d sound."; + case FMOD.RESULT.ERR_NEEDSHARDWARE: return "Tried to use a feature that requires hardware support."; + case FMOD.RESULT.ERR_NET_CONNECT: return "Couldn't connect to the specified host."; + case FMOD.RESULT.ERR_NET_SOCKET_ERROR: return "A socket error occurred. This is a catch-all for socket-related errors not listed elsewhere."; + case FMOD.RESULT.ERR_NET_URL: return "The specified URL couldn't be resolved."; + case FMOD.RESULT.ERR_NET_WOULD_BLOCK: return "Operation on a non-blocking socket could not complete immediately."; + case FMOD.RESULT.ERR_NOTREADY: return "Operation could not be performed because specified sound/DSP connection is not ready."; + case FMOD.RESULT.ERR_OUTPUT_ALLOCATED: return "Error initializing output device, but more specifically, the output device is already in use and cannot be reused."; + case FMOD.RESULT.ERR_OUTPUT_CREATEBUFFER: return "Error creating hardware sound buffer."; + case FMOD.RESULT.ERR_OUTPUT_DRIVERCALL: return "A call to a standard soundcard driver failed, which could possibly mean a bug in the driver or resources were missing or exhausted."; + case FMOD.RESULT.ERR_OUTPUT_FORMAT: return "Soundcard does not support the specified format."; + case FMOD.RESULT.ERR_OUTPUT_INIT: return "Error initializing output device."; + case FMOD.RESULT.ERR_OUTPUT_NODRIVERS: return "The output device has no drivers installed. If pre-init, FMOD_OUTPUT_NOSOUND is selected as the output mode. If post-init, the function just fails."; + case FMOD.RESULT.ERR_PLUGIN: return "An unspecified error has been returned from a plugin."; + case FMOD.RESULT.ERR_PLUGIN_MISSING: return "A requested output, dsp unit type or codec was not available."; + case FMOD.RESULT.ERR_PLUGIN_RESOURCE: return "A resource that the plugin requires cannot be allocated or found. (ie the DLS file for MIDI playback)"; + case FMOD.RESULT.ERR_PLUGIN_VERSION: return "A plugin was built with an unsupported SDK version."; + case FMOD.RESULT.ERR_RECORD: return "An error occurred trying to initialize the recording device."; + case FMOD.RESULT.ERR_REVERB_CHANNELGROUP: return "Reverb properties cannot be set on this channel because a parent channelgroup owns the reverb connection."; + case FMOD.RESULT.ERR_REVERB_INSTANCE: return "Specified instance in FMOD_REVERB_PROPERTIES couldn't be set. Most likely because it is an invalid instance number or the reverb doesn't exist."; + case FMOD.RESULT.ERR_SUBSOUNDS: return "The error occurred because the sound referenced contains subsounds when it shouldn't have, or it doesn't contain subsounds when it should have. The operation may also not be able to be performed on a parent sound."; + case FMOD.RESULT.ERR_SUBSOUND_ALLOCATED: return "This subsound is already being used by another sound, you cannot have more than one parent to a sound. Null out the other parent's entry first."; + case FMOD.RESULT.ERR_SUBSOUND_CANTMOVE: return "Shared subsounds cannot be replaced or moved from their parent stream, such as when the parent stream is an FSB file."; + case FMOD.RESULT.ERR_TAGNOTFOUND: return "The specified tag could not be found or there are no tags."; + case FMOD.RESULT.ERR_TOOMANYCHANNELS: return "The sound created exceeds the allowable input channel count. This can be increased using the 'maxinputchannels' parameter in System::setSoftwareFormat."; + case FMOD.RESULT.ERR_TRUNCATED: return "The retrieved string is too long to fit in the supplied buffer and has been truncated."; + case FMOD.RESULT.ERR_UNIMPLEMENTED: return "Something in FMOD hasn't been implemented when it should be. Contact support."; + case FMOD.RESULT.ERR_UNINITIALIZED: return "This command failed because System::init or System::setDriver was not called."; + case FMOD.RESULT.ERR_UNSUPPORTED: return "A command issued was not supported by this object. Possibly a plugin without certain callbacks specified."; + case FMOD.RESULT.ERR_VERSION: return "The version number of this file format is not supported."; + case FMOD.RESULT.ERR_EVENT_ALREADY_LOADED: return "The specified bank has already been loaded."; + case FMOD.RESULT.ERR_EVENT_LIVEUPDATE_BUSY: return "The live update connection failed due to the game already being connected."; case FMOD.RESULT.ERR_EVENT_LIVEUPDATE_MISMATCH: return "The live update connection failed due to the game data being out of sync with the tool."; - case FMOD.RESULT.ERR_EVENT_LIVEUPDATE_TIMEOUT: return "The live update connection timed out."; - case FMOD.RESULT.ERR_EVENT_NOTFOUND: return "The requested event, bus or vca could not be found."; - case FMOD.RESULT.ERR_STUDIO_UNINITIALIZED: return "The Studio::System object is not yet initialized."; - case FMOD.RESULT.ERR_STUDIO_NOT_LOADED: return "The specified resource is not loaded, so it can't be unloaded."; - case FMOD.RESULT.ERR_INVALID_STRING: return "An invalid string was passed to this function."; - case FMOD.RESULT.ERR_ALREADY_LOCKED: return "The specified resource is already locked."; - case FMOD.RESULT.ERR_NOT_LOCKED: return "The specified resource is not locked, so it can't be unlocked."; - case FMOD.RESULT.ERR_RECORD_DISCONNECTED: return "The specified recording driver has been disconnected."; - case FMOD.RESULT.ERR_TOOMANYSAMPLES: return "The length provided exceed the allowable limit."; - default: return "Unknown error."; + case FMOD.RESULT.ERR_EVENT_LIVEUPDATE_TIMEOUT: return "The live update connection timed out."; + case FMOD.RESULT.ERR_EVENT_NOTFOUND: return "The requested event, bus or vca could not be found."; + case FMOD.RESULT.ERR_STUDIO_UNINITIALIZED: return "The Studio::System object is not yet initialized."; + case FMOD.RESULT.ERR_STUDIO_NOT_LOADED: return "The specified resource is not loaded, so it can't be unloaded."; + case FMOD.RESULT.ERR_INVALID_STRING: return "An invalid string was passed to this function."; + case FMOD.RESULT.ERR_ALREADY_LOCKED: return "The specified resource is already locked."; + case FMOD.RESULT.ERR_NOT_LOCKED: return "The specified resource is not locked, so it can't be unlocked."; + case FMOD.RESULT.ERR_RECORD_DISCONNECTED: return "The specified recording driver has been disconnected."; + case FMOD.RESULT.ERR_TOOMANYSAMPLES: return "The length provided exceed the allowable limit."; + default: return "Unknown error."; } } } diff --git a/Igniter/Properties/AssemblyInfo.cs b/Igniter/Properties/AssemblyInfo.cs index ccdcb0b..7860177 100644 --- a/Igniter/Properties/AssemblyInfo.cs +++ b/Igniter/Properties/AssemblyInfo.cs @@ -1,6 +1,4 @@ using System.Reflection; -using System.Resources; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Windows; diff --git a/Igniter/ViewModels/MainViewModel.cs b/Igniter/ViewModels/MainViewModel.cs index b1778af..8dbcd03 100644 --- a/Igniter/ViewModels/MainViewModel.cs +++ b/Igniter/ViewModels/MainViewModel.cs @@ -1,7 +1,6 @@ using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.Messaging; using Igniter.MSG; -using Ionic.Zip; using System; using System.Diagnostics; using System.IO; diff --git a/LedCSharp/LogitechGSDK.cs b/LedCSharp/LogitechGSDK.cs index 44576f8..1d426a4 100644 --- a/LedCSharp/LogitechGSDK.cs +++ b/LedCSharp/LogitechGSDK.cs @@ -159,16 +159,16 @@ //Config option functions [DllImport("LogitechLedEnginesWrapper ", CallingConvention = CallingConvention.Cdecl)] - public static extern bool LogiLedGetConfigOptionNumber([MarshalAs(UnmanagedType.LPWStr)]String configPath, ref double defaultNumber); + public static extern bool LogiLedGetConfigOptionNumber([MarshalAs(UnmanagedType.LPWStr)] String configPath, ref double defaultNumber); [DllImport("LogitechLedEnginesWrapper ", CallingConvention = CallingConvention.Cdecl)] - public static extern bool LogiLedGetConfigOptionBool([MarshalAs(UnmanagedType.LPWStr)]String configPath, ref bool defaultRed); + public static extern bool LogiLedGetConfigOptionBool([MarshalAs(UnmanagedType.LPWStr)] String configPath, ref bool defaultRed); [DllImport("LogitechLedEnginesWrapper ", CallingConvention = CallingConvention.Cdecl)] - public static extern bool LogiLedGetConfigOptionColor([MarshalAs(UnmanagedType.LPWStr)]String configPath, ref int defaultRed, ref int defaultGreen, ref int defaultBlue); + public static extern bool LogiLedGetConfigOptionColor([MarshalAs(UnmanagedType.LPWStr)] String configPath, ref int defaultRed, ref int defaultGreen, ref int defaultBlue); [DllImport("LogitechLedEnginesWrapper ", CallingConvention = CallingConvention.Cdecl)] - public static extern bool LogiLedGetConfigOptionKeyInput([MarshalAs(UnmanagedType.LPWStr)]String configPath, StringBuilder buffer, int bufsize); + public static extern bool LogiLedGetConfigOptionKeyInput([MarshalAs(UnmanagedType.LPWStr)] String configPath, StringBuilder buffer, int bufsize); ///////////////////// [DllImport("LogitechLedEnginesWrapper ", CallingConvention = CallingConvention.Cdecl)] diff --git a/Qwilight/Assets/UI/Default/Veil 0.jpg b/Qwilight/Assets/UI/Default/Veil 0.jpg new file mode 100644 index 0000000..1f586da --- /dev/null +++ b/Qwilight/Assets/UI/Default/Veil 0.jpg Binary files differ diff --git a/Qwilight/Assets/UI/Default/Veil 1.jpg b/Qwilight/Assets/UI/Default/Veil 1.jpg new file mode 100644 index 0000000..4293a9d --- /dev/null +++ b/Qwilight/Assets/UI/Default/Veil 1.jpg Binary files differ diff --git a/Qwilight/Assets/UI/Default/Veil 2.jpg b/Qwilight/Assets/UI/Default/Veil 2.jpg new file mode 100644 index 0000000..04fa5e0 --- /dev/null +++ b/Qwilight/Assets/UI/Default/Veil 2.jpg Binary files differ diff --git a/Qwilight/Compute/DefaultCompute.cs b/Qwilight/Compute/DefaultCompute.cs index d9948a7..af6f373 100644 --- a/Qwilight/Compute/DefaultCompute.cs +++ b/Qwilight/Compute/DefaultCompute.cs @@ -4860,7 +4860,7 @@ { var zipEntry = zipFile[LevyingComputingPosition.ToString()]; using var rms = PoolSystem.Instance.GetDataFlow((int)zipEntry.UncompressedSize); - zipFile[LevyingComputingPosition.ToString()].Extract(rms); + zipEntry.Extract(rms); rms.Position = 0; netItem.Comment = Comment.Parser.ParseFrom(rms); } diff --git a/Qwilight/Computing.cs b/Qwilight/Computing.cs index 3b39c5e..47e672a 100644 --- a/Qwilight/Computing.cs +++ b/Qwilight/Computing.cs @@ -155,7 +155,7 @@ 7.0 => "JUDGE: HD", 10.0 => "JUDGE: VHD", _ => $"JUDGE: LV. {Math.Round(JudgmentStage, 1)}" - }}{(double.IsNaN(HitPointsValue) ? string.Empty : $", HP: {Math.Round(100 * HitPointsValue, 3)}%")}"; + }}, HP: {(double.IsNaN(HitPointsValue) ? 0 : Math.Round(100 * HitPointsValue, 3))}%"; public string TotalNotesContents => $"{TotalNotes.ToString("#,##0")} (SC: {AutoableNotes.ToString("#,##0")}, {(IsAutoLongNote ? "LN" : "CN")}: {LongNotes.ToString("#,##0")}, MN: {TrapNotes.ToString("#,##0")})"; diff --git a/Qwilight/Looper.cs b/Qwilight/Looper.cs new file mode 100644 index 0000000..90171c5 --- /dev/null +++ b/Qwilight/Looper.cs @@ -0,0 +1,52 @@ +using Qwilight.Utilities; +using System.Diagnostics; + +namespace Qwilight +{ + public sealed class Looper + { + readonly Action, double, T> _onHandle; + readonly double _millis; + Thread _loopingHandler; + bool _isAvailable; + + public Looper(Action, double, T> onHandle, double millis) + { + _onHandle = onHandle; + _millis = millis; + } + + public void Levy(T param) + { + _isAvailable = true; + var loopingHandler = Stopwatch.StartNew(); + var loopingCounter = 0.0; + _loopingHandler = Utility.HandleParallelly(() => + { + try + { + while (_isAvailable) + { + _onHandle(this, loopingCounter, param); + loopingCounter += _millis; + + var toWait = loopingCounter - loopingHandler.GetMillis(); + if (toWait > 0.0) + { + Thread.Sleep(TimeSpan.FromMilliseconds(toWait)); + } + } + } + catch (ThreadInterruptedException) + { + } + }); + } + + public void Stop() + { + _isAvailable = false; + _loopingHandler?.Interrupt(); + } + } +} diff --git a/Qwilight/MSG/ViewFilesWindow.cs b/Qwilight/MSG/ViewFilesWindow.cs new file mode 100644 index 0000000..560d61e --- /dev/null +++ b/Qwilight/MSG/ViewFilesWindow.cs @@ -0,0 +1,9 @@ +using CommunityToolkit.Mvvm.Messaging.Messages; + +namespace Qwilight.MSG +{ + public sealed class ViewFilesWindow : AsyncRequestMessage + { + public IEnumerable Filters { get; init; } + } +} \ No newline at end of file diff --git a/Qwilight/Qwilight.csproj b/Qwilight/Qwilight.csproj index e54fd1c..4c02bef 100644 --- a/Qwilight/Qwilight.csproj +++ b/Qwilight/Qwilight.csproj @@ -66,7 +66,7 @@ - + diff --git a/Qwilight/System/Configure/Configure.cs b/Qwilight/System/Configure/Configure.cs index dcf04ce..a8388a3 100644 --- a/Qwilight/System/Configure/Configure.cs +++ b/Qwilight/System/Configure/Configure.cs @@ -4,7 +4,6 @@ using Qwilight.UIComponent; using Qwilight.Utilities; using Qwilight.ViewModel; -using System.Diagnostics; using System.Globalization; using System.IO; using System.Runtime.InteropServices; diff --git a/Qwilight/System/PositionSystem.cs b/Qwilight/System/PositionSystem.cs index 322312f..85568a9 100644 --- a/Qwilight/System/PositionSystem.cs +++ b/Qwilight/System/PositionSystem.cs @@ -2,9 +2,6 @@ using System.Collections.Concurrent; using System.IO; using System.Text; -using System.Text.Encodings.Web; -using System.Text.Json; -using System.Text.Json.Serialization; using System.Windows.Media; namespace Qwilight diff --git a/Qwilight/System/RGBSystem/DefaultRGBSystem.cs b/Qwilight/System/RGBSystem/DefaultRGBSystem.cs index c68aa0d..440d347 100644 --- a/Qwilight/System/RGBSystem/DefaultRGBSystem.cs +++ b/Qwilight/System/RGBSystem/DefaultRGBSystem.cs @@ -1,12 +1,11 @@ using Qwilight.Utilities; using RGB.NET.Core; -using RGB.NET.Devices.Corsair; using System.Collections.Frozen; using Windows.System; namespace Qwilight { - public abstract class DefaultRGBSystem: BaseRGBSystem + public abstract class DefaultRGBSystem : BaseRGBSystem { static LedId GetInput(VirtualKey rawInput) => rawInput switch { diff --git a/Qwilight/System/RGBSystem/GSSystem.cs b/Qwilight/System/RGBSystem/GSSystem.cs index f61279b..662059b 100644 --- a/Qwilight/System/RGBSystem/GSSystem.cs +++ b/Qwilight/System/RGBSystem/GSSystem.cs @@ -1,7 +1,5 @@ using Microsoft.UI; using RGB.NET.Core; -using RGB.NET.Devices.CoolerMaster; -using RGB.NET.Devices.Corsair; using RGB.NET.Devices.SteelSeries; using Color = Windows.UI.Color; diff --git a/Qwilight/UIComponent/AvatarTitle.cs b/Qwilight/UIComponent/AvatarTitle.cs index 928bf1f..7ba4955 100644 --- a/Qwilight/UIComponent/AvatarTitle.cs +++ b/Qwilight/UIComponent/AvatarTitle.cs @@ -1,5 +1,4 @@ using Microsoft.Graphics.Canvas.Brushes; -using System.Collections.Concurrent; using Windows.UI; using Brush = System.Windows.Media.Brush; diff --git a/Qwilight/UIComponent/NotifyItem.cs b/Qwilight/UIComponent/NotifyItem.cs index 5f8ca54..6a6315f 100644 --- a/Qwilight/UIComponent/NotifyItem.cs +++ b/Qwilight/UIComponent/NotifyItem.cs @@ -7,8 +7,8 @@ public sealed class NotifyItem : Model, IDisposable { NotifySystem.NotifyVariety _toNotifyVariety; - long _levyingStatus; - long _quitStatus; + double _levyingStatus; + double _quitStatus; string _text; public byte[] Data { get; set; } @@ -23,7 +23,7 @@ public bool IsStopped { get; set; } - public double BundleStatus => MaxStatus > 0L ? 100.0 * Status / MaxStatus : 0.0; + public double BundleStatus => MaxStatus > 0.0 ? 100.0 * Status / MaxStatus : 0.0; public Action OnHandle { get; init; } @@ -36,14 +36,14 @@ set => SetProperty(ref _toNotifyVariety, value, nameof(Variety)); } - public long Status + public double Status { get => _levyingStatus; set => SetProperty(ref _levyingStatus, value, nameof(BundleStatus)); } - public long MaxStatus + public double MaxStatus { get => _quitStatus; diff --git a/Qwilight/Utilities/Utility.cs b/Qwilight/Utilities/Utility.cs index ca023d5..5a1cb0b 100644 --- a/Qwilight/Utilities/Utility.cs +++ b/Qwilight/Utilities/Utility.cs @@ -6,7 +6,6 @@ using System.Diagnostics; using System.Management; using System.Runtime.InteropServices; -using System.Security.Principal; using System.Text.RegularExpressions; using System.Windows; using System.Windows.Controls.Primitives; diff --git a/Qwilight/View/ConfigureWindow/ComputingGUIConfigureWindow.xaml b/Qwilight/View/ConfigureWindow/ComputingGUIConfigureWindow.xaml index 77cfcf7..0eebf6d 100644 --- a/Qwilight/View/ConfigureWindow/ComputingGUIConfigureWindow.xaml +++ b/Qwilight/View/ConfigureWindow/ComputingGUIConfigureWindow.xaml @@ -131,12 +131,12 @@ - + - + diff --git a/Qwilight/View/MainWindow/MainWindow.xaml.cs b/Qwilight/View/MainWindow/MainWindow.xaml.cs index 17d9aeb..cf64359 100644 --- a/Qwilight/View/MainWindow/MainWindow.xaml.cs +++ b/Qwilight/View/MainWindow/MainWindow.xaml.cs @@ -181,6 +181,16 @@ } message.Reply(fileWindow.PickSingleFileAsync().AsTask().ContinueWith(file => file.Result?.Path)); }); + StrongReferenceMessenger.Default.Register(this, (recipient, message) => + { + var filesWindow = new FileOpenPicker(); + InitializeWithWindow.Initialize(filesWindow, _handle); + foreach (var filter in message.Filters) + { + filesWindow.FileTypeFilter.Add(filter); + } + message.Reply(filesWindow.PickMultipleFilesAsync().AsTask().ContinueWith(file => file.Result?.Select(file => file.Path).ToArray())); + }); StrongReferenceMessenger.Default.Register(this, (recipient, message) => PInvoke.PostMessage(_handle, PInvoke.WM_CLOSE, message.ViewAllowWindow ? (WPARAM)1 : (WPARAM)0, (LPARAM)0)); StrongReferenceMessenger.Default.Register(this, (recipient, message) => { diff --git a/Qwilight/View/ModifyAudioFilePathWindow.xaml b/Qwilight/View/ModifyAudioFilePathWindow.xaml index 0c1c297..0e11e1d 100644 --- a/Qwilight/View/ModifyAudioFilePathWindow.xaml +++ b/Qwilight/View/ModifyAudioFilePathWindow.xaml @@ -23,7 +23,7 @@ - - - - - - - + + + + + + + + diff --git a/Qwilight/View/QwilightClass.xaml.cs b/Qwilight/View/QwilightClass.xaml.cs index 0986a63..76c1e98 100644 --- a/Qwilight/View/QwilightClass.xaml.cs +++ b/Qwilight/View/QwilightClass.xaml.cs @@ -31,7 +31,7 @@ if (Utility.HasInput(VirtualKey.LeftShift)) { - PInvoke.AllocConsole(); + PInvoke.AllocConsole(); } GPUConfigure.Instance.Load(); @@ -41,7 +41,7 @@ NativeLibrary.TryLoad("nvapi64", out _); break; } - _wpfLoadingAsset.Show(true, true); + _wpfLoadingAsset.Show(true); Encoding.RegisterProvider(CodePagesEncodingProvider.Instance); #if DEBUG @@ -84,26 +84,27 @@ }); } - readonly ConcurrentDictionary _handledFaultMap = new(); - - void OnUnhandledFault(Exception e) - { - if (_handledFaultMap.TryAdd(e, null)) - { - var (logFilePath, faultText) = Utility.SaveFaultFile(QwilightComponent.FaultEntryPath, e); - if (!QwilightComponent.IsVS && !(e is OutOfMemoryException)) - { - _ = TwilightSystem.Instance.PostWwwParallel($"{QwilightComponent.QwilightAPI}/fault", faultText); - } - PInvoke.MessageBox(HWND.Null, e.Message, "Qwilight", MESSAGEBOX_STYLE.MB_OK | MESSAGEBOX_STYLE.MB_ICONERROR); - Utility.OpenAs(logFilePath); - } - } - QwilightClass() => InitializeComponent(); protected override void OnStartup(StartupEventArgs e) { + var handledFaults = new ConcurrentDictionary(); + void OnUnhandledFault(Exception e) + { + if (handledFaults.TryAdd(e, default)) + { + var (logFilePath, faultText) = Utility.SaveFaultFile(QwilightComponent.FaultEntryPath, e); + if (!QwilightComponent.IsVS && !(e is OutOfMemoryException)) + { + _ = TwilightSystem.Instance.PostWwwParallel($"{QwilightComponent.QwilightAPI}/fault", faultText); + } + if (PInvoke.MessageBox(HWND.Null, e.Message, "Qwilight", MESSAGEBOX_STYLE.MB_OKCANCEL | MESSAGEBOX_STYLE.MB_ICONERROR | MESSAGEBOX_STYLE.MB_DEFBUTTON2) == MESSAGEBOX_RESULT.IDOK) + { + Utility.OpenAs(logFilePath); + } + } + } + AppDomain.CurrentDomain.UnhandledException += (sender, e) => { OnUnhandledFault(e.ExceptionObject as Exception); diff --git a/Qwilight/View/WwwLevelWindow.xaml b/Qwilight/View/WwwLevelWindow.xaml index b0db074..18d3a50 100644 --- a/Qwilight/View/WwwLevelWindow.xaml +++ b/Qwilight/View/WwwLevelWindow.xaml @@ -58,423 +58,423 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Qwilight/ViewModel/ConfigureViewModel.cs b/Qwilight/ViewModel/ConfigureViewModel.cs index 5d19f5b..889832b 100644 --- a/Qwilight/ViewModel/ConfigureViewModel.cs +++ b/Qwilight/ViewModel/ConfigureViewModel.cs @@ -6,7 +6,6 @@ using Qwilight.UIComponent; using Qwilight.Utilities; using System.Collections.ObjectModel; -using System.Diagnostics; using System.IO; using System.Windows.Threading; using Windows.ApplicationModel.DataTransfer; diff --git a/Qwilight/ViewModel/MainViewModel.cs b/Qwilight/ViewModel/MainViewModel.cs index 91a4a5e..ad1c631 100644 --- a/Qwilight/ViewModel/MainViewModel.cs +++ b/Qwilight/ViewModel/MainViewModel.cs @@ -77,8 +77,9 @@ { EnableRaisingEvents = true }; + readonly Looper<(Action, double?)> _fadeLooper; + readonly Looper _fadeInLooper; long _randomMillis = Environment.TickCount64; - DispatcherTimer _fadeInHandler; bool _isAvailable = true; string _twilightCommentText0 = string.Empty; string _twilightCommentText1 = string.Empty; @@ -1557,6 +1558,53 @@ } } }; + _fadeLooper = new Looper<(Action, double?)>((looper, loopingCounter, param) => + { + var fadingMillis = param.Item2; + if (fadingMillis > 0.0) + { + var fadingMillisValue = fadingMillis.Value; + FadingValue.Status = Math.Min(fadingMillisValue, loopingCounter) / fadingMillisValue; + } + else + { + FadingValue.Status = 1.0; + } + + if (FadingValue.Status == 1.0) + { + looper.Stop(); + + UIHandler.Instance.HandleParallel(param.Item1); + + FadingValue.Layer = 0; + + _fadeInLooper.Levy(BaseUI.Instance.FadingProperties[(int)ModeValue]?[FadingValue.Layer]?.Millis); + } + }, QwilightComponent.StandardFrametime.TotalMilliseconds); + _fadeInLooper = new((looper, loopingCounter, param) => + { + if (param > 0) + { + var fadingMillisValue = param.Value; + FadingValue.Status = 1.0 - Math.Min(fadingMillisValue, loopingCounter) / fadingMillisValue; + } + else + { + FadingValue.Status = 0.0; + } + + if (FadingValue.Status == 0.0) + { + looper.Stop(); + + UIHandler.Instance.HandleParallel(() => + { + IsAvailable = true; + StrongReferenceMessenger.Default.Send(); + }); + } + }, QwilightComponent.StandardFrametime.TotalMilliseconds); } public void HandleLevyNoteFile(BaseNoteFile noteFile = null, EntryItem entryItem = null, string ubuntuID = null, WwwLevelData wwwLevelDataValue = null, ModeComponent defaultModeComponentValue = null) @@ -1764,19 +1812,11 @@ if (rar || lzma) { using IArchive rarLZMAFile = rar ? RarArchive.Open(filePath) : SevenZipArchive.Open(filePath); - foreach (var rarLZMAEntry in rarLZMAFile.Entries) + rarLZMAFile.ExtractToDirectory(bundleEntryPath, obj => { - try - { - rarLZMAEntry.WriteToDirectory(bundleEntryPath, new() - { - ExtractFullPath = true - }); - } - catch - { - } - } + savingFileItem.Status = 100.0 * obj; + savingFileItem.MaxStatus = 100.0; + }); } else { @@ -2044,7 +2084,7 @@ foreach (var noteFilePath in Utility.GetFiles(entryPath).Where(noteFilePath => { var noteFileName = Path.GetFileName(noteFilePath); - return QwilightComponent.NoteFileFormats.Any(format => noteFileName.IsTailCaselsss(format)) && noteFileName.EqualsCaseless("___bmse_temp.bms") && noteFileName.EqualsCaseless("___TempBMS.bms"); + return QwilightComponent.NoteFileFormats.Any(format => noteFileName.IsTailCaselsss(format)) && !noteFileName.EqualsCaseless("___bmse_temp.bms") && !noteFileName.EqualsCaseless("___TempBMS.bms"); })) { var entryItem = tmpEntryItem ?? NewEntryItem(); @@ -2058,7 +2098,7 @@ { if (!FastDB.Instance.GetNoteFile(noteFile)) { - noteFile.Compile(Environment.TickCount, setCancelDefaultEntryLoading); + noteFile.Compile(Environment.TickCount, setCancelDefaultEntryLoading); } noteFile.SetData(); targetNoteFiles.Add(noteFile); @@ -2411,7 +2451,7 @@ void Fade(Action onFade, DefaultCompute fadingViewComputer, bool isFadingComputerStable, int fadingViewLayer) { - _fadeInHandler?.Stop(); + _fadeInLooper.Stop(); IsAvailable = false; @@ -2419,51 +2459,7 @@ FadingValue.IsComputerStable = isFadingComputerStable; FadingValue.Layer = fadingViewLayer; - var millis = BaseUI.Instance.FadingProperties[(int)ModeValue]?[FadingValue.Layer]?.Millis; - var fadingCounter = Stopwatch.StartNew(); - var fadeHandler = new DispatcherTimer(QwilightComponent.StandardFrametime, DispatcherPriority.Send, (sender, e) => - { - if (millis > 0) - { - var millisValue = millis.Value; - FadingValue.Status = Math.Min(millisValue, fadingCounter.GetMillis()) / millisValue; - } - else - { - FadingValue.Status = 1.0; - } - - if (FadingValue.Status == 1.0) - { - (sender as DispatcherTimer).Stop(); - - FadingValue.Layer = 0; - onFade(); - - var millis = BaseUI.Instance.FadingProperties[(int)ModeValue]?[FadingValue.Layer]?.Millis; - fadingCounter.Restart(); - _fadeInHandler = new(QwilightComponent.StandardFrametime, DispatcherPriority.Send, (sender, e) => - { - if (millis > 0) - { - var millisValue = millis.Value; - FadingValue.Status = 1.0 - Math.Min(millisValue, fadingCounter.GetMillis()) / millisValue; - } - else - { - FadingValue.Status = 0.0; - } - - if (FadingValue.Status == 0.0) - { - (sender as DispatcherTimer).Stop(); - - IsAvailable = true; - StrongReferenceMessenger.Default.Send(); - } - }, UIHandler.Instance.Handler); - } - }, UIHandler.Instance.Handler); + _fadeLooper.Levy((onFade, BaseUI.Instance.FadingProperties[(int)ModeValue]?[FadingValue.Layer]?.Millis)); } public void InitMultiplierUnit() diff --git a/Qwilight/ViewModel/ModifyDefaultAudioFilePathViewModel.cs b/Qwilight/ViewModel/ModifyDefaultAudioFilePathViewModel.cs index 22a4a6b..ac26e6c 100644 --- a/Qwilight/ViewModel/ModifyDefaultAudioFilePathViewModel.cs +++ b/Qwilight/ViewModel/ModifyDefaultAudioFilePathViewModel.cs @@ -56,16 +56,22 @@ [RelayCommand] async Task OnNew() { - var filePath = await StrongReferenceMessenger.Default.Send(new ViewFileWindow { Filters = QwilightComponent.AudioFileFormats }); - var defaultAudioFilePathItem = new DefaultAudioFilePathItem + var filePaths = await StrongReferenceMessenger.Default.Send(new ViewFilesWindow { - Value = filePath - }; - if (!string.IsNullOrEmpty(filePath) && !DefaultAudioFilePathItemCollection.Contains(defaultAudioFilePathItem)) + Filters = QwilightComponent.AudioFileFormats + }); + foreach (var filePath in filePaths) { - AudioSystem.Instance.LoadDefaultAudioItem(filePath); - DefaultAudioFilePathItemCollection.Add(defaultAudioFilePathItem); - Configure.Instance.DefaultAudioFilePathItems = DefaultAudioFilePathItemCollection.ToArray(); + var defaultAudioFilePathItem = new DefaultAudioFilePathItem + { + Value = filePath + }; + if (!string.IsNullOrEmpty(filePath) && !DefaultAudioFilePathItemCollection.Contains(defaultAudioFilePathItem)) + { + AudioSystem.Instance.LoadDefaultAudioItem(filePath); + DefaultAudioFilePathItemCollection.Add(defaultAudioFilePathItem); + Configure.Instance.DefaultAudioFilePathItems = DefaultAudioFilePathItemCollection.ToArray(); + } } } diff --git a/Qwilight/ViewModel/ModifyVeilDrawingViewModel.cs b/Qwilight/ViewModel/ModifyVeilDrawingViewModel.cs index f7f0e1d..3b3be5d 100644 --- a/Qwilight/ViewModel/ModifyVeilDrawingViewModel.cs +++ b/Qwilight/ViewModel/ModifyVeilDrawingViewModel.cs @@ -2,7 +2,6 @@ using CommunityToolkit.Mvvm.Messaging; using Qwilight.MSG; using Qwilight.UIComponent; -using Qwilight.Utilities; using System.Collections.ObjectModel; using System.Windows.Input; @@ -49,19 +48,22 @@ [RelayCommand] async Task OnNew() { - var filePath = await StrongReferenceMessenger.Default.Send(new ViewFileWindow + var filePaths = await StrongReferenceMessenger.Default.Send(new ViewFilesWindow { Filters = QwilightComponent.DrawingFileFormats }); - var valueVeilDrawingItem = new VeilDrawingItem + foreach (var filePath in filePaths) { - FilePath = filePath - }; - if (!string.IsNullOrEmpty(filePath) && !VeilDrawingItemCollection.Contains(valueVeilDrawingItem)) - { - DrawingSystem.Instance.LoadVeilDrawing(valueVeilDrawingItem); - VeilDrawingItemCollection.Add(valueVeilDrawingItem); - Configure.Instance.VeilDrawingItems = VeilDrawingItemCollection.ToArray(); + var valueVeilDrawingItem = new VeilDrawingItem + { + FilePath = filePath + }; + if (!string.IsNullOrEmpty(filePath) && !VeilDrawingItemCollection.Contains(valueVeilDrawingItem)) + { + DrawingSystem.Instance.LoadVeilDrawing(valueVeilDrawingItem); + VeilDrawingItemCollection.Add(valueVeilDrawingItem); + Configure.Instance.VeilDrawingItems = VeilDrawingItemCollection.ToArray(); + } } } diff --git a/Qwilight/ViewModel/WantViewModel.cs b/Qwilight/ViewModel/WantViewModel.cs index fca78e4..04ce597 100644 --- a/Qwilight/ViewModel/WantViewModel.cs +++ b/Qwilight/ViewModel/WantViewModel.cs @@ -242,7 +242,7 @@ Configure.Instance.InputWantHandled[(int)BaseNoteFile.Handled.ID.Band1] || Configure.Instance.InputWantHandled[(int)BaseNoteFile.Handled.ID.F] || Configure.Instance.InputWantHandled[(int)BaseNoteFile.Handled.ID.HigherClear] || - Configure.Instance.InputWantHandled[(int)BaseNoteFile.Handled.ID.HighestClear]|| + Configure.Instance.InputWantHandled[(int)BaseNoteFile.Handled.ID.HighestClear] || Configure.Instance.InputWantHandled[(int)BaseNoteFile.Handled.ID.Yell1]; public Brush Level0 => Paints.PointPaints[Configure.Instance.InputWantLevel[(int)BaseNoteFile.Level.Level0] ? 1 : 0];