2008-12-08 04:46:09 +00:00
|
|
|
//__________________________________________________________________________________________________
|
|
|
|
// Common wiimote plugin spec, unversioned
|
|
|
|
//
|
|
|
|
|
|
|
|
#ifndef _WIIMOTE_H_INCLUDED__
|
|
|
|
#define _WIIMOTE_H_INCLUDED__
|
|
|
|
|
|
|
|
#include "PluginSpecs.h"
|
|
|
|
#include "ExportProlog.h"
|
|
|
|
|
2010-07-09 01:26:53 +00:00
|
|
|
#if !defined _WIN32 && !defined __APPLE__
|
2010-04-22 11:54:46 +00:00
|
|
|
#include "Config.h"
|
|
|
|
#endif
|
|
|
|
|
2009-01-07 02:59:19 +00:00
|
|
|
|
2008-12-08 04:46:09 +00:00
|
|
|
typedef void (*TLogv)(const char* _pMessage, int _v);
|
|
|
|
|
2009-01-07 02:59:19 +00:00
|
|
|
// This is called when the Wiimote sends input reports to the Core.
|
2008-12-08 04:46:09 +00:00
|
|
|
// Payload: an L2CAP packet.
|
2010-06-05 19:03:37 +00:00
|
|
|
typedef void (*TWiimoteInterruptChannel)(int _number, u16 _channelID, const void* _pData, u32 _Size);
|
2010-04-12 01:33:10 +00:00
|
|
|
typedef bool (*TRendererHasFocus)(void);
|
2008-12-08 04:46:09 +00:00
|
|
|
|
|
|
|
// This data is passed from the core on initialization.
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
HWND hWnd;
|
2010-02-13 23:56:24 +00:00
|
|
|
#if defined HAVE_X11 && HAVE_X11
|
2010-02-13 20:47:23 +00:00
|
|
|
void *pXWindow;
|
|
|
|
#endif
|
2009-02-20 03:13:22 +00:00
|
|
|
u32 ISOId;
|
2008-12-08 04:46:09 +00:00
|
|
|
TLogv pLog;
|
2010-06-05 19:03:37 +00:00
|
|
|
TWiimoteInterruptChannel pWiimoteInterruptChannel;
|
2010-04-12 01:33:10 +00:00
|
|
|
TRendererHasFocus pRendererHasFocus;
|
2008-12-08 04:46:09 +00:00
|
|
|
} SWiimoteInitialize;
|
|
|
|
|
2009-09-02 21:00:45 +00:00
|
|
|
|
|
|
|
// I N T E R F A C E
|
|
|
|
|
2008-12-08 04:46:09 +00:00
|
|
|
|
|
|
|
// __________________________________________________________________________________________________
|
|
|
|
// Function: Wiimote_Output
|
|
|
|
// Purpose: An L2CAP packet is passed from the Core to the Wiimote,
|
|
|
|
// on the HID CONTROL channel.
|
|
|
|
// input: Da pakket.
|
|
|
|
// output: none
|
|
|
|
//
|
2009-12-25 22:10:56 +00:00
|
|
|
EXPORT void CALL Wiimote_ControlChannel(int _number, u16 _channelID, const void* _pData, u32 _Size);
|
2008-12-08 04:46:09 +00:00
|
|
|
|
|
|
|
// __________________________________________________________________________________________________
|
2010-06-05 19:03:37 +00:00
|
|
|
// Function: Send keyboard input to the plugin
|
|
|
|
// Purpose:
|
|
|
|
// input: The key and if it's pressed or released
|
|
|
|
// output: None
|
|
|
|
//
|
|
|
|
EXPORT void CALL Wiimote_Input(u16 _Key, u8 _UpDown);
|
|
|
|
|
|
|
|
// __________________________________________________________________________________________________
|
|
|
|
// Function: Wiimote_InterruptChannel
|
2008-12-08 04:46:09 +00:00
|
|
|
// Purpose: An L2CAP packet is passed from the Core to the Wiimote,
|
|
|
|
// on the HID INTERRUPT channel.
|
|
|
|
// input: Da pakket.
|
|
|
|
// output: none
|
|
|
|
//
|
2009-12-25 22:10:56 +00:00
|
|
|
EXPORT void CALL Wiimote_InterruptChannel(int _number, u16 _channelID, const void* _pData, u32 _Size);
|
2008-12-08 04:46:09 +00:00
|
|
|
|
|
|
|
// __________________________________________________________________________________________________
|
|
|
|
// Function: Wiimote_Update
|
|
|
|
// Purpose: This function is called periodically by the Core.
|
|
|
|
// input: none
|
|
|
|
// output: none
|
|
|
|
//
|
2009-12-25 22:10:56 +00:00
|
|
|
EXPORT void CALL Wiimote_Update(int _number);
|
2008-12-08 04:46:09 +00:00
|
|
|
|
2010-06-20 02:17:53 +00:00
|
|
|
// __________________________________________________________________________________________________
|
|
|
|
// Function: Wiimote_UnPairWiimotes
|
|
|
|
// Purpose: Unpair real wiimotes to safe battery
|
|
|
|
// input: none
|
|
|
|
// output: number of unpaired wiimotes
|
|
|
|
//
|
|
|
|
EXPORT unsigned int CALL Wiimote_UnPairWiimotes();
|
|
|
|
|
2008-12-08 04:46:09 +00:00
|
|
|
// __________________________________________________________________________________________________
|
|
|
|
// Function: PAD_GetAttachedPads
|
|
|
|
// Purpose: Get mask of attached pads (eg: controller 1 & 4 -> 0x9)
|
|
|
|
// input: none
|
|
|
|
// output: number of pads
|
|
|
|
//
|
|
|
|
EXPORT unsigned int CALL Wiimote_GetAttachedControllers();
|
|
|
|
|
|
|
|
#include "ExportEpilog.h"
|
|
|
|
|
|
|
|
#endif //_WIIMOTE_H_INCLUDED__
|