/** * Copyright (c) 2026 Dominic Masters * * This software is released under the MIT License. * https://opensource.org/licenses/MIT */ #pragma once #include "display/displayplatform.h" // Expecting some definitions to be provided #ifndef DUSK_DISPLAY_SIZE_DYNAMIC #ifndef DUSK_DISPLAY_WIDTH #error "DUSK_DISPLAY_WIDTH must be defined." #endif #ifndef DUSK_DISPLAY_HEIGHT #error "DUSK_DISPLAY_HEIGHT must be defined" #endif #define DUSK_DISPLAY_WIDTH_DEFAULT DUSK_DISPLAY_WIDTH #define DUSK_DISPLAY_HEIGHT_DEFAULT DUSK_DISPLAY_HEIGHT #else #ifndef DUSK_DISPLAY_WIDTH_DEFAULT #error "DUSK_DISPLAY_WIDTH_DEFAULT must be defined." #endif #ifndef DUSK_DISPLAY_HEIGHT_DEFAULT #error "DUSK_DISPLAY_HEIGHT_DEFAULT must be defined." #endif #ifdef DUSK_DISPLAY_WIDTH #error "DUSK_DISPLAY_WIDTH should not be defined." #endif #ifdef DUSK_DISPLAY_HEIGHT #error "DUSK_DISPLAY_HEIGHT should not be defined." #endif #endif // Main Display Struct, platform-speicifc typedef displayplatform_t display_t; extern display_t DISPLAY; /** * Initializes the display system. * @return An errorret_t indicating success or failure. */ errorret_t displayInit(void); /** * Tells the display system to actually draw the frame. * @return An errorret_t indicating success or failure. */ errorret_t displayUpdate(void); /** * Sets the display state. * * @param state The state to set. * @return An errorret_t indicating success or failure. */ errorret_t displaySetState(displaystate_t state); /** * Disposes of the display system. * @return An errorret_t indicating success or failure. */ errorret_t displayDispose(void);