#include <stdlib.h>
wiiremote.hのインクルード依存関係図
このグラフは、どのファイルから直接、間接的にインクルードされているかを示しています。
マクロ定義 | |
#define | WRMT_MAX_DEVICES 32 |
#define | WRMT_MASK_BUTTON_TWO 0x0001 |
#define | WRMT_MASK_BUTTON_ONE 0x0002 |
#define | WRMT_MASK_BUTTON_B 0x0004 |
#define | WRMT_MASK_BUTTON_A 0x0008 |
#define | WRMT_MASK_BUTTON_MINUS 0x0010 |
#define | WRMT_MASK_BUTTON_HOME 0x0080 |
#define | WRMT_MASK_BUTTON_LEFT 0x0100 |
#define | WRMT_MASK_BUTTON_RIGHT 0x0200 |
#define | WRMT_MASK_BUTTON_DOWN 0x0400 |
#define | WRMT_MASK_BUTTON_UP 0x0800 |
#define | WRMT_MASK_BUTTON_PLUS 0x1000 |
#define | WRMT_MASK_BUTTONS |
#define | WRMT_MASK_LED_1 0x0001 |
#define | WRMT_MASK_LED_2 0x0002 |
#define | WRMT_MASK_LED_3 0x0004 |
#define | WRMT_MASK_LED_4 0x0008 |
#define | WRMT_MASK_LEDS |
型定義 | |
typedef wrmt_wiiremote | WRMT_WiiRemote |
列挙型 | |
enum | WRMT_FunctionType { WRMT_FUNCTION_CONTINUOUS = 0, WRMT_FUNCTION_MOTION, WRMT_FUNCTION_IR, WRMT_FUNCTION_SPEAKER, WRMT_NUMBER_OF_FUNCTIONS } |
Function Type ID [詳細] | |
enum | WRMT_DataType { WRMT_DATA_FORCE_FEEDBACK = 0, WRMT_DATA_LEDS, WRMT_DATA_SPEAKER_FORMAT, WRMT_DATA_SPEAKER_VOLUME, WRMT_DATA_SPEAKER_SAMPLE_RATE, WRMT_DATA_BUTTONS, WRMT_DATA_MOTION_X, WRMT_DATA_MOTION_Y, WRMT_DATA_MOTION_Z, WRMT_DATA_IR1_FOUND, WRMT_DATA_IR1_SIZE, WRMT_DATA_IR1_X, WRMT_DATA_IR1_Y, WRMT_DATA_IR2_FOUND, WRMT_DATA_IR2_SIZE, WRMT_DATA_IR2_X, WRMT_DATA_IR2_Y, WRMT_DATA_IR_FOUND, WRMT_DATA_IR_SIZE, WRMT_DATA_IR_X, WRMT_DATA_IR_Y, WRMT_DATA_BATTERY_LEVEL, WRMT_NUMBER_OF_DATA_TYPE } |
Data Type ID [詳細] | |
enum | WRMT_IOReturn { WRMT_IO_TIMEOUT = -2, WRMT_IO_ERROR = -1, WRMT_IO_SUCCESS = 0 } |
関数 | |
WRMT_DECLSPEC void | WRMT_SetError (const char *message) |
Set Error. | |
WRMT_DECLSPEC char * | WRMT_GetError () |
Get Error. | |
WRMT_DECLSPEC int | WRMT_Init () |
Initialize this library system. | |
WRMT_DECLSPEC void | WRMT_Quit () |
Quit library system. | |
WRMT_DECLSPEC void | WRMT_Sleep (int ms) |
Sleep. | |
WRMT_DECLSPEC int | WRMT_Update () |
Update all opened Wii Remote devices. | |
WRMT_DECLSPEC int | WRMT_Poll () |
Checks whether there is input data from the Wii Remote device. | |
WRMT_DECLSPEC int | WRMT_GetNumWiiRemote () |
Get the number of Wii Remote devices. | |
WRMT_DECLSPEC WRMT_WiiRemote * | WRMT_GetWiiRemoteAt (int device_index) |
Get the Wii Remote device at specified index. | |
WRMT_DECLSPEC WRMT_IOReturn | WRMT_WiiRemote_Open (WRMT_WiiRemote *self) |
Open connection to Wii Remote | |
WRMT_DECLSPEC int | WRMT_WiiRemote_IsOpened (WRMT_WiiRemote *self) |
Checks whether the connection to Wii Remote has opened. | |
WRMT_DECLSPEC void | WRMT_WiiRemote_Close (WRMT_WiiRemote *self) |
Close connection to Wii Remote. | |
WRMT_DECLSPEC int | WRMT_WiiRemote_IsEnabled (WRMT_WiiRemote *self, WRMT_FunctionType function_type) |
Checks whether the specified function is enabled. | |
WRMT_DECLSPEC WRMT_IOReturn | WRMT_WiiRemote_SetEnabled (WRMT_WiiRemote *self, WRMT_FunctionType function_type, int value) |
Enable or disable the specified function. | |
WRMT_DECLSPEC int | WRMT_WiiRemote_GetState (WRMT_WiiRemote *self, WRMT_DataType data_type) |
Get device state from Wii Remote. | |
WRMT_DECLSPEC WRMT_IOReturn | WRMT_WiiRemote_SetState (WRMT_WiiRemote *self, WRMT_DataType data_type, int value) |
Sets the state of the Wii Remote device. | |
WRMT_DECLSPEC WRMT_IOReturn | WRMT_WiiRemote_WriteDataToMemory (WRMT_WiiRemote *self, int address, const unsigned char *data, size_t data_size) |
Writes data to the specified memory area. |
#define WRMT_MASK_BUTTON_A 0x0008 |
#define WRMT_MASK_BUTTON_B 0x0004 |
#define WRMT_MASK_BUTTON_DOWN 0x0400 |
#define WRMT_MASK_BUTTON_HOME 0x0080 |
#define WRMT_MASK_BUTTON_LEFT 0x0100 |
#define WRMT_MASK_BUTTON_MINUS 0x0010 |
#define WRMT_MASK_BUTTON_ONE 0x0002 |
#define WRMT_MASK_BUTTON_PLUS 0x1000 |
#define WRMT_MASK_BUTTON_RIGHT 0x0200 |
#define WRMT_MASK_BUTTON_TWO 0x0001 |
#define WRMT_MASK_BUTTON_UP 0x0800 |
#define WRMT_MASK_BUTTONS |
#define WRMT_MASK_LED_1 0x0001 |
#define WRMT_MASK_LED_2 0x0002 |
#define WRMT_MASK_LED_3 0x0004 |
#define WRMT_MASK_LED_4 0x0008 |
#define WRMT_MASK_LEDS |
#define WRMT_MAX_DEVICES 32 |
typedef struct wrmt_wiiremote WRMT_WiiRemote |
enum WRMT_DataType |
Data Type ID
enum WRMT_FunctionType |
Function Type ID
enum WRMT_IOReturn |
WRMT_DECLSPEC char* WRMT_GetError | ( | ) |
Get Error.
WRMT_DECLSPEC int WRMT_GetNumWiiRemote | ( | ) |
Get the number of Wii Remote devices.
WRMT_DECLSPEC WRMT_WiiRemote* WRMT_GetWiiRemoteAt | ( | int | device_index | ) |
Get the Wii Remote device at specified index.
If an illegal value is passed to device_index
, the result is undefined.
device_index | the index of device. a valid range is 0 to WRMT_GetNumWiiRemote()-1. |
WRMT_DECLSPEC int WRMT_Init | ( | ) |
Initialize this library system.
It is necessary to call this function before the call of any other functions.
WRMT_DECLSPEC int WRMT_Poll | ( | ) |
Checks whether there is input data from the Wii Remote device.
The state is updated if there is data.
WRMT_DECLSPEC void WRMT_Quit | ( | ) |
Quit library system.
You should call this function before stop the program.
WRMT_DECLSPEC void WRMT_SetError | ( | const char * | message | ) |
Set Error.
WRMT_DECLSPEC void WRMT_Sleep | ( | int | ms | ) |
Sleep.
Pause for ms
milliseconds.
ms | the sleeping time specified by the millisecond. |
WRMT_DECLSPEC int WRMT_Update | ( | ) |
Update all opened Wii Remote devices.
WRMT_DECLSPEC void WRMT_WiiRemote_Close | ( | WRMT_WiiRemote * | self | ) |
Close connection to Wii Remote.
WRMT_DECLSPEC int WRMT_WiiRemote_GetState | ( | WRMT_WiiRemote * | self, | |
WRMT_DataType | data_type | |||
) |
Get device state from Wii Remote.
If an illegal value is passed to data_type
, the result is undefined.
data_type | the type of data. |
data_type
. WRMT_DECLSPEC int WRMT_WiiRemote_IsEnabled | ( | WRMT_WiiRemote * | self, | |
WRMT_FunctionType | function_type | |||
) |
Checks whether the specified function is enabled.
If an illegal value is passed to function_type
, the result is undefined.
function_type | the type of function. |
WRMT_DECLSPEC int WRMT_WiiRemote_IsOpened | ( | WRMT_WiiRemote * | self | ) |
Checks whether the connection to Wii Remote has opened.
WRMT_DECLSPEC WRMT_IOReturn WRMT_WiiRemote_Open | ( | WRMT_WiiRemote * | self | ) |
Open connection to Wii Remote
the | reference of WRMT_WiiRemote. |
WRMT_DECLSPEC WRMT_IOReturn WRMT_WiiRemote_SetEnabled | ( | WRMT_WiiRemote * | self, | |
WRMT_FunctionType | function_type, | |||
int | value | |||
) |
Enable or disable the specified function.
If an illegal value is passed to function_type
, the result is undefined.
function_type | the type of function. | |
value | enable : 1, disable : 0 |
WRMT_DECLSPEC WRMT_IOReturn WRMT_WiiRemote_SetState | ( | WRMT_WiiRemote * | self, | |
WRMT_DataType | data_type, | |||
int | value | |||
) |
Sets the state of the Wii Remote device.
If an illegal value is passed to data_type
, the result is undefined.
data_type | the type of data. | |
value | the various values by the data_type . |
WRMT_DECLSPEC WRMT_IOReturn WRMT_WiiRemote_WriteDataToMemory | ( | WRMT_WiiRemote * | self, | |
int | address, | |||
const unsigned char * | data, | |||
size_t | data_size | |||
) |
Writes data to the specified memory area.