Documentation/Globals
typedef

ArtPromiseResult

js/foo_uie_jsplitter.js:1973

Properties

NameTypeDescription
image?GdiBitmap

(or D2DBitmap if window.DrawMode == 1). Null on failure

pathstring

path to image file (or track file if image is embedded)

function

clearInterval

js/foo_uie_jsplitter.js:33
clearInterval(timerID)

Parameters

NameTypeDescription
timerIDnumber
function

clearTimeout

js/foo_uie_jsplitter.js:26
clearTimeout(timerID)

Parameters

NameTypeDescription
timerIDnumber
typedef

float

js/foo_uie_jsplitter.js:1
function

include

js/foo_uie_jsplitter.js:5
include(path, options)

Evaluates the script in file.
Similar to eval(utils.ReadTextFile(path)), but provides more features:
- Has include guards - script won't be evaluated a second time if it was evaluated before in the same panel.
- Has script caching - script file will be read only once from filesystem (even if it is included from different panels).
- Has better error reporting.

Note: when the relative path is used it will be searched in the following paths:
- ${current_package_path}/scripts/${path}, if the panel uses a package script.
- ${current_script_path}/${path}, if the script is not a top-level in-memory script.
- ${fb.ComponentPath}/${path}, otherwise.

Parameters

NameTypeDescription
pathstring

Absolute or relative path to JavaScript file.

options = undefinedoptionalobject
options.always_evaluate = falseoptionalboolean

If true, evaluates the script even if it was included before.

Example

<caption>Include some JS file</caption>
include('samples/complete/properties.js')
typedef

JsMemoryStats

js/foo_uie_jsplitter.js:2709

Return value of window.JsMemoryStats.

Properties

NameTypeDescription
MemoryUsagenumber

Memory usage of the current panel (in bytes)

TotalMemoryUsagenumber

Total memory usage of all panels (in bytes)

TotalMemoryLimitnumber

Maximum allowed memory usage for the component (in bytes).
If the total memory usage exceeds this value, all panels will fail with OOM error.

typedef

JsPackageDirs

js/foo_uie_jsplitter.js:2053

Note: returned directories are not guaranteed to exist.

Properties

NameTypeDescription
Rootstring

Root directory of the package

Assetsstring

Directory inside package folder that contains assets

Scriptsstring

Directory inside package folder that contains scripts

Storagestring

Persistent and unique directory inside foobar2000 profile folder that can be used to store runtime data (e.g. cache)

typedef

JsPackageInfo

js/foo_uie_jsplitter.js:2063

Return value of utils.GetPackageInfo.

Properties

NameTypeDescription
Versionstring

Package version

DirectoriesJsPackageDirs

Package directories

callback

on_run_cmd_async_done

Callbacks.js:690
on_run_cmd_async_done(task_id, success, exit_code, stdout, stderr)

Called when a process started by utils.RunCmdAsync finishes, fails to start, or times out.

Parameters

NameTypeDescription
task_idnumber

Task id returned by utils.RunCmdAsync.

successboolean

true only when the process was started, finished before timeout, and exited with code 0.
false when the process fails to start, times out, or exits with a non-zero code.

exit_codenumber

Process exit code.
If the process timed out, this value is 0xFFFFFFFF.

stdoutstring

Captured standard output.

stderrstring

Captured standard error and internal error messages.

typedef

PerformanceEntry

js/performance.js:1

Object representing a timestamp marker or measurement entry in the player's performance timeline

Properties

NameTypeDescription
entryTypestring

A string representing the type of performance metric. Can be either "mark" or "measure".

namestring

A string representing the name for a performance entry.

startTimenumber

Timestamp representing the starting time for the performance metric.

durationnumber

Value representing the duration of the performance entry (0.0 for "mark")

detailObject

Arbitrary metadata to include in the mark. Defaults to null. Can be an object of any type.

typedef

ScriptInfo

js/foo_uie_jsplitter.js:2796

Return value of window.ScriptInfo.
Note: package_id is only present when the panel script is a package.

Properties

NameTypeDescription
Namestring
Authoroptionalstring
Versionoptionalstring
PackageIdoptionalstring
function

setInterval

js/foo_uie_jsplitter.js:40
setInterval(func, delay, ...func_args)

Parameters

NameTypeDescription
funcfunction()
delaynumber
func_args...*

Returns

number
function

setTimeout

js/foo_uie_jsplitter.js:50
setTimeout(func, delay, ...func_args)

Parameters

NameTypeDescription
funcfunction()
delaynumber
func_args...*

Returns

number

Example source