openMSX
Classes | Namespaces | Typedefs | Enumerations | Functions | Variables
Event.hh File Reference
#include "JoystickId.hh"
#include "SDLKey.hh"
#include "StringStorage.hh"
#include "TclObject.hh"
#include "static_vector.hh"
#include "stl.hh"
#include <cassert>
#include <cstdint>
#include <string>
#include <utility>
#include <variant>
#include <SDL.h>
Include dependency graph for Event.hh:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  openmsx::EventBase
 
class  openmsx::SdlEvent
 
class  openmsx::KeyEvent
 
class  openmsx::KeyUpEvent
 
class  openmsx::KeyDownEvent
 
class  openmsx::MouseButtonEvent
 
class  openmsx::MouseButtonUpEvent
 
class  openmsx::MouseButtonDownEvent
 
class  openmsx::MouseWheelEvent
 
class  openmsx::MouseMotionEvent
 
class  openmsx::JoystickEvent
 
class  openmsx::JoystickButtonEvent
 
class  openmsx::JoystickButtonUpEvent
 
class  openmsx::JoystickButtonDownEvent
 
class  openmsx::JoystickAxisMotionEvent
 
class  openmsx::JoystickHatEvent
 
class  openmsx::WindowEvent
 
class  openmsx::TextEvent
 
class  openmsx::FileDropEvent
 
class  openmsx::QuitEvent
 
class  openmsx::OsdControlEvent
 OSD events are triggered by other events. More...
 
class  openmsx::OsdControlReleaseEvent
 
class  openmsx::OsdControlPressEvent
 
class  openmsx::GroupEvent
 
class  openmsx::FinishFrameEvent
 This event is send when a device (v99x8, v9990, video9000, laserdisc) reaches the end of a frame. More...
 
class  openmsx::CliCommandEvent
 Command received on CliComm connection. More...
 
class  openmsx::ImGuiActiveEvent
 
class  openmsx::SimpleEvent
 
class  openmsx::BootEvent
 Sent when the MSX resets or powers up. More...
 
class  openmsx::FrameDrawnEvent
 Sent when a FINISH_FRAME caused a redraw of the screen. More...
 
class  openmsx::BreakEvent
 
class  openmsx::SwitchRendererEvent
 
class  openmsx::TakeReverseSnapshotEvent
 Used to schedule 'taking reverse snapshots' between Z80 instructions. More...
 
class  openmsx::AfterTimedEvent
 Send when an after-EmuTime command should be executed. More...
 
class  openmsx::MachineLoadedEvent
 Send when a (new) machine configuration is loaded. More...
 
class  openmsx::MachineActivatedEvent
 Send when a machine is (de)activated. More...
 
class  openmsx::MachineDeactivatedEvent
 
class  openmsx::MidiInReaderEvent
 
class  openmsx::MidiInWindowsEvent
 
class  openmsx::MidiInCoreMidiEvent
 
class  openmsx::MidiInCoreMidiVirtualEvent
 
class  openmsx::MidiInALSAEvent
 
class  openmsx::Rs232TesterEvent
 
class  openmsx::Rs232NetEvent
 
class  openmsx::ImGuiDelayedActionEvent
 
struct  openmsx::GetIfEventHelper< T >
 
struct  openmsx::GetIfEventHelper< SdlEvent >
 
struct  openmsx::GetIfEventHelper< KeyEvent >
 
struct  openmsx::GetIfEventHelper< JoystickEvent >
 

Namespaces

namespace  openmsx
 This file implemented 3 utility functions:
 

Typedefs

using openmsx::Event = std::variant< KeyUpEvent, KeyDownEvent, MouseMotionEvent, MouseButtonUpEvent, MouseButtonDownEvent, MouseWheelEvent, JoystickAxisMotionEvent, JoystickHatEvent, JoystickButtonUpEvent, JoystickButtonDownEvent, OsdControlReleaseEvent, OsdControlPressEvent, WindowEvent, TextEvent, FileDropEvent, QuitEvent, FinishFrameEvent, CliCommandEvent, GroupEvent, BootEvent, FrameDrawnEvent, BreakEvent, SwitchRendererEvent, TakeReverseSnapshotEvent, AfterTimedEvent, MachineLoadedEvent, MachineActivatedEvent, MachineDeactivatedEvent, MidiInReaderEvent, MidiInWindowsEvent, MidiInCoreMidiEvent, MidiInCoreMidiVirtualEvent, MidiInALSAEvent, Rs232TesterEvent, Rs232NetEvent, ImGuiDelayedActionEvent, ImGuiActiveEvent >
 

