diff options
Diffstat (limited to 'platform/java/mupdf_native.c')
-rw-r--r-- | platform/java/mupdf_native.c | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/platform/java/mupdf_native.c b/platform/java/mupdf_native.c index 890bc6b1..eda01ed9 100644 --- a/platform/java/mupdf_native.c +++ b/platform/java/mupdf_native.c @@ -8300,6 +8300,41 @@ FUN(PDFAnnotation_setAuthor)(JNIEnv *env, jobject self, jstring jauthor) jni_rethrow(env, ctx); } +JNIEXPORT jlong JNICALL +FUN(PDFAnnotation_getModificationDateNative)(JNIEnv *env, jobject self) +{ + fz_context *ctx = get_context(env); + pdf_annot *annot = from_PDFAnnotation(env, self); + jlong t; + + if (!ctx || !annot) return -1; + + fz_try(ctx) + t = pdf_annot_modification_date(ctx, annot); + fz_catch(ctx) + { + jni_rethrow(env, ctx); + return -1; + } + + return t * 1000; +} + +JNIEXPORT void JNICALL +FUN(PDFAnnotation_setModificationDate)(JNIEnv *env, jobject self, jlong time) +{ + fz_context *ctx = get_context(env); + pdf_annot *annot = from_PDFAnnotation(env, self); + + fz_try(ctx) + pdf_set_annot_modification_date(ctx, annot, time / 1000); + fz_catch(ctx) + { + jni_rethrow(env, ctx); + return; + } +} + JNIEXPORT jobject JNICALL FUN(PDFAnnotation_getRect)(JNIEnv *env, jobject self) { |