28 # error This is a userspace-only header, not allowed by the current build.
31 #include <sifteo/abi.h>
55 template <_SYSVectorID tID>
67 _SYS_setVector(tID, 0, 0);
82 template <
typename tContext>
84 _SYS_setVector(tID, (
void*)
handler, reinterpret_cast<void*>(context));
100 _SYS_setVector(tID, (
void*)
handler, 0);
107 template <
typename tClass>
108 void set(
void (tClass::*
handler)(
unsigned), tClass *cls)
const {
111 void (tClass::*pMethod)(unsigned);
114 _SYS_setVector(tID, u.pVoid, (
void*) cls);
121 return _SYS_getVectorHandler(tID);
128 return _SYS_getVectorContext(tID);
144 template <_SYSVectorID tID>
156 _SYS_setVector(tID, 0, 0);
167 template <
typename tContext>
169 _SYS_setVector(tID, (
void*)
handler, reinterpret_cast<void*>(context));
180 _SYS_setVector(tID, (
void*)
handler, 0);
187 template <
typename tClass>
191 void (tClass::*pMethod)();
194 _SYS_setVector(tID, u.pVoid, (
void*) cls);
201 return _SYS_getVectorHandler(tID);
208 return _SYS_getVectorContext(tID);
229 _SYS_setGameMenuLabel(0);
230 _SYS_setVector(_SYS_BASE_GAME_MENU, 0, 0);
244 template <
typename tContext>
247 _SYS_setGameMenuLabel(label);
248 _SYS_setVector(_SYS_BASE_GAME_MENU, (
void*)
handler, reinterpret_cast<void*>(context));
262 void set(
void (*
handler)(
void*),
const char *label=0)
const {
264 _SYS_setGameMenuLabel(label);
265 _SYS_setVector(_SYS_BASE_GAME_MENU, (
void*)
handler, 0);
275 template <
typename tClass>
276 void set(
void (tClass::*
handler)(), tClass *cls,
const char *label=0)
const {
279 void (tClass::*pMethod)();
283 _SYS_setGameMenuLabel(label);
284 _SYS_setVector(_SYS_BASE_GAME_MENU, u.pVoid, (
void*) cls);
291 return _SYS_getVectorHandler(_SYS_BASE_GAME_MENU);
298 return _SYS_getVectorContext(_SYS_BASE_GAME_MENU);
313 ASSERT(label && label[0]);
314 _SYS_setGameMenuLabel(label);
323 _SYS_setPauseMenuResumeEnabled(enabled);
335 template <_SYSVectorID tID>
347 _SYS_setVector(tID, 0, 0);
362 template <
typename tContext>
363 void set(
void (*
handler)(tContext,
unsigned,
unsigned,
unsigned,
unsigned), tContext
context)
const {
364 _SYS_setVector(tID, (
void*)
handler, reinterpret_cast<void*>(context));
379 void set(
void (*
handler)(
void*,
unsigned,
unsigned,
unsigned,
unsigned))
const {
380 _SYS_setVector(tID, (
void*)
handler, 0);
387 template <
typename tClass>
388 void set(
void (tClass::*
handler)(
unsigned,
unsigned,
unsigned,
unsigned), tClass *cls)
const {
391 void (tClass::*pMethod)(unsigned, unsigned, unsigned, unsigned);
394 _SYS_setVector(tID, u.pVoid, (
void*) cls);
401 return _SYS_getVectorHandler(tID);
408 return _SYS_getVectorContext(tID);
void set(void(*handler)(tContext, unsigned), tContext context) const
Set this Vector to a function with context pointer.
Definition: event.h:83
const NullaryEventVector< _SYS_BASE_USB_CONNECT > usbConnect
The Sifteo Base has established a connection with the host's USB.
Definition: event.h:534
void set(void(*handler)()) const
Set this Vector to a bare function.
Definition: event.h:179
const NullaryEventVector< _SYS_BASE_USB_WRITE_AVAILABLE > usbWriteAvailable
Buffer space just became available for writing to the UsbPipe.
Definition: event.h:543
#define ASSERT(_x)
Runtime debug assertion.
Definition: macros.h:205
const NullaryEventVector< _SYS_BASE_USB_READ_AVAILABLE > usbReadAvailable
Packets are available for reading on the UsbPipe.
Definition: event.h:540
const EventVector< _SYS_BASE_VOLUME_DELETE > volumeDelete
A filesystem Volume was deleted.
Definition: event.h:508
const NullaryEventVector< _SYS_BASE_BT_READ_AVAILABLE > bluetoothReadAvailable
Packets are available for reading on the current BluetoothPipe.
Definition: event.h:524
const NullaryEventVector< _SYS_BASE_BT_WRITE_AVAILABLE > bluetoothWriteAvailable
Buffer space just became available for writing to the current BluetoothPipe.
Definition: event.h:527
void * handler() const
Return the currently set handler function, as a void pointer.
Definition: event.h:200
const EventVector< _SYS_BASE_TRACKER > baseTracker
An event generated by Sifteo::AudioTracker.
Definition: event.h:502
const EventVector< _SYS_BASE_VOLUME_COMMIT > volumeCommit
A filesystem Volume was committed and is now available to read.
Definition: event.h:511
const GameMenuEventVector gameMenu
An event generated by an optional custom "game menu" item on the standard pause menu.
Definition: event.h:505
Implementation for a single neighbor event vector.
Definition: event.h:336
const NullaryEventVector< _SYS_BASE_BT_CONNECT > bluetoothConnect
A mobile device has established a connection with the Sifteo Bluetooth API.
Definition: event.h:518
const EventVector< _SYS_CUBE_TOUCH > cubeTouch
A cube's touch state has changed (touch began or ended).
Definition: event.h:478
void * context() const
Return the currently set context object, as a void pointer.
Definition: event.h:127
const NullaryEventVector< _SYS_BASE_BT_DISCONNECT > bluetoothDisconnect
A mobile device has disconnected from the Sifteo Bluetooth API.
Definition: event.h:521
void set(void(tClass::*handler)(unsigned, unsigned, unsigned, unsigned), tClass *cls) const
Set this event vector to an instance method, given a class method pointer and an instance of that cla...
Definition: event.h:388
void * context() const
Return the currently set context object, as a void pointer.
Definition: event.h:207
const NeighborEventVector< _SYS_NEIGHBOR_REMOVE > neighborRemove
One neighbor connection has been dissolved.
Definition: event.h:441
const EventVector< _SYS_CUBE_ASSETDONE > cubeAssetDone
The current AssetConfiguration has finished loading on this cube.
Definition: event.h:472
void set(void(*handler)(void *, unsigned)) const
Set this Vector to a bare function.
Definition: event.h:99
const EventVector< _SYS_CUBE_BATTERY > cubeBatteryLevelChange
A cube's battery level has changed measurably.
Definition: event.h:481
const NeighborEventVector< _SYS_NEIGHBOR_ADD > neighborAdd
One neighbor connection (cube/side paired with cube/side) has been formed.
Definition: event.h:438
void set(void(*handler)(tContext, unsigned, unsigned, unsigned, unsigned), tContext context) const
Set this Vector to a function with context pointer.
Definition: event.h:363
const EventVector< _SYS_CUBE_DISCONNECT > cubeDisconnect
A formerly connected cube has been lost.
Definition: event.h:469
void set(void(*handler)(tContext), tContext context) const
Set this Vector to a function with context pointer.
Definition: event.h:168
Implementation for an event vector that takes no parameter.
Definition: event.h:145
const NullaryEventVector< _SYS_BASE_USB_DISCONNECT > usbDisconnect
The Sifteo Base has been disconnected from the host's USB.
Definition: event.h:537
Implementation for a single event vector.
Definition: event.h:56
void set(void(tClass::*handler)(), tClass *cls) const
Set this event vector to an instance method, given a class method pointer and an instance of that cla...
Definition: event.h:188
void set(void(*handler)(void *, unsigned, unsigned, unsigned, unsigned)) const
Set this Vector to a bare function.
Definition: event.h:379
const EventVector< _SYS_CUBE_CONNECT > cubeConnect
A new cube has connected and is ready for use.
Definition: event.h:455
void unset() const
Disable this event vector.
Definition: event.h:346
void * handler() const
Return the currently set handler function, as a void pointer.
Definition: event.h:120
void * context() const
Return the currently set context object, as a void pointer.
Definition: event.h:407
void unset() const
Disable this event vector.
Definition: event.h:66
void * handler() const
Return the currently set handler function, as a void pointer.
Definition: event.h:400
void unset() const
Disable this event vector.
Definition: event.h:155
void set(void(tClass::*handler)(unsigned), tClass *cls) const
Set this event vector to an instance method, given a class method pointer and an instance of that cla...
Definition: event.h:108
const EventVector< _SYS_CUBE_ACCELCHANGE > cubeAccelChange
A cube's accelerometer state has changed.
Definition: event.h:475
const EventVector< _SYS_CUBE_REFRESH > cubeRefresh
The application is responsible for repainting the screen on this cube and checking its installed asse...
Definition: event.h:495