Interface

id = AddExtMenuT(table)

SimpleTV ver
SimpleTV v.0.4.8 b9  or above
Description
Adds a item in the "Extra" menu and assign hotkeys to run the script
Parameters
t.utf8 (true) -  string coding
t.codepage (0) - code page of non utf8 text
t.name - Name of item in the "Extra" menu if name=='-' then add separator
t.luastring - lua file name or script 
t.lua_as_scr (false)  - if true then t.luastring is script, overwise t.luastring is file name of lua script
t.submenu ('') - string, name of submenu
t.key (0) - letter hotkey (type: byte (ANSI char))
t.ctrlkey (0) - modifier keys (type: number) (available value: 0 - not modifier keys, 1 - CTRL, 2 - SHIFT, 3 - CTRL + SHIFT )  
t.location (0) - 0 - in main menu,1 - in playlist menu, -1 all
t.image(t) - string, image file name 
Return Value
id - numeric identifier of the menu item (type: number)   

RemoveExtMenu(id)

SimpleTV ver
SimpleTV v.0.4.7 r3 (550) or above  
Description
Delete a item from the "Extra" menu
Parameters
id - numeric identifier of the menu item (type: number)
Return Value
Sample
m_simpleTV.Interface.RemoveExtMenu(id)

GetLanguage()

SimpleTV ver
SimpleTV v.0.4.7 r4 (556) or above
Description
Getting the language of OS and SimpleTV
Return Value
a - SimpleTV language  (ru, en, etc) (type: ANSI string)
b - OS language (type: ANSI string)
Sample
local a,b = m_simpleTV.Interface.GetLanguage()

number = MessageBox(Messsage string_UTF8,Caption string_UTF8,Type number,Object(opt))

Description
Show MessageBox
Parameters
Messsage - message string
Caption  - window caption
Type     - type of message box
Object   - parent window (object, nil or none - current foreground window, 0 - main window), from v 0.4.8 b8
Return Value
MessageBox return value or nil on error

number = GetSysColor(Index number)

Description
get system color
Return Value
RGB value of the given element.

SetFullScreenMode(number (-1 - toggle 0-unset 1-set))

boolean = GetFullScreenMode()

SetRatioMainFrame(number)

Sample

m_simpleTV.Interface.SetRatioMainFrame(9/16)

DEPRECTATED

AddExtMenu(NameString,LuaName,letter,mod_keys,location(opt),code_page(opt),submenu(opt) string,image(opt) string)

AddExtMenu_UTF8(NameString string_utf8,LuaName string_utf8,letter(opt),mod_keys(opt),location(opt),nil,submenu(opt) string_utf8,image(opt) string_utf8)

Зашли как: Anonymous (Anonymous)
mantis/simpletv/api/interface.txt · Последние изменения: 18/02/2016 22:53 — SergeyVS
 
За исключением случаев, когда указано иное, содержимое этой вики предоставляется на условиях следующей лицензии: CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki