Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search




Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Thank You for your continued support and contributions!

+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Plugins/Viewers
| | |-+  LUA Script Prints full API list
« previous next »
  • Print
Pages: [1]

Author Topic: LUA Script Prints full API list  (Read 1171 times)

Offline Bilgus

  • Developer
  • Member
  • *
  • Posts: 330
LUA Script Prints full API list
« on: August 28, 2017, 12:55:27 AM »
Currently we provide a small Lua script for printing the RB API for RBLUA
https://www.rockbox.org/wiki/PluginLua#API

Here is a longer script that gives you all the builtin lua tables and functions in addition to the RB API

I find it very helpful to have a list of all the available functions, strings, etc.

Code: [Select]
--RB LUA show all global variables; BILGUS
require "actions"
require "buttons"

local function a2m_m2a(addr_member)
--turns members into addresses; addresses back into members
return addr_member
end

local function dtTag(sType)
--convert named type; 'number'.. to short type '[n]...'
--if '?' supplied print out datatype key; number = [n]...
local retType = "?"
local typ = {
["nil"] = "nil",
["boolean"]  = "b",
["number"] = "n",
["string"] = "s",
["userdata"] = "u",
["function"] = "f",
["thread"] = "thr",
["table"] = "t"
}
if sType == "?" then retType = "Datatypes: " end
for k,v in pairs(typ) do
if sType == k then
retType = v break
elseif (sType == "?") then
retType = retType .. "  [" ..v.. "] = " .. k
end
end
return " [" ..retType.. "] "
end

local function tableByName(tName)
--find the longest match possible to an actual table
--Name comes in as (table) tName.var so we can pass back out the name found PITA
--returns the table found (key and value)
local ld = {}
local sMatch = ""
local kMatch = nil
local vMatch = nil

----FUNCTIONS for tableByName -----------------------------------------------------
local function search4Str(n, k, v)
local sKey = tostring(k)
if string.find (n, sKey,1,true) then
if sKey:len() > sMatch:len() then sMatch = sKey kMatch = k  vMatch = v end
--find the longest match we can
end
end
----END FUNCTIONS for tableByName -------------------------------------------------

if tName.val ~= nil and tName.val ~= "" then
for k, v in pairs(_G) do
        --_G check both since some tables are only in _G or package.loaded
search4Str(tName.val, k, v)
end
for k, v in pairs(package.loaded) do --package.loaded
search4Str(tName.val, k, v)
end
if not string.find (sMatch, "_G",1,true) then sMatch = "_G." .. sMatch end
        -- put the root _G in if not exist
if kMatch and vMatch then ld[kMatch] = vMatch tName.val = sMatch return ld end
end
tName.val = "_G"
return package.loaded --Not Found return default
end

local function dump_Tables(tBase, sFunc, tSeen, tRet)
--Based on: http://www.lua.org/cgi-bin/demo?globals
--Recurse through tBase tables copying all found Tables
local sSep=""
local ld={}

if sFunc ~= "" then sSep = "." end

for k, v in pairs(tBase) do
k = tostring(k)
    if k ~= "loaded" and type(v) == "table" and not tSeen[v] then
tSeen[v]=sFunc
tRet[sFunc..sSep .. k] = a2m_m2a(v) --place all keys into ld[i]=value
dump_Tables(v, sFunc .. sSep .. k, tSeen, tRet)
end
end
end

local function dump_Functions(tBase)
--Based on: http://www.lua.org/cgi-bin/demo?globals
--We already recursed through tBase copying all found tables
--we look up the table by name and then (ab)use a2m_m2a() to load the address
--after finding the table by address in tBase we will
        --put the table address of tFuncs in its place

for k,v in pairs(tBase) do
local tTable = a2m_m2a(v)
local tFuncs = {}

for key, val in pairs(tTable) do
if key ~= "loaded" then
tFuncs[dtTag(type(val)) .. tostring(key) ]= val
                --put the name and value in our tFuncs table
end
end
tBase[k] = a2m_m2a(tFuncs) -- copy the address back to tBase
end

end

local function get_common_branches(t, tRet)
--load t 'names(values)' into keys
--strip off long paths then iterate value if it exists
--local tRet={}
local sBranch = ""
local tName
for k in pairs(t) do
tName={["val"]=k}
tableByName(tName)
sBranch = tName.val
if tRet[sBranch] == nil then
tRet[sBranch] = 1 --first instance of this branch
else
tRet[sBranch] = tRet[sBranch] + 1
end
end
end

