summaryrefslogtreecommitdiff
path: root/content/content_protected.h
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2020-05-23 20:38:41 +0100
committerVincent Sanders <vince@kyllikki.org>2020-05-23 23:00:08 +0100
commite65e41e2d6efccba983cd63aadfb10b5b4a935b2 (patch)
tree3833ea9b7bb989fd5c96d5d230b66b6d29a59794 /content/content_protected.h
parent36b9262e1481fc24d302b58f03006e733b2e6d16 (diff)
downloadnetsurf-e65e41e2d6efccba983cd63aadfb10b5b4a935b2.tar.gz
netsurf-e65e41e2d6efccba983cd63aadfb10b5b4a935b2.tar.bz2
move content handler specific selection copying into handlers
Diffstat (limited to 'content/content_protected.h')
-rw-r--r--content/content_protected.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/content/content_protected.h b/content/content_protected.h
index 9a3654beb..02bc8614d 100644
--- a/content/content_protected.h
+++ b/content/content_protected.h
@@ -47,6 +47,7 @@ struct browser_window_features;
struct textsearch_context;
struct box;
struct selection;
+struct selection_string;
typedef struct content_handler content_handler;
@@ -112,7 +113,10 @@ struct content_handler {
nserror (*textsearch_bounds)(struct content *c, unsigned start_idx, unsigned end_idx, struct box *start_ptr, struct box *end_ptr, struct rect *bounds_out);
/**
- * cause a region of the content to be marked invalid and hence redraw
+ * redraw an area of selected text
+ *
+ * The defined text selection will cause an area of the
+ * content to be marked as invalid and hence redrawn.
*
* \param c The content being redrawn
* \param start_idx The start index of the text region to be redrawn
@@ -122,6 +126,11 @@ struct content_handler {
nserror (*textselection_redraw)(struct content *c, unsigned start_idx, unsigned end_idx);
/**
+ * copy selected text into selection string possibly with formatting
+ */
+ nserror (*textselection_copy)(struct content *c, unsigned start_idx, unsigned end_idx, struct selection_string *selstr);
+
+ /**
* create a selection object
*/
nserror (*create_selection)(struct content *c, struct selection **sel_out);