openMSX
|
#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>
Go to the source code of this file.
Namespaces | |
namespace | openmsx |
This file implemented 3 utility functions: | |
Typedefs | |
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, MidiInALSAEvent, Rs232TesterEvent > |
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::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::MIDI_IN_ALSA = event_index<MidiInALSAEvent> , openmsx::RS232_TESTER = event_index<Rs232TesterEvent> , 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. 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) |
Variables | |
template<typename T > | |
constexpr uint8_t | openmsx::event_index = get_index<T, EventVariant>::value |
ObjectPool< RcEvent > | openmsx::eventPool |
std::recursive_mutex | openmsx::eventPoolMutex |