local function pairsByPairs (t, tkSorted)
--tkSorted should be an already sorted (i)table with t[keys] in the values
--https://www.lua.org/pil/19.3.html
--!!Note: table sort default function does not like numbers as [KEY]!!
--see *sortbyKeys*cmp_alphanum*

local i = 0      -- iterator variable
local iter = function ()   -- iterator function
i = i + 1
if tkSorted[i] == nil then return nil
else return tkSorted[i], t[tkSorted[i]]
end
end
return iter
end

local function sortbyKeys(t, tkSorted)
--loads keys of (t) into values of tkSorted
--and then sorts them
--tkSorted has integer keys (see ipairs)
----FUNCTIONS for sortByKeys -------------
local cmp_alphanum = function (op1, op2)
local type1= type(op1)
local type2 = type(op2)
if type1 ~= type2 then
return type1 < type2
else
return op1 < op2
end
end
----END FUNCTIONS for sortByKeys ---------
for n in pairs(t) do table.insert(tkSorted, n) end
table.sort(tkSorted, cmp_alphanum)--table.sort(tkSorted)
end

local function funcprint(strName, value)
        local sType = type(value)
        local sVal = ""
        local sHex = ""
--strName = tostring(strName)

if nil ~= string.find (";string;number;userdata;boolean;", sType, 1, true) then
        --If any of the above types print the contents of variable
sVal = tostring(value)

        if type(value) == "number" then
            sHex = " = 0x" .. string.format("%x", value)       
        else
            sHex = ""
            sVal = string.gsub(sVal, "\n", "\\n") --replace newline with \n
        end

return "\t" ..strName .." : " ..sVal .. sHex .. "\r\n"
else
return  "\t"..strName.."\r\n"
end
end

local function errorHandler( err )
    file:write(" ERROR:" .. err .. "\n")
end


------------MAIN----------------------------------------------------------------
local tSeen= {}
local tcBase = {}
local tkSortCbase = {}
local tMods= {}
local tkSortMods = {}
        local n = 0

    file = io.open('/rblua.txt', "w+") --overwrite
    file:write ("*Loaded Modules* \n")

    xpcall( function()
                dump_Tables(tableByName({["val"] = "_G"}),"", tSeen, tMods)
                --you can put a table name here if you just wanted to display
                --only its items, ex. "os" or "rb" or "io"
                --However, it has to be accessible directly from _G
                --so "rb.actions" wouldn't return anything since its technically
                --enumerated through _G.rb
            end , errorHandler )
tSeen = nil

    xpcall( function()dump_Functions(tMods)end , errorHandler )

    get_common_branches(tMods, tcBase)

    sortbyKeys(tcBase, tkSortCbase)
    sortbyKeys(tMods, tkSortMods)

    for k, v in pairsByPairs(tcBase, tkSortCbase ) do
n = n + 1
        if n == 1 then
            file:write (tostring(k))
        else
            file:write (", " .. tostring(k))
        end
        if n >= 3 then
n = 0
file:write ("\r\n")
end
end
tcBase= nil tkSortCbase= nil
    file:write ("\r\n" .. dtTag("?") .. "\r\n\r\n" .. "Functions: \r\n")

    n = 0
for key, val in pairsByPairs(tMods, tkSortMods) do
strName=tostring(key)
local tkSorted = {}
    local tFuncs = a2m_m2a(val)
sortbyKeys(tFuncs, tkSorted)

        file:write ("\r\n" .. tostring(key) .. "\r\n")

for k, v in pairsByPairs(tFuncs, tkSorted) do
            n = n + 1
            file:write (funcprint(k,v))
        end
end
    file:write ("\r\n\r\n" .. n .. " Items Found \r\n")
    file:close()

Sample Output:
Code: [Select]
*Loaded Modules*
_G, _G.actions, _G.bit
_G.buttons, _G.coroutine, _G.io
_G.luadir, _G.math, _G.os
_G.package, _G.string, _G.table

 [Datatypes:   [n] = number  [nil] = nil  [u] = userdata  [t] = table  [s] = string  [f] = function  [b] = boolean  [thr] = thread]

Functions:

