From 93cde4831bca7055c38a1d6246fdcb84df07f7ec Mon Sep 17 00:00:00 2001
From: Alyssa Ross <hi@alyssa.is>
Date: Fri, 31 May 2019 20:32:02 +0000
Subject: bemenu: add --line-height / -H option

Text is displayed vertically centered in a line. If unspecified, or 0,
the previous behaviour of making the height the size of the text, plus
two pixels on either side, is used, so there will be no change in
behaviour if this option is not used.

Fixes https://github.com/Cloudef/bemenu/issues/44.
---
 lib/bemenu.h | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

(limited to 'lib/bemenu.h')

diff --git a/lib/bemenu.h b/lib/bemenu.h
index 8b28dfe..9482b31 100644
--- a/lib/bemenu.h
+++ b/lib/bemenu.h
@@ -385,6 +385,23 @@ bool bm_menu_set_font(struct bm_menu *menu, const char *font);
  */
 const char* bm_menu_get_font(const struct bm_menu *menu);
 
+/**
+ * Set size of line in pixels.
+ * Some renderers such as ncurses may ignore this when it does not make sense.
+ *
+ * @param menu bm_menu instance where to set line height.
+ * @param line_height 0 for default line height, > 0 for that many pixels.
+ */
+void bm_menu_set_line_height(struct bm_menu *menu, uint32_t line_height);
+
+/**
+ * Get size of line in pixels.
+ *
+ * @param menu bm_menu instance where to get line height.
+ * @return uint32_t for max amount of vertical lines to be shown.
+ */
+uint32_t bm_menu_get_line_height(struct bm_menu *menu);
+
 /**
  * Set a hexadecimal color for element.
  *
-- 
cgit v1.2.3-70-g09d2