Enumerations

enum class  openmsx::EventType : uint8_t {
  openmsx::KEY_UP = event_index<KeyUpEvent> , openmsx::KEY_DOWN = event_index<KeyDownEvent> , openmsx::MOUSE_MOTION = event_index<MouseMotionEvent> , openmsx::MOUSE_BUTTON_UP = event_index<MouseButtonUpEvent> ,
  openmsx::MOUSE_BUTTON_DOWN = event_index<MouseButtonDownEvent> , openmsx::MOUSE_WHEEL = event_index<MouseWheelEvent> , openmsx::JOY_AXIS_MOTION = event_index<JoystickAxisMotionEvent> , openmsx::JOY_HAT = event_index<JoystickHatEvent> ,
  openmsx::JOY_BUTTON_UP = event_index<JoystickButtonUpEvent> , openmsx::JOY_BUTTON_DOWN = event_index<JoystickButtonDownEvent> , openmsx::OSD_CONTROL_RELEASE = event_index<OsdControlReleaseEvent> , openmsx::OSD_CONTROL_PRESS = event_index<OsdControlPressEvent> ,
  openmsx::WINDOW = event_index<WindowEvent> , openmsx::TEXT = event_index<TextEvent> , openmsx::FILE_DROP = event_index<FileDropEvent> , openmsx::QUIT = event_index<QuitEvent> ,
  openmsx::GROUP = event_index<GroupEvent> , openmsx::BOOT = event_index<BootEvent> , openmsx::FINISH_FRAME = event_index<FinishFrameEvent> , openmsx::FRAME_DRAWN = event_index<FrameDrawnEvent> ,
  openmsx::BREAK = event_index<BreakEvent> , openmsx::SWITCH_RENDERER = event_index<SwitchRendererEvent> , openmsx::TAKE_REVERSE_SNAPSHOT = event_index<TakeReverseSnapshotEvent> , openmsx::CLICOMMAND = event_index<CliCommandEvent> ,
  openmsx::AFTER_TIMED = event_index<AfterTimedEvent> , openmsx::MACHINE_LOADED = event_index<MachineLoadedEvent> , openmsx::MACHINE_ACTIVATED = event_index<MachineActivatedEvent> , openmsx::MACHINE_DEACTIVATED = event_index<MachineDeactivatedEvent> ,
  openmsx::MIDI_IN_READER = event_index<MidiInReaderEvent> , openmsx::MIDI_IN_WINDOWS = event_index<MidiInWindowsEvent> , openmsx::MIDI_IN_COREMIDI = event_index<MidiInCoreMidiEvent> , openmsx::MIDI_IN_COREMIDI_VIRTUAL = event_index<MidiInCoreMidiVirtualEvent> ,
  openmsx::MIDI_IN_ALSA = event_index<MidiInALSAEvent> , openmsx::RS232_TESTER = event_index<Rs232TesterEvent> , openmsx::RS232_NET = event_index<Rs232NetEvent> , openmsx::IMGUI_DELAYED_ACTION = event_index<ImGuiDelayedActionEvent> ,
  openmsx::IMGUI_ACTIVE = event_index<ImGuiActiveEvent> , openmsx::NUM_EVENT_TYPES
}
 

Functions

EventType openmsx::getType (const Event &event)
 
std::string openmsx::toString (const Event &event)
 Get a string representation of this event.
 
TclObject openmsx::toTclList (const Event &event)
 Similar to toString(), but retains the structure of the event.
 
bool openmsx::operator== (const Event &x, const Event &y)
 
bool openmsx::matches (const Event &self, const Event &other)
 Does this event 'match' the given event.
 
template<typename T >
const T * openmsx::get_event_if (const Event &event)
 
template<typename T >
const T & openmsx::get_event (const Event &event)
 

Variables

template<typename T >
constexpr uint8_t openmsx::event_index = get_index<T, Event>::value