openMSX
Public Member Functions | Static Public Member Functions | Friends | List of all members
openmsx::InputEventGenerator Class Referencefinal

#include <InputEventGenerator.hh>

Inheritance diagram for openmsx::InputEventGenerator:
Inheritance graph
[legend]
Collaboration diagram for openmsx::InputEventGenerator:
Collaboration graph
[legend]

Public Member Functions

 InputEventGenerator (CommandController &commandController, EventDistributor &eventDistributor, GlobalSettings &globalSettings)
 
 ~InputEventGenerator ()
 
void wait ()
 Wait for event(s) and handle it. More...
 
void setKeyRepeat (bool enable)
 Enable or disable keyboard event repeats. More...
 
void reinit ()
 This functions shouldn't be needed, but in the SDL library input and video or closely coupled (sigh). More...
 
BooleanSettinggetGrabInput () const
 Input Grab on or off. More...
 
void poll ()
 

Static Public Member Functions

static int joystickNumButtons (SDL_Joystick *joystick)
 Normally the following two functions simply delegate to SDL_JoystickNumButtons() and SDL_JoystickGetButton(). More...
 
static bool joystickGetButton (SDL_Joystick *joystick, int button)
 

Friends

class EscapeGrabCmd
 

Detailed Description

Definition at line 20 of file InputEventGenerator.hh.

Constructor & Destructor Documentation

openmsx::InputEventGenerator::InputEventGenerator ( CommandController commandController,
EventDistributor eventDistributor,
GlobalSettings globalSettings 
)
openmsx::InputEventGenerator::~InputEventGenerator ( )

Member Function Documentation

BooleanSetting& openmsx::InputEventGenerator::getGrabInput ( ) const
inline

Input Grab on or off.

Definition at line 48 of file InputEventGenerator.hh.

Referenced by openmsx::VisibleSurface::VisibleSurface(), and openmsx::VisibleSurface::~VisibleSurface().

bool openmsx::InputEventGenerator::joystickGetButton ( SDL_Joystick *  joystick,
int  button 
)
static

Definition at line 425 of file InputEventGenerator.cc.

References PLATFORM_ANDROID, and UNREACHABLE.

int openmsx::InputEventGenerator::joystickNumButtons ( SDL_Joystick *  joystick)
static

Normally the following two functions simply delegate to SDL_JoystickNumButtons() and SDL_JoystickGetButton().

Except on Android, see comments in .cc for more details.

Definition at line 417 of file InputEventGenerator.cc.

References PLATFORM_ANDROID.

Referenced by openmsx::Joystick::Joystick(), openmsx::JoyMega::registerAll(), and openmsx::Joystick::registerAll().

void openmsx::InputEventGenerator::poll ( )

Definition at line 87 of file InputEventGenerator.cc.

Referenced by openmsx::EventDistributor::deliverEvents(), and wait().

void openmsx::InputEventGenerator::reinit ( )

This functions shouldn't be needed, but in the SDL library input and video or closely coupled (sigh).

For example when the video mode is changed we need to reset the keyrepeat and unicode settings.

Definition at line 69 of file InputEventGenerator.cc.

References setKeyRepeat().

Referenced by InputEventGenerator().

void openmsx::InputEventGenerator::setKeyRepeat ( bool  enable)

Enable or disable keyboard event repeats.

Definition at line 118 of file InputEventGenerator.cc.

Referenced by reinit().

void openmsx::InputEventGenerator::wait ( )

Wait for event(s) and handle it.

This method should be called from the main thread.

Definition at line 75 of file InputEventGenerator.cc.

References poll().

Friends And Related Function Documentation

friend class EscapeGrabCmd
friend

Definition at line 75 of file InputEventGenerator.hh.


The documentation for this class was generated from the following files: