summaryrefslogtreecommitdiff
path: root/fitz
diff options
context:
space:
mode:
authorPaul Gardiner <paulg.artifex@glidos.net>2013-02-22 12:20:33 +0000
committerPaul Gardiner <paulg.artifex@glidos.net>2013-02-22 12:20:33 +0000
commit5d15995814d4d99e44a860ae435659d9e30fad3b (patch)
tree65617f8c4c5819774b510eca4f388a279b67b329 /fitz
parent9d20a4f3a69fdea855f8678c1ad50b5db7472d81 (diff)
downloadmupdf-5d15995814d4d99e44a860ae435659d9e30fad3b.tar.xz
Add fz_get_annot_type
Diffstat (limited to 'fitz')
-rw-r--r--fitz/doc_interactive.c5
-rw-r--r--fitz/fitz-internal.h5
-rw-r--r--fitz/fitz.h34
3 files changed, 39 insertions, 5 deletions
diff --git a/fitz/doc_interactive.c b/fitz/doc_interactive.c
index ea08577d..db9fce87 100644
--- a/fitz/doc_interactive.c
+++ b/fitz/doc_interactive.c
@@ -81,6 +81,11 @@ void fz_choice_widget_set_value(fz_interactive *idoc, fz_widget *tw, int n, char
pdf_choice_widget_set_value((pdf_document *)idoc, tw, n, opts);
}
+fz_annot_type fz_get_annot_type(fz_annot *annot)
+{
+ return pdf_annot_type((pdf_annot *)annot);
+}
+
fz_annot *fz_create_annot(fz_interactive *idoc, fz_page *page, fz_annot_type type)
{
return (fz_annot *)pdf_create_annot((pdf_document *)idoc, (pdf_page *)page, type);
diff --git a/fitz/fitz-internal.h b/fitz/fitz-internal.h
index 75283a49..0c801ed2 100644
--- a/fitz/fitz-internal.h
+++ b/fitz/fitz-internal.h
@@ -1193,11 +1193,6 @@ fz_pixmap *fz_render_stroked_glyph(fz_context *ctx, fz_font*, int, const fz_matr
void fz_render_t3_glyph_direct(fz_context *ctx, fz_device *dev, fz_font *font, int gid, const fz_matrix *trm, void *gstate, int nestedDepth);
void fz_prepare_t3_glyph(fz_context *ctx, fz_font *font, int gid, int nestedDepth);
-typedef enum
-{
- FZ_ANNOT_STRIKEOUT
-} fz_annot_type;
-
/*
fz_create_annot: create a new annotation of the specified type on the
specified page. The returned pdf_annot structure is owned by the page
diff --git a/fitz/fitz.h b/fitz/fitz.h
index 156d271c..4c7022d4 100644
--- a/fitz/fitz.h
+++ b/fitz/fitz.h
@@ -2512,6 +2512,40 @@ fz_rect *fz_bound_page(fz_document *doc, fz_page *page, fz_rect *rect);
*/
typedef struct fz_annot_s fz_annot;
+typedef enum
+{
+ FZ_ANNOT_TEXT,
+ FZ_ANNOT_LINK,
+ FZ_ANNOT_FREETEXT,
+ FZ_ANNOT_LINE,
+ FZ_ANNOT_SQUARE,
+ FZ_ANNOT_CIRCLE,
+ FZ_ANNOT_POLYGON,
+ FZ_ANNOT_POLYLINE,
+ FZ_ANNOT_HIGHLIGHT,
+ FZ_ANNOT_UNDERLINE,
+ FZ_ANNOT_SQUIGGLY,
+ FZ_ANNOT_STRIKEOUT,
+ FZ_ANNOT_STAMP,
+ FZ_ANNOT_CARET,
+ FZ_ANNOT_INK,
+ FZ_ANNOT_POPUP,
+ FZ_ANNOT_FILEATTACHMENT,
+ FZ_ANNOT_SOUND,
+ FZ_ANNOT_MOVIE,
+ FZ_ANNOT_WIDGET,
+ FZ_ANNOT_SCREEN,
+ FZ_ANNOT_PRINTERMARK,
+ FZ_ANNOT_TRAPNET,
+ FZ_ANNOT_WATERMARK,
+ FZ_ANNOT_3D
+} fz_annot_type;
+
+/*
+ fz_get_annot_type: return the type of an annotation
+*/
+fz_annot_type fz_get_annot_type(fz_annot *annot);
+
/*
fz_first_annot: Return a pointer to the first annotation on a page.