diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-11-17 14:35:36 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-11-17 15:43:18 +0300 |
commit | 80d1d624d378d4d8c03fb26ef286baf5479b6497 (patch) | |
tree | d5ae6545d0318d8e0448d3a084a15e72aff6e2a5 /extern/sdlew/include/SDL2/SDL_messagebox.h | |
parent | 90bf426554a7cc1d429f2dd9a02edbcbeb51ceec (diff) |
Support dynamic loading of SDL libraries
This is mainly to address old issue when one need to have SDL library installed
in order to use our official builds. Some hip distros already installs SDL,
but it's not quite the same across all the variety of the distros.
We also now switching to SDL-2.0, most of the distros have it in repositories
already, so it shouldn't be huge deal to install it if needed.
Reviewers: campbellbarton
Reviewed By: campbellbarton
Differential Revision: https://developer.blender.org/D878
Diffstat (limited to 'extern/sdlew/include/SDL2/SDL_messagebox.h')
-rw-r--r-- | extern/sdlew/include/SDL2/SDL_messagebox.h | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/extern/sdlew/include/SDL2/SDL_messagebox.h b/extern/sdlew/include/SDL2/SDL_messagebox.h new file mode 100644 index 00000000000..378d5d94868 --- /dev/null +++ b/extern/sdlew/include/SDL2/SDL_messagebox.h @@ -0,0 +1,80 @@ + +#ifndef _SDL_messagebox_h +#define _SDL_messagebox_h + +#include "SDL_stdinc.h" +#include "SDL_video.h" + +#include "begin_code.h" + +#ifdef __cplusplus +extern "C" { +#endif + +typedef enum +{ + SDL_MESSAGEBOX_ERROR = 0x00000010, + SDL_MESSAGEBOX_WARNING = 0x00000020, + SDL_MESSAGEBOX_INFORMATION = 0x00000040 +} SDL_MessageBoxFlags; + +typedef enum +{ + SDL_MESSAGEBOX_BUTTON_RETURNKEY_DEFAULT = 0x00000001, + SDL_MESSAGEBOX_BUTTON_ESCAPEKEY_DEFAULT = 0x00000002 +} SDL_MessageBoxButtonFlags; + +typedef struct +{ + Uint32 flags; + int buttonid; + const char * text; +} SDL_MessageBoxButtonData; + +typedef struct +{ + Uint8 r, g, b; +} SDL_MessageBoxColor; + +typedef enum +{ + SDL_MESSAGEBOX_COLOR_BACKGROUND, + SDL_MESSAGEBOX_COLOR_TEXT, + SDL_MESSAGEBOX_COLOR_BUTTON_BORDER, + SDL_MESSAGEBOX_COLOR_BUTTON_BACKGROUND, + SDL_MESSAGEBOX_COLOR_BUTTON_SELECTED, + SDL_MESSAGEBOX_COLOR_MAX +} SDL_MessageBoxColorType; + +typedef struct +{ + SDL_MessageBoxColor colors[SDL_MESSAGEBOX_COLOR_MAX]; +} SDL_MessageBoxColorScheme; + +typedef struct +{ + Uint32 flags; + SDL_Window *window; + const char *title; + const char *message; + + int numbuttons; + const SDL_MessageBoxButtonData *buttons; + + const SDL_MessageBoxColorScheme *colorScheme; +} SDL_MessageBoxData; + +typedef int SDLCALL tSDL_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid); + +typedef int SDLCALL tSDL_ShowSimpleMessageBox(Uint32 flags, const char *title, const char *message, SDL_Window *window); + +extern tSDL_ShowMessageBox *SDL_ShowMessageBox; +extern tSDL_ShowSimpleMessageBox *SDL_ShowSimpleMessageBox; + +#ifdef __cplusplus +} +#endif +#include "close_code.h" + +#endif + |