v1.1.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Groups Pages
abi/events.h
1 /* -*- mode: C; c-basic-offset: 4; intent-tabs-mode: nil -*-
2  *
3  * This file is part of the public interface to the Sifteo SDK.
4  * Copyright <c> 2012 Sifteo, Inc. All rights reserved.
5  */
6 
7 #ifndef _SIFTEO_ABI_EVENTS_H
8 #define _SIFTEO_ABI_EVENTS_H
9 
10 #include <sifteo/abi/types.h>
11 
12 #ifdef __cplusplus
13 extern "C" {
14 #endif
15 
16 
17 /*
18  * Event vectors. These can be changed at runtime in order to handle
19  * events within the game binary, via _SYS_setVector / _SYS_getVector.
20  */
21 
22 typedef void (*_SYSCubeEvent)(void *context, _SYSCubeID cid);
23 typedef void (*_SYSNeighborEvent)(void *context,
24  _SYSCubeID c0, _SYSSideID s0, _SYSCubeID c1, _SYSSideID s1);
25 
26 typedef enum {
27  _SYS_NEIGHBOR_ADD = 0,
28  _SYS_NEIGHBOR_REMOVE,
29  _SYS_CUBE_CONNECT,
30  _SYS_CUBE_DISCONNECT,
31  _SYS_CUBE_ASSETDONE,
32  _SYS_CUBE_TOUCH,
33  _SYS_BASE_BT_CONNECT,
34  _SYS_BASE_BT_DISCONNECT,
35  _SYS_CUBE_ACCELCHANGE,
36  _SYS_BASE_TRACKER,
37  _SYS_CUBE_BATTERY,
38  _SYS_CUBE_REFRESH,
39  _SYS_BASE_GAME_MENU,
40  _SYS_BASE_VOLUME_DELETE,
41  _SYS_BASE_VOLUME_COMMIT,
42  _SYS_BASE_BT_READ_AVAILABLE,
43  _SYS_BASE_BT_WRITE_AVAILABLE,
44  _SYS_BASE_USB_CONNECT,
45  _SYS_BASE_USB_DISCONNECT,
46  _SYS_BASE_USB_READ_AVAILABLE,
47  _SYS_BASE_USB_WRITE_AVAILABLE,
48 
49  _SYS_NUM_VECTORS, // Must be last
50 } _SYSVectorID;
51 
52 
53 #ifdef __cplusplus
54 } // extern "C"
55 #endif
56 
57 #endif