Commit Graph

174 Commits (bc191c1d9e8e838ca072a5e1376f52e87c37161b)

Author SHA1 Message Date
Dobrica Pavlinusic b555596f42 correctly dim part of page when hitting margins 12 years ago
Qingping Hou 7093e7377e fix: reset dc after screen rotate
handle ZOOM_FIT_TO_CONTENT_WIDTH_PAN mode
seperately.
12 years ago
Qingping Hou c85b768c0e switched shortcut between 10 degree and 90 degree rotation
* also deleted 10 degree rotation shortcut in
djvureader, becuase it is not supported by the
library.
12 years ago
Qingping Hou 95998a7397 add: NumInputBox class for goto page feature 12 years ago
HW 040a4e88b9 Merge pull request #95 from dpavlin/master
show overlap when moving with pan_by_page
12 years ago
HW 1c50a5676a free blitbuffers when cleaning complete cache 12 years ago
HW ec2eda0c05 switched font handling to only work with external fonts
now you can use a environment variable, FONTDIR, to point
to a font dir. Otherwise, "./fonts" is used by default.
Subdirectories are indexed.
12 years ago
Dobrica Pavlinusic 752da5ca3f use pan_overlap_vertical only in pan_by_page mode 12 years ago
Dobrica Pavlinusic 9dd9df0356 added dimRect and use it
dimRect might be useful if we want to display status messages over
content (as opposed to erasing background)
12 years ago
Dobrica Pavlinusic 5d9176907f show_overlap inverts part of page visible in previous view
This is nice feature of Sony e-book readers which is very useful when
reading since it shows previous part of visible page and provides
hint where to continue reading after page refresh
12 years ago
Qingping Hou ecd56a3745 mod: prefix global variables width and height with G_ 12 years ago
Qingping Hou 5f7f9a2a83 fix: remove slider event handling in unireader
Slider event handling has been moved to commands
module, refer to previous commit.
12 years ago
Qingping Hou b8b1bc19fd fix: wait for more time instead of suspending framework
refer to discussion in #88
12 years ago
Qingping Hou 245247b2d1 mod: use redrawCurrentPage() for all page redraw
different readers might have different way to redraw
pages, so I added this abstract method
12 years ago
Qingping Hou 1f9efe0d9c Merge branch 'master' into epub
Conflicts:
	Makefile
	unireader.lua
12 years ago
Qingping Hou cb83e47875 mod: use XPointer as absolute postion indicator inside document 12 years ago
Qingping Hou 9d11916bbd mod: resume framework in kpdf.sh 12 years ago
Qingping Hou 43288b55ec fix: handle zero used box 12 years ago
Qingping Hou 5e58a94632 mod: rm unused shortcuts in crereader 12 years ago
Qingping Hou a5a5c477ac mod: save and restore font face for each book in crereader 12 years ago
Qingping Hou c41e3e75a3 add: demo for fixing #85, #86 12 years ago
Qingping Hou c8a51bb4bd Merge branch 'master' into epub 12 years ago
Qingping Hou c48ed22fce fix: typo in drawOrCache() method 12 years ago
Qingping Hou 9e4b2675f0 Merge branch 'master' into epub
Conflicts:
	unireader.lua
12 years ago
Qingping Hou 0dd063b7ce Merge branch 'master' of github.com:hwhw/kindlepdfviewer
Conflicts:
	unireader.lua
12 years ago
Qingping Hou 8764b8aa4f fix: force freeing biltbuffer on cache evict
Also move cache display code above reading progress
code.
12 years ago
Dobrica Pavlinusic 244a6077ab cache_item_max_pixels is not used #79 12 years ago
Dobrica Pavlinušić fd8a7283c0 Merge pull request #83 from houqp/master
This should fix #78
12 years ago
Dobrica Pavlinusic 661c7be893 use @traycold code from #74 to show current mupdf cache usage 12 years ago
Qingping Hou dc30c491f7 add: Shift+R for manual full screen refresh
fix #78
12 years ago
Qingping Hou a035998b20 add: partial refresh configure entry in .readker.kpdfview.lua
fix #78
12 years ago
Dobrica Pavlinusic 5884f69b60 setCacheSize cleanup 12 years ago
Dobrica Pavlinusic 2754d996c4 move memory info to top of page
This allows section name to be displayed on bottom, and it won't push
memory info out of screen
12 years ago
Dobrica Pavlinusic 3e83dcc2a4 pass cache_document_size to document open
This is how mupdf API is structured
12 years ago
Dobrica Pavlinusic 4f0b41ebc5 show cache_current_memsize 12 years ago
Dobrica Pavlinusic 60b7ccb3cb added cleanCache bound to C key in menu #80 12 years ago
Dobrica Pavlinusic 91bd1277d7 control renderer memory usage #80
added setCacheSize and cache_document_size configuration vairable
12 years ago
Dobrica Pavlinusic 92ec4213c0 show djvu cache size #80
Currently it shows cache_max_memsize and cache_item_max_pixels from
lua and djvu cache size on menu key
12 years ago
Qingping Hou 37dfc84d5a fix: move commands initilization from global init to local
If we call addAllCommands in initGlobalSettings, all
the readers will share the same commands and we cannot
adjust commands for a specific reader. I thus moved this
method call to Unireader:init() method.
12 years ago
Qingping Hou 8a2b86e203 mod: factor last reading page saving and resotring 12 years ago
Qingping Hou 9b500189f2 Merge branch 'master' into epub 12 years ago
Qingping Hou ad9d13a947 mod: rename TOC to Toc, adapt showMenu to CREReader 12 years ago
Qingping Hou b09110a38d Merge branch 'djvu-highlight' into epub 12 years ago
Qingping Hou 4821f10dda half done demo for crengine 12 years ago
Dobrica Pavlinusic 69a8ee83bb specify multiple keys for single command #55
This code still doesn't support different modifiers on keys, but
I would rather refactor it in small steps first

