summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorFred Ross-Perry <fred.ross-perry@artifex.com>2017-11-13 17:04:06 -0800
committerTor Andersson <tor.andersson@artifex.com>2017-11-22 23:09:51 +0100
commited28a166dace50d1a555689b9d5353e62a1b1e69 (patch)
tree67dca9996a83d5939b7e3e4a91da8685a4764291 /include
parent52b6e193ba376f46dec2ae3b8c316f2e08fefc13 (diff)
downloadmupdf-ed28a166dace50d1a555689b9d5353e62a1b1e69.tar.xz
jni/js: Use correct text encoding in annotation author and contents.
Also clarify that a copy of author/contents is returned, and that the caller must free them.
Diffstat (limited to 'include')
-rw-r--r--include/mupdf/pdf/annot.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/include/mupdf/pdf/annot.h b/include/mupdf/pdf/annot.h
index df068bc1..e03ded3f 100644
--- a/include/mupdf/pdf/annot.h
+++ b/include/mupdf/pdf/annot.h
@@ -144,6 +144,7 @@ int pdf_annot_has_interior_color(fz_context *ctx, pdf_annot *annot);
int pdf_annot_has_line_ending_styles(fz_context *ctx, pdf_annot *annot);
int pdf_annot_has_icon_name(fz_context *ctx, pdf_annot *annot);
int pdf_annot_has_open(fz_context *ctx, pdf_annot *annot);
+int pdf_annot_has_author(fz_context *ctx, pdf_annot *annot);
int pdf_annot_flags(fz_context *ctx, pdf_annot *annot);
void pdf_annot_rect(fz_context *ctx, pdf_annot *annot, fz_rect *rect);
@@ -184,19 +185,24 @@ void pdf_annot_vertex(fz_context *ctx, pdf_annot *annot, int i, float v[2]);
void pdf_set_text_annot_position(fz_context *ctx, pdf_annot *annot, fz_point pt);
/*
+ pdf_copy_annot_contents: return a copy of the contents of an annotation.
+*/
+char *pdf_copy_annot_contents(fz_context *ctx, pdf_annot *annot);
+
+/*
pdf_set_annot_contents: set the contents of an annotation.
*/
void pdf_set_annot_contents(fz_context *ctx, pdf_annot *annot, const char *text);
/*
- pdf_annot_contents: return the contents of an annotation.
+ pdf_copy_annot_author: return a copy of the author of an annotation.
*/
-const char *pdf_annot_contents(fz_context *ctx, pdf_annot *annot);
+char *pdf_copy_annot_author(fz_context *ctx, pdf_annot *annot);
/*
- pdf_annot_author: return the author of an annotation.
+ pdf_set_annot_author: set the author of an annotation.
*/
-const char *pdf_annot_author(fz_context *ctx, pdf_annot *annot);
+void pdf_set_annot_author(fz_context *ctx, pdf_annot *annot, const char *author);
/*
pdf_annot_author: return the date of an annotation.