summaryrefslogtreecommitdiff
path: root/desktop/textarea.h
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2013-02-06 22:30:32 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2013-02-06 22:30:32 +0000
commit008cdb42d718ed1e1e61c9c16e6aa22bc345d202 (patch)
tree397329b758e900446a2534a8c6797765d0fe5cd5 /desktop/textarea.h
parent2260152ebfeed8c303343a12e11ea51713487ed7 (diff)
downloadnetsurf-008cdb42d718ed1e1e61c9c16e6aa22bc345d202.tar.gz
netsurf-008cdb42d718ed1e1e61c9c16e6aa22bc345d202.tar.bz2
Fix empty textarea reflow. Fix empty line (just \n) redraw. Add set layout function to set size and padding.
Diffstat (limited to 'desktop/textarea.h')
-rw-r--r--desktop/textarea.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/desktop/textarea.h b/desktop/textarea.h
index c54b08345..4276868c9 100644
--- a/desktop/textarea.h
+++ b/desktop/textarea.h
@@ -128,7 +128,7 @@ bool textarea_set_text(struct textarea *ta, const char *text);
*
* \param ta Text area
* \param buf Pointer to buffer to receive data, or NULL
- * to read length required
+ * to read length required (includes trailing '\0')
* \param len Length (bytes) of buffer pointed to by buf, or 0 to read length
* \return Length (bytes) written/required or -1 on error
*/
@@ -202,5 +202,19 @@ void textarea_get_dimensions(struct textarea *ta, int *width, int *height);
* \param height the new height of the textarea
*/
void textarea_set_dimensions(struct textarea *ta, int width, int height);
+
+/**
+ * Set the dimensions and padding of a textarea, causing a reflow and
+ * emitting a redraw request.
+ *
+ * \param width the new width of the textarea
+ * \param height the new height of the textarea
+ * \param top the new top padding of the textarea
+ * \param right the new right padding of the textarea
+ * \param bottom the new bottom padding of the textarea
+ * \param left the new left padding of the textarea
+ */
+void textarea_set_layout(struct textarea *ta, int width, int height,
+ int top, int right, int bottom, int left);
#endif