expo: Support rendering multiple lines of text
Use the measurement info to write each line of text separately, thus
respecting word-wrapping and newlines.
Fix up the comment for scene_obj_render() while we are here.
Since a lineedit does not support alignment, add a special case to just
display the text if there is no measurement. This happens assuming the
lineedit is initially empty.
Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/include/expo.h b/include/expo.h
index 7c6ab4b..a79aa1d 100644
--- a/include/expo.h
+++ b/include/expo.h
@@ -8,6 +8,7 @@
#define __EXPO_H
#include <abuf.h>
+#include <alist.h>
#include <dm/ofnode_decl.h>
#include <linux/bitops.h>
#include <linux/list.h>
@@ -296,11 +297,14 @@
* @str_id: ID of the text string to display
* @font_name: Name of font (allocated by caller)
* @font_size: Nominal size of font in pixels
+ * @lines: alist of struct vidconsole_mline with a separate record for each
+ * line of text
*/
struct scene_txt_generic {
uint str_id;
const char *font_name;
uint font_size;
+ struct alist lines;
};
/**