9 # error This is a userspace-only header, not allowed by the current build.
12 #include <sifteo/abi.h>
36 template <_SYSVectorID tID>
48 _SYS_setVector(tID, 0, 0);
63 template <
typename tContext>
65 _SYS_setVector(tID, (
void*)
handler, reinterpret_cast<void*>(context));
80 void set(void (*
handler)(
void*, unsigned))
const {
81 _SYS_setVector(tID, (
void*)
handler, 0);
88 template <
typename tClass>
89 void set(void (tClass::*
handler)(unsigned), tClass *cls)
const {
92 void (tClass::*pMethod)(unsigned);
95 _SYS_setVector(tID, u.pVoid, (
void*) cls);
102 return _SYS_getVectorHandler(tID);
109 return _SYS_getVectorContext(tID);
130 _SYS_setGameMenuLabel(0);
131 _SYS_setVector(_SYS_BASE_GAME_MENU, 0, 0);
145 template <
typename tContext>
146 void set(void (*
handler)(tContext), tContext
context,
const char *label=0)
const {
148 _SYS_setGameMenuLabel(label);
149 _SYS_setVector(_SYS_BASE_GAME_MENU, (
void*)
handler, reinterpret_cast<void*>(context));
163 void set(void (*
handler)(
void*),
const char *label=0)
const {
165 _SYS_setGameMenuLabel(label);
166 _SYS_setVector(_SYS_BASE_GAME_MENU, (
void*)
handler, 0);
176 template <
typename tClass>
177 void set(void (tClass::*
handler)(), tClass *cls,
const char *label=0)
const {
180 void (tClass::*pMethod)();
184 _SYS_setGameMenuLabel(label);
185 _SYS_setVector(_SYS_BASE_GAME_MENU, u.pVoid, (
void*) cls);
192 return _SYS_getVectorHandler(_SYS_BASE_GAME_MENU);
199 return _SYS_getVectorContext(_SYS_BASE_GAME_MENU);
215 ASSERT(label && label[0]);
216 _SYS_setGameMenuLabel(label);
228 template <_SYSVectorID tID>
240 _SYS_setVector(tID, 0, 0);
255 template <
typename tContext>
256 void set(void (*
handler)(tContext, unsigned, unsigned, unsigned, unsigned), tContext
context)
const {
257 _SYS_setVector(tID, (
void*)
handler, reinterpret_cast<void*>(context));
272 void set(void (*
handler)(
void*, unsigned, unsigned, unsigned, unsigned))
const {
273 _SYS_setVector(tID, (
void*)
handler, 0);
280 template <
typename tClass>
281 void set(void (tClass::*
handler)(unsigned, unsigned, unsigned, unsigned), tClass *cls)
const {
284 void (tClass::*pMethod)(unsigned, unsigned, unsigned, unsigned);
287 _SYS_setVector(tID, u.pVoid, (
void*) cls);
294 return _SYS_getVectorHandler(tID);
301 return _SYS_getVectorContext(tID);