#include "events.hpp"
#include "cursor.hpp"
#include "desktop/clipboard.hpp"
#include "log.hpp"
#include "draw_manager.hpp"
#include "preferences/preferences.hpp"
#include "quit_confirmation.hpp"
#include "sdl/userevent.hpp"
#include "utils/ranges.hpp"
#include "utils/general.hpp"
#include "video.hpp"
#include <algorithm>
#include <cassert>
#include <deque>
#include <future>
#include <iterator>
#include <thread>
#include <utility>
#include <vector>
#include <SDL2/SDL.h>
Go to the source code of this file.
Namespaces | |
events | |
Handling of system events. | |
Macros | |
#define | ERR_GEN LOG_STREAM(err, lg::general) |
#define | LOG_DP LOG_STREAM(info, log_display) |
#define | LOG_EV LOG_STREAM(info, log_event) |
#define | DBG_EV LOG_STREAM(debug, log_event) |
#define | INPUT_MIN 0x300 |
#define | INPUT_MAX 0x8FF |
Functions | |
void | events::focus_handler (const sdl_handler *ptr) |
bool | events::has_focus (const sdl_handler *hand, const SDL_Event *event) |
static void | events::raise_window_event (const SDL_Event &event) |
bool | events::is_in_main_thread () |
void | events::pump () |
Process all events currently in the queue. More... | |
void | events::draw () |
Trigger a draw cycle. More... | |
void | events::raise_process_event () |
void | events::raise_resize_event () |
void | events::process_tooltip_strings (int mousex, int mousey) |
Triggered by mouse-motion, sends the cursor position to all handlers to check whether a tooltip should be shown. More... | |
bool | events::is_input (const SDL_Event &event) |
Is the event an input event? More... | |
void | events::discard_input () |
Discards all input events. More... | |
void | events::call_in_main_thread (const std::function< void(void)> &f) |
Variables | |
static lg::log_domain | log_display ("display") |
static lg::log_domain | log_event ("event") |
std::deque< context > | events::event_contexts |
std::vector< pump_monitor * > | events::pump_monitors |
static const std::thread::id | events::main_thread = std::this_thread::get_id() |
#define DBG_EV LOG_STREAM(debug, log_event) |
Definition at line 51 of file events.cpp.
#define ERR_GEN LOG_STREAM(err, lg::general) |
Definition at line 44 of file events.cpp.
#define INPUT_MAX 0x8FF |
Definition at line 761 of file events.cpp.
#define INPUT_MIN 0x300 |
Definition at line 760 of file events.cpp.
#define LOG_DP LOG_STREAM(info, log_display) |
Definition at line 47 of file events.cpp.
#define LOG_EV LOG_STREAM(info, log_event) |
Definition at line 50 of file events.cpp.
|
static |
|
static |