int wsmoused(struct wsdisplay_softc *, caddr_t, int, struct proc *);
void motion_event(struct wsscreen *, u_int, int);
void button_event(struct wsscreen *, int, int);
int ctrl_event(struct wsdisplay_softc *, u_int, int, struct proc *);
void mouse_moverel(struct wsscreen *, int, int);
void inverse_char(struct wsscreen *, u_int);
void inverse_region(struct wsscreen *, u_int, u_int);
u_int skip_spc_right(struct wsscreen *, int);
u_int skip_spc_left(struct wsscreen *);
u_int skip_char_right(struct wsscreen *, u_int);
u_int skip_char_left(struct wsscreen *, u_int);
u_int class_cmp(struct wsscreen *, u_int, u_int);
void mouse_copy_start(struct wsscreen *);
void mouse_copy_word(struct wsscreen *);
void mouse_copy_line(struct wsscreen *);
void mouse_copy_end(struct wsscreen *);
void mouse_copy_extend(struct wsscreen *);
void mouse_copy_extend_char(struct wsscreen *);
void mouse_copy_extend_word(struct wsscreen *);
void mouse_copy_extend_line(struct wsscreen *);
void mouse_copy_extend_after(struct wsscreen *);
void mouse_hide(struct wsscreen *);
void remove_selection(struct wsscreen *);
void mouse_copy_selection(struct wsscreen *);
void mouse_paste(struct wsscreen *);
void mouse_zaxis(struct wsscreen *, int);
void allocate_copybuffer(struct wsdisplay_softc *);
void mouse_remove(struct wsscreen *);
#define NO_BORDER 0
#define BORDER 1
#define N_COLS(dconf) ((dconf)->scrdata->ncols)
#define N_ROWS(dconf) ((dconf)->scrdata->nrows)
#define WS_NCOLS(scr) N_COLS((scr)->scr_dconf)
#define WS_NROWS(scr) N_ROWS((scr)->scr_dconf)
#define MAXCOL(dconf) (N_COLS(dconf) - 1)
#define MAXROW(dconf) (N_ROWS(dconf) - 1)
#define GETCHAR(scr, pos, cellp) \
((*(scr)->sc->sc_accessops->getchar) \
((scr)->sc->sc_accesscookie, (pos) / N_COLS((scr)->scr_dconf), \
(pos) % N_COLS((scr)->scr_dconf), cellp))
#define PUTCHAR(dconf, pos, uc, attr) \
((*(dconf)->emulops->putchar) \
((dconf)->emulcookie, ((pos) / N_COLS(dconf)), \
((pos) % N_COLS(dconf)), (uc), (attr)))
#define MOUSE_COPY_BUTTON 0
#define MOUSE_PASTE_BUTTON 1
#define MOUSE_EXTEND_BUTTON 2
#define IS_ALPHANUM(c) ((c) != ' ')
#define IS_SPACE(c) ((c) == ' ')