diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-04-27 11:59:28 +0300 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-04-27 11:59:28 +0300 |
commit | 9a7aa34e63132edb5906914ff99b861e64ee9099 (patch) | |
tree | 327e275b7f4fd6eb05150f7c03a87a72794d22a0 /src/ui/window.h | |
parent | 170209cf926e2f714d507fefaa6b30fd245811ad (diff) |
Refactor: Added a proper Root object
`Root` encapsulates the root widget and the associated UI state.
Diffstat (limited to 'src/ui/window.h')
-rw-r--r-- | src/ui/window.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ui/window.h b/src/ui/window.h index 9d9a6aeb..f90bd863 100644 --- a/src/ui/window.h +++ b/src/ui/window.h | |||
@@ -22,7 +22,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ | |||
22 | 22 | ||
23 | #pragma once | 23 | #pragma once |
24 | 24 | ||
25 | #include "widget.h" | 25 | #include "root.h" |
26 | 26 | ||
27 | #include <the_Foundation/rect.h> | 27 | #include <the_Foundation/rect.h> |
28 | #include <SDL_events.h> | 28 | #include <SDL_events.h> |
@@ -66,8 +66,8 @@ struct Impl_Window { | |||
66 | iBool ignoreClick; | 66 | iBool ignoreClick; |
67 | uint32_t focusGainedAt; | 67 | uint32_t focusGainedAt; |
68 | SDL_Renderer *render; | 68 | SDL_Renderer *render; |
69 | iWidget * root; | 69 | iRoot root; /* root widget and UI state */ |
70 | float pixelRatio; /* conversion between points and pixels, e.g., coords, window size */ | 70 | float pixelRatio; /* conversion between points and pixels, e.g., coords, window size */ |
71 | float displayScale; /* DPI-based scaling factor of current display, affects uiScale only */ | 71 | float displayScale; /* DPI-based scaling factor of current display, affects uiScale only */ |
72 | float uiScale; | 72 | float uiScale; |
73 | uint32_t frameTime; | 73 | uint32_t frameTime; |