Debian Codegraph @

common/include/messagebox.h

raw
1 /*
2 * This file is part of the DXX-Rebirth project <https://www.dxx-rebirth.com/>.
3 * It is copyright by its individual contributors, as recorded in the
4 * project's Git history. See COPYING.txt at the top level for license
5 * terms and a link to the Git history.
6 */
7 /*
8 * messagebox.h
9 * d1x-rebirth
10 *
11 * Display an error or warning messagebox using the OS's window server.
12 *
13 */
14
15 #pragma once
16
17 #include <span>
18 #include <SDL.h>
19
20 namespace dcx {
21
22 #if defined(WIN32) || defined(__APPLE__) || defined(__MACH__) || SDL_MAJOR_VERSION == 2
23 // Display a warning in a messagebox
24 void msgbox_warning(std::span<const char> message);
25
26 // Display an error in a messagebox
27 extern void msgbox_error(const char *message);
28 #else
29 #define msgbox_error(M) (static_cast<void>(M))
30 #endif
31
32 }