aboutsummaryrefslogtreecommitdiff
path: root/render.h
diff options
context:
space:
mode:
authorAndrew J. Hesford <ajh@sideband.org>2024-01-17 20:00:14 +0000
committerDaniel Eklöf <daniel@ekloef.se>2024-02-05 11:14:53 +0000
commit21a8d832ce12217ddd493cdcaefdc457128f2ada (patch)
treec49b5375dc8f2b1919adc2a1a8fc49e2c25cc3dd /render.h
parentutil: add streq() function and use in place of strcmp(...) == 0 (diff)
feature: add resize-by-cells option to constrain window sizes...
...to multiples of the cell size, and preserve grid size when changing fonts or display scales in floating windows.
Diffstat (limited to 'render.h')
-rw-r--r--render.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/render.h b/render.h
index f038ffb0..78ebae40 100644
--- a/render.h
+++ b/render.h
@@ -10,8 +10,15 @@ struct renderer;
struct renderer *render_init(struct fdm *fdm, struct wayland *wayl);
void render_destroy(struct renderer *renderer);
-bool render_resize(struct terminal *term, int width, int height);
-bool render_resize_force(struct terminal *term, int width, int height);
+enum resize_options {
+ RESIZE_NORMAL = 0,
+ RESIZE_FORCE = 1 << 0,
+ RESIZE_BY_CELLS = 1 << 1,
+ RESIZE_KEEP_GRID = 1 << 2,
+};
+
+bool render_resize(
+ struct terminal *term, int width, int height, uint8_t resize_options);
void render_refresh(struct terminal *term);
void render_refresh_csd(struct terminal *term);