4#include "colorspaces.hpp"
5#include <unordered_map>
9#if defined(_3DS) || defined(_3DS_MOCK)
11#elif defined(WII) || defined(WII_MOCK)
21#define SCREEN_WIDTH RootDisplay::screenWidth
22#define SCREEN_HEIGHT RootDisplay::screenHeight
39 void setScreenResolution(
int width,
int height);
41 static CST_Renderer* renderer;
42 static CST_Window* window;
46 static void pushScreen(std::unique_ptr<Screen> screen);
47 static void popScreen();
48 static Screen* topScreen();
49 static void clearScreens();
50 static bool hasScreens();
53 static void deferAction(std::function<
void()>
action);
56 static void processDeferredActions();
59 static std::vector<std::unique_ptr<Screen>> screenStack;
62 static std::vector<std::function<void()>> deferredActions;
64 static bool isProcessingEvents;
67 static int screenWidth;
68 static int screenHeight;
71 static float dpiScale;
74 static float globalScale;
79 static bool idleCursorPulsing;
82 bool canUseSelectToExit =
false;
84 int lastFrameTime = 99;
85 SDL_Event needsRender;
88 std::unique_ptr<InputEvents> events;
90 std::function<void()> windowResizeCallback = NULL;
94#if !defined(SIMPLE_SDL2)
95 Mix_Music* music = NULL;
101 bool hasRequestedQuit =
false;
102 bool isAppRunning =
true;
int width
width and height of this element (must be manually set, isn't usually calculated (but is in some case...
Element * parent
the parent element (reference only, not owned)
std::function< void()> action
the action to call (from binded callback) on touch or button selection https://stackoverflow....
bool process(InputEvents *event)
process any input that is received for this element
void render(Element *parent)
display the current state of the display