Merged revisions 8663 via svnmerge from

svn://svn.netsurf-browser.org/branches/paulblokus/textinput

........
  r8663 | paulblokus | 2009-07-22 00:46:29 +0100 (Wed, 22 Jul 2009) | 2 lines
  
  added getter for textarea dimensions
........

svn path=/trunk/netsurf/; revision=8695
This commit is contained in:
Michael Drake 2009-07-22 15:59:25 +00:00
parent 1e96962f6f
commit f1eb054b87
2 changed files with 16 additions and 0 deletions

View File

@ -1415,3 +1415,18 @@ void textarea_normalise_text(struct text_area *ta,
}
}
/**
* Gets the dimensions of a textarea
*
* \param width if not NULL, gets updated to the width of the textarea
* \param height if not NULL, gets updated to the height of the textarea
*/
void textarea_get_dimensions(struct text_area *ta, int *width, int *height)
{
if (width != NULL)
*width = ta->vis_width;
if (height != NULL)
*height = ta->vis_height;
}

View File

@ -54,6 +54,7 @@ bool textarea_mouse_action(struct text_area *ta, browser_mouse_state mouse,
int x, int y);
bool textarea_drag_end(struct text_area *ta, browser_mouse_state mouse,
int x, int y);
void textarea_get_dimensions(struct text_area *ta, int *width, int *height);
#endif