ldoc fixes

reviewable/pr6807/r1
yparitcher 4 years ago
parent 433b82f162
commit 602e0b3feb

@ -20,7 +20,12 @@ format = 'markdown'
sort_modules = true sort_modules = true
file = { file = {
'../frontend', '../frontend',
'../plugins',
'../base/ffi', '../base/ffi',
'../platform/android/luajit-launcher/assets', '../platform/android/luajit-launcher/assets',
exclude = {'../base/ffi/sha2.lua'}, exclude = {'../base/ffi/sha2.lua',
'../plugins/evernote.koplugin/slt2.lua',
'../plugins/newsdownloader.koplugin/lib/handler.lua',
'../plugins/newsdownloader.koplugin/lib/xml.lua',
},
} }

@ -1,5 +1,28 @@
--[[-- --[[--
Dispatcher module This module is responsible for dispatching events.
To add a new action an entry must be added to `settingsList` & `dispatcher_menu_order`
This can also be done at runtime via @{registerAction}().
`settingsList` contains the list of dispatchable settings.
Each setting contains:
* category: one of:
* none: a direct event call
* arg: a event that expects a gesture object or an argument
* absolutenumber: event that sets a number
* incrementalnumber: event that increments a number & accepts a gesture object
* string: event with a list of arguments to chose from
* event: what to call.
* title: for use in ui.
* section: under which menu to display (currently: device, filemanager, rolling, paging)
and optionally
* min/max: for number
* default
* args: allowed values for string.
* toggle: display name for args
* separator: put a separator after in the menu list
--]]-- --]]--
local CreOptions = require("ui/data/creoptions") local CreOptions = require("ui/data/creoptions")
@ -15,25 +38,7 @@ local Dispatcher = {
initialized = false, initialized = false,
} }
--[[-- -- See above for description.
contains a list of a dispatchable settings
each setting contains:
category: one of
none: a direct event call
arg: a event that expects a gesture object or an argument
absolutenumber: event that sets a number
incrementalnumber: event that increments a number & accepts a gesture object
string: event with a list of arguments to chose from
event: what to call.
title: for use in ui.
section: under which menu to display (currently: device, filemanager, rolling, paging)
and optionally
min/max: for number
default
args: allowed values for string.
toggle: display name for args
separator: put a separator after in the menu list
--]]--
local settingsList = { local settingsList = {
-- Device settings -- Device settings
show_frontlight_dialog = { category="none", event="ShowFlDialog", title=_("Show frontlight dialog"), device=true, condition=Device:hasFrontlight(),}, show_frontlight_dialog = { category="none", event="ShowFlDialog", title=_("Show frontlight dialog"), device=true, condition=Device:hasFrontlight(),},
@ -322,10 +327,20 @@ function Dispatcher:init()
end end
--[[-- --[[--
add settings at runtime Adds settings at runtime.
@param name: the key to use in the table
@param value: a table per settingsList above. @usage
see helloworld plugin for an example. function Hello:onDispatcherRegisterActions()
Dispatcher:registerAction("helloworld_action", {category="none", event="HelloWorld", title=_("Hello World"), filemanager=true,})
end
function Hello:init()
self:onDispatcherRegisterActions()
end
@param name the key to use in the table
@param value a table per settingsList above
--]]-- --]]--
function Dispatcher:registerAction(name, value) function Dispatcher:registerAction(name, value)
if settingsList[name] == nil then if settingsList[name] == nil then

@ -1,10 +1,12 @@
--[[ --[[--
This module implements functions for loading, saving and editing calibre metadata files. This module implements functions for loading, saving and editing calibre metadata files.
Calibre uses JSON to store metadata on device after each wired transfer. Calibre uses JSON to store metadata on device after each wired transfer.
In wireless transfers calibre sends the same metadata to the client, which is in charge In wireless transfers calibre sends the same metadata to the client, which is in charge
of storing it. of storing it.
--]]
@module koplugin.calibre.metadata
--]]--
local rapidjson = require("rapidjson") local rapidjson = require("rapidjson")
local logger = require("logger") local logger = require("logger")

@ -1,3 +1,9 @@
--[[--
This is a debug plugin to test Plugin functionality.
@module koplugin.HelloWorld
--]]--
-- This is a debug plugin, remove the following if block to enable it -- This is a debug plugin, remove the following if block to enable it
if true then if true then
return { disabled = true, } return { disabled = true, }

Loading…
Cancel
Save