_G
[f] assert
[f] collectgarbage
[f] dofile
[f] error
[f] gcinfo
[f] getfenv
[f] getmetatable
[f] ipairs
[f] load
[f] loadfile
[f] loadstring
[f] module
[f] newproxy
[f] next
[f] pairs
[f] pcall
[f] rawequal
[f] rawget
[f] rawset
[f] require
[f] select
[f] setfenv
[f] setmetatable
[f] tonumber
[f] tostring
[f] type
[f] unpack
[f] xpcall
[s] _VERSION : Lua 5.1
[t] _G
[t] bit
[t] coroutine
[t] io
[t] luadir
[t] math
[t] os
[t] package
[t] rb
[t] string
[t] table
[u] file : file (1)

_G.bit
[f] arshift
[f] band
[f] bnot
[f] bor
[f] bxor
[f] lshift
[f] rshift
[n] bits : 32 = 0x20

_G.coroutine
[f] create
[f] resume
[f] running
[f] status
[f] wrap
[f] yield

_G.io
[f] close
[f] input
[f] lines
[f] open
[f] output
[f] read
[f] type
[f] write

_G.luadir
[f] dir
[f] mkdir
[f] rmdir

_G.math
[f] abs
[f] ceil
[f] deg
[f] floor
[f] fmod
[f] max
[f] min
[f] rad
[f] random
[f] randomseed

_G.os
[f] date
[f] exit
[f] remove
[f] rename
[f] time

_G.package
[f] seeall
[s] config : /\n;\n?\n!\n-
[s] path : $/?.lua;$/?/init.lua;/.rockbox/rocks/viewers/lua/?.lua;/.rockbox/rocks/viewers/lua/?/init.lua;
[t] loaders
[t] preload

_G.package.loaders
[f] 1
[f] 2

_G.package.preload

