diff options
| author | nathan <nathansmith@disroot.org> | 2025-11-17 04:19:01 +0000 |
|---|---|---|
| committer | nathan <nathansmith@disroot.org> | 2025-11-17 04:19:01 +0000 |
| commit | fe39cc897fbc8d8470d790df5306550c841d95d4 (patch) | |
| tree | 97243f3c23a471000163fc9e157bb145f5d92536 /src/ui.h | |
| parent | 7bb57d60f8d8249eb48c9c7a7e7d3760127a0c3c (diff) | |
| download | FindThings-fe39cc897fbc8d8470d790df5306550c841d95d4.tar.gz FindThings-fe39cc897fbc8d8470d790df5306550c841d95d4.tar.bz2 FindThings-fe39cc897fbc8d8470d790df5306550c841d95d4.zip | |
Window focus stuff
Diffstat (limited to 'src/ui.h')
| -rw-r--r-- | src/ui.h | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -16,6 +16,12 @@ typedef void (*DrawWindowContentCallback)(Vector2 position, Vector2 scroll); +typedef enum { + NO_FOCUS_ACTION, + REQUEST_FOCUS, + DEMAND_FOCUS +} FocusCommand; + typedef struct { char title[UI_WINDOW_TITLE_MAX]; Rectangle rect; @@ -25,6 +31,7 @@ typedef struct { DrawWindowContentCallback callback; Vector2 contentSize; Vector2 scroll; + bool hasFocus; } FloatingWindow; typedef struct { @@ -33,7 +40,7 @@ typedef struct { } WindowManager; FloatingWindow createFloatingWindow(const char* title, Rectangle rect); -bool updateFloatingWindow(FloatingWindow* window); +FocusCommand updateFloatingWindow(FloatingWindow* window); void initWindowManager(WindowManager* wm); void updateWindowManager(WindowManager* wm); |
