|
Foundation
|
Platform-dependent application abstractions. More...
Classes | |
| class | NativeApplication |
| Application base class. Handles initialization and shutdown of the native platform, and windowing management. More... | |
| class | NativeWindow |
| Class representing a window for the platform. More... | |
Typedefs | |
| using | Path = std::filesystem::path |
| OS specific filesystem path. Alias of std::filesystem::path. | |
| using | ByteArray = Core::Vector< char > |
| Vector of bytes. Alias of Core::Vector<char> | |
| using | Bytes = Core::Span< const char > |
| Span of bytes. Alias of Core::Span<const char> | |
Enumerations | |
| enum class | MessageBoxType : int { Ok = 0 , OkCancel = 1 , YesNo = 2 , YesNoCancel = 3 } |
| enum class | MessageBoxIcon : int { Info = 0 , Warning = 1 , Error = 2 , Question = 3 } |
| enum class | MessageBoxResult : int { No = 0 , Yes = 1 , Cancel = 2 } |
Functions | |
| void | glfw_error_callback (int error, const char *description) |
| MessageBoxResult | CreateMessageBox (const char *title, const char *message, MessageBoxType type=MessageBoxType::Ok, MessageBoxIcon icon=MessageBoxIcon::Info, MessageBoxResult default_result=MessageBoxResult::Yes) |
| Creates a message box with the specified title and message. | |
| size_t | GetFileSize (Path const &path) |
| size_t | ReadFile (Path const &path, ByteArray &data) |
| Reads the entire contents of a file into a byte vector. | |
| size_t | WriteFile (Path const &path, Bytes data) |
| Writes the entire contents of a byte vector to a file. | |
Platform-dependent application abstractions.
Vector of bytes. Alias of Core::Vector<char>
Span of bytes. Alias of Core::Span<const char>
| using Foundation::Native::Path = typedef std::filesystem::path |
OS specific filesystem path. Alias of std::filesystem::path.
|
strong |
|
strong |
|
strong |
| MessageBoxResult Foundation::Native::CreateMessageBox | ( | const char * | title, |
| const char * | message, | ||
| MessageBoxType | type = MessageBoxType::Ok, |
||
| MessageBoxIcon | icon = MessageBoxIcon::Info, |
||
| MessageBoxResult | default_result = MessageBoxResult::Yes |
||
| ) |
Creates a message box with the specified title and message.
This is blocking, and will halt execution until the user dismisses it.
Reads the entire contents of a file into a byte vector.