From cf32aba65f5b44043cdadccdab0bd6342349da24 Mon Sep 17 00:00:00 2001 From: Kalle Olavi Niemitalo Date: Sat, 17 Feb 2007 14:17:24 +0200 Subject: [PATCH] BFU doc: Comment on what widget_data.cdata means for WIDGET_TEXT. Inspired by bug 935. --- src/bfu/widget.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/bfu/widget.h b/src/bfu/widget.h index ec1b42815..5e7d18148 100644 --- a/src/bfu/widget.h +++ b/src/bfu/widget.h @@ -51,11 +51,18 @@ struct widget { struct widget_data { struct widget *widget; + /* For WIDGET_FIELD: If CONFIG_UTF8 is defined and UTF-8 I/O * is enabled for the terminal, then @cdata is in UTF-8; * otherwise, @cdata is in the charset of the terminal, and * the charset is assumed to be unibyte. (Thus, if you choose - * UTF-8 as the charset but disable UTF-8 I/O, you lose.) */ + * UTF-8 as the charset but disable UTF-8 I/O, you lose.) + * + * For WIDGET_TEXT: @cdata is cast from/to an unsigned char ** + * that points to the first element of an array. Each element + * in this array corresponds to one line of text, and is an + * unsigned char * that points to the first character of that + * line. The array has @widget_data.info.text.lines elements. */ unsigned char *cdata; struct box box;