Current changes adds support for Kindle 3 left page keys
reported by @houqp in issue #55
12 years ago
Dobrica Pavlinusic d3318beb84 print defined commands using dump 12 years ago
Qingping Hou d37e81ad0c Merge remote-tracking branch 'upstream/master' into djvu-highlight
Conflicts:
	unireader.lua
12 years ago
Qingping Hou 8159b24a46 add: simple highlight lists menu 12 years ago
Dobrica Pavlinusic 6886ae9830 exit reader with just Home as before #55 12 years ago
Qingping Hou 1113759972 fix: add virtual startHighLightMode method for all readers. 12 years ago
Qingping Hou 81a1f3d366 demo of text highlight
* text selection
* highlight save and restore
12 years ago
Qingping Hou 7c81f60a58 rewrite highlight again :( finished the cursor part 12 years ago
Qingping Hou 9aa9bc802f mod: add highlight after merged command module 12 years ago
Qingping Hou 46f171df3b Merge branch 'master' of github.com:hwhw/kindlepdfviewer into djvu-highlight
Conflicts:
	unireader.lua
12 years ago
Qingping Hou 1e2d7f62ac record and save highlight table 12 years ago
traycold bfcad367bb using font module for getting fonts (commit f95231d789)
renamed function names using camelCase (issue #62)
12 years ago
traycold fd6c6dbe60 Merge remote branch 'hwhw/master'
* hwhw/master:
  Password input, handling for broken documents
  factored pages count out, better error and password handling
  factored pages counter out of document struct
12 years ago
Qingping Hou a185f238eb mod: rewrite highlight feature 12 years ago
Qingping Hou f4ea1cdb62 Merge branch 'master' of github.com:hwhw/kindlepdfviewer into djvu-highlight
Conflicts:
	blitbuffer.c
	unireader.lua
12 years ago
HW 7e3e38be62 Password input, handling for broken documents 12 years ago
traycold 3d2a748aee Merge remote branch 'hwhw/master'
* hwhw/master:
  fix a Lua 5.0 syntax that was deprecated in 5.1
  separate DC out of pdf.c and djvu.c (cleanup)
  removed obsolete page rotation handling, closes #70
  allow easier customization of toolchain for libdjvu
  fix: remove page number checking in displaying TOC
  fix: handle LPGBCK and LPGFWD in selectmenu
12 years ago
HW 9ee7afa86d separate DC out of pdf.c and djvu.c (cleanup) 12 years ago
Qingping Hou e7f0a8bddb mod: rewrite highlight feature
waiting for integrate test with cursor support
12 years ago
Qingping Hou 84c8230730 POC of text highlight in current page! 12 years ago
Qingping Hou c8f87d5661 fix: remove page number checking in displaying TOC
Former showTOC() method checks the page number in each
entry and only display entry whose page number is greater
than the previous one. However, I think this is too
"clever", we should better leave the TOC untouched to keep
consistent with other pdf readers.
12 years ago
traycold 496ab3720e small bugfix 12 years ago
traycold 943b511b7c complete implementation of issue #55
created a help page
12 years ago
traycold abf9696221 Merge branch 'master' of git://github.com/hwhw/kindlepdfviewer.git
Conflicts:
	reader.lua
	unireader.lua
12 years ago
Qingping Hou 56a00d79a0 mod: delete debug print 12 years ago
Qingping Hou 46cfd950c7 fix: typo 12 years ago
Qingping Hou 8c31dd3c5f fix: hanlde offset in ZOOM_FIT_TO_WIDTH_PAN mode
ZOOM_FIT_TO_WIDTH_PAN mode must be handled differently.
Because not like other zoom mode, its offset is not set
to middle of the screen or page.
12 years ago
Qingping Hou 734f94da89 fix: handle positive self.offset in draworcache method 12 years ago
HW 8410ac5cb7 fix forgotten corner case when caching 12 years ago
HW aab05c3002 Fix page caching
Fixed page caching. Cache strategy is the following:
prio 1: cache/render requested area
prio 2: cache/render as much of the current page as possible
prio 3: cache/render full page
prio 4: render next page

This is still a bit buggy when in fit-to-content mode.
12 years ago
HW 86ff74acd6 prepare for more elaborate caching policy
we allow for bigger render buffers, so the cache now returns
the ID (hash) of the relevant cashed tile PLUS offsets into that
tile, pointing to the coordinates where the requested frame
has its origin.
12 years ago
Qingping Hou 0e914c5fda revert 70b7e029d3 again
commit 5fae18298a mistakenly
reverted d8a58e8764, in which
commit 70b7e029d3 was reverted.
12 years ago
Qingping Hou 5fae18298a add: goto input box in reader 12 years ago
Dobrica Pavlinusic d8a58e8764 revert 70b7e029d3
It's not that simple since ZOOM_FIT_TO_CONTENT_HALF_WIDTH also
needs bounding boxes, and this seems like over-optimization
which seems to be bug infested especially because it deals
with negative numbers so code just *looks* wrong
12 years ago
Dobrica Pavlinusic 7ee77dee5c removed duplicate code 12 years ago
Qingping Hou 7389255503 fix: handle last section in getTOCTitleByPage() 12 years ago
traycold 3fbb39fc05 Proof of concept for issue #55.
Still to be completed.
12 years ago
Qingping Hou f95231d789 add: status bar in reading menu & font.lua
* Since fontchooser is replaced by selectmenu, it
is no longer needed. So I rewrite it into font.lua
module which can cache faces that shared among all
UIs.

* add progressBar method in graphics.lua to draw
reading progress.

* add reading progress information in reading menu.
It is just a demo. Should be clean up in next release
when the real reading menu is out. :)
12 years ago
Qingping Hou 319826c385 mod: screen rotation implemented by ioctl
Now you get a instance rotate :) With only one bug.
I have to restore to previous rotation state of the
native system after exists. Because the native system
does poll the new rotation state that changed by ioctl.

