ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

Custom event source for ResidualVM with true joystick support. More...

#include <resvm-sdl-events.h>

Inheritance diagram for ResVmSdlEventSource:
Collaboration diagram for ResVmSdlEventSource:

List of all members.

Classes

struct  KbdMouse

Public Member Functions

 ResVmSdlEventSource ()
void resetKeyboardEmulation (int16 x_max, int16 y_max)
 Resets keyboard emulation after a video screen change.

Protected Member Functions

bool pollEvent (Common::Event &event) override
 Gets and processes SDL events.
void updateKbdMouse ()
bool handleMouseMotion (SDL_Event &ev, Common::Event &event) override
bool handleMouseButtonDown (SDL_Event &ev, Common::Event &event) override
bool handleMouseButtonUp (SDL_Event &ev, Common::Event &event) override
bool handleJoyButtonDown (SDL_Event &ev, Common::Event &event) override
bool handleJoyButtonUp (SDL_Event &ev, Common::Event &event) override
bool handleJoyAxisMotion (SDL_Event &ev, Common::Event &event) override
bool handleKbdMouse (Common::Event &event)
bool processMouseEvent (Common::Event &event, int x, int y, int relx=0, int rely=0) override
 Assigns the mouse coords to the mouse event.
virtual bool handleAxisToMouseMotion (int16 xAxis, int16 yAxis)
 Update the virtual mouse according to a joystick or game controller axis position change.
int16 computeJoystickMouseSpeedFactor () const
 Compute the virtual mouse movement speed factor according to the 'kbdmouse_speed' setting.
bool shouldGenerateMouseEvents ()

Protected Attributes

KbdMouse _km

Detailed Description

Custom event source for ResidualVM with true joystick support.

Definition at line 34 of file resvm-sdl-events.h.


Constructor & Destructor Documentation

ResVmSdlEventSource::ResVmSdlEventSource (  ) 

Definition at line 54 of file resvm-sdl-events.cpp.


Member Function Documentation

int16 ResVmSdlEventSource::computeJoystickMouseSpeedFactor (  )  const [protected]

Compute the virtual mouse movement speed factor according to the 'kbdmouse_speed' setting.

The speed factor is scaled with the display size.

Definition at line 413 of file resvm-sdl-events.cpp.

bool ResVmSdlEventSource::handleAxisToMouseMotion ( int16  xAxis,
int16  yAxis 
) [protected, virtual]

Update the virtual mouse according to a joystick or game controller axis position change.

Definition at line 291 of file resvm-sdl-events.cpp.

bool ResVmSdlEventSource::handleJoyAxisMotion ( SDL_Event &  ev,
Common::Event event 
) [override, protected, virtual]

Reimplemented from SdlEventSource.

Definition at line 132 of file resvm-sdl-events.cpp.

bool ResVmSdlEventSource::handleJoyButtonDown ( SDL_Event &  ev,
Common::Event event 
) [override, protected, virtual]

Reimplemented from SdlEventSource.

Definition at line 104 of file resvm-sdl-events.cpp.

bool ResVmSdlEventSource::handleJoyButtonUp ( SDL_Event &  ev,
Common::Event event 
) [override, protected, virtual]

Reimplemented from SdlEventSource.

Definition at line 118 of file resvm-sdl-events.cpp.

bool ResVmSdlEventSource::handleKbdMouse ( Common::Event event  )  [protected]

Definition at line 258 of file resvm-sdl-events.cpp.

bool ResVmSdlEventSource::handleMouseButtonDown ( SDL_Event &  ev,
Common::Event event 
) [override, protected, virtual]

Reimplemented from SdlEventSource.

Definition at line 88 of file resvm-sdl-events.cpp.

bool ResVmSdlEventSource::handleMouseButtonUp ( SDL_Event &  ev,
Common::Event event 
) [override, protected, virtual]

Reimplemented from SdlEventSource.

Definition at line 96 of file resvm-sdl-events.cpp.

bool ResVmSdlEventSource::handleMouseMotion ( SDL_Event &  ev,
Common::Event event 
) [override, protected, virtual]

Reimplemented from SdlEventSource.

Definition at line 80 of file resvm-sdl-events.cpp.

bool ResVmSdlEventSource::pollEvent ( Common::Event event  )  [override, protected, virtual]

Gets and processes SDL events.

Reimplemented from SdlEventSource.

Definition at line 69 of file resvm-sdl-events.cpp.

bool ResVmSdlEventSource::processMouseEvent ( Common::Event event,
int  x,
int  y,
int  relx = 0,
int  rely = 0 
) [override, protected, virtual]

Assigns the mouse coords to the mouse event.

Furthermore notify the graphics manager about the position change. ResidualVM addon: The parameters relx and rely for relative mouse movement are ResidualVM specific

Reimplemented from SdlEventSource.

Definition at line 62 of file resvm-sdl-events.cpp.

void ResVmSdlEventSource::resetKeyboardEmulation ( int16  x_max,
int16  y_max 
)

Resets keyboard emulation after a video screen change.

Definition at line 321 of file resvm-sdl-events.cpp.

bool ResVmSdlEventSource::shouldGenerateMouseEvents (  )  [protected]

Definition at line 244 of file resvm-sdl-events.cpp.

void ResVmSdlEventSource::updateKbdMouse (  )  [protected]

Definition at line 331 of file resvm-sdl-events.cpp.


Member Data Documentation

Definition at line 50 of file resvm-sdl-events.h.


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


Generated on Sat May 30 2020 05:02:26 for ResidualVM by doxygen 1.7.1
curved edge   curved edge