diff options
| author | Mitchell Hashimoto <m@mitchellh.com> | 2025-08-26 09:47:03 -0700 |
|---|---|---|
| committer | Mitchell Hashimoto <m@mitchellh.com> | 2025-08-26 09:52:26 -0700 |
| commit | a90bf58080fdcc671e666e92d741ad90e8868be8 (patch) | |
| tree | 2061325f5b2262dcd08b76ee98c9c561b8004876 /include | |
| parent | 6a78f9c0c091ff505a6eb6aba45ee6bd4f52af37 (diff) | |
config: change quick terminal size C layout to tagged union
Diffstat (limited to 'include')
| -rw-r--r-- | include/ghostty.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/include/ghostty.h b/include/ghostty.h index 7758423fe..6fd218e9e 100644 --- a/include/ghostty.h +++ b/include/ghostty.h @@ -455,11 +455,16 @@ typedef enum { GHOSTTY_QUICK_TERMINAL_SIZE_NONE, GHOSTTY_QUICK_TERMINAL_SIZE_PERCENTAGE, GHOSTTY_QUICK_TERMINAL_SIZE_PIXELS, -} ghostty_quick_terminal_size_e; +} ghostty_quick_terminal_size_tag_e; + +typedef union { + float percentage; + uint32_t pixels; +} ghostty_quick_terminal_size_value_u; typedef struct { - ghostty_quick_terminal_size_e type; - uint32_t value; + ghostty_quick_terminal_size_tag_e tag; + ghostty_quick_terminal_size_value_u value; } ghostty_quick_terminal_size_s; typedef struct { |
