summaryrefslogtreecommitdiff
path: root/src/ui/window.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/window.h')
-rw-r--r--src/ui/window.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/ui/window.h b/src/ui/window.h
index b2b22e90..ad577ce4 100644
--- a/src/ui/window.h
+++ b/src/ui/window.h
@@ -56,6 +56,17 @@ struct Impl_WindowPlacement {
56 int lastHit; 56 int lastHit;
57}; 57};
58 58
59enum iWindowSplit {
60 vertical_WindowSplit = iBit(1),
61 oneToTwo_WindowSplit = iBit(2),
62 twoToOne_WindowSplit = iBit(3),
63 equal_WindowSplit = oneToTwo_WindowSplit | twoToOne_WindowSplit,
64 /* meta */
65 mode_WindowSplit = vertical_WindowSplit | equal_WindowSplit,
66 mask_WindowSplit = equal_WindowSplit,
67 merge_WindowSplit = iBit(10),
68};
69
59struct Impl_Window { 70struct Impl_Window {
60 SDL_Window * win; 71 SDL_Window * win;
61 iWindowPlacement place; 72 iWindowPlacement place;
@@ -67,6 +78,8 @@ struct Impl_Window {
67 uint32_t focusGainedAt; 78 uint32_t focusGainedAt;
68 SDL_Renderer *render; 79 SDL_Renderer *render;
69 iInt2 size; 80 iInt2 size;
81 int splitMode;
82 int pendingSplitMode;
70 iRoot * roots[2]; /* root widget and UI state; second one is for split mode */ 83 iRoot * roots[2]; /* root widget and UI state; second one is for split mode */
71 iRoot * keyRoot; /* root that has the current keyboard input focus */ 84 iRoot * keyRoot; /* root that has the current keyboard input focus */
72 iWidget * hover; 85 iWidget * hover;
@@ -98,6 +111,7 @@ iBool setKeyRoot_Window (iWindow *, iRoot *root);
98void setCursor_Window (iWindow *, int cursor); 111void setCursor_Window (iWindow *, int cursor);
99void setSnap_Window (iWindow *, int snapMode); 112void setSnap_Window (iWindow *, int snapMode);
100void setKeyboardHeight_Window(iWindow *, int height); 113void setKeyboardHeight_Window(iWindow *, int height);
114void setSplitMode_Window (iWindow *, int splitMode);
101void showToolbars_Window (iWindow *, iBool show); 115void showToolbars_Window (iWindow *, iBool show);
102iBool postContextClick_Window (iWindow *, const SDL_MouseButtonEvent *); 116iBool postContextClick_Window (iWindow *, const SDL_MouseButtonEvent *);
103 117
@@ -112,6 +126,7 @@ uint32_t frameTime_Window (const iWindow *);
112SDL_Renderer *renderer_Window (const iWindow *); 126SDL_Renderer *renderer_Window (const iWindow *);
113int snap_Window (const iWindow *); 127int snap_Window (const iWindow *);
114iBool isFullscreen_Window (const iWindow *); 128iBool isFullscreen_Window (const iWindow *);
129int numRoots_Window (const iWindow *);
115iRoot * findRoot_Window (const iWindow *, const iWidget *widget); 130iRoot * findRoot_Window (const iWindow *, const iWidget *widget);
116iRoot * otherRoot_Window (const iWindow *, iRoot *root); 131iRoot * otherRoot_Window (const iWindow *, iRoot *root);
117 132