Classes | Namespaces | Functions | Variables

gui/auxiliary/timer.cpp File Reference

#include "gui/auxiliary/timer.hpp"
#include "events.hpp"
#include "gui/auxiliary/log.hpp"
#include <boost/static_assert.hpp>
#include <SDL_timer.h>
#include <map>
Include dependency graph for timer.cpp:

Go to the source code of this file.

Classes

struct  gui2::ttimer
class  gui2::texecutor
 Helper to make removing a timer in a callback safe. More...

Namespaces

namespace  gui2
 

A class inherited from ttext_box that displays its input as stars.


Functions

static Uint32 gui2::timer_callback (Uint32, void *id)
unsigned long gui2::add_timer (const Uint32 interval, const boost::function< void(unsigned long id)> &callback, const bool repeat=false)
 Adds a new timer.
bool gui2::remove_timer (const unsigned long id)
 Removes a timer.
bool gui2::execute_timer (const unsigned long id)
 Executes a timer.

Variables

static unsigned long gui2::id = 0
 Ids for the timers.
static std::map< unsigned long,
ttimer > 
gui2::timers
 The active timers.
static unsigned long gui2::executing_id = 0
 The id of the event being executed, 0 if none.
static bool gui2::executing_id_removed = false
 Did somebody try to remove the timer during its execution?
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated by doxygen 1.7.1 on Fri May 25 2012 01:04:37 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs