lsnes/include/core/joystickapi.hpp

51 lines
1.1 KiB
C++
Raw Normal View History

2013-01-21 12:48:07 +02:00
#ifndef _joystickapi__hpp__included__
#define _joystickapi__hpp__included__
//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.
*/
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.
*/
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.
*/
void joystick_driver_thread_fn() throw();
2013-01-21 12:48:07 +02:00
/**
* Signal the joystick thread to quit.
*/
void joystick_driver_signal() throw();
2013-01-21 12:48:07 +02:00
/**
* Identification for joystick plugin.
*/
const char* joystick_driver_name();
2013-01-21 12:48:07 +02:00
#endif