23#ifndef NETSURF_DESKTOP_SELECTION_H_
24#define NETSURF_DESKTOP_SELECTION_H_
void selection_drag_end(struct selection *s)
Handles completion of a drag operation.
bool selection_click(struct selection *s, struct browser_window *top, browser_mouse_state mouse, unsigned idx)
Handles mouse clicks (including drag starts) in or near a selection.
void selection_reinit(struct selection *s)
Initialise the selection object to use the given box subtree as its root, ie.
bool selection_highlighted(const struct selection *s, unsigned start, unsigned end, unsigned *start_idx, unsigned *end_idx)
Tests whether a text range lies partially within the selection, if there is a selection defined,...
bool selection_clear(struct selection *s, bool redraw)
Clears the current selection, optionally causing the screen to be updated.
struct selection * selection_create(struct content *c)
Creates a new selection object associated with a browser window.
void selection_init(struct selection *s)
Initialise the selection object to use the given box subtree as its root, ie.
bool selection_copy_to_clipboard(struct selection *s)
Copy the selected contents to the clipboard.
bool selection_dragging_start(struct selection *s)
void selection_track(struct selection *s, browser_mouse_state mouse, unsigned idx)
Handles movements related to the selection, eg.
bool selection_active(struct selection *s)
determine if a selecion is active
bool selection_dragging(struct selection *s)
void selection_set_position(struct selection *s, unsigned start, unsigned end)
Set the position of the current selection, updating the screen.
void selection_destroy(struct selection *s)
Destroys a selection object clearing it if nesessary.
bool selection_string_append(const char *text, size_t length, bool space, struct plot_font_style *style, struct selection_string *sel_string)
Append text to selection string.
void selection_select_all(struct selection *s)
Selects all the text within the box subtree controlled by this selection object, updating the screen ...
char * selection_get_copy(struct selection *s)
Get copy of selection as string.
Core mouse and pointer states.
browser_mouse_state
Mouse state.
Content which corresponds to a single URL.
static nserror text(const struct redraw_context *ctx, const struct plot_font_style *fstyle, int x, int y, const char *text, size_t length)
Text plotting.