v1.1.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Modules Pages
Variables
Sifteo::Events Namespace Reference

Namespace of all available event vectors. More...

Variables

const EventVector
< _SYS_BASE_TRACKER > 
baseTracker
 An event generated by Sifteo::AudioTracker.
 
const NullaryEventVector
< _SYS_BASE_BT_CONNECT > 
bluetoothConnect
 A mobile device has established a connection with the Sifteo Bluetooth API.
 
const NullaryEventVector
< _SYS_BASE_BT_DISCONNECT > 
bluetoothDisconnect
 A mobile device has disconnected from the Sifteo Bluetooth API.
 
const NullaryEventVector
< _SYS_BASE_BT_READ_AVAILABLE > 
bluetoothReadAvailable
 Packets are available for reading on the current BluetoothPipe.
 
const NullaryEventVector
< _SYS_BASE_BT_WRITE_AVAILABLE > 
bluetoothWriteAvailable
 Buffer space just became available for writing to the current BluetoothPipe.
 
const EventVector
< _SYS_CUBE_ACCELCHANGE > 
cubeAccelChange
 A cube's accelerometer state has changed.
 
const EventVector
< _SYS_CUBE_ASSETDONE > 
cubeAssetDone
 The current AssetConfiguration has finished loading on this cube.
 
const EventVector
< _SYS_CUBE_BATTERY > 
cubeBatteryLevelChange
 A cube's battery level has changed measurably.
 
const EventVector
< _SYS_CUBE_CONNECT > 
cubeConnect
 A new cube has connected and is ready for use. More...
 
const EventVector
< _SYS_CUBE_DISCONNECT > 
cubeDisconnect
 A formerly connected cube has been lost. More...
 
const EventVector
< _SYS_CUBE_REFRESH > 
cubeRefresh
 The application is responsible for repainting the screen on this cube and checking its installed assets. More...
 
const EventVector
< _SYS_CUBE_TOUCH > 
cubeTouch
 A cube's touch state has changed (touch began or ended).
 
const GameMenuEventVector gameMenu
 An event generated by an optional custom "game menu" item on the standard pause menu.
 
const NeighborEventVector
< _SYS_NEIGHBOR_ADD > 
neighborAdd
 One neighbor connection (cube/side paired with cube/side) has been formed.
 
const NeighborEventVector
< _SYS_NEIGHBOR_REMOVE > 
neighborRemove
 One neighbor connection has been dissolved.
 
const NullaryEventVector
< _SYS_BASE_USB_CONNECT > 
usbConnect
 The Sifteo Base has established a connection with the host's USB.
 
const NullaryEventVector
< _SYS_BASE_USB_DISCONNECT > 
usbDisconnect
 The Sifteo Base has been disconnected from the host's USB.
 
const NullaryEventVector
< _SYS_BASE_USB_READ_AVAILABLE > 
usbReadAvailable
 Packets are available for reading on the UsbPipe.
 
const NullaryEventVector
< _SYS_BASE_USB_WRITE_AVAILABLE > 
usbWriteAvailable
 Buffer space just became available for writing to the UsbPipe.
 
const EventVector
< _SYS_BASE_VOLUME_COMMIT > 
volumeCommit
 A filesystem Volume was committed and is now available to read.
 
const EventVector
< _SYS_BASE_VOLUME_DELETE > 
volumeDelete
 A filesystem Volume was deleted.
 

Detailed Description

Namespace of all available event vectors.

Specific system calls are defined as 'yielding', i.e. they may wait until an event occurs in the runtime. System::paint() includes an implicit yield, for example. System::yield() is an explicit yield.

On any yielding system call, the system may dispatch pending event handlers. These are not running in a separate thread, but they can be delivered at many potential points in your program. They are somewhat like Deferred Procedure Calls in Win32, or Signals in UNIX-like operating systems.

This object represents a single asynchronous event which may have a handler set for it. Instances of this template exist in the Events namespace.

Variable Documentation

const EventVector<_SYS_CUBE_CONNECT> Sifteo::Events::cubeConnect

A new cube has connected and is ready for use.

This event is only sent for cubes within an application's range, as defined by Metadata::cubeRange(). The current set of connected cubes, retrievable with CubeSet::connected(), is updated immediately prior to dispatching this event.

const EventVector<_SYS_CUBE_DISCONNECT> Sifteo::Events::cubeDisconnect

A formerly connected cube has been lost.

This event is only sent if the number of cubes is still within the application's range, as defined by Metadata::cubeRange(). If the number of cubes falls below the application's minimum, instead of generating this event the system will prompt the user to reconnect a cube or to exit.

The current set of connected cubes, retrievable with CubeSet::connected(), is updated immediately prior to dispatching this event.

const EventVector<_SYS_CUBE_REFRESH> Sifteo::Events::cubeRefresh

The application is responsible for repainting the screen on this cube and checking its installed assets.

This event is issued by the system in any case where an otherwise-invisible system operation (a cube disconnecting and reconnecting, the user pausing and resuming the game) has caused the contents of a cube's VRAM and/or Asset Flash to require updating.

If an application-visible cube disconnect/reconnect event has occurred, this event is always delivered after the applicable cubeDisconnect and cubeConnect.