summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorFriedrich Stoltzfus <friedrichstoltzfus@gmail.com>2025-06-12 12:47:03 -0400
committerMitchell Hashimoto <m@mitchellh.com>2025-08-26 09:47:31 -0700
commit17f7f204e1478a3ae00be2644bc04865539defd6 (patch)
treec7457ac67820c7d53fb210dd670b17cb15134cbd /include
parent63cd424678cf75ceb6a85501a38fb06f4bf7f118 (diff)
macOS: update zig and c structs for quick terminal size
Applying the feedback given by @pluiedev to use an enum to specify the type of quick terminal size configuration given (pixels or percentage). Updated the Swift code to work with the enum as well.
Diffstat (limited to 'include')
-rw-r--r--include/ghostty.h17
1 files changed, 13 insertions, 4 deletions
diff --git a/include/ghostty.h b/include/ghostty.h
index 780f49b6c..300aaec35 100644
--- a/include/ghostty.h
+++ b/include/ghostty.h
@@ -451,11 +451,20 @@ typedef struct {
} ghostty_config_palette_s;
// config.QuickTerminalSize
+typedef enum {
+ GHOSTTY_QUICK_TERMINAL_SIZE_NONE,
+ GHOSTTY_QUICK_TERMINAL_SIZE_PERCENTAGE,
+ GHOSTTY_QUICK_TERMINAL_SIZE_PIXELS,
+} ghostty_quick_terminal_size_e;
+
+typedef struct {
+ ghostty_quick_terminal_size_e type;
+ uint32_t value;
+} ghostty_quick_terminal_size_u;
+
typedef struct {
- uint8_t primary_type; // 0 = none, 1 = percentage, 2 = pixels
- float primary_value;
- uint8_t secondary_type; // 0 = none, 1 = percentage, 2 = pixels
- float secondary_value;
+ ghostty_quick_terminal_size_u primary;
+ ghostty_quick_terminal_size_u secondary;
} ghostty_config_quick_terminal_size_s;
// apprt.Target.Key