From 442218cb8047912d8e57936cb0a4ce791db9f31d Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Sat, 2 Feb 2013 22:58:35 +0000 Subject: Pull flags out of textarea_setup. --- desktop/textarea.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'desktop/textarea.c') diff --git a/desktop/textarea.c b/desktop/textarea.c index a048058f5..3fe284497 100644 --- a/desktop/textarea.c +++ b/desktop/textarea.c @@ -948,14 +948,15 @@ static bool textarea_drag_end(struct textarea *ta, browser_mouse_state mouse, /* exported interface, documented in textarea.h */ -struct textarea *textarea_create(const textarea_setup *setup, +struct textarea *textarea_create(const textarea_flags flags, + const textarea_setup *setup, textarea_client_callback callback, void *data) { struct textarea *ret; /* Sanity check flags */ - assert(!(setup->flags & TEXTAREA_MULTILINE && - setup->flags & TEXTAREA_PASSWORD)); + assert(!(flags & TEXTAREA_MULTILINE && + flags & TEXTAREA_PASSWORD)); if (callback == NULL) { LOG(("no callback provided")); @@ -971,7 +972,7 @@ struct textarea *textarea_create(const textarea_setup *setup, ret->callback = callback; ret->data = data; - ret->flags = setup->flags; + ret->flags = flags; ret->vis_width = setup->width; ret->vis_height = setup->height; @@ -1008,7 +1009,7 @@ struct textarea *textarea_create(const textarea_setup *setup, ret->text.len = 1; ret->text.utf8_len = 0; - if (setup->flags & TEXTAREA_PASSWORD) { + if (flags & TEXTAREA_PASSWORD) { ret->password.data = malloc(64); if (ret->password.data == NULL) { LOG(("malloc failed")); -- cgit v1.2.3