From 5124b8a02a2adb72a7352f14e06dc2a773afbc1f Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Sat, 12 Jan 2013 20:46:01 +0000 Subject: Add textarea_setup struct to textarea_create API. --- desktop/textarea.h | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) (limited to 'desktop/textarea.h') diff --git a/desktop/textarea.h b/desktop/textarea.h index e4fa2c7aa..a798e7c9f 100644 --- a/desktop/textarea.h +++ b/desktop/textarea.h @@ -36,6 +36,26 @@ typedef enum textarea_flags { TEXTAREA_READONLY = (1 << 2) } textarea_flags; +typedef struct textarea_setup { + textarea_flags flags; + + int width; + int height; + + int pad_top; + int pad_right; + int pad_bottom; + int pad_left; + + int border_width; + colour border_col; + + colour selected_text; + colour selected_bg; + plot_font_style_t text; + +} textarea_setup; + struct textarea; @@ -54,8 +74,7 @@ typedef void(*textarea_redraw_request_callback)(void *data, int x, int y, * \param data user specified data which will be passed to redraw callbacks * \return Opaque handle for textarea or 0 on error */ -struct textarea *textarea_create(int width, int height, - textarea_flags flags, const plot_font_style_t *style, +struct textarea *textarea_create(const textarea_setup *setup, textarea_redraw_request_callback redraw_request, void *data); /** -- cgit v1.2.3