cpp-sdl2
C++ header-only SDL2 wrapper
sdl Namespace Reference

Define to deactivate exception support. More...

Namespaces

 clipboard
 Clipboard management functions.
 
 details
 Contains implementation details.
 
 Mouse
 
 power
 Power related functions.
 
 simd
 
 system
 Get information about the system (os, cpu, ram...)
 

Classes

class  Color
 C++ wrapping around the SDL_Color structure. More...
 
union  Event
 Object that represent an event captured by SDL. More...
 
class  Exception
 Define to deactivate exception support. More...
 
class  GameController
 Represent a gamepad (game controller) More...
 
class  Haptic
 
class  Joystick
 
class  Pixel
 Represent a 4 channel pixel. More...
 
class  Rect
 sdl::Rect, C++ wrapping of SDL_Rect More...
 
class  Renderer
 Class that represent a SDL2 2D renderer. More...
 
struct  Root
 This class represent the "library entry point". More...
 
class  SharedObject
 Represent a shared object (dynamic library, dynamically loaded library, module, plugin...). More...
 
class  Surface
 Represent an SDL_Surface. More...
 
class  Texture
 Class that represet a renderer texture. More...
 
class  Timer
 Represent an SDL timer. More...
 
class  Vec2
 Generic templated 2D vector class. More...
 
class  Window
 Represent an SDL window. More...
 

Typedefs

using Vec2i = Vec2< int, SDL_Point >
 Vector of two integers, that is convertible to/from SDL_Point. More...
 
using Vec2f = Vec2< float >
 Vector of two floats. More...
 
using Vec2d = Vec2< double >
 Vector of two double. More...
 

Functions

std::string version ()
 Get version as string. More...
 
void show_message_box (uint32_t flags, std::string const &title, std::string const &message)
 Show a message box, usefull to display error messages. More...
 
void show_message_box (uint32_t flags, std::string const &title, std::string const &message, sdl::Window const &parent)
 Show a message box, as a modal child of parent More...
 

Detailed Description

Define to deactivate exception support.

Typedef Documentation

◆ Vec2d

using sdl::Vec2d = typedef Vec2<double>

Vector of two double.

Definition at line 164 of file vec2.hpp.

◆ Vec2f

using sdl::Vec2f = typedef Vec2<float>

Vector of two floats.

Definition at line 162 of file vec2.hpp.

◆ Vec2i

using sdl::Vec2i = typedef Vec2<int, SDL_Point>

Vector of two integers, that is convertible to/from SDL_Point.

Definition at line 160 of file vec2.hpp.

Function Documentation

◆ show_message_box() [1/2]

void sdl::show_message_box ( uint32_t  flags,
std::string const &  title,
std::string const &  message 
)
inline

Show a message box, usefull to display error messages.

Definition at line 23 of file utils.hpp.

◆ show_message_box() [2/2]

void sdl::show_message_box ( uint32_t  flags,
std::string const &  title,
std::string const &  message,
sdl::Window const &  parent 
)
inline

Show a message box, as a modal child of parent

Definition at line 29 of file utils.hpp.

References sdl::Window::ptr().

◆ version()

std::string sdl::version ( )
inline

Get version as string.

Definition at line 11 of file utils.hpp.