summaryrefslogtreecommitdiff
path: root/render/textinput.c
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2011-07-07 18:38:35 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2011-07-07 18:38:35 +0000
commit50f52cfc515da6532a2844e46951fe75a5f3ec40 (patch)
tree128d46bce1af6d3a13e323c0f180f3ffa95601d1 /render/textinput.c
parente9b0a3ffb4e5d22f78360451d2ecba67094f6b49 (diff)
downloadnetsurf-50f52cfc515da6532a2844e46951fe75a5f3ec40.tar.gz
netsurf-50f52cfc515da6532a2844e46951fe75a5f3ec40.tar.bz2
Remove ghost caret.
svn path=/trunk/netsurf/; revision=12589
Diffstat (limited to 'render/textinput.c')
-rw-r--r--render/textinput.c59
1 files changed, 1 insertions, 58 deletions
diff --git a/render/textinput.c b/render/textinput.c
index a12d72aaf..5a6c38778 100644
--- a/render/textinput.c
+++ b/render/textinput.c
@@ -48,10 +48,6 @@
/* Define to enable textinput debug */
#undef TEXTINPUT_DEBUG
-/** ghost caret used to indicate the insertion point when dragging text
- into a textarea/input field */
-struct caret ghost_caret;
-
static bool textbox_delete(struct browser_window *bw, struct box *text_box,
unsigned char_offset, unsigned utf8_len);
@@ -76,59 +72,6 @@ static bool textinput_input_paste_text(struct browser_window *bw,
#define SPACE_LEN(b) ((b->space == 0) ? 0 : 1)
-/**
- * Remove the given text caret from the window by invalidating it
- * and causing its former position to be redrawn.
- *
- * \param c structure describing text caret
- */
-
-void caret_remove(struct caret *c)
-{
- if (c->defined) {
- int w = (c->height + 7) / 8;
- int xc = c->x;
- c->defined = false;
- browser_window_redraw_rect(c->bw,
- xc - w, c->y, 2 * w, c->height);
- }
-}
-
-
-/**
- * Set the given text caret's position within the window (text box
- * and byte/pixel offsets within the UTF-8 content of that text box)
- * and draw it.
- *
- * \param c structure describing text caret
- * \param bw browser window containing caret
- * \param box TEXT box containing caret
- * \param char_offset byte offset within UTF-8 representation
- * \param pixel_offset from left side of box
- */
-
-void caret_set_position(struct caret *c, struct browser_window *bw,
- struct box *text_box, int char_offset, int pixel_offset)
-{
- struct rect r;
- int xc;
- int w;
-
- box_bounds(text_box, &r);
-
- c->bw = bw;
- c->text_box = text_box;
- c->char_offset = char_offset;
-
- c->x = xc = r.x0 + pixel_offset;
- c->y = r.y0;
- c->height = r.y1 - r.y0;
- w = (c->height + 7) / 8;
-
- c->defined = true;
-
- browser_window_redraw_rect(c->bw, xc - w, c->y, w * 2, c->height);
-}
/**
@@ -145,7 +88,7 @@ void caret_set_position(struct caret *c, struct browser_window *bw,
* \return pointer to TEXT box
*/
-struct box *textarea_get_position(struct box *textarea, int x, int y,
+static struct box *textarea_get_position(struct box *textarea, int x, int y,
int *pchar_offset, int *ppixel_offset)
{
/* A textarea is an INLINE_BLOCK containing a single