SDL_messagebox.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. #ifndef _SDL_messagebox_h
  2. #define _SDL_messagebox_h
  3. #include "SDL_stdinc.h"
  4. #include "SDL_video.h"
  5. #include "begin_code.h"
  6. #ifdef __cplusplus
  7. extern "C" {
  8. #endif
  9. typedef enum
  10. {
  11. SDL_MESSAGEBOX_ERROR = 0x00000010,
  12. SDL_MESSAGEBOX_WARNING = 0x00000020,
  13. SDL_MESSAGEBOX_INFORMATION = 0x00000040
  14. } SDL_MessageBoxFlags;
  15. typedef enum
  16. {
  17. SDL_MESSAGEBOX_BUTTON_RETURNKEY_DEFAULT = 0x00000001,
  18. SDL_MESSAGEBOX_BUTTON_ESCAPEKEY_DEFAULT = 0x00000002
  19. } SDL_MessageBoxButtonFlags;
  20. typedef struct
  21. {
  22. Uint32 flags;
  23. int buttonid;
  24. const char * text;
  25. } SDL_MessageBoxButtonData;
  26. typedef struct
  27. {
  28. Uint8 r, g, b;
  29. } SDL_MessageBoxColor;
  30. typedef enum
  31. {
  32. SDL_MESSAGEBOX_COLOR_BACKGROUND,
  33. SDL_MESSAGEBOX_COLOR_TEXT,
  34. SDL_MESSAGEBOX_COLOR_BUTTON_BORDER,
  35. SDL_MESSAGEBOX_COLOR_BUTTON_BACKGROUND,
  36. SDL_MESSAGEBOX_COLOR_BUTTON_SELECTED,
  37. SDL_MESSAGEBOX_COLOR_MAX
  38. } SDL_MessageBoxColorType;
  39. typedef struct
  40. {
  41. SDL_MessageBoxColor colors[SDL_MESSAGEBOX_COLOR_MAX];
  42. } SDL_MessageBoxColorScheme;
  43. typedef struct
  44. {
  45. Uint32 flags;
  46. SDL_Window *window;
  47. const char *title;
  48. const char *message;
  49. int numbuttons;
  50. const SDL_MessageBoxButtonData *buttons;
  51. const SDL_MessageBoxColorScheme *colorScheme;
  52. } SDL_MessageBoxData;
  53. typedef int SDLCALL tSDL_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid);
  54. typedef int SDLCALL tSDL_ShowSimpleMessageBox(Uint32 flags, const char *title, const char *message, SDL_Window *window);
  55. extern tSDL_ShowMessageBox *SDL_ShowMessageBox;
  56. extern tSDL_ShowSimpleMessageBox *SDL_ShowSimpleMessageBox;
  57. #ifdef __cplusplus
  58. }
  59. #endif
  60. #include "close_code.h"
  61. #endif