2
0
mirror of https://github.com/raylib-cs/raylib-cs synced 2025-04-03 11:09:40 -04:00
raylib-cs/Raylib-cs/types/Automation.cs
2024-12-21 15:00:13 +00:00

36 lines
925 B
C#

using System;
using System.Runtime.InteropServices;
namespace Raylib_cs;
/// <summary>Automation event</summary>
[StructLayout(LayoutKind.Sequential)]
public unsafe struct AutomationEvent
{
/// <summary>Event frame</summary>
public uint Frame;
/// <summary>Event type (AutomationEventType)</summary>
public uint Type;
/// <summary>Event parameters (if required)</summary>
public fixed int Params[4];
}
/// <summary>Automation event list</summary>
[StructLayout(LayoutKind.Sequential)]
public unsafe struct AutomationEventList
{
/// <summary>Events max entries (MAX_AUTOMATION_EVENTS)</summary>
public uint Capacity;
/// <summary>Events entries count</summary>
public uint Count;
/// <summary>Events entries</summary>
public AutomationEvent* Events;
/// <inheritdoc cref="Events"/>
public ReadOnlySpan<AutomationEvent> EventsAsSpan => new(Events, (int)Count);
}