Event-c-api.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. #pragma once
  2. #include "Error-c-api.h"
  3. #include "WaitStatus-c-api.h"
  4. #if defined(__cplusplus)
  5. #include "os/Event.h"
  6. typedef il2cpp::os::Event UnityPalEvent;
  7. typedef il2cpp::os::EventHandle UnityPalEventHandle;
  8. #else
  9. typedef struct UnityPalEvent UnityPalEvent;
  10. typedef struct UnityPalEventHandle UnityPalEventHandle;
  11. #endif
  12. #if defined(__cplusplus)
  13. extern "C"
  14. {
  15. #endif
  16. UnityPalEvent* UnityPalEventNew(int32_t manualReset, int32_t signaled);
  17. void UnityPalEventDelete(UnityPalEvent* event);
  18. UnityPalErrorCode UnityPalEventSet(UnityPalEvent* event);
  19. UnityPalErrorCode UnityPalEventReset(UnityPalEvent* event);
  20. UnityPalWaitStatus UnityPalEventWait(UnityPalEvent* event, int32_t interruptible);
  21. UnityPalWaitStatus UnityPalEventWaitMs(UnityPalEvent* event, uint32_t ms, int32_t interruptible);
  22. UnityPalEventHandle* UnityPalEventHandleNew(UnityPalEvent* Event);
  23. void UnityPalEventHandleDelete(UnityPalEventHandle* Event);
  24. int32_t UnityPalEventHandleWait(UnityPalEventHandle* handle);
  25. int32_t UnityPalEventHandleWaitMs(UnityPalEventHandle* handle, uint32_t ms);
  26. void UnityPalEventHandleSignal(UnityPalEventHandle* handle);
  27. UnityPalEvent* UnityPalEventHandleGet(UnityPalEventHandle* handle);
  28. #if defined(__cplusplus)
  29. }
  30. #endif