summaryrefslogtreecommitdiff
path: root/android/jni/mupdf.c
AgeCommit message (Collapse)Author
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-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-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-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-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-01-27Rename pdf_xref type to pdf_document.Tor Andersson
2012-01-20Update Android build to cope with removal of pdf_load_page_tree.Robin Watts
Just mirror the changes done in pdfdraw.
2012-01-19Remove confusing optional 'password' argument to pdf_open_xref.Tor Andersson
Require that clients call pdf_needs_password/pdf_authenticate_password instead. For dumb clients, we still allow for decrypting a file with a blank password without calling those functions.
2012-01-12Use the same coordinate system for pdf and xps pages in the interface.Tor Andersson
Move coordinate space tweaks into pdf_ and xps_run_page, and provide neutral pdf_ and xps_bound_page functions to return the page size as a zero-origined bounding box.
2012-01-12Fix android for previous glyph cache changes.Tor Andersson
2012-01-11Use enum for FZ_STORE_DEFAULT default size.Tor Andersson
2012-01-04Bug 692739: Add ability to abort time consuming actionsRobin Watts
A new 'cookie' parameter is added to page rendering/interpretation functions. Supply this as NULL to get existing behaviour. If you supply a non-NULL cookie, then this is taken as a pointer to a struct that can be used for simple, non-thread locked communication between caller and library. The entire struct should be memset to zero before entry, except for specific flags (thus coping with future extensions to this struct). The abort flag should be zero on entry. It will be checked periodically by the library - if the caller sets it non-zero (via another thread) then the current operation will be aborted. No guarantees are given as to how often this will be checked, or how fast it will be responded to. The progress_max field will be set to an integer (-1 for unknown) representing the number of 'things' to do. The progress field will count up from 0 to this number as time goes by. No guarantees are made as to the accuracy of this information, but it should be useful for offering some sort of progress bar etc. Note that progress_max may increase during the job. In general, callers should be careful to accept out of range or invalid data in this structure as this is deliberately accessed 'unlocked'.
2011-12-21Bring the Android demo port up to date.Robin Watts
Hadn't been updated to allow for context/exceptions.
2011-11-14ARM opts in draw_scale.c; updated android build opts.Robin Watts
Kammerer reports 90%+ of CPU time is spent in the image scaling code for his documents on Android. In this commit we provide ARM optimised cores for the common scaling routines (1/2/4 components). Tests indicate this doubles the speed of rendering for a bitmap heavy PDF file on an HTC desire. This code is included if ARCH_ARM is defined. If ARCH_THUMB is defined then extra instructions are added to ensure correct interworking. We also update the Android jni makefiles to set these defines. We update the ReadMe.txt with more explicit instructions and update with more modern ndk/sdk versions. We update build.xml in line with new sdk releases.
2011-07-05Fix bug 692276. Android not displaying pdf contents.Robin Watts
The calculation of the translation due to the mediabox/cropbox was wrong on android, causing nothing to be rendered.
2011-07-04Android build lifecycle tweaks; fix leaking.Robin Watts
If the app was hidden, and then restarted, it would leak lots of memory due to onCreate not only being called on create. To fix this, we armour the app a bit aginst such problems, including adding code to destroy the core when the app really is destroyed.
2011-06-01Fix android build; bug 692222.Robin Watts
Bring the MuPDF android build up to date with the latest source changes. Many thanks to Dominic Battre for his helpful report in bug 692222.
2011-04-04android: Conform to coding convention.Tor Andersson
Use tabs for indentation and no extra spaces to align stuff.
2011-04-04Le Roi est mort, vive le Roi!Tor Andersson
The run-together words are dead! Long live the underscores! The postscript inspired naming convention of using all run-together words has served us well, but it is now time for more readable code. In this commit I have also added the sed script, rename.sed, that I used to convert the source. Use it on your patches and application code.
2011-01-17Speed up android app rendering by reusing a display list, and rename some of ↵Robin Watts
the internal classes.
2010-12-02Import Android demo.Robin Watts