summaryrefslogtreecommitdiff
path: root/desktop/textarea.h
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2013-01-12 20:46:01 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2013-01-12 20:46:01 +0000
commit5124b8a02a2adb72a7352f14e06dc2a773afbc1f (patch)
tree823b518d517edf14f2c46ab8d8b2781991283804 /desktop/textarea.h
parentac03806a50f292fc13930a2fdb3c8744bcaa954a (diff)
downloadnetsurf-5124b8a02a2adb72a7352f14e06dc2a773afbc1f.tar.gz
netsurf-5124b8a02a2adb72a7352f14e06dc2a773afbc1f.tar.bz2
Add textarea_setup struct to textarea_create API.
Diffstat (limited to 'desktop/textarea.h')
-rw-r--r--desktop/textarea.h23
1 files changed, 21 insertions, 2 deletions
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);
/**