summaryrefslogtreecommitdiff
path: root/src/ui/root.h
blob: 4b14b9428da582dcc22d87d5a06cccc43ec6dd7c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#pragma once

#include "widget.h"
#include <the_Foundation/ptrset.h>

iDeclareType(Root)
    
struct Impl_Root {
    iWidget *  widget;
    iWidget *  hover;
    iWidget *  mouseGrab;
    iWidget *  focus;
    iPtrArray *onTop; /* order is important; last one is topmost */
    iPtrSet *  pendingDestruction;
};

iDeclareTypeConstruction(Root)

/*----------------------------------------------------------------------------------------------*/

void        createUserInterface_Root            (iRoot *);

void        setCurrent_Root                     (iRoot *);
iRoot *     get_Root                            (void);

iPtrArray * onTop_Root                          (iRoot *);
void        destroyPending_Root                 (iRoot *);
    
void        updateMetrics_Root                  (iRoot *);
void        updatePadding_Root                  (iRoot *); /* TODO: is part of metrics? */
void        dismissPortraitPhoneSidebars_Root   (iRoot *);
void        showToolbars_Root                   (iRoot *, iBool show);