libgui 2.01
libgui is a GUI library for the GameCube, Wii, and Wii U
 
Loading...
Searching...
No Matches
InputDriver Class Referenceabstract

Platform input backend GuiElements delegate to, via the per-channel InputController objects update() feeds. More...

#include <InputDriver.h>

Inheritance diagram for InputDriver:
[legend]

Public Member Functions

virtual void init ()=0
 Initializes the controller subsystem.
 
virtual void shutdown ()=0
 Shuts the controller subsystem down.
 
virtual void update ()=0
 Polls the hardware and dispatches InputPadData payloads to the UI.
 
virtual void setRumble (int channel, bool rumble)=0
 Requests a rumble event on the specified controller channel.
 
virtual void setContinuousRumble (int channel, bool continuous)=0
 Holds a channel's motor on (or releases it) until changed. Drivers cap an unbroken run and insert a short gap so the motor is not driven continuously.
 
void setRumbleEnabled (bool enabled)
 Globally enables or disables rumble requested through setRumble().
 
bool isRumbleEnabled () const
 
void setWiimoteOrientation (int orientation)
 
int getWiimoteOrientation () const
 

Protected Attributes

bool rumbleEnabled = true
 see setRumbleEnabled()
 
int wiimoteOrientation = WIIMOTE_ORIENTATION_VERTICAL
 see setWiimoteOrientation()
 

Detailed Description

Platform input backend GuiElements delegate to, via the per-channel InputController objects update() feeds.

Exactly one driver implements this and assigns the single global Platform instance.

Definition at line 21 of file InputDriver.h.

Member Function Documentation

◆ getWiimoteOrientation()

int InputDriver::getWiimoteOrientation ( ) const
inline
Returns
the current Wiimote orientation (a WIIMOTE_ORIENTATION_* value)

Definition at line 46 of file InputDriver.h.

◆ init()

virtual void InputDriver::init ( )
pure virtual

Initializes the controller subsystem.

Implemented in OgcInputDriver, and WutInputDriver.

◆ isRumbleEnabled()

bool InputDriver::isRumbleEnabled ( ) const
inline
Returns
true if rumble is enabled

Definition at line 42 of file InputDriver.h.

◆ setContinuousRumble()

virtual void InputDriver::setContinuousRumble ( int channel,
bool continuous )
pure virtual

Holds a channel's motor on (or releases it) until changed. Drivers cap an unbroken run and insert a short gap so the motor is not driven continuously.

Implemented in OgcInputDriver, and WutInputDriver.

◆ setRumble()

virtual void InputDriver::setRumble ( int channel,
bool rumble )
pure virtual

Requests a rumble event on the specified controller channel.

Implemented in OgcInputDriver, and WutInputDriver.

◆ setRumbleEnabled()

void InputDriver::setRumbleEnabled ( bool enabled)
inline

Globally enables or disables rumble requested through setRumble().

Definition at line 40 of file InputDriver.h.

◆ setWiimoteOrientation()

void InputDriver::setWiimoteOrientation ( int orientation)
inline
Parameters
orientationWIIMOTE_ORIENTATION_VERTICAL or WIIMOTE_ORIENTATION_HORIZONTAL

Definition at line 44 of file InputDriver.h.

◆ shutdown()

virtual void InputDriver::shutdown ( )
pure virtual

Shuts the controller subsystem down.

Implemented in OgcInputDriver, and WutInputDriver.

◆ update()

virtual void InputDriver::update ( )
pure virtual

Polls the hardware and dispatches InputPadData payloads to the UI.

Implemented in OgcInputDriver, and WutInputDriver.

Member Data Documentation

◆ rumbleEnabled

bool InputDriver::rumbleEnabled = true
protected

see setRumbleEnabled()

Definition at line 49 of file InputDriver.h.

◆ wiimoteOrientation

int InputDriver::wiimoteOrientation = WIIMOTE_ORIENTATION_VERTICAL
protected

see setWiimoteOrientation()

Definition at line 50 of file InputDriver.h.


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