Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
openmsx::SDLKey Struct Reference

#include <SDLKey.hh>

Public Member Functions

std::string toString () const

Static Public Member Functions

static SDLKey create (SDL_Keycode code, bool down, uint16_t mod=0)
static SDLKey createDown (SDL_Keycode code)
static std::optional< SDLKeyfromString (std::string_view name)
static SDL_Keycode keycodeFromString (zstring_view name)
static std::string toString (SDL_Keycode code)

Public Attributes

SDL_Keysym sym
bool down

Detailed Description

Definition at line 18 of file SDLKey.hh.

Member Function Documentation

◆ create()

static SDLKey openmsx::SDLKey::create ( SDL_Keycode  code,
bool  down,
uint16_t  mod = 0 

Definition at line 22 of file SDLKey.hh.

References down, and sym.

Referenced by createDown(), and TEST_CASE().

◆ createDown()

static SDLKey openmsx::SDLKey::createDown ( SDL_Keycode  code)

Definition at line 31 of file SDLKey.hh.

References create().

Referenced by TEST_CASE().

◆ fromString()

std::optional< SDLKey > openmsx::SDLKey::fromString ( std::string_view  name)

◆ keycodeFromString()

SDL_Keycode openmsx::SDLKey::keycodeFromString ( zstring_view  name)

Definition at line 109 of file

References zstring_view::c_str().

Referenced by fromString(), and openmsx::parseBooleanInput().

◆ toString() [1/2]

std::string openmsx::SDLKey::toString ( ) const

Definition at line 230 of file

References down, sym, and toString().

Referenced by toString(), and openmsx::toString().

◆ toString() [2/2]

std::string openmsx::SDLKey::toString ( SDL_Keycode  code)

Definition at line 223 of file

Member Data Documentation

◆ down

bool openmsx::SDLKey::down

Definition at line 20 of file SDLKey.hh.

Referenced by create(), fromString(), and toString().

◆ sym

SDL_Keysym openmsx::SDLKey::sym

Definition at line 19 of file SDLKey.hh.

Referenced by create(), fromString(), and toString().

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