diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2009-07-06 23:47:50 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2009-07-06 23:47:50 +0000 |
commit | 68aeb65cdf4b25772be8142112cc1c00572d1629 (patch) | |
tree | 8fa6755756dd92641f38591be4a2417d50c995a2 /desktop/textarea.c | |
parent | d98ec423b1df201c8da79d9a9459da0411748fab (diff) | |
download | netsurf-68aeb65cdf4b25772be8142112cc1c00572d1629.tar.gz netsurf-68aeb65cdf4b25772be8142112cc1c00572d1629.tar.bz2 |
Merged revisions 8059-8359 via svnmerge from
svn://svn.netsurf-browser.org/branches/paulblokus/textinput
........
r8337 | paulblokus | 2009-07-06 00:38:21 +0100 (Mon, 06 Jul 2009) | 2 lines
added textarea_set_position
........
svn path=/trunk/netsurf/; revision=8360
Diffstat (limited to 'desktop/textarea.c')
-rw-r--r-- | desktop/textarea.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/desktop/textarea.c b/desktop/textarea.c index 3e0ce466a..20aaeed78 100644 --- a/desktop/textarea.c +++ b/desktop/textarea.c @@ -194,6 +194,25 @@ struct text_area *textarea_create(int x, int y, int width, int height, /** + * Change the position of a textarea. The text area is redrawn + * + * \param ta the textarea to change position of + * \param x X coordinate of the the new position + * \param y Y coordinate of the the new position + */ +void textarea_set_position(struct text_area *ta, int x, int y) +{ + ta->x = x; + ta->y = y; + ta->redraw_start_callback(ta->data); + textarea_redraw(ta, ta->x, ta->y, ta->x + ta->vis_width, + ta->y + ta->vis_height); + textarea_set_caret(ta, textarea_get_caret(ta)); + ta->redraw_start_callback(ta->data); +} + + +/** * Destroy a text area * * \param ta Text area to destroy @@ -710,6 +729,10 @@ bool textarea_reflow(struct text_area *ta, unsigned int line) * Handle redraw requests for text areas * * \param redraw Redraw request block + * \param x0 left X coordinate of redraw area + * \param y0 top Y coordinate of redraw area + * \param x1 right X coordinate of redraw area + * \param y1 bottom Y coordinate of redraw area */ void textarea_redraw(struct text_area *ta, int x0, int y0, int x1, int y1) { |