65enum class Cursor : uint8_t {
69void setCursor(Cursor);
Contains jngl::Pixels class.
void showWindow(const std::string &title, int width, int height, bool fullscreen=false, std::pair< int, int > minAspectRatio={ 4, 3 }, std::pair< int, int > maxAspectRatio={ 16, 9 })
Creates the main window.
void hideWindow()
Cleans up the window and unloads everything.
void setFullscreen(bool)
Toggle fullscreen window mode.
int getWindowWidth()
Returns the width of the window in actual pixels (i.e. ignoring jngl::getScaleFactor)
int getDesktopWidth()
Returns the width of the main display in actual pixels.
void atExit(std::function< void()>)
Call this function once when the window is hidden.
int getDesktopHeight()
Returns the height of the main display in actual pixels.
int getWindowHeight()
Returns the height of the window in actual pixels (i.e. ignoring jngl::getScaleFactor)
void setTitle(const std::string &title)
Sets the main window title.
std::array< Pixels, 2 > getWindowSize()
Returns {width, height} of the window in actual pixels.
std::vector< float > readPixels()
Read red, green and blue values of the whole window frame buffer.
bool getFullscreen()
If the window is displayed fullscreen (always true on mobile devices)