From ca8f110730ad5aadbc80a450a46de62c4004cbd1 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Thu, 22 Sep 2016 14:01:31 +0200 Subject: Clean up annotation enum names. Put them in the PDF name space and separate words with underscores. Remove redundant namespace prefixes in java constants. Device.FLAG_MASK rather than Device.FZ_DEVFLAG_MASK. Use namespace for PDF annotation flag enum. --- include/mupdf/fitz/annotation.h | 29 ------------------------ include/mupdf/pdf/annot.h | 49 ++++++++++++++++++++++++++++++++--------- 2 files changed, 39 insertions(+), 39 deletions(-) (limited to 'include') diff --git a/include/mupdf/fitz/annotation.h b/include/mupdf/fitz/annotation.h index a3120858..9864fd16 100644 --- a/include/mupdf/fitz/annotation.h +++ b/include/mupdf/fitz/annotation.h @@ -6,35 +6,6 @@ #include "mupdf/fitz/math.h" #include "mupdf/fitz/document.h" -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_new_annot: Create and initialize an annotation struct. */ diff --git a/include/mupdf/pdf/annot.h b/include/mupdf/pdf/annot.h index 499a56fc..a7a83348 100644 --- a/include/mupdf/pdf/annot.h +++ b/include/mupdf/pdf/annot.h @@ -1,18 +1,47 @@ #ifndef MUPDF_PDF_ANNOT_H #define MUPDF_PDF_ANNOT_H +typedef enum +{ + PDF_ANNOT_TEXT, + PDF_ANNOT_LINK, + PDF_ANNOT_FREE_TEXT, + PDF_ANNOT_LINE, + PDF_ANNOT_SQUARE, + PDF_ANNOT_CIRCLE, + PDF_ANNOT_POLYGON, + PDF_ANNOT_POLY_LINE, + PDF_ANNOT_HIGHLIGHT, + PDF_ANNOT_UNDERLINE, + PDF_ANNOT_SQUIGGLY, + PDF_ANNOT_STRIKE_OUT, + PDF_ANNOT_STAMP, + PDF_ANNOT_CARET, + PDF_ANNOT_INK, + PDF_ANNOT_POPUP, + PDF_ANNOT_FILE_ATTACHMENT, + PDF_ANNOT_SOUND, + PDF_ANNOT_MOVIE, + PDF_ANNOT_WIDGET, + PDF_ANNOT_SCREEN, + PDF_ANNOT_PRINTER_MARK, + PDF_ANNOT_TRAP_NET, + PDF_ANNOT_WATERMARK, + PDF_ANNOT_3D +} fz_annot_type; + enum { - F_Invisible = 1 << (1-1), - F_Hidden = 1 << (2-1), - F_Print = 1 << (3-1), - F_NoZoom = 1 << (4-1), - F_NoRotate = 1 << (5-1), - F_NoView = 1 << (6-1), - F_ReadOnly = 1 << (7-1), - F_Locked = 1 << (8-1), - F_ToggleNoView = 1 << (9-1), - F_LockedContents = 1 << (10-1) + PDF_ANNOT_IS_INVISIBLE = 1 << (1-1), + PDF_ANNOT_IS_HIDDEN = 1 << (2-1), + PDF_ANNOT_IS_PRINT = 1 << (3-1), + PDF_ANNOT_IS_NO_ZOOM = 1 << (4-1), + PDF_ANNOT_IS_NO_ROTATE = 1 << (5-1), + PDF_ANNOT_IS_NO_VIEW = 1 << (6-1), + PDF_ANNOT_IS_READ_ONLY = 1 << (7-1), + PDF_ANNOT_IS_LOCKED = 1 << (8-1), + PDF_ANNOT_IS_TOGGLE_NO_VIEW = 1 << (9-1), + PDF_ANNOT_IS_LOCKED_CONTENTS = 1 << (10-1) }; /* -- cgit v1.2.3