Commit Graph

10481 Commits (master)
 

Author SHA1 Message Date
HW 4cd63b71df bugfix, removed old test constant 12 years ago
HW b6d75b84ec Added widget abstraction framework
An example for using it:

--snip
require "widget"
require "font"

fb = einkfb.open("/dev/fb0")
G_width, G_height = fb:getSize()

dialog = CenterContainer:new({
        dimen = { w = G_width, h = G_height },
        VerticalGroup:new({
                align = "center",
                FrameContainer:new({
                        CenterContainer:new({
                                dimen = { w = 400, h = 200 },
                                TextWidget:new({
                                        text = "Hi there! jgVJV",
                                        face = Font:getFace("cfont", 30)
                                })
                        })
                }),
                ImageWidget:new({
                        file = "test.png"
                }),
                FrameContainer:new({
                        CenterContainer:new({
                                dimen = { w = 300, h = 200 },
                                TextWidget:new({
                                        text = "another box",
                                        face = Font:getFace("cfont", 30)
                                })
                        })
                })
        })
})

dialog:paintTo(fb.bb, 0, 0)

fb:refresh(0)

input.waitForEvent()
--snip
12 years ago
HW 38afb59b3f added interface to get blitbuffers from JPEG/PNG files
this is supposed to help us in the UI code.
12 years ago
HW e52b4808b1 fix typo 12 years ago
{Qingping,Dave} Hou 3bd8a8a2cf Merge pull request #111 from dpavlin/master
added reading of pan_margin settings
12 years ago
Dobrica Pavlinusic eeae5982dd added reading of pan_margin settings 12 years ago
Qingping Hou cde796f6b5 fix full screen refresh command, close #99 12 years ago
Qingping Hou c71f5c6f6a add: sleep and usleep in util module
Now using it in commands.lua
12 years ago
Qingping Hou db1b2cd01a fix: add back KEY_FW{LEFT,RIGHT} commands to NumInputBox 12 years ago
HW f905158b6a reverted removal of last-doc shortcut, introduced framework restart 12 years ago
HW 3022889088 kill our own child process. not quite finished.
we can now kill and wait for the slider watcher subprocess that we spawned.
However, it will have a subprocess itself, the lipc-wait-event process.
That one currently stays alive until it finally sends something.
12 years ago
HW c198f554e4 Merge pull request #110 from dpavlin/master
few more cleanups before release
12 years ago
HW e4841e88c4 added line spacing setting for crereader
this patch also introduces an interface for setFontSize and setStyleSheet.
Hopefully, we can use the latter to send customized CSS to CREngine
as Lua strings. This functionality is however untested for now.
12 years ago
Dobrica Pavlinusic a46dae3341 Merge branch 'master' of github.com:dpavlin/kindlepdfviewer 12 years ago
Dobrica Pavlinusic b6d167f8ca remove page:getPageText debug dump to improve performance on device
And leave it in unireader if we can't find text on page
12 years ago
Dobrica Pavlinusic 56ddad6a38 remove page:getPageText debug dump to improve performance on device 12 years ago
Dobrica Pavlinusic a65090025c display crash.log on error 12 years ago
Dobrica Pavlinusic ffa663d37d added few more keys to inputbox 12 years ago
Dobrica Pavlinusic 81c6dc5997 commands.map is very large, impacts startup performance on device 12 years ago
Dobrica Pavlinusic 96958c62ca added UniReader:screenOffset and use it 12 years ago
Dobrica Pavlinusic 4d49e9f28b correct two-column margin calculation respecting globalzoom 12 years ago
Dobrica Pavlinusic 0a8ca94218 make highlight working in all zoom modes #103
This change introduce object's dest_x and dest_y coordinates which
are needed in zoomedRectCoordTransform to make highlight scale and
move according to current pan position.
12 years ago
Dobrica Pavlinušić ef6ab7d0db Merge pull request #107 from houqp/master
show_overlap calculation bug in two column mode
12 years ago
Qingping Hou 3828a6c440 fix: clear show_overlap in two column mode on KEY_FW_{LEFT, RIGHT} 12 years ago
Qingping Hou cafa86a5bd fix condition in saveWaitForEvent()
add newline escape sequence.

close #106
12 years ago
Qingping Hou e0327ed4e8 fix: enable screen rotate in crereader.lua 12 years ago
Qingping Hou 75f244eb60 fix: typo in unireader 12 years ago
HW 57d769e0ae added wrapper function for input.waitForEvent that retries on EINTR 12 years ago
HW b11c5f414a highlighting: fixed segfault when there's no text on a PDF page
also, add a few more whitespace characters from the Unicode standard.
12 years ago
Qingping Hou 1407579ea8 mod: remove debug code 12 years ago
Qingping Hou 528d76aa60 Merge branch 'master' of github.com:hwhw/kindlepdfviewer 12 years ago
{Qingping,Dave} Hou 2407490284 Merge pull request #105 from houqp/master
bug fix in highlight code
12 years ago
Qingping Hou 3b4445a6dd Merge branch 'master' of github.com:hwhw/kindlepdfviewer 12 years ago
Qingping Hou dcd485c84c fix: bug in highlighting words
Properly highlight words that partially fit
into screen range.
12 years ago
Dobrica Pavlinušić e89750b379 Merge pull request #104 from houqp/master
API changes in highlighting code
12 years ago
Qingping Hou 3438d6749d mod: rewrite part of highlight code
* add _isEntireLineInScreenHeightRange() method
  For better page view navigation when highlighting
  or moving cursor.

* bug fix in _isWordInScreenRange() method

* add _nextGap(), _prevGap(), _gapInNextLine()
  and _gapInPrevLine() methods, so now key event
  handling code in cursor moving mode only focuses
  on drawing, calculation task is passed to these
  four methods.
12 years ago
Qingping Hou 75d5b5f984 fix: three bugs in highlight mode
* handle left end of first line in cursor move
* properly highlight first word if cursor starts
  from left end of first line
* handle right end of last line in cursor move
12 years ago
Qingping Hou 66ab3a2f56 fix: typo in unireader's comment 12 years ago
Qingping Hou 56d4700001 mod: changes APIs in highlighting code 12 years ago
HW face8b44c0 fixed cursor positioning 12 years ago
HW 46d197954b put highlight implementation into unireader 12 years ago
HW e772d9f0d7 turn back coordinates to be just in pt, not 0,01pt 12 years ago
HW 80a6e0210b add PDF text extraction (for pages)
this will return data in the way that djvu.c does already.
hopefully, this will permit us to re-use the highlighting code
(and factor it out into unireader.lua)
12 years ago
Dobrica Pavlinušić da6c2309d2 Merge pull request #101 from houqp/master
Fix for CREngine's build environment
12 years ago
Qingping Hou 0007a8677f fix: rm antiword in make clean 12 years ago
Qingping Hou e3f6bab9f1 mod: adapt Makefile to new kpvcrlib's CMake environment 12 years ago
Qingping Hou 3bf6860767 fix: a terrible mistake in kpvcrlib's CMakeLists.txt
add LINUX & _LINUX macro definition.

also stop building antiword.
12 years ago
Qingping Hou e42530bbc0 mod: set DrawBuf to 4bpp mode in cre.cpp 12 years ago
{Qingping,Dave} Hou 6158ac49f6 Merge pull request #100 from dpavlin/master
correctly dim part of page when hitting margins
12 years ago
Dobrica Pavlinusic b555596f42 correctly dim part of page when hitting margins 12 years ago