Function fermium::messagebox::SDL_ShowSimpleMessageBox
source · pub unsafe extern "C" fn SDL_ShowSimpleMessageBox(
flags: SDL_MessageBoxFlags,
title: *const c_char,
message: *const c_char,
window: *mut SDL_Window
) -> c_int
Expand description
Create a simple modal message box.
This function may be called at any time, even before SDL_Init
. This
makes it useful for reporting errors like a failure to create a renderer
or OpenGL context.
Note that if SDL_Init
would fail because there isn’t any available
video target, this function is likely to fail for the same reasons. If
this is a concern, check the return value from this function and fall back
to writing to stderr
if you can.
flags
should be one ofSDL_MESSAGEBOX_ERROR
,SDL_MESSAGEBOX_WARNING
, orSDL_MESSAGEBOX_INFORMATION
.title
UTF-8 title text.message
UTF-8 message text.window
The parent window, or NULL for no parent.
Returns: 0 on success, -1 on error.
See Also: SDL_ShowMessageBox