summaryrefslogtreecommitdiff
path: root/android/jni
AgeCommit message (Collapse)Author
2013-01-30Fix Android build after rect/bbox changes.Robin Watts
2013-01-30Eliminate fz_bbox in favor of fz_rect everywhere.Tor Andersson
2013-01-26Android: Fix NullPointerException seen on Google PlayRobin Watts
According to Google Plays automated crash detection, we get a NullPointerException when trying to parse a null string as a Uri. This turns out to be caused by us trying to open a PDF attachment from gmail. This is because MuPDF is invoked with a content:// URL that does not have a file associated with it. Instead we can open that URL as an InputStream. Here we amend MuPDF to spot that case, and to open the InputStream, suck the data into a byteArray, and then to use that to open the file from.
2013-01-21Rename app.Robin Watts
Due to a clash on Google Play, we need to rename the apps main class from com.artifex.mupdf to something else. We choose com.artifex.mupdfdemo. Any user of the code in their own app should rename it similarly. To simplify this process we add some macros in the C. Various renames and lots of tedious package name editing is still required in the Java though.
2013-01-10Android: add core method returning the words on a pagePaul Gardiner
2012-12-13Android: add hooks to the app to handle GoToR linksPaul Gardiner
2012-12-05Android: rework link handlingPaul Gardiner
Remove unnecessary hitPageLink method from MuPDFCore and extend the handling of external links to the java classes
2012-11-29Fix a couple of leaksPaul Gardiner
2012-11-28Avoid calling interactive functions with a NULL idoc.Robin Watts
This solves the android build SEGVing on xps files such as ECMA-288.xps.
2012-11-28Android: add support for listbox and combobox form fieldsPaul Gardiner
2012-11-28Android: Allow multiple instances of MuPDF to run simultaneously.Robin Watts
Previously, we had assumed that we'd only ever have one MuPDFActivity running at once; this meant that we only had a single MuPDFCore, and that it was safe to hold the native libraries state in global variables. Unfortunately, it seems that if you launch MuPDF from the apps list, and open a file, then return to the home screen using 'Home' rather than 'Back', MuPDF is kept running in the background. Launching a PDF file from a file manager then starts a new MuPDFActivity and things get very confused. The solution implemented here is first to move all the MuPDF global variables into a 'globals' structure, and update the code to use this. Next, we allocate this structure on 'openFile', and free it on 'destroying'. Finally, we return the pointer to this structure as a java long from openFile, and store it in a private data pointer, globals. Each MuPDFCore native method can then retrieve the value of 'globals' and get the global state back. This means that every MuPDFCore native method must now be non-static (except isJavascriptSupported).
2012-11-27Android: fix accidently swapped title and message in alert dialogPaul Gardiner
2012-11-27Android: implement saving of form dataPaul Gardiner
2012-11-26Move xps_xml.c to base_xml.c in Android makefiles.Robin Watts
Missed from previous commit.
2012-11-22Hardwire AA_BITS to 8 on android build.Robin Watts
2012-11-21Android: Move draw_simple_scale.c back into Core.mkRobin Watts
By manually inserting a literal pool, we can avoid the need to split draw_simple_scale.c out.
2012-11-20Missed Core2.mk in the profiler commit.Robin Watts
Forgot to add a new file to git.
2012-11-19Enable android profiler build.Robin Watts
Requires android-ndk-profiler to be copied into android and android/jni. Also requires r8c of the NDK.
2012-11-19Android: implement alert dialogPaul Gardiner
2012-11-16Move text searching function into fitz.Tor Andersson
2012-11-09Android: restrict annotation updates to ones within the patch areaPaul Gardiner
2012-10-31android: avoid regeneration of annotation display list between updatesPaul Gardiner
Also add more detail to debug output
2012-10-31Android: cache only one page object for the sake of hq renderingPaul Gardiner
2012-10-31Android: use partial updates to speed rendering after interactionPaul Gardiner
2012-10-30Android: cache information for 3 pages in the corePaul Gardiner
2012-10-29Add fz_update_pagePaul Gardiner
Regenerate dirty appearance streams and report changed annotations since last call. Also include a partial revert of changes in 96f335bc, that turn out not to be necessary. fz_update_page must now be called between each document-changing event and the next render. pdfapp.c and the android app have been updated to do so, but do not yet take advantage of the possibility to render only the updated areas of the screen.
2012-10-25Update the android app to keep a separate display list for annotationsPaul Gardiner
2012-10-16Forms: avoid the need to reload the page on every changePaul Gardiner
Add pdf_update_annot, which is called before rendering an annotation, and checks that the annotation structure has correct information. There are three reasons the information can be out of date. Attributes of a field may have been changed such that its appearance stream needs updating. In this case the field will have have "Dirty" added to its dictionary The mouse may have changed state over the field, and a different appearance stream needs selecting. The annotation structure now records the mouse states for which the current appearance stream is acceptable. The field may have changed state as recorded by its "AS" value, and a different appearance stream needs selecting.
2012-10-11Android: support entry of text into formsPaul Gardiner
2012-10-11Android Forms: pass in mouse events and handle updatingPaul Gardiner
Also add a function to report whether the core has javascript support, so that the additional features can be enabled only when the javascript engine is present
2012-10-10android: v8 buildPaul Gardiner
2012-10-10Fix Android build.Robin Watts
Files had been added to project, but not to android makefiles. Thirdparty file paths needed updating in android makefiles. Rebuilding with the latest ndk (r8b) shows a problem due to a bug in the NDK. Work around this.
2012-09-18Forms: add event handling api and specifically support for javascript alertPaul Gardiner
2012-09-06Update android makefile to build with the newly merged forms code.Tor Andersson
2012-08-13Fix android build after last thirdparty updatePaul Gardiner
2012-05-11Split part of fz_document interface for pdf_document into separate file.Tor Andersson
Make a separate constructor function that does not link in the interpreter, so we can save space in the mubusy binary by not including the font and cmap resources.
2012-05-10Combine all small tools into mubusy and remove the separate executables.Tor Andersson
2012-04-23Minimize android ThirdParty.mk targets.Tor Andersson
2012-04-23Update build files for new thirdparty package with freetype 2.4.9.Tor Andersson
2012-03-15Android app: highlighting and inhibiting of linksPaul Gardiner
2012-03-13Merge master and pg_android branchesRobin Watts
Bring up to date with current APIs, including text device changes.
2012-03-13Rename some functions and accessors to be more consistent.Tor Andersson
Debug printing functions: debug -> print. Accessors: get noun attribute -> noun attribute. Find -> lookup when the returned value is not reference counted. pixmap_with_rect -> pixmap_with_bbox. We are reserving the word "find" to mean lookups that give ownership of objects to the caller. Lookup is used in other places where the ownership is not transferred, or simple values are returned. The rename is done by the sed script in scripts/rename3.sed
2012-02-20Update android app to use document interfaceRobin Watts
This adds XPS and CBZ support for free.
2012-02-20Updated MuPDF Android app from Paul Gardiner.Paul Gardiner
2012-02-13Remove arch_port.c from visual C solution/Android build.Robin Watts
File references escaped deletion in previous commit.
2012-02-11Purge unused and bit rotted fz_accelerate stuff, part 2.Tor Andersson
2012-02-09Update ios and Android projects with locking changes.Robin Watts
I forgot to update Android and iOS projects with the extra arg to fz_new_context. Fixed here.
2012-02-07Rename a few functions.Tor Andersson
2012-02-03Reference count fz_link objects.Tor Andersson
2012-01-30Move PNG, JPEG and TIFF image loading from muxps into fitz.Tor Andersson