|
Etterna 0.75.1
|
Classes | |
| struct | Dimensions |
| Platform-independent struct to store screen dimensions. More... | |
Functions | |
| bool | setConsoleEnabled (bool enable) |
| void | init () |
| std::string | getSystem () |
| Determine the system name with the version number. | |
| std::string | getArchitecture () |
| Determine if the current system is 64bit or 32bit. | |
| std::string | getKernel () |
| Determine the current systems kernel type and version. | |
| std::size_t | getSystemMemory () |
| Determine the total amount of memory available on a system. | |
| std::string | getSystemCPU () |
| Get the system CPU information String should include CPU Manufacturer, Model, and Frequency. | |
| std::string | getSystemGPU () |
| Get the primary system GPU information String should include. | |
| Dimensions | getScreenDimensions () |
| Get the screen dimensions of the screen the game window is currently displayed on. | |
| Dimensions | getWindowDimensions () |
| Get the dimensions of the game window. | |
| std::string | getLanguage () |
| Get the users preferred language. | |
| bool | openWebsite (const std::string &url) |
| Send a URL to be opened with the system's default web browser. | |
| bool | openFolder (const ghc::filesystem::path &path) |
| Send a path to be opened with the system's default file browser. | |
| std::string | getClipboard () |
| Get contents of the system clipboard. | |
| bool | setClipboardText (std::string text) |
| Set contents of sytem clipboard to provided text. | |
| void | setCursorVisible (bool value) |
| ghc::filesystem::path | getExecutableDirectory () |
| Get the location of the binary. | |
| ghc::filesystem::path | getAppDirectory () |
| Get the base game directory. "The etterna folder". | |
| bool | isOtherInstanceRunning (int argc, char **argv) |
| bool | boostPriority () |
| bool | unboostPriority () |
| bool | requestUserAttention () |
This file is where functions which have a cross-platform implementation may be defined.
A namespace to hold all system specific tasks. Intended to be implemented once for each operating system/kernel.
All std::string types returned must be UTF-8.
| ghc::filesystem::path Core::Platform::getAppDirectory | ( | ) |
Get the base game directory. "The etterna folder".
This is the folder where the user chose to install the application. NOTE: This directory is retrieved based on the binary location.
If the binary locations are changed, the functions and documentation must be changed accordingly.
| std::string Core::Platform::getArchitecture | ( | ) |
Determine if the current system is 64bit or 32bit.
| std::string Core::Platform::getClipboard | ( | ) |
Get contents of the system clipboard.
| ghc::filesystem::path Core::Platform::getExecutableDirectory | ( | ) |
Get the location of the binary.
| std::string Core::Platform::getKernel | ( | ) |
Determine the current systems kernel type and version.
| std::string Core::Platform::getLanguage | ( | ) |
Get the users preferred language.
| Dimensions Core::Platform::getScreenDimensions | ( | ) |
Get the screen dimensions of the screen the game window is currently displayed on.
| std::string Core::Platform::getSystem | ( | ) |
Determine the system name with the version number.
| std::string Core::Platform::getSystemGPU | ( | ) |
Get the primary system GPU information String should include.
| std::size_t Core::Platform::getSystemMemory | ( | ) |
Determine the total amount of memory available on a system.
| Dimensions Core::Platform::getWindowDimensions | ( | ) |
Get the dimensions of the game window.
| void Core::Platform::init | ( | ) |
Run any desired initialization processes specific to a particular operating system.
| bool Core::Platform::isOtherInstanceRunning | ( | int | argc, |
| char ** | argv ) |
Check if another instance of this application is already running
| argc | argc from main |
| argv | argv from main |
| bool Core::Platform::openFolder | ( | const ghc::filesystem::path & | path | ) |
Send a path to be opened with the system's default file browser.
| path | Path to open |
| bool Core::Platform::openWebsite | ( | const std::string & | url | ) |
Send a URL to be opened with the system's default web browser.
| url | URL to open |
| bool Core::Platform::setClipboardText | ( | std::string | text | ) |
Set contents of sytem clipboard to provided text.
| text | Text to set clipboard to |
| bool Core::Platform::setConsoleEnabled | ( | bool | enable | ) |
Enable or disable the system output console.
This is defined in Platform.cpp
Mac and Unix always have an associated console with the program, and can be seen depending on how the application is launched. This function is written for windows, which when linked with the /SUBSYSTEM:WINDOWS flag, needs a separate console to be allocated, and linked to the IO of this application.
| enable | Boolean to enable or disable |
| void Core::Platform::setCursorVisible | ( | bool | value | ) |
Set if the mouse is visible or invisible
| value | True if visible mouse desired, false if not. |