2013-01-21 12:48:07 +02:00
|
|
|
#ifndef _joystickapi__hpp__included__
|
|
|
|
#define _joystickapi__hpp__included__
|
|
|
|
|
2013-01-22 08:06:28 +02:00
|
|
|
//These correspond to various joystick_driver_* functions.
|
|
|
|
struct _joystick_driver
|
|
|
|
{
|
|
|
|
void (*init)();
|
|
|
|
void (*quit)();
|
|
|
|
void (*thread_fn)();
|
|
|
|
void (*signal)();
|
|
|
|
const char* (*name)();
|
|
|
|
};
|
|
|
|
|
|
|
|
struct joystick_driver
|
|
|
|
{
|
|
|
|
joystick_driver(_joystick_driver drv);
|
|
|
|
};
|
|
|
|
|
2013-01-21 12:48:07 +02:00
|
|
|
/**
|
|
|
|
* Joystick initialization function.
|
|
|
|
*
|
|
|
|
* - The third initialization function to be called by window_init().
|
|
|
|
* - The call occurs in the main thread.
|
|
|
|
* - Implemented by the joystick plugin.
|
|
|
|
*/
|
2013-01-21 19:06:28 +02:00
|
|
|
void joystick_driver_init() throw();
|
2013-01-21 12:48:07 +02:00
|
|
|
/**
|
|
|
|
* Joystick quit function.
|
|
|
|
*
|
|
|
|
* - The third last quit function to be called by window_quit().
|
|
|
|
* - The call occurs in the main thread.
|
|
|
|
* - Implemented by the joystick plugin.
|
|
|
|
*/
|
2013-01-21 19:06:28 +02:00
|
|
|
void joystick_driver_quit() throw();
|
2013-01-21 12:48:07 +02:00
|
|
|
/**
|
|
|
|
* This thread becomes the joystick polling thread.
|
|
|
|
*
|
|
|
|
* - Called in joystick polling thread.
|
|
|
|
*/
|
2013-01-21 19:06:28 +02:00
|
|
|
void joystick_driver_thread_fn() throw();
|
2013-01-21 12:48:07 +02:00
|
|
|
/**
|
|
|
|
* Signal the joystick thread to quit.
|
|
|
|
*/
|
2013-01-21 19:06:28 +02:00
|
|
|
void joystick_driver_signal() throw();
|
2013-01-21 12:48:07 +02:00
|
|
|
/**
|
|
|
|
* Identification for joystick plugin.
|
|
|
|
*/
|
2013-01-22 08:06:28 +02:00
|
|
|
const char* joystick_driver_name();
|
2013-01-21 12:48:07 +02:00
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|