Currently, I don't know how to force the native system
to detect the changes.
12 years ago
Qingping Hou f795bda6e0 mod: read cache settings from .reader.kpdfview.lua 12 years ago
Qingping Hou 70b7e029d3 mod: only get usedBBox in fit to content mode
make fit to page mode a little bit faster
12 years ago
Qingping Hou d2aaf15dce add: screen.lua
* move rotation mode to global variable, now check rotation
with Screen.cur_rotation_mode

* move screenRotate to screen module so other UIs can use it.
12 years ago
Qingping Hou 3dbf9877bc add: 90 degree rotation support
demo for issue #51
12 years ago
Qingping Hou 3474e56d30 fix: check key mode properly for manual crop 12 years ago
Dobrica Pavlinusic 4bc0bca413 store globalzoom and globalzoommode settings 12 years ago
Dobrica Pavlinusic 4d7fa2d12f Alt+Z to toggle bbox cropping 12 years ago
Dobrica Pavlinusic c2f2e617ad correct bbox loading and Shift+Z removes page bbox
this moves #35 a *little* bit closer to release ;-)
12 years ago
Dobrica Pavlinusic 9575d23f63 save bbox layout
inspired by f79ae48de8
12 years ago
Dobrica Pavlinusic 0c7eb32d48 Merge branch 'master' into 35_manual_crop 12 years ago
Dobrica Pavlinusic fdca464b96 don't pre-cache next page if we are going to modify bbox 12 years ago
Dobrica Pavlinusic f62a12a629 more debugging output for secting bboxes 12 years ago
Qingping Hou bf267ef0ef mod: add ZOOM_FIT_TO_CONTENT_WIDTH_PAN mode
This mode is used with ZOOM_FIT_TO_CONTENT_WIDTH, so
when press KEY_PGFWD, you jump to lower part of current
page. When hit page bottom, you do a real page turn. It
now behaviors the same like the native reader as I
mentioned in issue #41.

The first time you set to ZOOM_FIT_TO_CONTENT_WIDTH mode,
the reader will setup proper zoom factor and offset, then
switch to ZOOM_FIT_TO_CONTENT_WIDTH_PAN mode. When you hit
the page bottom, the reader will set the mode back to
ZOOM_FIT_TO_CONTENT_WIDTH mode and do a real page turn.
12 years ago
Qingping Hou f79ae48de8 add: UniReader:initGlobalSettings()
Use this method to read settings that may shared
among all readers. For instance, pan_overlap_vertical
12 years ago
Qingping Hou 68b94fa337 mod: code clean up for KEY_2 to KEY_9 bindings
inspired by commit:
796b42cc36
12 years ago
Qingping Hou 2ca5f2302c fix: set offset to top in unireader
set offset to top even usedbox is larger than
or equal to pagesize.
12 years ago
Qingping Hou dce80b7b1c mod: change default offset in fit_page_width/height mode
set to the top of page
12 years ago