diff options
author | Fred Ross-Perry <fross-perry@conceptuamath.com> | 2016-08-22 19:23:13 -0700 |
---|---|---|
committer | Fred Ross-Perry <fross-perry@conceptuamath.com> | 2016-08-23 08:55:22 -0700 |
commit | 9d304f9a3f7a9735974e31df45a0149bcdce2362 (patch) | |
tree | 1aa19d2a1d6938c1b9b557bd7368389e9f1e0972 | |
parent | cb375a3bd6a845fe0e3b8079358dc5c3bf3a994e (diff) | |
download | mupdf-9d304f9a3f7a9735974e31df45a0149bcdce2362.tar.xz |
Java - correct the JNI signatures for bbox fields in StructuredText inner classes.
-rw-r--r-- | platform/java/mupdf_native.c | 10 | ||||
-rw-r--r-- | platform/java/mupdf_native.h | 60 |
2 files changed, 65 insertions, 5 deletions
diff --git a/platform/java/mupdf_native.c b/platform/java/mupdf_native.c index 62855ac0..7759a7d0 100644 --- a/platform/java/mupdf_native.c +++ b/platform/java/mupdf_native.c @@ -467,22 +467,22 @@ static int find_fids(JNIEnv *env) cls_TextBlock = get_class(&err, env, PKG"StructuredText$TextBlock"); mid_TextBlock_init = get_method(&err, env, "<init>", "(L"PKG"StructuredText;)V"); - fid_TextBlock_bbox = get_field(&err, env, "bbox", PKG"Rect"); + fid_TextBlock_bbox = get_field(&err, env, "bbox", "L"PKG"Rect;"); fid_TextBlock_lines = get_field(&err, env, "lines", "[L"PKG"StructuredText$TextLine;"); cls_TextChar = get_class(&err, env, PKG"StructuredText$TextChar"); mid_TextChar_init = get_method(&err, env, "<init>", "(L"PKG"StructuredText;)V"); - fid_TextChar_bbox = get_field(&err, env, "bbox", PKG"Rect"); + fid_TextChar_bbox = get_field(&err, env, "bbox", "L"PKG"Rect;"); fid_TextChar_c = get_field(&err, env, "c", "I"); cls_TextLine = get_class(&err, env, PKG"StructuredText$TextLine"); mid_TextLine_init = get_method(&err, env, "<init>", "(L"PKG"StructuredText;)V"); - fid_TextLine_bbox = get_field(&err, env, "bbox", PKG"Rect"); + fid_TextLine_bbox = get_field(&err, env, "bbox", "L"PKG"Rect;"); fid_TextLine_spans = get_field(&err, env, "spans", "[L"PKG"StructuredText$TextSpan;"); cls_TextSpan = get_class(&err, env, PKG"StructuredText$TextSpan"); mid_TextSpan_init = get_method(&err, env, "<init>", "(L"PKG"StructuredText;)V"); - fid_TextSpan_bbox = get_field(&err, env, "bbox", PKG"Rect"); + fid_TextSpan_bbox = get_field(&err, env, "bbox", "L"PKG"Rect;"); fid_TextSpan_chars = get_field(&err, env, "chars", "[L"PKG"StructuredText$TextChar;"); cls_TextWalker = get_class(&err, env, PKG"TextWalker"); @@ -2301,7 +2301,7 @@ newNativeAndroidDrawDevice(JNIEnv *env, jobject self, fz_context *ctx, jobject o fz_try(ctx) { - LOGI("DrawDeviceNative: bitmap=%d,%d page=%d,%d->%d,%d patch=%d,%d->%d,%d", width, height, pageX0, pageY0, pageX1, pageY1, patchX0, patchY0, patchX1, patchY1); +// LOGI("DrawDeviceNative: bitmap=%d,%d page=%d,%d->%d,%d patch=%d,%d->%d,%d", width, height, pageX0, pageY0, pageX1, pageY1, patchX0, patchY0, patchX1, patchY1); /* Sanitise patch w.r.t page. */ if (patchX0 < pageX0) patchX0 = pageX0; diff --git a/platform/java/mupdf_native.h b/platform/java/mupdf_native.h index 8fb0ffac..e64885f6 100644 --- a/platform/java/mupdf_native.h +++ b/platform/java/mupdf_native.h @@ -2037,6 +2037,14 @@ JNIEXPORT jobject JNICALL Java_com_artifex_mupdf_fitz_Page_toStructuredText JNIEXPORT jobjectArray JNICALL Java_com_artifex_mupdf_fitz_Page_search (JNIEnv *, jobject, jstring); +/* + * Class: com_artifex_mupdf_fitz_Page + * Method: textAsHtml + * Signature: ()[B + */ +JNIEXPORT jbyteArray JNICALL Java_com_artifex_mupdf_fitz_Page_textAsHtml + (JNIEnv *, jobject); + #ifdef __cplusplus } #endif @@ -2536,6 +2544,58 @@ JNIEXPORT jobjectArray JNICALL Java_com_artifex_mupdf_fitz_StructuredText_highli JNIEXPORT jstring JNICALL Java_com_artifex_mupdf_fitz_StructuredText_copy (JNIEnv *, jobject, jobject); +/* + * Class: com_artifex_mupdf_fitz_StructuredText + * Method: getBlocks + * Signature: ()[Lcom/artifex/mupdf/fitz/StructuredText/TextBlock; + */ +JNIEXPORT jobjectArray JNICALL Java_com_artifex_mupdf_fitz_StructuredText_getBlocks + (JNIEnv *, jobject); + +#ifdef __cplusplus +} +#endif +#endif +/* Header for class com_artifex_mupdf_fitz_StructuredText_TextChar */ + +#ifndef _Included_com_artifex_mupdf_fitz_StructuredText_TextChar +#define _Included_com_artifex_mupdf_fitz_StructuredText_TextChar +#ifdef __cplusplus +extern "C" { +#endif +#ifdef __cplusplus +} +#endif +#endif +/* Header for class com_artifex_mupdf_fitz_StructuredText_TextSpan */ + +#ifndef _Included_com_artifex_mupdf_fitz_StructuredText_TextSpan +#define _Included_com_artifex_mupdf_fitz_StructuredText_TextSpan +#ifdef __cplusplus +extern "C" { +#endif +#ifdef __cplusplus +} +#endif +#endif +/* Header for class com_artifex_mupdf_fitz_StructuredText_TextLine */ + +#ifndef _Included_com_artifex_mupdf_fitz_StructuredText_TextLine +#define _Included_com_artifex_mupdf_fitz_StructuredText_TextLine +#ifdef __cplusplus +extern "C" { +#endif +#ifdef __cplusplus +} +#endif +#endif +/* Header for class com_artifex_mupdf_fitz_StructuredText_TextBlock */ + +#ifndef _Included_com_artifex_mupdf_fitz_StructuredText_TextBlock +#define _Included_com_artifex_mupdf_fitz_StructuredText_TextBlock +#ifdef __cplusplus +extern "C" { +#endif #ifdef __cplusplus } #endif |