The Battle for Wesnoth  1.15.2+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
 
struct  events::pump_info
 
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 DRAW_ALL_EVENT   (SDL_USEREVENT + 6)
 
#define INVOKE_FUNCTION_EVENT   (SDL_USEREVENT + 7)
 

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)
 
void events::call_in_main_thread (const std::function< void(void)> &f)
 
void events::pump ()
 
void events::peek_for_resize ()
 
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...
 

Macro Definition Documentation

◆ CLOSE_WINDOW_EVENT

#define CLOSE_WINDOW_EVENT   (SDL_USEREVENT + 4)

Definition at line 27 of file events.hpp.

Referenced by gui2::event::sdl_event_handler::handle_event(), and gui2::window::show().

◆ DOUBLE_CLICK_EVENT

#define DOUBLE_CLICK_EVENT   SDL_USEREVENT

◆ DRAW_ALL_EVENT

#define DRAW_ALL_EVENT   (SDL_USEREVENT + 6)

◆ DRAW_EVENT

#define DRAW_EVENT   (SDL_USEREVENT + 3)

◆ HOVER_REMOVE_POPUP_EVENT

#define HOVER_REMOVE_POPUP_EVENT   (SDL_USEREVENT + 2)

Definition at line 25 of file events.hpp.

Referenced by gui2::event::sdl_event_handler::handle_event().

◆ INVOKE_FUNCTION_EVENT

#define INVOKE_FUNCTION_EVENT   (SDL_USEREVENT + 7)

Definition at line 30 of file events.hpp.

Referenced by events::call_in_main_thread(), and events::pump().

◆ SHOW_HELPTIP_EVENT

#define SHOW_HELPTIP_EVENT   (SDL_USEREVENT + 5)

◆ TIMER_EVENT

#define TIMER_EVENT   (SDL_USEREVENT + 1)

Typedef Documentation

◆ sdl_handler_vector

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

Definition at line 189 of file events.hpp.