openMSX
Classes | Public Member Functions | Static Public Member Functions | 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 (const InputEventGenerator &)=delete
 
InputEventGeneratoroperator= (const InputEventGenerator &)=delete
 
 InputEventGenerator (CommandController &commandController, EventDistributor &eventDistributor, GlobalSettings &globalSettings)
 
 ~InputEventGenerator ()
 
void wait ()
 Wait for event(s) and handle it. More...
 
BooleanSettinggetGrabInput ()
 Input Grab on or off. More...
 
void updateGrab (bool grab)
 Must be called when 'grabinput' or 'fullscreen' setting changes. 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)
 

Detailed Description

Definition at line 17 of file InputEventGenerator.hh.

Constructor & Destructor Documentation

◆ InputEventGenerator() [1/2]

openmsx::InputEventGenerator::InputEventGenerator ( const InputEventGenerator )
delete

◆ InputEventGenerator() [2/2]

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

◆ ~InputEventGenerator()

openmsx::InputEventGenerator::~InputEventGenerator ( )

Member Function Documentation

◆ getGrabInput()

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

Input Grab on or off.

Definition at line 34 of file InputEventGenerator.hh.

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

◆ joystickGetButton()

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

Definition at line 475 of file InputEventGenerator.cc.

References PLATFORM_ANDROID, and UNREACHABLE.

◆ joystickNumButtons()

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 467 of file InputEventGenerator.cc.

References PLATFORM_ANDROID.

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

◆ operator=()

InputEventGenerator& openmsx::InputEventGenerator::operator= ( const InputEventGenerator )
delete

◆ poll()

void openmsx::InputEventGenerator::poll ( )

Definition at line 62 of file InputEventGenerator.cc.

References utf8::unchecked::next().

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

◆ updateGrab()

void openmsx::InputEventGenerator::updateGrab ( bool  grab)

Must be called when 'grabinput' or 'fullscreen' setting changes.

Definition at line 422 of file InputEventGenerator.cc.

◆ wait()

void openmsx::InputEventGenerator::wait ( )

Wait for event(s) and handle it.

This method should be called from the main thread.

Definition at line 50 of file InputEventGenerator.cc.

References poll().


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