summaryrefslogtreecommitdiff
path: root/src/ui/root.h
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-04-28 14:02:20 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-04-28 14:02:20 +0300
commit408597bd4f71a13a511b6af33601dff0be2ed317 (patch)
tree44f6b776ddab24bb5d1b18179872546125c3d679 /src/ui/root.h
parent852689943bfbbbb933ba617cb0a971f82923a2f3 (diff)
Working on multiple UI roots
Various refactorings and fixes to handle root-global and window-global state, root-specific palettes, and proper coordinate system changes (e.g., when opening menus). UI events are posted and handled in the context of a specific root.
Diffstat (limited to 'src/ui/root.h')
-rw-r--r--src/ui/root.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ui/root.h b/src/ui/root.h
index 39e7bf3c..e5fdcbe4 100644
--- a/src/ui/root.h
+++ b/src/ui/root.h
@@ -1,6 +1,7 @@
1#pragma once 1#pragma once
2 2
3#include "widget.h" 3#include "widget.h"
4#include "color.h"
4#include <the_Foundation/ptrset.h> 5#include <the_Foundation/ptrset.h>
5#include <the_Foundation/vec2.h> 6#include <the_Foundation/vec2.h>
6 7
@@ -8,12 +9,10 @@ iDeclareType(Root)
8 9
9struct Impl_Root { 10struct Impl_Root {
10 iWidget * widget; 11 iWidget * widget;
11 iWidget * hover;
12 iWidget * mouseGrab;
13 iWidget * focus;
14 iPtrArray *onTop; /* order is important; last one is topmost */ 12 iPtrArray *onTop; /* order is important; last one is topmost */
15 iPtrSet * pendingDestruction; 13 iPtrSet * pendingDestruction;
16 int loadAnimTimer; 14 int loadAnimTimer;
15 iColor tmPalette[tmMax_ColorId]; /* theme-specific palette */
17}; 16};
18 17
19iDeclareTypeConstruction(Root) 18iDeclareTypeConstruction(Root)
@@ -24,6 +23,7 @@ void createUserInterface_Root (iRoot *);
24 23
25void setCurrent_Root (iRoot *); 24void setCurrent_Root (iRoot *);
26iRoot * get_Root (void); 25iRoot * get_Root (void);
26iAnyObject *findWidget_Root (const char *id); /* under current Root */
27 27
28iPtrArray * onTop_Root (iRoot *); 28iPtrArray * onTop_Root (iRoot *);
29void destroyPending_Root (iRoot *); 29void destroyPending_Root (iRoot *);