47 "This is a custom messagebox",
57 data.
message =
"This is a custom messagebox from a background thread.";
65 event.type = (intptr_t)eventNumber;
72 SDL_Log(
"Pressed button: %d, %s\n", button, button == -1 ?
"[closed]" : button == 1 ?
"Cancel" :
"OK");
76 event.type = (intptr_t)eventNumber;
84 main(
int argc,
char *argv[])
93 "This is a simple error MessageBox",
102 "This is a simple MessageBox with a newline:\r\nHello world!",
111 "UTF-8 Simple MessageBox",
112 "Unicode text: '牛肉西蘭花' ...",
121 "UTF-8 Simple MessageBox",
122 "Unicode text and newline:\r\n'牛肉西蘭花'\n'牛肉西蘭花'",
132 "Unicode text in the title.",
159 if (event.
type == eventNumber) {
166 SDL_Log(
"Message box thread return %i\n", status);
176 "This is a simple error MessageBox with a parent window",
int main(int argc, char *argv[])
#define SDL_WINDOWPOS_CENTERED
static int button_messagebox(void *eventNumber)
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
#define SDL_RegisterEvents
A user-defined event type (event.user.*)
#define SDL_ShowSimpleMessageBox
const SDL_MessageBoxButtonData * buttons
MessageBox structure containing title, text, window, etc.
#define SDL_ShowMessageBox
#define SDL_LogSetPriority
EGLSurface EGLNativeWindowType * window
The type used to identify a window.