move reader code into frontend/apps/reader

it makes more sense to completely separate the UI framework and
application code

also move frontend/ui/configurable.lua to frontend/configurable.lua
This commit is contained in:
Qingping Hou
2014-04-02 16:59:17 -04:00
parent 7ca851de21
commit 4b357c1466
35 changed files with 46 additions and 45 deletions

View File

@@ -2,7 +2,7 @@ local Cache = require("cache")
local CacheItem = require("cacheitem")
local KoptOptions = require("ui/data/koptoptions")
local Document = require("document/document")
local Configurable = require("ui/reader/configurable")
local Configurable = require("configurable")
local DrawContext = require("ffi/drawcontext")
local ffi = require("ffi")
ffi.cdef[[
@@ -125,7 +125,7 @@ function PdfDocument:getUsedBBox(pageno)
if used.y0 < 0 then used.y0 = 0 end
if used.y1 > pheight then used.y1 = pheight end
--@TODO give size for cacheitem? 02.12 2012 (houqp)
Cache:insert(hash, CacheItem:new{
Cache:insert(hash, CacheItem:new{
ubbox = used,
})
page:close()
@@ -140,7 +140,7 @@ function PdfDocument:getPageLinks(pageno)
end
local page = self._document:openPage(pageno)
local links = page:getPageLinks()
Cache:insert(hash, CacheItem:new{
Cache:insert(hash, CacheItem:new{
links = links,
})
page:close()