diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2013-02-02 22:58:35 +0000 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2013-02-02 22:58:35 +0000 |
commit | 442218cb8047912d8e57936cb0a4ce791db9f31d (patch) | |
tree | c1c1f062df0b3e98576b379d5166aa675206801c /desktop/textarea.c | |
parent | 97bc1d01894c54e206e2001c26f333cd0c3f6d28 (diff) | |
download | netsurf-442218cb8047912d8e57936cb0a4ce791db9f31d.tar.gz netsurf-442218cb8047912d8e57936cb0a4ce791db9f31d.tar.bz2 |
Pull flags out of textarea_setup.
Diffstat (limited to 'desktop/textarea.c')
-rw-r--r-- | desktop/textarea.c | 11 |
1 files changed, 6 insertions, 5 deletions
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")); |