The Battle for Wesnoth  1.19.5+dev
Classes | Namespaces | Macros | Typedefs | Functions
events.hpp File Reference
#include <SDL2/SDL_events.h>
#include <vector>
#include <list>
#include <functional>
Include dependency graph for events.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  events::context
 
class  events::sdl_handler
 
struct  events::event_context
 
class  events::pump_monitor
 

Namespaces

 events
 Handling of system events.
 

Macros

#define DOUBLE_CLICK_EVENT   SDL_USEREVENT
 
#define TIMER_EVENT   (SDL_USEREVENT + 1)
 
#define HOVER_REMOVE_POPUP_EVENT   (SDL_USEREVENT + 2)
 
#define DRAW_EVENT   (SDL_USEREVENT + 3)
 
#define CLOSE_WINDOW_EVENT   (SDL_USEREVENT + 4)
 
#define SHOW_HELPTIP_EVENT   (SDL_USEREVENT + 5)
 
#define INVOKE_FUNCTION_EVENT   (SDL_USEREVENT + 6)
 

Typedefs

typedef std::list< sdl_handler * > events::handler_list
 
typedef std::vector< events::sdl_handler * > sdl_handler_vector
 

Functions

void events::focus_handler (const sdl_handler *ptr)
 
bool events::has_focus (const sdl_handler *hand, const SDL_Event *event)
 
bool events::is_in_main_thread ()
 
void events::call_in_main_thread (const std::function< void(void)> &f)
 
void events::pump ()
 Process all events currently in the queue. More...
 
void events::draw ()
 Trigger a draw cycle. More...
 
void events::pump_and_draw ()
 pump() then immediately draw() 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...
 

Macro Definition Documentation

◆ CLOSE_WINDOW_EVENT

#define CLOSE_WINDOW_EVENT   (SDL_USEREVENT + 4)

Definition at line 28 of file events.hpp.

◆ DOUBLE_CLICK_EVENT

#define DOUBLE_CLICK_EVENT   SDL_USEREVENT

Definition at line 24 of file events.hpp.

◆ DRAW_EVENT

#define DRAW_EVENT   (SDL_USEREVENT + 3)

Definition at line 27 of file events.hpp.

◆ HOVER_REMOVE_POPUP_EVENT

#define HOVER_REMOVE_POPUP_EVENT   (SDL_USEREVENT + 2)

Definition at line 26 of file events.hpp.

◆ INVOKE_FUNCTION_EVENT

#define INVOKE_FUNCTION_EVENT   (SDL_USEREVENT + 6)

Definition at line 30 of file events.hpp.

◆ SHOW_HELPTIP_EVENT

#define SHOW_HELPTIP_EVENT   (SDL_USEREVENT + 5)

Definition at line 29 of file events.hpp.

◆ TIMER_EVENT

#define TIMER_EVENT   (SDL_USEREVENT + 1)

Definition at line 25 of file events.hpp.

Typedef Documentation

◆ sdl_handler_vector

typedef std::vector<events::sdl_handler*> sdl_handler_vector

Definition at line 182 of file events.hpp.