sdlterm/src/sdlterm.h
changeset 58 50308ed5e4f9
parent 57 911927edbdde
child 60 fccca2a60492
equal deleted inserted replaced
57:911927edbdde 58:50308ed5e4f9
     1 #include "SDL.h"
     1 #include "SDL.h"
     2 #include "SDL_ttf.h"
     2 #include "SDL_ttf.h"
     3 
     3 
     4 #include <map>
     4 #include <map>
       
     5 #include <string>
     5 #include <vector>
     6 #include <vector>
       
     7 #include <exception>
     6 
     8 
     7 
     9 
     8 namespace Style
    10 namespace Style
     9 {
    11 {
    10     enum {
    12     enum {
   221 
   223 
   222     const char *_translate_keyname(SDLKey sym);
   224     const char *_translate_keyname(SDLKey sym);
   223     static Uint32 _wait_event_callback(Uint32 interval, void *param);
   225     static Uint32 _wait_event_callback(Uint32 interval, void *param);
   224 };
   226 };
   225 
   227 
       
   228 
       
   229 class SDLTermError: public std::exception
       
   230 {
       
   231 public:
       
   232     SDLTermError(const std::string &a_msg)
       
   233         : std::exception(), _msg(a_msg) {};
       
   234     virtual ~SDLTermError() throw() {};
       
   235 
       
   236     virtual const char *what() const throw() { return _msg.c_str(); };
       
   237 
       
   238 private:
       
   239     std::string _msg;
       
   240 };
       
   241