Auto generate paramkeys and return handles to events.

This commit is contained in:
MidoriKami 2023-09-21 20:47:49 -07:00
parent 3b5995e6ab
commit 26838d9f5c
7 changed files with 127 additions and 40 deletions

View file

@ -18,18 +18,18 @@ public interface IAddonEventManager
/// <summary>
/// Registers an event handler for the specified addon, node, and type.
/// </summary>
/// <param name="eventId">Unique Id for this event, maximum 0x10000.</param>
/// <param name="atkUnitBase">The parent addon for this event.</param>
/// <param name="atkResNode">The node that will trigger this event.</param>
/// <param name="eventType">The event type for this event.</param>
/// <param name="eventHandler">The handler to call when event is triggered.</param>
void AddEvent(uint eventId, nint atkUnitBase, nint atkResNode, AddonEventType eventType, AddonEventHandler eventHandler);
/// <returns>IAddonEventHandle used to remove the event. Null if no event was added.</returns>
IAddonEventHandle? AddEvent(nint atkUnitBase, nint atkResNode, AddonEventType eventType, AddonEventHandler eventHandler);
/// <summary>
/// Unregisters an event handler with the specified event id and event type.
/// </summary>
/// <param name="eventId">The Unique Id for this event.</param>
void RemoveEvent(uint eventId);
/// <param name="eventHandle">Unique handle identifying this event.</param>
void RemoveEvent(IAddonEventHandle eventHandle);
/// <summary>
/// Force the game cursor to be the specified cursor.