OldSchool Library
|
Functions and definitions related to message boxes in OSLib. More...
Macros | |
#define | oslDebug(format...) |
Displays a debug message, with the same format as printf. | |
#define | oslMake3Buttons(b1, a1, b2, a2, b3, a3) |
Creates a 32-bit integer to be used for the 'flags' parameter when calling oslMessageBox. | |
#define | oslWarning(format...) |
Displays a warning message with the same format as oslDebug. | |
#define | oslFatalError(format...) |
Displays a fatal error message. This function will terminate execution after displaying the message. | |
#define | oslAssert(cond) |
Displays a fatal error message if the condition is not satisfied. | |
Enumerations | |
enum | OSL_MB_ACTIONS { OSL_MB_OK = 1 , OSL_MB_CANCEL , OSL_MB_YES , OSL_MB_NO , OSL_MB_QUIT } |
Message box button actions. More... | |
Functions | |
unsigned int | oslMessageBox (const char *text, const char *title, unsigned int flags) |
Displays a message box. | |
Functions and definitions related to message boxes in OSLib.
#define oslDebug | ( | format... | ) |
Displays a debug message, with the same format as printf.
The title displays the file, the line number, and the function from where it has been called.
Example usage:
#define oslMake3Buttons | ( | b1, | |
a1, | |||
b2, | |||
a2, | |||
b3, | |||
a3 ) |
Creates a 32-bit integer to be used for the 'flags' parameter when calling oslMessageBox.
There are 6 arguments, 2 per button. The first of each pair represents the button assigned (one of the OSL_KEY_BITS values) and the second one represents the action (one of OSL_MB_ACTIONS values).
Example usage:
#define oslFatalError | ( | format... | ) |
Displays a fatal error message. This function will terminate execution after displaying the message.
The only available choice is 'Quit', ensuring that this function is a dead end and no one will ever return from it.
#define oslAssert | ( | cond | ) |
Displays a fatal error message if the condition is not satisfied.
This macro allows you to assert that a condition is true. If it is not, a fatal error message is displayed, and the program is terminated.
Example usage:
enum OSL_MB_ACTIONS |
|
extern |
Displays a message box.
text | The text displayed inside of the message box. |
title | The title of the message box. |
flags | Flags representing the buttons and their actions, created using oslMake3Buttons. |
Example usage: