diff options
author | Dave Davenport <qball@gmpclient.org> | 2015-11-22 20:41:45 +0100 |
---|---|---|
committer | Dave Davenport <qball@gmpclient.org> | 2015-11-22 20:41:45 +0100 |
commit | 4510f65d5a1ab292b73e348f9247e1de679e697b (patch) | |
tree | ed8663ddd72dee1580bad588cb9998e0e0d1fd44 /include | |
parent | ca1b590bf84d15d5aa807018d416fdf57075b87e (diff) |
textbox: advance cursor correctly for multi-char input
Thanks to eigengrau
fixes: #280
Diffstat (limited to 'include')
-rw-r--r-- | include/textbox.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/include/textbox.h b/include/textbox.h index 0e46db04..70bd441b 100644 --- a/include/textbox.h +++ b/include/textbox.h @@ -100,7 +100,7 @@ void textbox_draw ( textbox *tb, cairo_t *draw ); * * @returns if the key was handled (1), unhandled(0) or handled and return was pressed (-1) */ -int textbox_keypress ( textbox *tb, XEvent *ev, char *pad, KeySym key, Status stat ); +int textbox_keypress ( textbox *tb, XEvent *ev, char *pad, int pad_len, KeySym key, Status stat ); /** * @param tb Handle to the textbox @@ -127,13 +127,14 @@ void textbox_cursor ( textbox *tb, int pos ); void textbox_move ( textbox *tb, int x, int y ); /** - * @param tb Handle to the textbox - * @param pos The position to insert the string at - * @param str The string to insert. + * @param tb Handle to the textbox + * @param pos The position to insert the string at + * @param str The string to insert. + * @param slen The length of the string. * * Insert the string str at position pos. */ -void textbox_insert ( textbox *tb, int pos, char *str ); +void textbox_insert ( textbox *tb, int pos, char *str, int slen ); /** * Setup the cached fonts. This is required to do |