_G.rb
[f] action_userabort
[f] atoi
[f] audio_ff_rewind
[f] audio_flush_and_reload_tracks
[f] audio_get_file_pos
[f] audio_next
[f] audio_pause
[f] audio_prev
[f] audio_resume
[f] audio_set_input_source
[f] audio_set_output_source
[f] audio_set_recording_gain
[f] audio_status
[f] audio_stop
[f] backlight_force_on
[f] backlight_off
[f] backlight_on
[f] backlight_set_timeout
[f] backlight_set_timeout_plugged
[f] backlight_use_settings
[f] battery_level
[f] battery_level_safe
[f] battery_time
[f] battery_voltage
[f] beep_play
[f] buf_handle_offset
[f] buf_set_base_handle
[f] buf_used
[f] bufadvance
[f] bufclose
[f] bufcuttail
[f] bufseek
[f] button_clear_queue
[f] button_get
[f] button_get_w_tmo
[f] button_queue_count
[f] button_status
[f] charger_inserted
[f] charging_state
[f] clear_viewport
[f] codec_close
[f] codec_run_proc
[f] commit_dcache
[f] commit_discard_dcache
[f] commit_discard_idcache
[f] create_numbered_filename
[f] current_path
[f] current_tick
[f] default_event_handler
[f] dir_exists
[f] do_menu
[f] dsp_dither_enable
[f] dsp_eq_enable
[f] dsp_set_crossfeed_type
[f] file_exists
[f] filetype_get_attr
[f] font_getstringsize
[f] font_load
[f] font_unload
[f] get_action
[f] get_codec_filename
[f] get_codepage_name
[f] get_plugin_action
[f] gui_syncyesno_run
[f] is_backlight_on
[f] iso_decode
[f] kbd_input
[f] keyclick_click
[f] lcd_clear_display
[f] lcd_drawline
[f] lcd_drawpixel
[f] lcd_drawrect
[f] lcd_fillrect
[f] lcd_framebuffer
[f] lcd_get_drawmode
[f] lcd_hline
[f] lcd_mono_bitmap
[f] lcd_mono_bitmap_part
[f] lcd_puts
[f] lcd_puts_scroll
[f] lcd_putsxy
[f] lcd_scroll_stop
[f] lcd_set_contrast
[f] lcd_set_drawmode
[f] lcd_set_invert_display
[f] lcd_setfont
[f] lcd_update
[f] lcd_update_rect
[f] lcd_vline
[f] led
[f] mixer_get_frequency
[f] mixer_set_frequency
[f] new_image
[f] open_utf8
[f] pcm_apply_settings
[f] pcm_close_recording
[f] pcm_get_bytes_waiting
[f] pcm_init_recording
[f] pcm_is_paused
[f] pcm_is_playing
[f] pcm_play_lock
[f] pcm_play_pause
[f] pcm_play_stop
[f] pcm_play_unlock
[f] pcm_set_frequency
[f] pcm_stop_recording
[f] playlist_add
[f] playlist_amount
[f] playlist_create
[f] playlist_insert_directory
[f] playlist_insert_track
[f] playlist_remove_all_tracks
[f] playlist_resume
[f] playlist_resume_track
[f] playlist_shuffle
[f] playlist_start
[f] playlist_sync
[f] plugin_get_current_filename
[f] plugin_release_audio_buffer
[f] rand
[f] read_bmp_file
[f] reload_directory
[f] remove
[f] rename
[f] reset_poweroff_timer
[f] set_current_file
[f] set_dirfilter
[f] set_viewport
[f] settings_save
[f] show_logo
[f] sim_lcd_ex_update_rect
[f] sleep
[f] sound_default
[f] sound_max
[f] sound_min
[f] sound_numdecimals
[f] sound_set
[f] sound_unit
[f] sound_val2phys
[f] splash
[f] srand
[f] storage_sleep
[f] storage_spin
[f] storage_spindown
[f] strcasecmp
[f] strcat
[f] strchr
[f] strcmp
[f] strcpy
[f] strip_extension
[f] strlcat
[f] strlcpy
[f] strlen
[f] strncasecmp
[f] strrchr
[f] talk_disable
[f] thread_exit
[f] thread_self
[f] thread_set_priority
[f] thread_thaw
[f] thread_wait
[f] timer_set_period
[f] timer_unregister
[f] usb_acknowledge
[f] usb_inserted
[f] utf16BEdecode
[f] utf16LEdecode
[f] utf8encode
[f] utf8length
[f] utf8seek
[f] yield
[n] FONT_SYSFIXED : -1 = 0xffffffff
[n] FONT_UI : 12 = 0xc
[n] HZ : 100 = 0x64
[n] LCD_DEPTH : 1 = 0x1
[n] LCD_HEIGHT : 64 = 0x40
[n] LCD_WIDTH : 128 = 0x80
[n] PLAYLIST_INSERT : -2 = 0xfffffffe
[n] PLAYLIST_INSERT_FIRST : -4 = 0xfffffffc
[n] PLAYLIST_INSERT_LAST : -3 = 0xfffffffd
[n] PLAYLIST_INSERT_LAST_SHUFFLED : -7 = 0xfffffff9
[n] PLAYLIST_INSERT_SHUFFLED : -5 = 0xfffffffb
[n] PLAYLIST_PREPEND : -1 = 0xffffffff
[n] PLAYLIST_REPLACE : -6 = 0xfffffffa
[n] SCREEN_MAIN : 0 = 0x0
[s] HOME_DIR : /
[s] PLUGIN_APPS_DATA_DIR : /.rockbox/rocks/apps
[s] PLUGIN_DATA_DIR : /.rockbox/rocks
[s] PLUGIN_DIR : /.rockbox/rocks
[s] PLUGIN_GAMES_DATA_DIR : /.rockbox/rocks/games
[s] ROCKBOX_DIR : /.rockbox
[s] VIEWERS_DATA_DIR : /.rockbox/rocks/viewers
[t] actions
[t] buttons
[t] contexts

