wut/include/gx2/event.h

80 lines
1.5 KiB
C
Raw Normal View History

2016-01-08 17:38:38 +01:00
#pragma once
#include <wut.h>
#include <coreinit/time.h>
#include "enum.h"
2016-01-08 17:38:38 +01:00
/**
* \defgroup gx2_event Event
* \ingroup gx2
* @{
*/
#ifdef __cplusplus
extern "C" {
#endif
2016-01-08 17:52:12 +01:00
typedef struct GX2DisplayListOverrunData GX2DisplayListOverrunData;
2016-01-08 17:38:38 +01:00
typedef void (*GX2EventCallbackFunction)(GX2EventType, void *);
struct GX2DisplayListOverrunData
{
2016-10-09 21:57:50 +02:00
//! Pointer to overrun display list
2016-01-08 17:38:38 +01:00
void *oldList;
2016-10-09 21:57:50 +02:00
//! Size of overrun display list
2016-01-08 17:38:38 +01:00
uint32_t oldSize;
2016-10-09 21:57:50 +02:00
//! Pointer to new display list
2016-01-08 17:38:38 +01:00
void *newList;
2016-10-09 21:57:50 +02:00
//! Size of new display list
2016-01-08 17:38:38 +01:00
uint32_t newSize;
2016-10-09 21:57:50 +02:00
2016-01-08 17:38:38 +01:00
UNKNOWN(8);
};
CHECK_OFFSET(GX2DisplayListOverrunData, 0x00, oldList);
CHECK_OFFSET(GX2DisplayListOverrunData, 0x04, oldSize);
CHECK_OFFSET(GX2DisplayListOverrunData, 0x08, newList);
CHECK_OFFSET(GX2DisplayListOverrunData, 0x0C, newSize);
CHECK_SIZE(GX2DisplayListOverrunData, 0x18);
BOOL
GX2DrawDone();
void
GX2WaitForVsync();
void
GX2WaitForFlip();
void
GX2SetEventCallback(GX2EventType type,
GX2EventCallbackFunction func,
void *userData);
void
GX2GetEventCallback(GX2EventType type,
GX2EventCallbackFunction *funcOut,
void **userDataOut);
OSTime
GX2GetRetiredTimeStamp();
OSTime
GX2GetLastSubmittedTimeStamp();
void
GX2GetSwapStatus(uint32_t *swapCount,
uint32_t *flipCount,
OSTime *lastFlip,
OSTime *lastVsync);
BOOL
GX2WaitTimeStamp(OSTime time);
2016-01-08 17:38:38 +01:00
#ifdef __cplusplus
}
#endif
/** @} */