Multi-platform ebook reader

An ebook reader application supports PDF, DJVU, EPUB, FB2 and many more formats, running on Kindle, Kobo, PocketBook, Ubuntu Touch and Android devices.

Modules

apps.filemanager.filemanagerbookinfo This module provides a way to display book information (filename and book metadata)
apps.filemanager.filemanagerconverter This module is responsible for converting files.
apps.filemanager.filemanagerutil This module contains miscellaneous helper functions for FileManager
apps.filemanager.lib.md Stream Utils
apps.reader.modules.readerlink ReaderLink is an abstraction for document-specific link interfaces.
apps.reader.modules.readerview ReaderView module handles all the screen painting for document browsing.
depgraph DepGraph module.
device.gesturedetector This module detects gestures.
device.input An interface to get input events.
docsettings This module is responsible for reading and writing metadata.lua files in the so-called sidecar directory (Wikipedia definition).
document.documentregistry This is a registry for document providers
dump A simple serialization function which won't do uservalues, functions, or loops.
ffi.blitbuffer Generic blitbuffer/GFX stuff that works on memory buffers
ffi.framebuffer Framebuffer API.
ffi.freetype Freetype library interface (text rendering)
ffi.md5 MD5 hash library.
ffi.mupdf MuPDF API

This is a FFI wrapper for what was a Lua-based API in the past Some kind of C wrapper is needed for muPDF since muPDF uses a setjmp/longjmp based approach to error/exception handling.

ffi.png Module for PNG decoding/encoding.
ffi.sdl2_0 Module for interfacing SDL 2.0 video/input facilities
ffi.util Module for various utility functions.
ffi.zipwriter Zip packing workflow & code from luarocks' zip.lua : https://github.com/luarocks/luarocks/blob/master/src/luarocks/tools/zip.lua Modified to not require lua-zlib (we can wrap zlib with ffi) cf: http://luajit.org/extffitutorial.html, which uses zlib as an example ! Simplified to take filename and content from strings and not from disk
logger Logger module.
luadata Handles append-mostly data such as KOReader's bookmarks and dictionary search history.
luasettings This module handles generic settings as well as KOReader's global settings system.
optmath Simple math helper functions
random A set of functions to extend math.random and math.randomseed.
ui.downloadmgr This module displays a PathChooser widget to choose a download directory.
ui.event Events are messages that are passed through the widget tree

Events need a "name" attribute as minimal data.

ui.font Font module.
ui.geometry 2D Geometry utilities
ui.hook_container HookContainer allows listeners to register and unregister a hook for speakers to execute.
ui.menusorter This module is responsible for constructing the KOReader menu based on a list of menu_items and a separate menu order.
ui.plugin.background_task_plugin BackgroundTaskPlugin creates a plugin with a switch to enable or disable it and executes a background task.
ui.plugin.switch_plugin SwitchPlugin creates a plugin with a switch to enable or disable it.
ui.quickstart This module is responsible for generating the quickstart guide.
ui.rendertext Text rendering module.
ui.size This module provides a standardized set of sizes for use in widgets.
ui.timeval A simple module to module to compare and do arithmetic with time values.
ui.translator This module translates text using Google Translate.
ui.trapper Trapper module: provides methods for simple interaction with UI, without the need for explicit callbacks, for use by linear jobs between their steps.
ui.uimanager This module manages widgets.
ui.widget.bboxwidget BBoxWidget shows a bbox for page cropping.
ui.widget.button A button widget that shows text or an icon and handles callback when tapped.
ui.widget.checkbutton Button widget that shows a checkmark () when checked and an empty box () when unchecked.
ui.widget.checkmark Widget that shows a checkmark (), an empty box () or nothing of the same size.
ui.widget.closebutton Button widget that shows an "×" and handles closing window when tapped
ui.widget.confirmbox Widget that shows a confirmation alert with a message and Cancel/OK buttons

Example:

UIManager:show(ConfirmBox:new{
    text = _("Save the document?"),
    ok_text = _("Save"),  -- ok_text defaults to _("OK")
    ok_callback = function()
        -- save document
    end,
})

It is strongly recommended to set a custom ok_text describing the action to be confirmed, as demonstrated in the example above.

ui.widget.container.alphacontainer AlphaContainer will paint its content (1 widget) onto lower levels using a transparency (0..1)
ui.widget.container.bottomcontainer BottomContainer contains its content (1 widget) at the bottom of its own dimensions
ui.widget.container.centercontainer CenterContainer centers its content (1 widget) within its own dimensions
ui.widget.container.framecontainer A FrameContainer is some graphics content (1 widget) that is surrounded by a frame
ui.widget.container.inputcontainer An InputContainer is a WidgetContainer that handles user input events including multi touches and key presses.
ui.widget.container.leftcontainer LeftContainer aligns its content (1 widget) at the left of its own dimensions
ui.widget.container.rightcontainer RightContainer aligns its content (1 widget) at the right of its own dimensions
ui.widget.container.topcontainer TopContainer contains its content (1 widget) at the top of its own dimensions
ui.widget.container.underlinecontainer An UnderlineContainer is a WidgetContainer that is able to paint a line under its child node.
ui.widget.container.widgetcontainer WidgetContainer is a container for one or multiple Widgets.
ui.widget.eventlistener The EventListener is an interface that handles events.
ui.widget.horizontalgroup A layout widget that puts objects besides each other.
ui.widget.iconbutton Button with a big icon image! Designed for touch devices.
ui.widget.imageviewer ImageViewer displays an image with some simple manipulation options.
ui.widget.imagewidget

ImageWidget shows an image from a file or memory

Show image from file example:

UIManager:show(ImageWidget:new{
    file = "resources/info-i.png",
    -- Make sure alpha is set to true if png has transparent background
    -- alpha = true,
})

Show image from memory example:

UIManager:show(ImageWidget:new{
    -- bitmap_buffer should be a block of memory that holds the raw
    -- uncompressed bitmap.
ui.widget.infomessage Widget that displays an informational message.
ui.widget.inputdialog Widget for taking user input.
ui.widget.keyvaluepage Widget that presents a multi-page to show key value pairs.
ui.widget.linewidget Widget that displays a line.
ui.widget.listview Widget component that handles pagination for a list of items.
ui.widget.logindialog This widget displays a login dialog with a username and password.
ui.widget.menu Widget that displays a shortcut icon for menu item.
ui.widget.multiconfirmbox Widget that shows a message and cancel/choice1/choice2 buttons
ui.widget.networksetting Network setting widget.
ui.widget.notification Widget that displays a tiny notification at the top of the screen.
ui.widget.overlapgroup A layout widget that puts objects above each other.
ui.widget.progresswidget Widget for displaying progress bar.
ui.widget.scrolltextwidget Text widget with vertical scroll bar.
ui.widget.textboxwidget A TextWidget that handles long text wrapping
ui.widget.textviewer Displays some text in a scrollable view.
ui.widget.textwidget A TextWidget puts a string on a single line.
ui.widget.toggleswitch Displays a button that toggles between states.
ui.widget.touchmenu TouchMenu widget for hierarchical menus.
ui.widget.verticalgroup A layout widget that puts objects under each other.
ui.widget.widget This is a generic Widget interface, which is the base class for all other widgets.
util This module contains miscellaneous helper functions for the KOReader frontend.
version This module helps with retrieving version information.

Topics

Collaborating
DataStore.md
Development
Events.md
Hacking.md
Porting.md
README.md
Unit
generated by LDoc 1.4.6 Last updated 2017-10-08 14:57:40