_G.rb.actions
[n] ACTION_BMS_DELETE : 80 = 0x50
[n] ACTION_ENTER_MENUITEM : 71 = 0x47
[n] ACTION_EXIT_AFTER_THIS_MENUITEM : 70 = 0x46
[n] ACTION_EXIT_MENUITEM : 69 = 0x45
[n] ACTION_F3 : 18 = 0x12
[n] ACTION_FM_EXIT : 58 = 0x3a
[n] ACTION_FM_FREEZE : 55 = 0x37
[n] ACTION_FM_MENU : 52 = 0x34
[n] ACTION_FM_MODE : 57 = 0x39
[n] ACTION_FM_NEXT_PRESET : 61 = 0x3d
[n] ACTION_FM_PLAY : 59 = 0x3b
[n] ACTION_FM_PRESET : 53 = 0x35
[n] ACTION_FM_PREV_PRESET : 62 = 0x3e
[n] ACTION_FM_RECORD : 54 = 0x36
[n] ACTION_FM_RECORD_DBLPRE : 60 = 0x3c
[n] ACTION_FM_STOP : 56 = 0x38
[n] ACTION_KBD_ABORT : 106 = 0x6a
[n] ACTION_KBD_BACKSPACE : 107 = 0x6b
[n] ACTION_KBD_CURSOR_LEFT : 101 = 0x65
[n] ACTION_KBD_CURSOR_RIGHT : 102 = 0x66
[n] ACTION_KBD_DONE : 105 = 0x69
[n] ACTION_KBD_DOWN : 109 = 0x6d
[n] ACTION_KBD_LEFT : 99 = 0x63
[n] ACTION_KBD_MORSE_INPUT : 110 = 0x6e
[n] ACTION_KBD_MORSE_SELECT : 111 = 0x6f
[n] ACTION_KBD_PAGE_FLIP : 104 = 0x68
[n] ACTION_KBD_RIGHT : 100 = 0x64
[n] ACTION_KBD_SELECT : 103 = 0x67
[n] ACTION_KBD_UP : 108 = 0x6c
[n] ACTION_LISTTREE_PGDOWN : 43 = 0x2b
[n] ACTION_LISTTREE_PGUP : 42 = 0x2a
[n] ACTION_LIST_VOLDOWN : 45 = 0x2d
[n] ACTION_LIST_VOLUP : 44 = 0x2c
[n] ACTION_NONE : 0 = 0x0
[n] ACTION_PS_DEC_BIG : 88 = 0x58
[n] ACTION_PS_DEC_SMALL : 87 = 0x57
[n] ACTION_PS_EXIT : 95 = 0x5f
[n] ACTION_PS_FASTER : 97 = 0x61
[n] ACTION_PS_INC_BIG : 86 = 0x56
[n] ACTION_PS_INC_SMALL : 85 = 0x55
[n] ACTION_PS_NUDGE_LEFT : 89 = 0x59
[n] ACTION_PS_NUDGE_LEFTOFF : 91 = 0x5b
[n] ACTION_PS_NUDGE_RIGHT : 90 = 0x5a
[n] ACTION_PS_NUDGE_RIGHTOFF : 92 = 0x5c
[n] ACTION_PS_RESET : 94 = 0x5e
[n] ACTION_PS_SLOWER : 96 = 0x60
[n] ACTION_PS_TOGGLE_MODE : 93 = 0x5d
[n] ACTION_QS_DOWN : 83 = 0x53
[n] ACTION_QS_LEFT : 81 = 0x51
[n] ACTION_QS_RIGHT : 82 = 0x52
[n] ACTION_QS_TOP : 84 = 0x54
[n] ACTION_REC_F2 : 66 = 0x42
[n] ACTION_REC_F3 : 67 = 0x43
[n] ACTION_REC_LCD : 63 = 0x3f
[n] ACTION_REC_NEWFILE : 65 = 0x41
[n] ACTION_REC_PAUSE : 64 = 0x40
[n] ACTION_REDRAW : 2 = 0x2
[n] ACTION_REQUEST_MENUITEM : 68 = 0x44
[n] ACTION_SETTINGS_DEC : 75 = 0x4b
[n] ACTION_SETTINGS_DECBIGSTEP : 77 = 0x4d
[n] ACTION_SETTINGS_DECREPEAT : 76 = 0x4c
[n] ACTION_SETTINGS_INC : 72 = 0x48
[n] ACTION_SETTINGS_INCBIGSTEP : 74 = 0x4a
[n] ACTION_SETTINGS_INCREPEAT : 73 = 0x49
[n] ACTION_SETTINGS_RESET : 78 = 0x4e
[n] ACTION_SETTINGS_SET : 79 = 0x4f
[n] ACTION_STD_CANCEL : 11 = 0xb
[n] ACTION_STD_CONTEXT : 12 = 0xc
[n] ACTION_STD_HOTKEY : 17 = 0x11
[n] ACTION_STD_KEYLOCK : 15 = 0xf
[n] ACTION_STD_MENU : 13 = 0xd
[n] ACTION_STD_NEXT : 8 = 0x8
[n] ACTION_STD_NEXTREPEAT : 9 = 0x9
[n] ACTION_STD_OK : 10 = 0xa
[n] ACTION_STD_PREV : 6 = 0x6
[n] ACTION_STD_PREVREPEAT : 7 = 0x7
[n] ACTION_STD_QUICKSCREEN : 14 = 0xe
[n] ACTION_STD_REC : 16 = 0x10
[n] ACTION_TOUCHSCREEN : 3 = 0x3
[n] ACTION_TOUCHSCREEN_IGNORE : 5 = 0x5
[n] ACTION_TOUCHSCREEN_MODE : 4 = 0x4
[n] ACTION_TREE_HOTKEY : 51 = 0x33
[n] ACTION_TREE_PGLEFT : 47 = 0x2f
[n] ACTION_TREE_PGRIGHT : 48 = 0x30
[n] ACTION_TREE_ROOT_INIT : 46 = 0x2e
[n] ACTION_TREE_STOP : 49 = 0x31
[n] ACTION_TREE_WPS : 50 = 0x32
[n] ACTION_UNKNOWN : 1 = 0x1
[n] ACTION_USB_HID_BROWSER_HISTORY_BACK : 145 = 0x91
[n] ACTION_USB_HID_BROWSER_HISTORY_FORWARD : 146 = 0x92
[n] ACTION_USB_HID_BROWSER_SCROLL_DOWN : 136 = 0x88
[n] ACTION_USB_HID_BROWSER_SCROLL_PAGE_DOWN : 137 = 0x89
[n] ACTION_USB_HID_BROWSER_SCROLL_PAGE_UP : 138 = 0x8a
[n] ACTION_USB_HID_BROWSER_SCROLL_UP : 135 = 0x87
[n] ACTION_USB_HID_BROWSER_TAB_CLOSE : 144 = 0x90
[n] ACTION_USB_HID_BROWSER_TAB_NEXT : 143 = 0x8f
[n] ACTION_USB_HID_BROWSER_TAB_PREV : 142 = 0x8e
[n] ACTION_USB_HID_BROWSER_VIEW_FULL_SCREEN : 147 = 0x93
[n] ACTION_USB_HID_BROWSER_ZOOM_IN : 139 = 0x8b
[n] ACTION_USB_HID_BROWSER_ZOOM_OUT : 140 = 0x8c
[n] ACTION_USB_HID_BROWSER_ZOOM_RESET : 141 = 0x8d
[n] ACTION_USB_HID_FIRST : 112 = 0x70
[n] ACTION_USB_HID_LAST : 178 = 0xb2
[n] ACTION_USB_HID_MODE_SWITCH_NEXT : 114 = 0x72
[n] ACTION_USB_HID_MODE_SWITCH_PREV : 115 = 0x73
[n] ACTION_USB_HID_MOUSE_BUTTON_LEFT : 172 = 0xac
[n] ACTION_USB_HID_MOUSE_BUTTON_LEFT_REL : 173 = 0xad
[n] ACTION_USB_HID_MOUSE_BUTTON_RIGHT : 174 = 0xae
[n] ACTION_USB_HID_MOUSE_BUTTON_RIGHT_REL : 175 = 0xaf
[n] ACTION_USB_HID_MOUSE_DOWN : 150 = 0x96
[n] ACTION_USB_HID_MOUSE_DOWN_REP : 151 = 0x97
[n] ACTION_USB_HID_MOUSE_LDRAG_DOWN : 158 = 0x9e
[n] ACTION_USB_HID_MOUSE_LDRAG_DOWN_REP : 159 = 0x9f
[n] ACTION_USB_HID_MOUSE_LDRAG_LEFT : 160 = 0xa0
[n] ACTION_USB_HID_MOUSE_LDRAG_LEFT_REP : 161 = 0xa1
[n] ACTION_USB_HID_MOUSE_LDRAG_RIGHT : 162 = 0xa2
[n] ACTION_USB_HID_MOUSE_LDRAG_RIGHT_REP : 163 = 0xa3
[n] ACTION_USB_HID_MOUSE_LDRAG_UP : 156 = 0x9c
[n] ACTION_USB_HID_MOUSE_LDRAG_UP_REP : 157 = 0x9d
[n] ACTION_USB_HID_MOUSE_LEFT : 152 = 0x98
[n] ACTION_USB_HID_MOUSE_LEFT_REP : 153 = 0x99
[n] ACTION_USB_HID_MOUSE_RDRAG_DOWN : 166 = 0xa6
[n] ACTION_USB_HID_MOUSE_RDRAG_DOWN_REP : 167 = 0xa7
[n] ACTION_USB_HID_MOUSE_RDRAG_LEFT : 168 = 0xa8
[n] ACTION_USB_HID_MOUSE_RDRAG_LEFT_REP : 169 = 0xa9
[n] ACTION_USB_HID_MOUSE_RDRAG_RIGHT : 170 = 0xaa
[n] ACTION_USB_HID_MOUSE_RDRAG_RIGHT_REP : 171 = 0xab
[n] ACTION_USB_HID_MOUSE_RDRAG_UP : 164 = 0xa4
[n] ACTION_USB_HID_MOUSE_RDRAG_UP_REP : 165 = 0xa5
[n] ACTION_USB_HID_MOUSE_RIGHT : 154 = 0x9a
[n] ACTION_USB_HID_MOUSE_RIGHT_REP : 155 = 0x9b
[n] ACTION_USB_HID_MOUSE_UP : 148 = 0x94
[n] ACTION_USB_HID_MOUSE_UP_REP : 149 = 0x95
[n] ACTION_USB_HID_MOUSE_WHEEL_SCROLL_DOWN : 177 = 0xb1
[n] ACTION_USB_HID_MOUSE_WHEEL_SCROLL_UP : 176 = 0xb0
[n] ACTION_USB_HID_MULTIMEDIA_PLAYBACK_PLAY_PAUSE : 119 = 0x77
[n] ACTION_USB_HID_MULTIMEDIA_PLAYBACK_STOP : 120 = 0x78
[n] ACTION_USB_HID_MULTIMEDIA_PLAYBACK_TRACK_NEXT : 122 = 0x7a
[n] ACTION_USB_HID_MULTIMEDIA_PLAYBACK_TRACK_PREV : 121 = 0x79
[n] ACTION_USB_HID_MULTIMEDIA_VOLUME_DOWN : 117 = 0x75
[n] ACTION_USB_HID_MULTIMEDIA_VOLUME_MUTE : 118 = 0x76
[n] ACTION_USB_HID_MULTIMEDIA_VOLUME_UP : 116 = 0x74
[n] ACTION_USB_HID_NONE : 113 = 0x71
[n] ACTION_USB_HID_PRESENTATION_LINK_NEXT : 132 = 0x84
[n] ACTION_USB_HID_PRESENTATION_LINK_PREV : 131 = 0x83
[n] ACTION_USB_HID_PRESENTATION_MOUSE_CLICK : 133 = 0x85
[n] ACTION_USB_HID_PRESENTATION_MOUSE_OVER : 134 = 0x86
[n] ACTION_USB_HID_PRESENTATION_SCREEN_BLACK : 129 = 0x81
[n] ACTION_USB_HID_PRESENTATION_SCREEN_WHITE : 130 = 0x82
[n] ACTION_USB_HID_PRESENTATION_SLIDESHOW_LEAVE : 124 = 0x7c
[n] ACTION_USB_HID_PRESENTATION_SLIDESHOW_START : 123 = 0x7b
[n] ACTION_USB_HID_PRESENTATION_SLIDE_FIRST : 127 = 0x7f
[n] ACTION_USB_HID_PRESENTATION_SLIDE_LAST : 128 = 0x80
[n] ACTION_USB_HID_PRESENTATION_SLIDE_NEXT : 126 = 0x7e
[n] ACTION_USB_HID_PRESENTATION_SLIDE_PREV : 125 = 0x7d
[n] ACTION_WPS_ABRESET : 40 = 0x28
[n] ACTION_WPS_ABSETA_PREVDIR : 38 = 0x26
[n] ACTION_WPS_ABSETB_NEXTDIR : 39 = 0x27
[n] ACTION_WPS_BROWSE : 19 = 0x13
[n] ACTION_WPS_CONTEXT : 31 = 0x1f
[n] ACTION_WPS_CREATE_BOOKMARK : 36 = 0x24
[n] ACTION_WPS_HOTKEY : 41 = 0x29
[n] ACTION_WPS_ID3SCREEN : 30 = 0x1e
[n] ACTION_WPS_LIST_BOOKMARKS : 35 = 0x23
[n] ACTION_WPS_MENU : 33 = 0x21
[n] ACTION_WPS_PITCHSCREEN : 29 = 0x1d
[n] ACTION_WPS_PLAY : 20 = 0x14
[n] ACTION_WPS_QUICKSCREEN : 32 = 0x20
[n] ACTION_WPS_REC : 37 = 0x25
[n] ACTION_WPS_SEEKBACK : 21 = 0x15
[n] ACTION_WPS_SEEKFWD : 22 = 0x16
[n] ACTION_WPS_SKIPNEXT : 24 = 0x18
[n] ACTION_WPS_SKIPPREV : 25 = 0x19
[n] ACTION_WPS_STOP : 26 = 0x1a
[n] ACTION_WPS_STOPSEEK : 23 = 0x17
[n] ACTION_WPS_VIEW_PLAYLIST : 34 = 0x22
[n] ACTION_WPS_VOLDOWN : 27 = 0x1b
[n] ACTION_WPS_VOLUP : 28 = 0x1c
[n] ACTION_YESNO_ACCEPT : 98 = 0x62
[n] PLA_CANCEL : 188 = 0xbc
[n] PLA_DOWN : 181 = 0xb5
[n] PLA_DOWN_REPEAT : 185 = 0xb9
[n] PLA_EXIT : 189 = 0xbd
[n] PLA_LEFT : 182 = 0xb6
[n] PLA_LEFT_REPEAT : 186 = 0xba
[n] PLA_RIGHT : 183 = 0xb7
[n] PLA_RIGHT_REPEAT : 187 = 0xbb
[n] PLA_SELECT : 190 = 0xbe
[n] PLA_SELECT_REL : 191 = 0xbf
[n] PLA_SELECT_REPEAT : 192 = 0xc0
[n] PLA_UP : 180 = 0xb4
[n] PLA_UP_REPEAT : 184 = 0xb8

