The Battle for Wesnoth  1.15.2+dev
Namespaces | Macros | Functions | Variables
events.cpp File Reference
#include "events.hpp"
#include "cursor.hpp"
#include "desktop/clipboard.hpp"
#include "log.hpp"
#include "quit_confirmation.hpp"
#include "video.hpp"
#include "sdl/userevent.hpp"
#include <algorithm>
#include <atomic>
#include <cassert>
#include <deque>
#include <iterator>
#include <utility>
#include <vector>
#include <thread>
#include <SDL2/SDL.h>
#include <boost/range/adaptor/reversed.hpp>
Include dependency graph for events.cpp:

Go to the source code of this file.

Namespaces

 events
 Handling of system events.
 

Macros

#define ERR_GEN   LOG_STREAM(err, lg::general)
 
#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 bool events::remove_on_resize (const SDL_Event &a)
 
void events::pump ()
 
void events::raise_process_event ()
 
void events::raise_resize_event ()
 
void events::raise_draw_event ()
 
void events::raise_draw_all_event ()
 
void events::raise_volatile_draw_event ()
 
void events::raise_volatile_draw_all_event ()
 
void events::raise_volatile_undraw_event ()
 
void events::raise_help_string_event (int mousex, int mousey)
 
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::peek_for_resize ()
 
void events::call_in_main_thread (const std::function< void(void)> &f)
 

Variables

std::deque< context > events::event_contexts
 
std::vector< pump_monitor * > events::pump_monitors
 
const uint32_t events::resize_timeout = 100
 
SDL_Event events::last_resize_event
 
bool events::last_resize_event_used = true
 
static const std::thread::id events::main_thread = std::this_thread::get_id()
 

Macro Definition Documentation

◆ ERR_GEN

#define ERR_GEN   LOG_STREAM(err, lg::general)

Definition at line 40 of file events.cpp.

◆ INPUT_MAX

#define INPUT_MAX   0x8FF

Definition at line 846 of file events.cpp.

Referenced by events::discard_input(), and events::is_input().

◆ INPUT_MIN

#define INPUT_MIN   0x300

Definition at line 845 of file events.cpp.

Referenced by events::discard_input(), and events::is_input().