Classes | Namespaces | Typedefs | Enumerations | Functions | Variables
Event.hh File Reference
#include "ObjectPool.hh"
#include "Keys.hh"
#include "static_vector.hh"
#include "StringStorage.hh"
#include "stl.hh"
#include "TclObject.hh"
#include "Thread.hh"
#include "Timer.hh"
#include <cassert>
#include <cstdint>
#include <limits>
#include <mutex>
#include <string>
#include <utility>
#include <variant>
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.


class  openmsx::Event
class  openmsx::EventBase
class  openmsx::TimedEvent
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::FocusEvent
class  openmsx::ResizeEvent
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::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::ExposeEvent
 Send when (part of) the openMSX window gets exposed, and thus should be repainted. More...
class  openmsx::MidiInReaderEvent
class  openmsx::MidiInWindowsEvent
class  openmsx::MidiInCoreMidiEvent
class  openmsx::MidiInCoreMidiVirtualEvent
class  openmsx::Rs232TesterEvent
struct  openmsx::RcEvent
struct  openmsx::GetIfEventHelper< T >
struct  openmsx::GetIfEventHelper< TimedEvent >
struct  openmsx::GetIfEventHelper< KeyEvent >
struct  openmsx::GetIfEventHelper< JoystickEvent >


namespace  openmsx
 This file implemented 3 utility functions:


using openmsx::EventVariant = std::variant< KeyUpEvent, KeyDownEvent, MouseMotionEvent, MouseButtonUpEvent, MouseButtonDownEvent, MouseWheelEvent, JoystickAxisMotionEvent, JoystickHatEvent, JoystickButtonUpEvent, JoystickButtonDownEvent, OsdControlReleaseEvent, OsdControlPressEvent, FocusEvent, ResizeEvent, FileDropEvent, QuitEvent, FinishFrameEvent, CliCommandEvent, GroupEvent, BootEvent, FrameDrawnEvent, BreakEvent, SwitchRendererEvent, TakeReverseSnapshotEvent, AfterTimedEvent, MachineLoadedEvent, MachineActivatedEvent, MachineDeactivatedEvent, ExposeEvent, MidiInReaderEvent, MidiInWindowsEvent, MidiInCoreMidiEvent, MidiInCoreMidiVirtualEvent, Rs232TesterEvent >


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::FOCUS = event_index<FocusEvent> , openmsx::RESIZE = event_index<ResizeEvent> , 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::EXPOSE = event_index<ExposeEvent> , 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::RS232_TESTER = event_index<Rs232TesterEvent> , openmsx::NUM_EVENT_TYPES


EventType openmsx::getType (const Event &event)
std::string openmsx::toString (const Event &event)
 Get a string representation of this event. More...
TclObject openmsx::toTclList (const Event &event)
 Similar to toString(), but retains the structure of the event. More...
bool openmsx::operator== (const Event &x, const Event &y)
bool openmsx::isRepeatStopper (const Event &self, const Event &other)
 Should 'bind -repeat' be stopped by 'other' event. More...
bool openmsx::matches (const Event &self, const Event &other)
 Does this event 'match' the given event. More...
const EventVariant & openmsx::getVariant (const Event &event)
template<typename Visitor >
auto openmsx::visit (Visitor &&visitor, const Event &event)
template<typename Visitor >
auto openmsx::visit (Visitor &&visitor, const Event &event1, const Event &event2)
template<typename T >
const T * openmsx::get_if (const Event &event)
template<typename T >
const T & openmsx::get (const Event &event)


template<typename T >
constexpr uint8_t openmsx::event_index = get_index<T, EventVariant>::value
ObjectPool< RcEvent > openmsx::eventPool
std::recursive_mutex openmsx::eventPoolMutex