_G.rb.buttons
[n] BUTTON_DOWN : 16 = 0x10
[n] BUTTON_HOME : 1 = 0x1
[n] BUTTON_LEFT : 32 = 0x20
[n] BUTTON_MAIN : 511 = 0x1ff
[n] BUTTON_POWER : 256 = 0x100
[n] BUTTON_REL : 33554432 = 0x2000000
[n] BUTTON_REPEAT : 67108864 = 0x4000000
[n] BUTTON_RIGHT : 64 = 0x40
[n] BUTTON_SELECT : 128 = 0x80
[n] BUTTON_TOUCHSCREEN : 134217728 = 0x8000000
[n] BUTTON_UP : 8 = 0x8
[n] BUTTON_VOL_DOWN : 4 = 0x4
[n] BUTTON_VOL_UP : 2 = 0x2

_G.rb.contexts
[n] CONTEXT_ALARMSCREEN : 13 = 0xd
[n] CONTEXT_BOOKMARKSCREEN : 12 = 0xc
[n] CONTEXT_FM : 20 = 0x14
[n] CONTEXT_ID3DB : 5 = 0x5
[n] CONTEXT_KEYBOARD : 18 = 0x12
[n] CONTEXT_LIST : 6 = 0x6
[n] CONTEXT_MAINMENU : 4 = 0x4
[n] CONTEXT_MORSE_INPUT : 19 = 0x13
[n] CONTEXT_PITCHSCREEN : 15 = 0xf
[n] CONTEXT_QUICKSCREEN : 14 = 0xe
[n] CONTEXT_RECORD : 3 = 0x3
[n] CONTEXT_RECSCREEN : 17 = 0x11
[n] CONTEXT_SETTINGS : 7 = 0x7
[n] CONTEXT_SETTINGS_COLOURCHOOSER : 9 = 0x9
[n] CONTEXT_SETTINGS_EQ : 8 = 0x8
[n] CONTEXT_SETTINGS_RECTRIGGER : 11 = 0xb
[n] CONTEXT_SETTINGS_TIME : 10 = 0xa
[n] CONTEXT_STD : 0 = 0x0
[n] CONTEXT_TREE : 2 = 0x2
[n] CONTEXT_USB_HID : 21 = 0x15
[n] CONTEXT_USB_HID_MODE_BROWSER : 24 = 0x18
[n] CONTEXT_USB_HID_MODE_MOUSE : 25 = 0x19
[n] CONTEXT_USB_HID_MODE_MULTIMEDIA : 22 = 0x16
[n] CONTEXT_USB_HID_MODE_PRESENTATION : 23 = 0x17
[n] CONTEXT_WPS : 1 = 0x1
[n] CONTEXT_YESNOSCREEN : 16 = 0x10

_G.string
[f] byte
[f] char
[f] dump
[f] find
[f] format
[f] gfind
[f] gmatch
[f] gsub
[f] len
[f] lower
[f] match
[f] rep
[f] reverse
[f] sub
[f] upper

_G.table
[f] concat
[f] foreach
[f] foreachi
[f] getn
[f] insert
[f] maxn
[f] remove
[f] setn
[f] sort

538 Items Found
« Last Edit: August 28, 2017, 01:46:31 AM by Bilgus »
Logged

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Plugins/Viewers
| | |-+  LUA Script Prints full API list
 

  • SMF 2.0.6 | SMF © 2013, Simple Machines
  • XHTML
  • RSS
  • WAP2

Page created in 0.043 seconds with 34 queries.