From 6f6d258159c480d5e9eb5f827dfb4eecc6b91eef Mon Sep 17 00:00:00 2001 From: Bronley Plumb Date: Tue, 18 Jan 2022 15:45:01 -0500 Subject: [PATCH 001/104] clean up XmlScope mocks between tests --- src/XmlScope.spec.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/XmlScope.spec.ts b/src/XmlScope.spec.ts index 7739d023d..72cef2a9b 100644 --- a/src/XmlScope.spec.ts +++ b/src/XmlScope.spec.ts @@ -6,6 +6,8 @@ import { Program } from './Program'; import { expectDiagnostics, trim } from './testHelpers.spec'; import { standardizePath as s, util } from './util'; let rootDir = s`${process.cwd()}/rootDir`; +import { createSandbox } from 'sinon'; +const sinon = createSandbox(); describe('XmlScope', () => { let program: Program; @@ -13,10 +15,12 @@ describe('XmlScope', () => { program = new Program({ rootDir: rootDir }); + sinon.restore(); }); afterEach(() => { program.dispose(); + sinon.restore(); }); describe('constructor', () => { From 11667047f5b8a2d00a9b130add45df2ffc5943f4 Mon Sep 17 00:00:00 2001 From: Bronley Plumb Date: Tue, 18 Jan 2022 15:45:32 -0500 Subject: [PATCH 002/104] Fix comment typo --- src/Program.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Program.ts b/src/Program.ts index 955cc2094..c352f2d2a 100644 --- a/src/Program.ts +++ b/src/Program.ts @@ -1264,7 +1264,7 @@ export class Program { } /** - * Find a list of files in the program that have a function with the given name (case INsensitive) + * Find a list of files in the program that have a class with the given name (case INsensitive) */ public findFilesForClass(className: string) { const files = [] as BscFile[]; From 3147202b948d08be198255c068f082857c9de1f0 Mon Sep 17 00:00:00 2001 From: Bronley Plumb Date: Tue, 25 Jan 2022 10:34:01 -0500 Subject: [PATCH 003/104] don't crash on null options in printDiagnostics --- src/ProgramBuilder.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ProgramBuilder.ts b/src/ProgramBuilder.ts index 3d7bb2906..2e15b831c 100644 --- a/src/ProgramBuilder.ts +++ b/src/ProgramBuilder.ts @@ -254,7 +254,7 @@ export class ProgramBuilder { } private printDiagnostics(diagnostics?: BsDiagnostic[]) { - if (this.options.showDiagnosticsInConsole === false) { + if (this.options?.showDiagnosticsInConsole === false) { return; } if (!diagnostics) { From 3c700dfceec40b4d4ddd372d32158a7c5472d7bd Mon Sep 17 00:00:00 2001 From: Bronley Plumb Date: Tue, 25 Jan 2022 10:34:30 -0500 Subject: [PATCH 004/104] Parser references expressions (#487) * Expression tracking during parse. * Partial support for re-calculating `references.expressions` * Capture rest of missing expressions. --- src/astUtils/reflection.ts | 5 +- src/parser/Parser.spec.ts | 70 +++++++++++++++++++++++ src/parser/Parser.ts | 111 +++++++++++++++++++++++++++++++++++-- 3 files changed, 181 insertions(+), 5 deletions(-) diff --git a/src/astUtils/reflection.ts b/src/astUtils/reflection.ts index bea4229d0..7ad3e8a92 100644 --- a/src/astUtils/reflection.ts +++ b/src/astUtils/reflection.ts @@ -1,5 +1,5 @@ import type { Body, AssignmentStatement, Block, ExpressionStatement, CommentStatement, ExitForStatement, ExitWhileStatement, FunctionStatement, IfStatement, IncrementStatement, PrintStatement, GotoStatement, LabelStatement, ReturnStatement, EndStatement, StopStatement, ForStatement, ForEachStatement, WhileStatement, DottedSetStatement, IndexedSetStatement, LibraryStatement, NamespaceStatement, ImportStatement, ClassFieldStatement, ClassMethodStatement, ClassStatement, Statement, InterfaceFieldStatement, InterfaceMethodStatement, InterfaceStatement } from '../parser/Statement'; -import type { LiteralExpression, Expression, BinaryExpression, CallExpression, FunctionExpression, NamespacedVariableNameExpression, DottedGetExpression, XmlAttributeGetExpression, IndexedGetExpression, GroupingExpression, EscapedCharCodeLiteralExpression, ArrayLiteralExpression, AALiteralExpression, UnaryExpression, VariableExpression, SourceLiteralExpression, NewExpression, CallfuncExpression, TemplateStringQuasiExpression, TemplateStringExpression, TaggedTemplateStringExpression, AnnotationExpression, FunctionParameterExpression } from '../parser/Expression'; +import type { LiteralExpression, Expression, BinaryExpression, CallExpression, FunctionExpression, NamespacedVariableNameExpression, DottedGetExpression, XmlAttributeGetExpression, IndexedGetExpression, GroupingExpression, EscapedCharCodeLiteralExpression, ArrayLiteralExpression, AALiteralExpression, UnaryExpression, VariableExpression, SourceLiteralExpression, NewExpression, CallfuncExpression, TemplateStringQuasiExpression, TemplateStringExpression, TaggedTemplateStringExpression, AnnotationExpression, FunctionParameterExpression, AAMemberExpression } from '../parser/Expression'; import type { BrsFile } from '../files/BrsFile'; import type { XmlFile } from '../files/XmlFile'; import type { BscFile, File, TypedefProvider } from '../interfaces'; @@ -188,6 +188,9 @@ export function isArrayLiteralExpression(element: Statement | Expression | undef export function isAALiteralExpression(element: Statement | Expression | undefined): element is AALiteralExpression { return element?.constructor.name === 'AALiteralExpression'; } +export function isAAMemberExpression(element: Statement | Expression | undefined): element is AAMemberExpression { + return element?.constructor.name === 'AAMemberExpression'; +} export function isUnaryExpression(element: Statement | Expression | undefined): element is UnaryExpression { return element?.constructor.name === 'UnaryExpression'; } diff --git a/src/parser/Parser.spec.ts b/src/parser/Parser.spec.ts index 90bc1c9d4..7ae6be63a 100644 --- a/src/parser/Parser.spec.ts +++ b/src/parser/Parser.spec.ts @@ -1,5 +1,6 @@ import { expect, assert } from 'chai'; import { Lexer, ReservedWords } from '../lexer'; +import type { Expression } from './Expression'; import { DottedGetExpression, XmlAttributeGetExpression, CallfuncExpression, AnnotationExpression, CallExpression, FunctionExpression } from './Expression'; import { Parser, ParseMode } from './Parser'; import type { AssignmentStatement, ClassStatement, Statement } from './Statement'; @@ -8,6 +9,9 @@ import { Range } from 'vscode-languageserver'; import { DiagnosticMessages } from '../DiagnosticMessages'; import { isBlock, isCommentStatement, isFunctionStatement, isIfStatement } from '../astUtils'; import { expectZeroDiagnostics } from '../testHelpers.spec'; +import { BrsTranspileState } from './BrsTranspileState'; +import { SourceNode } from 'source-map'; +import { BrsFile, Program } from '..'; describe('parser', () => { it('emits empty object when empty token list is provided', () => { @@ -40,6 +44,72 @@ describe('parser', () => { 'main' ]); }); + + function expressionsToStrings(expressions: Set) { + return [...expressions.values()].map(x => { + const file = new BrsFile('', '', new Program({} as any)); + const state = new BrsTranspileState(file); + return new SourceNode(null, null, null, x.transpile(state)).toString(); + }); + } + + it('works for references.expressions', () => { + const parser = Parser.parse(` + a += 1 + 2 + a++ + a-- + some.node@.doCallfunc() + bravo(3 + 4).jump(callMe()) + obj = { + val1: someValue + } + arr = [ + one + ] + thing = alpha.bravo + alpha.charlie() + delta(alpha.delta) + call1().a.b.call2() + class Person + name as string = "bob" + end class + function thing(p1 = name.space.getSomething()) + + end function + `); + const expected = [ + 'a += 1 + 2', + 'a++', + 'a--', + //currently the "toString" does a transpile, so that's why this is different. + 'some.node.callfunc("doCallfunc", invalid)', + '3 + 4', + 'callMe()', + 'bravo(3 + 4).jump(callMe())', + 'someValue', + '{\n val1: someValue\n}', + 'one', + '[\n one\n]', + 'alpha.bravo', + 'alpha.charlie()', + 'alpha.delta', + 'delta(alpha.delta)', + 'call1().a.b.call2()', + '"bob"', + 'name.space.getSomething()' + ].sort(); + + expect( + expressionsToStrings(parser.references.expressions).sort() + ).to.eql(expected); + + //tell the parser we modified the AST and need to regenerate references + parser.invalidateReferences(); + + expect( + expressionsToStrings(parser.references.expressions).sort() + ).to.eql(expected); + }); }); describe('callfunc operator', () => { diff --git a/src/parser/Parser.ts b/src/parser/Parser.ts index 7af59b49d..9deb6b6b9 100644 --- a/src/parser/Parser.ts +++ b/src/parser/Parser.ts @@ -90,7 +90,7 @@ import { } from './Expression'; import type { Diagnostic, Range } from 'vscode-languageserver'; import { Logger } from '../Logger'; -import { isAnnotationExpression, isCallExpression, isCallfuncExpression, isClassMethodStatement, isCommentStatement, isDottedGetExpression, isIfStatement, isIndexedGetExpression, isVariableExpression } from '../astUtils/reflection'; +import { isAAMemberExpression, isAnnotationExpression, isCallExpression, isCallfuncExpression, isClassMethodStatement, isCommentStatement, isDottedGetExpression, isIfStatement, isIndexedGetExpression, isVariableExpression } from '../astUtils/reflection'; import { createVisitor, WalkMode } from '../astUtils/visitors'; import { createStringLiteral, createToken } from '../astUtils/creators'; import { RegexLiteralExpression } from '.'; @@ -916,6 +916,9 @@ export class Parser { new BinaryExpression(new VariableExpression(name, this.currentNamespaceName), operator, value), this.currentFunctionExpression ); + //remove the right-hand-side expression from this assignment operator, and replace with the full assignment expression + this._references.expressions.delete(value); + this._references.expressions.add(result); } this._references.assignmentStatements.push(result); return result; @@ -1851,7 +1854,9 @@ export class Parser { throw this.lastDiagnosticAsError(); } - return new IncrementStatement(expr, operator); + const result = new IncrementStatement(expr, operator); + this._references.expressions.add(result); + return result; } if (isCallExpression(expr) || isCallfuncExpression(expr)) { @@ -2100,7 +2105,9 @@ export class Parser { } private expression(): Expression { - return this.anonymousFunction(); + const expression = this.anonymousFunction(); + this._references.expressions.add(expression); + return expression; } private anonymousFunction(): Expression { @@ -2266,14 +2273,19 @@ export class Parser { return this.newExpression(); } let expr = this.primary(); - + //an expression to keep for _references + let referenceCallExpression: Expression; while (true) { if (this.match(TokenKind.LeftParen)) { expr = this.finishCall(this.previous(), expr); + //store this call expression in references + referenceCallExpression = expr; } else if (this.match(TokenKind.LeftSquareBracket)) { expr = this.indexedGet(expr); } else if (this.match(TokenKind.Callfunc)) { expr = this.callfunc(expr); + //store this callfunc expression in references + referenceCallExpression = expr; } else if (this.match(TokenKind.Dot)) { if (this.match(TokenKind.LeftSquareBracket)) { expr = this.indexedGet(expr); @@ -2309,6 +2321,10 @@ export class Parser { break; } } + //if we found a callExpression, add it to `expressions` in references + if (referenceCallExpression) { + this._references.expressions.add(referenceCallExpression); + } return expr; } @@ -2762,14 +2778,57 @@ export class Parser { */ private findReferences() { this._references = new References(); + const excludedExpressions = new Set(); + + const visitCallExpression = (e: CallExpression | CallfuncExpression) => { + for (const p of e.args) { + this._references.expressions.add(p); + } + //add calls that were not excluded (from loop below) + if (!excludedExpressions.has(e)) { + this._references.expressions.add(e); + } + + //if this call is part of a longer expression that includes a call higher up, find that higher one and remove it + if (e.callee) { + let node: Expression = e.callee; + while (node) { + //the primary goal for this loop. If we found a parent call expression, remove it from `references` + if (isCallExpression(node)) { + this.references.expressions.delete(node); + excludedExpressions.add(node); + //stop here. even if there are multiple calls in the chain, each child will find and remove its closest parent, so that reduces excess walking. + break; + + //when we hit a variable expression, we're definitely at the leftmost expression so stop + } else if (isVariableExpression(node)) { + break; + //if + + } else if (isDottedGetExpression(node) || isIndexedGetExpression(node)) { + node = node.obj; + } else { + //some expression we don't understand. log it and quit the loop + this.logger.info('Encountered unknown expression while calculating function expression chain', node); + break; + } + } + } + }; this.ast.walk(createVisitor({ AssignmentStatement: s => { this._references.assignmentStatements.push(s); + this.references.expressions.add(s.value); }, ClassStatement: s => { this._references.classStatements.push(s); }, + ClassFieldStatement: s => { + if (s.initialValue) { + this._references.expressions.add(s.initialValue); + } + }, NamespaceStatement: s => { this._references.namespaceStatements.push(s); }, @@ -2789,15 +2848,47 @@ export class Parser { }, NewExpression: e => { this._references.newExpressions.push(e); + for (const p of e.call.args) { + this._references.expressions.add(p); + } + }, + ExpressionStatement: s => { + this._references.expressions.add(s.expression); + }, + CallfuncExpression: e => { + visitCallExpression(e); + }, + CallExpression: e => { + visitCallExpression(e); }, AALiteralExpression: e => { this.addPropertyHints(e); + this._references.expressions.add(e); + for (const member of e.elements) { + if (isAAMemberExpression(member)) { + this._references.expressions.add(member.value); + } + } + }, + ArrayLiteralExpression: e => { + for (const element of e.elements) { + //keep everything except comments + if (!isCommentStatement(element)) { + this._references.expressions.add(element); + } + } }, DottedGetExpression: e => { this.addPropertyHints(e.name); }, DottedSetStatement: e => { this.addPropertyHints(e.name); + }, + UnaryExpression: e => { + this._references.expressions.add(e); + }, + IncrementStatement: e => { + this._references.expressions.add(e); } }), { walkMode: WalkMode.visitAllRecursive @@ -2868,6 +2959,18 @@ export class References { } private _interfaceStatementLookup: Map; + /** + * A collection of full expressions. This excludes intermediary expressions. + * + * Example 1: + * `a.b.c` is composed of `a` (variableExpression) `.b` (DottedGetExpression) `.c` (DottedGetExpression) + * This will only contain the final `.c` DottedGetExpression because `.b` and `a` can both be derived by walking back from the `.c` DottedGetExpression. + * + * Example 2: + * `name.space.doSomething(a.b.c)` will result in 2 entries in this list. the `CallExpression` for `doSomething`, and the `.c` DottedGetExpression. + */ + public expressions = new Set(); + public importStatements = [] as ImportStatement[]; public libraryStatements = [] as LibraryStatement[]; public namespaceStatements = [] as NamespaceStatement[]; From 5e6dedc185bc3805e28bd56ae3a793ba64840b04 Mon Sep 17 00:00:00 2001 From: Bronley Plumb Date: Tue, 25 Jan 2022 10:59:01 -0500 Subject: [PATCH 005/104] Adds plugin hooks for file validation (#490) --- src/Program.spec.ts | 30 ++++++++++++++++++++++++++++++ src/files/BrsFile.ts | 12 ++++++++++++ src/files/XmlFile.ts | 26 +++++++++++++++++++------- src/interfaces.ts | 21 +++++++++++++++++++++ 4 files changed, 82 insertions(+), 7 deletions(-) diff --git a/src/Program.spec.ts b/src/Program.spec.ts index 835901b8e..f327f8d47 100644 --- a/src/Program.spec.ts +++ b/src/Program.spec.ts @@ -2335,4 +2335,34 @@ describe('Program', () => { } }); }); + + describe('plugins', () => { + it('emits file validation events', () => { + const plugin = { + name: 'test', + beforeFileValidate: sinon.spy(), + onFileValidate: sinon.spy(), + afterFileValidate: sinon.spy() + }; + program.plugins.add(plugin); + program.addOrReplaceFile('source/main.brs', ''); + expect(plugin.beforeFileValidate.callCount).to.equal(1); + expect(plugin.onFileValidate.callCount).to.equal(1); + expect(plugin.afterFileValidate.callCount).to.equal(1); + }); + + it('emits file validation events', () => { + const plugin = { + name: 'test', + beforeFileValidate: sinon.spy(), + onFileValidate: sinon.spy(), + afterFileValidate: sinon.spy() + }; + program.plugins.add(plugin); + program.addOrReplaceFile('components/main.xml', ''); + expect(plugin.beforeFileValidate.callCount).to.equal(1); + expect(plugin.onFileValidate.callCount).to.equal(1); + expect(plugin.afterFileValidate.callCount).to.equal(1); + }); + }); }); diff --git a/src/files/BrsFile.ts b/src/files/BrsFile.ts index 6a928e2fb..e4eb69d89 100644 --- a/src/files/BrsFile.ts +++ b/src/files/BrsFile.ts @@ -276,6 +276,18 @@ export class BrsFile { //find all places where a sub/function is being called this.findFunctionCalls(); + //emit an event before starting to validate this file + this.program.plugins.emit('beforeFileValidate', { + file: this, + program: this.program + }); + + //emit an event to allow plugins to contribute to the file validation process + this.program.plugins.emit('onFileValidate', { + file: this, + program: this.program + }); + this.findAndValidateImportAndImportStatements(); //attach this file to every diagnostic diff --git a/src/files/XmlFile.ts b/src/files/XmlFile.ts index 71e05ad52..1d462e071 100644 --- a/src/files/XmlFile.ts +++ b/src/files/XmlFile.ts @@ -193,16 +193,28 @@ export class XmlFile { this.getCommentFlags(this.parser.tokens as any[]); - if (!this.parser.ast.root) { - //skip empty XML - return; - } - //notify AST ready this.program.plugins.emit('afterFileParse', this); - //initial validation - this.validateComponent(this.parser.ast); + //emit an event before starting to validate this file + this.program.plugins.emit('beforeFileValidate', { + file: this, + program: this.program + }); + + //emit an event to allow plugins to contribute to the file validation process + this.program.plugins.emit('onFileValidate', { + file: this, + program: this.program + }); + + if (this.parser.ast.root) { + + //initial validation + this.validateComponent(this.parser.ast); + } else { + //skip empty XML + } } /** diff --git a/src/interfaces.ts b/src/interfaces.ts index adbee7ff5..3249198f0 100644 --- a/src/interfaces.ts +++ b/src/interfaces.ts @@ -207,6 +207,17 @@ export interface CompilerPlugin { //file events beforeFileParse?: (source: SourceObj) => void; afterFileParse?: (file: BscFile) => void; + /** + * Called before each file is validated + */ + beforeFileValidate?: PluginHandler; + /** + * Called during the file validation process. If your plugin contributes file validations, this is a good place to contribute them. + */ + onFileValidate?: PluginHandler; + /** + * Called after each file is validated + */ afterFileValidate?: (file: BscFile) => void; beforeFileTranspile?: PluginHandler; afterFileTranspile?: PluginHandler; @@ -231,6 +242,16 @@ export interface OnGetSemanticTokensEvent { semanticTokens: SemanticToken[]; } +export interface BeforeFileValidateEvent { + program: Program; + file: T; +} + +export interface OnFileValidateEvent { + program: Program; + file: T; +} + export type Editor = Pick; export interface BeforeFileTranspileEvent { From ad78fc8d7f00569c71a6a95870a6fc8bda3c8d98 Mon Sep 17 00:00:00 2001 From: Bronley Plumb Date: Tue, 25 Jan 2022 11:12:43 -0500 Subject: [PATCH 006/104] Don't import from `..` folders (#491) --- src/parser/Parser.spec.ts | 3 ++- src/parser/tests/controlFlow/For.spec.ts | 4 ++-- src/parser/tests/controlFlow/ForEach.spec.ts | 3 ++- src/parser/tests/expression/NullCoalescenceExpression.spec.ts | 2 +- src/parser/tests/statement/Dim.spec.ts | 2 +- src/parser/tests/statement/Throw.spec.ts | 2 +- 6 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/parser/Parser.spec.ts b/src/parser/Parser.spec.ts index 7ae6be63a..5a8fa3fb5 100644 --- a/src/parser/Parser.spec.ts +++ b/src/parser/Parser.spec.ts @@ -11,7 +11,8 @@ import { isBlock, isCommentStatement, isFunctionStatement, isIfStatement } from import { expectZeroDiagnostics } from '../testHelpers.spec'; import { BrsTranspileState } from './BrsTranspileState'; import { SourceNode } from 'source-map'; -import { BrsFile, Program } from '..'; +import { BrsFile } from '../files/BrsFile'; +import { Program } from '../Program'; describe('parser', () => { it('emits empty object when empty token list is provided', () => { diff --git a/src/parser/tests/controlFlow/For.spec.ts b/src/parser/tests/controlFlow/For.spec.ts index 684cbd198..957399562 100644 --- a/src/parser/tests/controlFlow/For.spec.ts +++ b/src/parser/tests/controlFlow/For.spec.ts @@ -3,8 +3,8 @@ import { Parser } from '../../Parser'; import { TokenKind } from '../../../lexer'; import { EOF, identifier, token } from '../Parser.spec'; import { Range } from 'vscode-languageserver'; -import type { ForStatement } from '../..'; -import { LiteralExpression } from '../..'; +import type { ForStatement } from '../../Statement'; +import { LiteralExpression } from '../../Expression'; describe('parser for loops', () => { it('accepts a \'step\' clause', () => { diff --git a/src/parser/tests/controlFlow/ForEach.spec.ts b/src/parser/tests/controlFlow/ForEach.spec.ts index 7c518657f..6dd145527 100644 --- a/src/parser/tests/controlFlow/ForEach.spec.ts +++ b/src/parser/tests/controlFlow/ForEach.spec.ts @@ -3,8 +3,9 @@ import { expect } from 'chai'; import { Parser } from '../../Parser'; import { TokenKind } from '../../../lexer'; import { EOF, identifier, token } from '../Parser.spec'; -import { ForEachStatement, VariableExpression } from '../..'; import { Range } from 'vscode-languageserver'; +import { ForEachStatement } from '../../Statement'; +import { VariableExpression } from '../../Expression'; describe('parser foreach loops', () => { it('requires a name and target', () => { diff --git a/src/parser/tests/expression/NullCoalescenceExpression.spec.ts b/src/parser/tests/expression/NullCoalescenceExpression.spec.ts index aeb2005fa..8239fa6c9 100644 --- a/src/parser/tests/expression/NullCoalescenceExpression.spec.ts +++ b/src/parser/tests/expression/NullCoalescenceExpression.spec.ts @@ -14,7 +14,7 @@ import { LiteralExpression, NullCoalescingExpression } from '../../Expression'; -import { Program } from '../../..'; +import { Program } from '../../../Program'; import { expectZeroDiagnostics, getTestTranspile } from '../../../testHelpers.spec'; describe('NullCoalescingExpression', () => { diff --git a/src/parser/tests/statement/Dim.spec.ts b/src/parser/tests/statement/Dim.spec.ts index 09b0e9bd9..3eb898a0a 100644 --- a/src/parser/tests/statement/Dim.spec.ts +++ b/src/parser/tests/statement/Dim.spec.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import type { DimStatement } from '../..'; +import type { DimStatement } from '../../Statement'; import { DiagnosticMessages } from '../../../DiagnosticMessages'; import { Parser } from '../../Parser'; diff --git a/src/parser/tests/statement/Throw.spec.ts b/src/parser/tests/statement/Throw.spec.ts index e949eec44..e10afe789 100644 --- a/src/parser/tests/statement/Throw.spec.ts +++ b/src/parser/tests/statement/Throw.spec.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import type { TryCatchStatement, ThrowStatement } from '../..'; +import type { TryCatchStatement, ThrowStatement } from '../../Statement'; import { DiagnosticMessages } from '../../../DiagnosticMessages'; import { LiteralExpression } from '../../Expression'; import { Parser } from '../../Parser'; From 5c613339333185350326c9d3f6c4a32feff325d2 Mon Sep 17 00:00:00 2001 From: Bronley Plumb Date: Tue, 25 Jan 2022 11:26:40 -0500 Subject: [PATCH 007/104] fix npm audit issues. --- package-lock.json | 504 ++++++++-------------------------------------- 1 file changed, 89 insertions(+), 415 deletions(-) diff --git a/package-lock.json b/package-lock.json index d5ab99a62..cdeca5e83 100644 --- a/package-lock.json +++ b/package-lock.json @@ -889,23 +889,6 @@ } } }, - "node_modules/@typescript-eslint/eslint-plugin/node_modules/debug": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", - "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", - "dev": true, - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, "node_modules/@typescript-eslint/eslint-plugin/node_modules/lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", @@ -1005,23 +988,6 @@ } } }, - "node_modules/@typescript-eslint/parser/node_modules/debug": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", - "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", - "dev": true, - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, "node_modules/@typescript-eslint/scope-manager": { "version": "4.32.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.32.0.tgz", @@ -1079,23 +1045,6 @@ } } }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/debug": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", - "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", - "dev": true, - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, "node_modules/@typescript-eslint/typescript-estree/node_modules/globby": { "version": "11.0.4", "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.4.tgz", @@ -1281,9 +1230,9 @@ } }, "node_modules/anymatch": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz", - "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", + "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", "dependencies": { "normalize-path": "^3.0.0", "picomatch": "^2.0.4" @@ -1720,23 +1669,29 @@ } }, "node_modules/chokidar": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.1.tgz", - "integrity": "sha512-9+s+Od+W0VJJzawDma/gvBNQqkTiqYTWLuZoyAsivsI4AaWTCzHG06/TMjsf1cYe9Cb97UCEhjz7HvnPk2p/tw==", + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], "dependencies": { - "anymatch": "~3.1.1", + "anymatch": "~3.1.2", "braces": "~3.0.2", - "glob-parent": "~5.1.0", + "glob-parent": "~5.1.2", "is-binary-path": "~2.1.0", "is-glob": "~4.0.1", "normalize-path": "~3.0.0", - "readdirp": "~3.5.0" + "readdirp": "~3.6.0" }, "engines": { "node": ">= 8.10.0" }, "optionalDependencies": { - "fsevents": "~2.3.1" + "fsevents": "~2.3.2" } }, "node_modules/clean-stack": { @@ -1962,10 +1917,9 @@ "integrity": "sha512-rZHcgBkbYavBeD9ej6sP56XfG53d51CD4dnaw989YX/nZ/ZJfgRx/9ePKmTNiUiyQvh4mtrMoS3OAWW+yoYtpg==" }, "node_modules/debug": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", - "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", - "deprecated": "Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)", + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", + "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", "dev": true, "dependencies": { "ms": "2.1.2" @@ -2094,23 +2048,6 @@ "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", "dev": true }, - "node_modules/dependency-tree/node_modules/debug": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", - "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", - "dev": true, - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, "node_modules/dependency-tree/node_modules/typescript": { "version": "3.9.10", "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.10.tgz", @@ -3383,23 +3320,6 @@ "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", "dev": true }, - "node_modules/filing-cabinet/node_modules/debug": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", - "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", - "dev": true, - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, "node_modules/filing-cabinet/node_modules/resolve": { "version": "1.20.0", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", @@ -3740,9 +3660,9 @@ } }, "node_modules/glob": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", - "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -4693,9 +4613,9 @@ "dev": true }, "node_modules/json-schema": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", - "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", + "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==" }, "node_modules/json-schema-traverse": { "version": "0.4.1", @@ -4742,17 +4662,17 @@ } }, "node_modules/jsprim": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", - "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", - "engines": [ - "node >=0.6.0" - ], + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", + "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", "dependencies": { "assert-plus": "1.0.0", "extsprintf": "1.3.0", - "json-schema": "0.2.3", + "json-schema": "0.4.0", "verror": "1.10.0" + }, + "engines": { + "node": ">=0.6.0" } }, "node_modules/jszip": { @@ -5230,32 +5150,32 @@ "dev": true }, "node_modules/mocha": { - "version": "9.1.3", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-9.1.3.tgz", - "integrity": "sha512-Xcpl9FqXOAYqI3j79pEtHBBnQgVXIhpULjGQa7DVb0Po+VzmSIK9kanAiWLHoRR/dbZ2qpdPshuXr8l1VaHCzw==", + "version": "9.2.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-9.2.0.tgz", + "integrity": "sha512-kNn7E8g2SzVcq0a77dkphPsDSN7P+iYkqE0ZsGCYWRsoiKjOt+NvXfaagik8vuDa6W5Zw3qxe8Jfpt5qKf+6/Q==", "dev": true, "dependencies": { "@ungap/promise-all-settled": "1.1.2", "ansi-colors": "4.1.1", "browser-stdout": "1.3.1", - "chokidar": "3.5.2", - "debug": "4.3.2", + "chokidar": "3.5.3", + "debug": "4.3.3", "diff": "5.0.0", "escape-string-regexp": "4.0.0", "find-up": "5.0.0", - "glob": "7.1.7", + "glob": "7.2.0", "growl": "1.10.5", "he": "1.2.0", "js-yaml": "4.1.0", "log-symbols": "4.1.0", "minimatch": "3.0.4", "ms": "2.1.3", - "nanoid": "3.1.25", + "nanoid": "3.2.0", "serialize-javascript": "6.0.0", "strip-json-comments": "3.1.1", "supports-color": "8.1.1", "which": "2.0.2", - "workerpool": "6.1.5", + "workerpool": "6.2.0", "yargs": "16.2.0", "yargs-parser": "20.2.4", "yargs-unparser": "2.0.0" @@ -5272,69 +5192,12 @@ "url": "https://opencollective.com/mochajs" } }, - "node_modules/mocha/node_modules/anymatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", - "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", - "dev": true, - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, "node_modules/mocha/node_modules/argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true }, - "node_modules/mocha/node_modules/chokidar": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.2.tgz", - "integrity": "sha512-ekGhOnNVPgT77r4K/U3GDhu+FQ2S8TnK/s2KbIGXi0SZWuwkZ2QNyfWdZW+TVfn84DpEP7rLeCt2UI6bJ8GwbQ==", - "dev": true, - "dependencies": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" - }, - "engines": { - "node": ">= 8.10.0" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - } - }, - "node_modules/mocha/node_modules/debug": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", - "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", - "dev": true, - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/mocha/node_modules/debug/node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, "node_modules/mocha/node_modules/escape-string-regexp": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", @@ -5363,26 +5226,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/mocha/node_modules/glob": { - "version": "7.1.7", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", - "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", - "dev": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/mocha/node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -5455,18 +5298,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/mocha/node_modules/readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "dev": true, - "dependencies": { - "picomatch": "^2.2.1" - }, - "engines": { - "node": ">=8.10.0" - } - }, "node_modules/mocha/node_modules/supports-color": { "version": "8.1.1", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", @@ -5547,9 +5378,9 @@ "dev": true }, "node_modules/nanoid": { - "version": "3.1.25", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.25.tgz", - "integrity": "sha512-rdwtIXaXCLFAQbnfqDRnI6jaRHp9fTcYBjtFKE8eezcZ7LuLjhUaQGNeMXf1HmRoCH32CLz6XwX0TtxEOS/A3Q==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.2.0.tgz", + "integrity": "sha512-fmsZYa9lpn69Ad5eDn7FMcnnSR+8R34W9qJEijxYhTbfOWzr22n1QxCMzXLK+ODyW2973V3Fux959iQoUxzUIA==", "dev": true, "bin": { "nanoid": "bin/nanoid.cjs" @@ -6409,18 +6240,6 @@ "node": ">=6.14.4" } }, - "node_modules/postcss/node_modules/nanoid": { - "version": "3.1.23", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.23.tgz", - "integrity": "sha512-FiB0kzdP0FFVGDKlRLEQ1BgDzU87dy5NnzjeW9YZNt+/c3+q82EQDUwniSAUxp/F0gFNI1ZhKU1FqYsMuqZVnw==", - "dev": true, - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, "node_modules/postcss/node_modules/source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -6520,23 +6339,6 @@ "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", "dev": true }, - "node_modules/precinct/node_modules/debug": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", - "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", - "dev": true, - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, "node_modules/precinct/node_modules/detective-typescript": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/detective-typescript/-/detective-typescript-6.0.0.tgz", @@ -6830,9 +6632,9 @@ } }, "node_modules/readdirp": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.5.0.tgz", - "integrity": "sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", "dependencies": { "picomatch": "^2.2.1" }, @@ -8212,9 +8014,9 @@ } }, "node_modules/workerpool": { - "version": "6.1.5", - "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.1.5.tgz", - "integrity": "sha512-XdKkCK0Zqc6w3iTxLckiuJ81tiD/o5rBE/m+nXpRCB+/Sq4DqkfXZ/x0jW02DG1tGsfUGXbTJyZDP+eu67haSw==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.0.tgz", + "integrity": "sha512-Rsk5qQHJ9eowMH28Jwhe8HEbmdYDX4lwoMWshiCXugjtHqMD9ZbiqSDLxcsfdqsETPzVUtX5s1Z5kStiIM6l4A==", "dev": true }, "node_modules/wrap-ansi": { @@ -9134,15 +8936,6 @@ "tsutils": "^3.21.0" }, "dependencies": { - "debug": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", - "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", - "dev": true, - "requires": { - "ms": "2.1.2" - } - }, "lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", @@ -9202,17 +8995,6 @@ "@typescript-eslint/types": "4.32.0", "@typescript-eslint/typescript-estree": "4.32.0", "debug": "^4.3.1" - }, - "dependencies": { - "debug": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", - "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", - "dev": true, - "requires": { - "ms": "2.1.2" - } - } } }, "@typescript-eslint/scope-manager": { @@ -9246,15 +9028,6 @@ "tsutils": "^3.21.0" }, "dependencies": { - "debug": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", - "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", - "dev": true, - "requires": { - "ms": "2.1.2" - } - }, "globby": { "version": "11.0.4", "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.4.tgz", @@ -9392,9 +9165,9 @@ } }, "anymatch": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz", - "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", + "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", "requires": { "normalize-path": "^3.0.0", "picomatch": "^2.0.4" @@ -9719,18 +9492,18 @@ } }, "chokidar": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.1.tgz", - "integrity": "sha512-9+s+Od+W0VJJzawDma/gvBNQqkTiqYTWLuZoyAsivsI4AaWTCzHG06/TMjsf1cYe9Cb97UCEhjz7HvnPk2p/tw==", + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", "requires": { - "anymatch": "~3.1.1", + "anymatch": "~3.1.2", "braces": "~3.0.2", - "fsevents": "~2.3.1", - "glob-parent": "~5.1.0", + "fsevents": "~2.3.2", + "glob-parent": "~5.1.2", "is-binary-path": "~2.1.0", "is-glob": "~4.0.1", "normalize-path": "~3.0.0", - "readdirp": "~3.5.0" + "readdirp": "~3.6.0" } }, "clean-stack": { @@ -9916,9 +9689,9 @@ "integrity": "sha512-rZHcgBkbYavBeD9ej6sP56XfG53d51CD4dnaw989YX/nZ/ZJfgRx/9ePKmTNiUiyQvh4mtrMoS3OAWW+yoYtpg==" }, "debug": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", - "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", + "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", "dev": true, "requires": { "ms": "2.1.2" @@ -10011,15 +9784,6 @@ "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", "dev": true }, - "debug": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", - "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", - "dev": true, - "requires": { - "ms": "2.1.2" - } - }, "typescript": { "version": "3.9.10", "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.10.tgz", @@ -10980,15 +10744,6 @@ "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", "dev": true }, - "debug": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", - "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", - "dev": true, - "requires": { - "ms": "2.1.2" - } - }, "resolve": { "version": "1.20.0", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", @@ -11231,9 +10986,9 @@ } }, "glob": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", - "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", "requires": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -11912,9 +11667,9 @@ "dev": true }, "json-schema": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", - "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", + "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==" }, "json-schema-traverse": { "version": "0.4.1", @@ -11955,13 +11710,13 @@ } }, "jsprim": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", - "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", + "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", "requires": { "assert-plus": "1.0.0", "extsprintf": "1.3.0", - "json-schema": "0.2.3", + "json-schema": "0.4.0", "verror": "1.10.0" } }, @@ -12341,86 +12096,43 @@ "dev": true }, "mocha": { - "version": "9.1.3", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-9.1.3.tgz", - "integrity": "sha512-Xcpl9FqXOAYqI3j79pEtHBBnQgVXIhpULjGQa7DVb0Po+VzmSIK9kanAiWLHoRR/dbZ2qpdPshuXr8l1VaHCzw==", + "version": "9.2.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-9.2.0.tgz", + "integrity": "sha512-kNn7E8g2SzVcq0a77dkphPsDSN7P+iYkqE0ZsGCYWRsoiKjOt+NvXfaagik8vuDa6W5Zw3qxe8Jfpt5qKf+6/Q==", "dev": true, "requires": { "@ungap/promise-all-settled": "1.1.2", "ansi-colors": "4.1.1", "browser-stdout": "1.3.1", - "chokidar": "3.5.2", - "debug": "4.3.2", + "chokidar": "3.5.3", + "debug": "4.3.3", "diff": "5.0.0", "escape-string-regexp": "4.0.0", "find-up": "5.0.0", - "glob": "7.1.7", + "glob": "7.2.0", "growl": "1.10.5", "he": "1.2.0", "js-yaml": "4.1.0", "log-symbols": "4.1.0", "minimatch": "3.0.4", "ms": "2.1.3", - "nanoid": "3.1.25", + "nanoid": "3.2.0", "serialize-javascript": "6.0.0", "strip-json-comments": "3.1.1", "supports-color": "8.1.1", "which": "2.0.2", - "workerpool": "6.1.5", + "workerpool": "6.2.0", "yargs": "16.2.0", "yargs-parser": "20.2.4", "yargs-unparser": "2.0.0" }, "dependencies": { - "anymatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", - "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", - "dev": true, - "requires": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - } - }, "argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true }, - "chokidar": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.2.tgz", - "integrity": "sha512-ekGhOnNVPgT77r4K/U3GDhu+FQ2S8TnK/s2KbIGXi0SZWuwkZ2QNyfWdZW+TVfn84DpEP7rLeCt2UI6bJ8GwbQ==", - "dev": true, - "requires": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "fsevents": "~2.3.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" - } - }, - "debug": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", - "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", - "dev": true, - "requires": { - "ms": "2.1.2" - }, - "dependencies": { - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - } - } - }, "escape-string-regexp": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", @@ -12437,20 +12149,6 @@ "path-exists": "^4.0.0" } }, - "glob": { - "version": "7.1.7", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", - "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, "has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -12499,15 +12197,6 @@ "p-limit": "^3.0.2" } }, - "readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "dev": true, - "requires": { - "picomatch": "^2.2.1" - } - }, "supports-color": { "version": "8.1.1", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", @@ -12568,9 +12257,9 @@ "dev": true }, "nanoid": { - "version": "3.1.25", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.25.tgz", - "integrity": "sha512-rdwtIXaXCLFAQbnfqDRnI6jaRHp9fTcYBjtFKE8eezcZ7LuLjhUaQGNeMXf1HmRoCH32CLz6XwX0TtxEOS/A3Q==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.2.0.tgz", + "integrity": "sha512-fmsZYa9lpn69Ad5eDn7FMcnnSR+8R34W9qJEijxYhTbfOWzr22n1QxCMzXLK+ODyW2973V3Fux959iQoUxzUIA==", "dev": true }, "natural-compare": { @@ -13217,12 +12906,6 @@ "source-map": "^0.6.1" }, "dependencies": { - "nanoid": { - "version": "3.1.23", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.23.tgz", - "integrity": "sha512-FiB0kzdP0FFVGDKlRLEQ1BgDzU87dy5NnzjeW9YZNt+/c3+q82EQDUwniSAUxp/F0gFNI1ZhKU1FqYsMuqZVnw==", - "dev": true - }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -13300,15 +12983,6 @@ "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", "dev": true }, - "debug": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", - "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", - "dev": true, - "requires": { - "ms": "2.1.2" - } - }, "detective-typescript": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/detective-typescript/-/detective-typescript-6.0.0.tgz", @@ -13535,9 +13209,9 @@ } }, "readdirp": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.5.0.tgz", - "integrity": "sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", "requires": { "picomatch": "^2.2.1" } @@ -14612,9 +14286,9 @@ "dev": true }, "workerpool": { - "version": "6.1.5", - "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.1.5.tgz", - "integrity": "sha512-XdKkCK0Zqc6w3iTxLckiuJ81tiD/o5rBE/m+nXpRCB+/Sq4DqkfXZ/x0jW02DG1tGsfUGXbTJyZDP+eu67haSw==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.0.tgz", + "integrity": "sha512-Rsk5qQHJ9eowMH28Jwhe8HEbmdYDX4lwoMWshiCXugjtHqMD9ZbiqSDLxcsfdqsETPzVUtX5s1Z5kStiIM6l4A==", "dev": true }, "wrap-ansi": { From d6cff91b6626048f9e3086a1246aefa48f183377 Mon Sep 17 00:00:00 2001 From: Bronley Plumb Date: Tue, 25 Jan 2022 13:26:32 -0500 Subject: [PATCH 008/104] Remove nested index files (#492) * Don't import from `..` folders * Remove export barrels, instead import directly --- src/Program.spec.ts | 6 ++++-- src/Program.ts | 4 ++-- src/ProgramBuilder.spec.ts | 2 +- src/Scope.spec.ts | 2 +- src/Scope.ts | 5 +++-- src/astUtils/index.ts | 10 ---------- src/astUtils/reflection.spec.ts | 4 ++-- src/astUtils/visitors.spec.ts | 2 +- .../codeActions/CodeActionsProcessor.ts | 2 +- .../semanticTokens/SemanticTokensProcessor.ts | 2 +- src/files/BrsFile.spec.ts | 3 ++- src/files/BrsFile.ts | 7 ++++--- src/index.ts | 16 ++++++++++++--- src/interfaces.ts | 3 ++- src/lexer/Lexer.spec.ts | 2 +- src/lexer/Lexer.ts | 3 +-- src/lexer/index.ts | 3 --- src/parser/Expression.ts | 4 ++-- src/parser/Parser.Class.spec.ts | 3 ++- src/parser/Parser.spec.ts | 5 +++-- src/parser/Parser.ts | 20 +++++++------------ src/parser/Statement.spec.ts | 4 ++-- src/parser/Statement.ts | 4 ++-- src/parser/index.ts | 3 --- src/parser/tests/Parser.spec.ts | 6 +++--- src/parser/tests/controlFlow/For.spec.ts | 2 +- src/parser/tests/controlFlow/ForEach.spec.ts | 2 +- src/parser/tests/controlFlow/If.spec.ts | 6 +++--- src/parser/tests/controlFlow/While.spec.ts | 2 +- src/parser/tests/expression/Additive.spec.ts | 2 +- .../tests/expression/ArrayLiterals.spec.ts | 2 +- .../AssociativeArrayLiterals.spec.ts | 4 ++-- src/parser/tests/expression/Boolean.spec.ts | 2 +- src/parser/tests/expression/Call.spec.ts | 3 ++- .../tests/expression/Exponential.spec.ts | 2 +- src/parser/tests/expression/Function.spec.ts | 2 +- src/parser/tests/expression/Indexing.spec.ts | 2 +- .../tests/expression/Multiplicative.spec.ts | 2 +- .../NullCoalescenceExpression.spec.ts | 2 +- .../tests/expression/PrefixUnary.spec.ts | 2 +- src/parser/tests/expression/Primary.spec.ts | 2 +- .../tests/expression/Relational.spec.ts | 2 +- .../TemplateStringExpression.spec.ts | 2 +- .../expression/TernaryExpression.spec.ts | 2 +- .../statement/AssignmentOperators.spec.ts | 2 +- .../tests/statement/Declaration.spec.ts | 2 +- src/parser/tests/statement/Function.spec.ts | 3 ++- src/parser/tests/statement/Goto.spec.ts | 3 ++- src/parser/tests/statement/Increment.spec.ts | 2 +- .../tests/statement/LibraryStatement.spec.ts | 2 +- src/parser/tests/statement/Misc.spec.ts | 3 ++- .../tests/statement/PrintStatement.spec.ts | 2 +- .../tests/statement/ReturnStatement.spec.ts | 2 +- src/parser/tests/statement/Set.spec.ts | 2 +- src/parser/tests/statement/Stop.spec.ts | 3 ++- src/preprocessor/Chunk.ts | 2 +- src/preprocessor/Preprocessor.ts | 4 ++-- src/preprocessor/index.ts | 3 --- src/util.ts | 7 ++++--- src/validators/ClassValidator.ts | 4 ++-- 60 files changed, 107 insertions(+), 109 deletions(-) delete mode 100644 src/astUtils/index.ts delete mode 100644 src/lexer/index.ts delete mode 100644 src/parser/index.ts delete mode 100644 src/preprocessor/index.ts diff --git a/src/Program.spec.ts b/src/Program.spec.ts index f327f8d47..638dfe60c 100644 --- a/src/Program.spec.ts +++ b/src/Program.spec.ts @@ -15,8 +15,10 @@ import { EmptyStatement } from './parser/Statement'; import { expectDiagnostics, expectHasDiagnostics, expectZeroDiagnostics, trim, trimMap } from './testHelpers.spec'; import { doesNotThrow } from 'assert'; import { Logger } from './Logger'; -import { createToken, createVisitor, isBrsFile, WalkMode } from './astUtils'; -import { TokenKind } from './lexer'; +import { createToken } from './astUtils/creators'; +import { createVisitor, WalkMode } from './astUtils/visitors'; +import { isBrsFile } from './astUtils/reflection'; +import { TokenKind } from './lexer/TokenKind'; import type { LiteralExpression } from './parser/Expression'; let sinon = sinonImport.createSandbox(); diff --git a/src/Program.ts b/src/Program.ts index c352f2d2a..94e32b6ed 100644 --- a/src/Program.ts +++ b/src/Program.ts @@ -22,8 +22,8 @@ import { URI } from 'vscode-uri'; import PluginInterface from './PluginInterface'; import { isBrsFile, isXmlFile, isClassMethodStatement, isXmlScope } from './astUtils/reflection'; import type { FunctionStatement, Statement } from './parser/Statement'; -import { ParseMode } from './parser'; -import { TokenKind } from './lexer'; +import { ParseMode } from './parser/Parser'; +import { TokenKind } from './lexer/TokenKind'; import { BscPlugin } from './bscPlugin/BscPlugin'; import { AstEditor } from './astUtils/AstEditor'; const startOfSourcePkgPath = `source${path.sep}`; diff --git a/src/ProgramBuilder.spec.ts b/src/ProgramBuilder.spec.ts index 7fc4debc0..16dd5709f 100644 --- a/src/ProgramBuilder.spec.ts +++ b/src/ProgramBuilder.spec.ts @@ -9,7 +9,7 @@ import { Logger, LogLevel } from './Logger'; import * as diagnosticUtils from './diagnosticUtils'; import type { BscFile, BsDiagnostic } from '.'; import { Range } from '.'; -import { DiagnosticSeverity } from './astUtils'; +import { DiagnosticSeverity } from 'vscode-languageserver'; import { BrsFile } from './files/BrsFile'; import { expectZeroDiagnostics } from './testHelpers.spec'; diff --git a/src/Scope.spec.ts b/src/Scope.spec.ts index 6ca9bae3b..1dab9e47b 100644 --- a/src/Scope.spec.ts +++ b/src/Scope.spec.ts @@ -9,7 +9,7 @@ import PluginInterface from './PluginInterface'; import { expectDiagnostics, expectZeroDiagnostics, trim } from './testHelpers.spec'; import { Logger } from './Logger'; import type { BrsFile } from './files/BrsFile'; -import type { FunctionStatement, NamespaceStatement } from './parser'; +import type { FunctionStatement, NamespaceStatement } from './parser/Statement'; describe('Scope', () => { let sinon = sinonImport.createSandbox(); diff --git a/src/Scope.ts b/src/Scope.ts index b2dde21c9..4caa1c6ff 100644 --- a/src/Scope.ts +++ b/src/Scope.ts @@ -7,8 +7,9 @@ import { DiagnosticMessages } from './DiagnosticMessages'; import type { CallableContainer, BsDiagnostic, FileReference, BscFile, CallableContainerMap } from './interfaces'; import type { FileLink, Program } from './Program'; import { BsClassValidator } from './validators/ClassValidator'; -import type { NamespaceStatement, Statement, NewExpression, FunctionStatement, ClassStatement } from './parser'; -import { ParseMode } from './parser'; +import type { NamespaceStatement, Statement, FunctionStatement, ClassStatement } from './parser/Statement'; +import type { NewExpression } from './parser/Expression'; +import { ParseMode } from './parser/Parser'; import { standardizePath as s, util } from './util'; import { globalCallableMap } from './globalCallables'; import { Cache } from './Cache'; diff --git a/src/astUtils/index.ts b/src/astUtils/index.ts deleted file mode 100644 index 7186b4772..000000000 --- a/src/astUtils/index.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Range, Position, CancellationToken, CancellationTokenSource, DiagnosticSeverity, DiagnosticTag } from 'vscode-languageserver'; - -// convenience re-export from vscode -export { Range, Position, CancellationToken, CancellationTokenSource, DiagnosticSeverity, DiagnosticTag }; - -export * from './visitors'; -export * from './stackedVisitor'; -export * from './reflection'; -export * from './creators'; -export * from './xml'; diff --git a/src/astUtils/reflection.spec.ts b/src/astUtils/reflection.spec.ts index dd2367d80..9683a2194 100644 --- a/src/astUtils/reflection.spec.ts +++ b/src/astUtils/reflection.spec.ts @@ -2,8 +2,8 @@ import { expect } from 'chai'; import { PrintStatement, Block, Body, AssignmentStatement, CommentStatement, ExitForStatement, ExitWhileStatement, ExpressionStatement, FunctionStatement, IfStatement, IncrementStatement, GotoStatement, LabelStatement, ReturnStatement, EndStatement, StopStatement, ForStatement, ForEachStatement, WhileStatement, DottedSetStatement, IndexedSetStatement, LibraryStatement, NamespaceStatement, ImportStatement, ClassStatement, EmptyStatement } from '../parser/Statement'; import { FunctionExpression, NamespacedVariableNameExpression, BinaryExpression, CallExpression, DottedGetExpression, IndexedGetExpression, GroupingExpression, EscapedCharCodeLiteralExpression, ArrayLiteralExpression, AALiteralExpression, UnaryExpression, VariableExpression, SourceLiteralExpression, NewExpression, CallfuncExpression, TemplateStringQuasiExpression, XmlAttributeGetExpression, TemplateStringExpression, TaggedTemplateStringExpression, AnnotationExpression } from '../parser/Expression'; -import type { Token } from '../lexer'; -import { TokenKind } from '../lexer'; +import type { Token } from '../lexer/Token'; +import { TokenKind } from '../lexer/TokenKind'; import { isPrintStatement, isIfStatement, isBody, isAssignmentStatement, isBlock, isExpressionStatement, isCommentStatement, isExitForStatement, isExitWhileStatement, isFunctionStatement, isIncrementStatement, isGotoStatement, isLabelStatement, isReturnStatement, isEndStatement, isStopStatement, isForStatement, isForEachStatement, isWhileStatement, isDottedSetStatement, isIndexedSetStatement, isLibraryStatement, isNamespaceStatement, isImportStatement, isExpression, isBinaryExpression, isCallExpression, isFunctionExpression, isNamespacedVariableNameExpression, isDottedGetExpression, isXmlAttributeGetExpression, isIndexedGetExpression, isGroupingExpression, isLiteralExpression, isEscapedCharCodeLiteralExpression, isArrayLiteralExpression, isAALiteralExpression, isUnaryExpression, isVariableExpression, isSourceLiteralExpression, isNewExpression, isCallfuncExpression, isTemplateStringQuasiExpression, isTemplateStringExpression, isTaggedTemplateStringExpression, isBrsFile, isXmlFile, isClassStatement, isStatement, isAnnotationExpression } from './reflection'; import { createToken, createStringLiteral, createIdentifier, interpolatedRange as range } from './creators'; import { Program } from '../Program'; diff --git a/src/astUtils/visitors.spec.ts b/src/astUtils/visitors.spec.ts index fd317f6d6..83dd056ea 100644 --- a/src/astUtils/visitors.spec.ts +++ b/src/astUtils/visitors.spec.ts @@ -8,7 +8,7 @@ import { BrsFile } from '../files/BrsFile'; import type { Statement } from '../parser/Statement'; import { PrintStatement, Block, ReturnStatement } from '../parser/Statement'; import type { Expression } from '../parser/Expression'; -import { TokenKind } from '../lexer'; +import { TokenKind } from '../lexer/TokenKind'; import { createVisitor, WalkMode, walkStatements } from './visitors'; import { isPrintStatement } from './reflection'; import { createToken } from './creators'; diff --git a/src/bscPlugin/codeActions/CodeActionsProcessor.ts b/src/bscPlugin/codeActions/CodeActionsProcessor.ts index 8de1e3b77..d86b8b0dd 100644 --- a/src/bscPlugin/codeActions/CodeActionsProcessor.ts +++ b/src/bscPlugin/codeActions/CodeActionsProcessor.ts @@ -6,7 +6,7 @@ import { DiagnosticCodeMap } from '../../DiagnosticMessages'; import type { BrsFile } from '../../files/BrsFile'; import type { XmlFile } from '../../files/XmlFile'; import type { BscFile, OnGetCodeActionsEvent } from '../../interfaces'; -import { ParseMode } from '../../parser'; +import { ParseMode } from '../../parser/Parser'; import { util } from '../../util'; export class CodeActionsProcessor { diff --git a/src/bscPlugin/semanticTokens/SemanticTokensProcessor.ts b/src/bscPlugin/semanticTokens/SemanticTokensProcessor.ts index 812b4103a..b95393ff4 100644 --- a/src/bscPlugin/semanticTokens/SemanticTokensProcessor.ts +++ b/src/bscPlugin/semanticTokens/SemanticTokensProcessor.ts @@ -3,7 +3,7 @@ import { SemanticTokenTypes } from 'vscode-languageserver-protocol'; import { isBrsFile, isCustomType } from '../../astUtils/reflection'; import type { BrsFile } from '../../files/BrsFile'; import type { OnGetSemanticTokensEvent } from '../../interfaces'; -import { ParseMode } from '../../parser'; +import { ParseMode } from '../../parser/Parser'; import util from '../../util'; export class SemanticTokensProcessor { diff --git a/src/files/BrsFile.spec.ts b/src/files/BrsFile.spec.ts index 082beaf18..3c31eb557 100644 --- a/src/files/BrsFile.spec.ts +++ b/src/files/BrsFile.spec.ts @@ -11,7 +11,8 @@ import { IntegerType } from '../types/IntegerType'; import { StringType } from '../types/StringType'; import { BrsFile } from './BrsFile'; import { SourceMapConsumer } from 'source-map'; -import { TokenKind, Lexer, Keywords } from '../lexer'; +import { Lexer } from '../lexer/Lexer'; +import { TokenKind, Keywords } from '../lexer/TokenKind'; import { DiagnosticMessages } from '../DiagnosticMessages'; import type { StandardizedFileEntry } from 'roku-deploy'; import util, { standardizePath as s } from '../util'; diff --git a/src/files/BrsFile.ts b/src/files/BrsFile.ts index e4eb69d89..8d0a59df8 100644 --- a/src/files/BrsFile.ts +++ b/src/files/BrsFile.ts @@ -8,9 +8,10 @@ import type { Scope } from '../Scope'; import { DiagnosticCodeMap, diagnosticCodes, DiagnosticMessages } from '../DiagnosticMessages'; import { FunctionScope } from '../FunctionScope'; import type { Callable, CallableArg, CallableParam, CommentFlag, FunctionCall, BsDiagnostic, FileReference } from '../interfaces'; -import type { Token } from '../lexer'; -import { Lexer, TokenKind, AllowedLocalIdentifiers, Keywords } from '../lexer'; -import { Parser, ParseMode } from '../parser'; +import type { Token } from '../lexer/Token'; +import { Lexer } from '../lexer/Lexer'; +import { TokenKind, AllowedLocalIdentifiers, Keywords } from '../lexer/TokenKind'; +import { Parser, ParseMode } from '../parser/Parser'; import type { FunctionExpression, VariableExpression, Expression } from '../parser/Expression'; import type { ClassStatement, FunctionStatement, NamespaceStatement, ClassMethodStatement, AssignmentStatement, LibraryStatement, ImportStatement, Statement, ClassFieldStatement } from '../parser/Statement'; import type { FileLink, Program, SignatureInfoObj } from '../Program'; diff --git a/src/index.ts b/src/index.ts index 0792c4100..df12d8276 100644 --- a/src/index.ts +++ b/src/index.ts @@ -8,8 +8,18 @@ export { Watcher } from './Watcher'; export * from './interfaces'; export * from './LanguageServer'; export * from './XmlScope'; -export * from './lexer'; -export * from './parser'; +export * from './lexer/TokenKind'; +export * from './lexer/Token'; +export { Lexer } from './lexer/Lexer'; +export * from './parser/Parser'; +export * from './parser/Expression'; +export * from './parser/Statement'; export * from './BsConfig'; export * from './deferred'; -export * from './astUtils'; +// convenience re-export from vscode +export { Range, Position, CancellationToken, CancellationTokenSource, DiagnosticSeverity, DiagnosticTag } from 'vscode-languageserver'; +export * from './astUtils/visitors'; +export * from './astUtils/stackedVisitor'; +export * from './astUtils/reflection'; +export * from './astUtils/creators'; +export * from './astUtils/xml'; diff --git a/src/interfaces.ts b/src/interfaces.ts index 3249198f0..b0ddb4d22 100644 --- a/src/interfaces.ts +++ b/src/interfaces.ts @@ -7,7 +7,8 @@ import type { FunctionType } from './types/FunctionType'; import type { ParseMode } from './parser/Parser'; import type { Program, SourceObj, TranspileObj } from './Program'; import type { ProgramBuilder } from './ProgramBuilder'; -import type { Expression, FunctionStatement } from './parser'; +import type { FunctionStatement } from './parser/Statement'; +import type { Expression } from './parser/Expression'; import type { TranspileState } from './parser/TranspileState'; import type { SourceNode } from 'source-map'; import type { BscType } from './types/BscType'; diff --git a/src/lexer/Lexer.spec.ts b/src/lexer/Lexer.spec.ts index 8572a9518..44938a57f 100644 --- a/src/lexer/Lexer.spec.ts +++ b/src/lexer/Lexer.spec.ts @@ -1,7 +1,7 @@ /* eslint no-template-curly-in-string: 0 */ import { expect } from 'chai'; -import { TokenKind } from '.'; +import { TokenKind } from './TokenKind'; import { Lexer } from './Lexer'; import { isToken } from './Token'; import { rangeToArray } from '../parser/Parser.spec'; diff --git a/src/lexer/Lexer.ts b/src/lexer/Lexer.ts index 95725d346..bc1f38658 100644 --- a/src/lexer/Lexer.ts +++ b/src/lexer/Lexer.ts @@ -1,11 +1,10 @@ /* eslint-disable func-names */ -import { TokenKind, ReservedWords, Keywords } from './TokenKind'; +import { TokenKind, ReservedWords, Keywords, PreceedingRegexTypes } from './TokenKind'; import type { Token } from './Token'; import { isAlpha, isDecimalDigit, isAlphaNumeric, isHexDigit } from './Characters'; import type { Range, Diagnostic } from 'vscode-languageserver'; import { DiagnosticMessages } from '../DiagnosticMessages'; import util from '../util'; -import { PreceedingRegexTypes } from '.'; export class Lexer { /** diff --git a/src/lexer/index.ts b/src/lexer/index.ts deleted file mode 100644 index dbdf2c6da..000000000 --- a/src/lexer/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from './TokenKind'; -export * from './Token'; -export { Lexer } from './Lexer'; diff --git a/src/parser/Expression.ts b/src/parser/Expression.ts index d7c663a47..5bb7dd09d 100644 --- a/src/parser/Expression.ts +++ b/src/parser/Expression.ts @@ -1,6 +1,6 @@ /* eslint-disable no-bitwise */ -import type { Token, Identifier } from '../lexer'; -import { TokenKind } from '../lexer'; +import type { Token, Identifier } from '../lexer/Token'; +import { TokenKind } from '../lexer/TokenKind'; import type { Block, CommentStatement, FunctionStatement } from './Statement'; import type { Range } from 'vscode-languageserver'; import util from '../util'; diff --git a/src/parser/Parser.Class.spec.ts b/src/parser/Parser.Class.spec.ts index ac1e78489..6867e2d30 100644 --- a/src/parser/Parser.Class.spec.ts +++ b/src/parser/Parser.Class.spec.ts @@ -1,6 +1,7 @@ import { expect } from 'chai'; import { DiagnosticMessages } from '../DiagnosticMessages'; -import { TokenKind, Lexer, AllowedLocalIdentifiers, AllowedProperties } from '../lexer'; +import { TokenKind, AllowedLocalIdentifiers, AllowedProperties } from '../lexer/TokenKind'; +import { Lexer } from '../lexer/Lexer'; import { Parser, ParseMode } from './Parser'; import type { FunctionStatement, AssignmentStatement, ClassFieldStatement } from './Statement'; import { ClassStatement } from './Statement'; diff --git a/src/parser/Parser.spec.ts b/src/parser/Parser.spec.ts index 5a8fa3fb5..64971237c 100644 --- a/src/parser/Parser.spec.ts +++ b/src/parser/Parser.spec.ts @@ -1,5 +1,6 @@ import { expect, assert } from 'chai'; -import { Lexer, ReservedWords } from '../lexer'; +import { Lexer } from '../lexer/Lexer'; +import { ReservedWords } from '../lexer/TokenKind'; import type { Expression } from './Expression'; import { DottedGetExpression, XmlAttributeGetExpression, CallfuncExpression, AnnotationExpression, CallExpression, FunctionExpression } from './Expression'; import { Parser, ParseMode } from './Parser'; @@ -7,7 +8,7 @@ import type { AssignmentStatement, ClassStatement, Statement } from './Statement import { PrintStatement, FunctionStatement, NamespaceStatement, ImportStatement } from './Statement'; import { Range } from 'vscode-languageserver'; import { DiagnosticMessages } from '../DiagnosticMessages'; -import { isBlock, isCommentStatement, isFunctionStatement, isIfStatement } from '../astUtils'; +import { isBlock, isCommentStatement, isFunctionStatement, isIfStatement } from '../astUtils/reflection'; import { expectZeroDiagnostics } from '../testHelpers.spec'; import { BrsTranspileState } from './BrsTranspileState'; import { SourceNode } from 'source-map'; diff --git a/src/parser/Parser.ts b/src/parser/Parser.ts index 9deb6b6b9..1cf32079c 100644 --- a/src/parser/Parser.ts +++ b/src/parser/Parser.ts @@ -1,21 +1,16 @@ -import type { - Token, - Identifier, - BlockTerminator -} from '../lexer'; +import type { Token, Identifier } from '../lexer/Token'; +import { isToken } from '../lexer/Token'; +import type { BlockTerminator } from '../lexer/TokenKind'; +import { Lexer } from '../lexer/Lexer'; import { - TokenKind, AllowedLocalIdentifiers, AssignmentOperators, DisallowedLocalIdentifiersText, DisallowedFunctionIdentifiersText, AllowedProperties, - Lexer, BrighterScriptSourceLiterals, - isToken, - DeclarableTypes -} from '../lexer'; - + DeclarableTypes, TokenKind +} from '../lexer/TokenKind'; import type { Statement, PrintSeparatorTab, @@ -59,7 +54,6 @@ import { import type { DiagnosticInfo } from '../DiagnosticMessages'; import { DiagnosticMessages } from '../DiagnosticMessages'; import { util } from '../util'; - import type { Expression } from './Expression'; import { AALiteralExpression, @@ -75,6 +69,7 @@ import { LiteralExpression, NamespacedVariableNameExpression, NewExpression, + RegexLiteralExpression, UnaryExpression, VariableExpression, XmlAttributeGetExpression, @@ -93,7 +88,6 @@ import { Logger } from '../Logger'; import { isAAMemberExpression, isAnnotationExpression, isCallExpression, isCallfuncExpression, isClassMethodStatement, isCommentStatement, isDottedGetExpression, isIfStatement, isIndexedGetExpression, isVariableExpression } from '../astUtils/reflection'; import { createVisitor, WalkMode } from '../astUtils/visitors'; import { createStringLiteral, createToken } from '../astUtils/creators'; -import { RegexLiteralExpression } from '.'; export class Parser { /** diff --git a/src/parser/Statement.spec.ts b/src/parser/Statement.spec.ts index ab74065bd..e5bd5f71f 100644 --- a/src/parser/Statement.spec.ts +++ b/src/parser/Statement.spec.ts @@ -2,8 +2,8 @@ import { expect } from 'chai'; import type { NamespaceStatement } from './Statement'; import { Body, ClassStatement, CommentStatement, EmptyStatement } from './Statement'; import { ParseMode, Parser } from './Parser'; -import { CancellationTokenSource, WalkMode } from '../astUtils'; -import { Range } from 'vscode-languageserver'; +import { WalkMode } from '../astUtils/visitors'; +import { CancellationTokenSource, Range } from 'vscode-languageserver'; import { NamespacedVariableNameExpression, VariableExpression } from './Expression'; import { Program } from '../Program'; import * as path from 'path'; diff --git a/src/parser/Statement.ts b/src/parser/Statement.ts index 3c121bca4..7b214d600 100644 --- a/src/parser/Statement.ts +++ b/src/parser/Statement.ts @@ -1,6 +1,6 @@ /* eslint-disable no-bitwise */ -import type { Token, Identifier } from '../lexer'; -import { CompoundAssignmentOperators, TokenKind } from '../lexer'; +import type { Token, Identifier } from '../lexer/Token'; +import { CompoundAssignmentOperators, TokenKind } from '../lexer/TokenKind'; import type { BinaryExpression, Expression, NamespacedVariableNameExpression, FunctionExpression, AnnotationExpression, FunctionParameterExpression } from './Expression'; import { CallExpression, VariableExpression } from './Expression'; import { util } from '../util'; diff --git a/src/parser/index.ts b/src/parser/index.ts deleted file mode 100644 index e72377a22..000000000 --- a/src/parser/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from './Parser'; -export * from './Expression'; -export * from './Statement'; diff --git a/src/parser/tests/Parser.spec.ts b/src/parser/tests/Parser.spec.ts index ce2369acb..f6ec177ef 100644 --- a/src/parser/tests/Parser.spec.ts +++ b/src/parser/tests/Parser.spec.ts @@ -1,7 +1,7 @@ -import type { Token } from '../../lexer'; -import { TokenKind, ReservedWords } from '../../lexer'; +import type { Token } from '../../lexer/Token'; +import { TokenKind, ReservedWords } from '../../lexer/TokenKind'; import { interpolatedRange } from '../../astUtils/creators'; -import type { Range } from '../../astUtils'; +import type { Range } from 'vscode-languageserver'; /* A set of utilities to be used while writing tests for the BRS parser. */ diff --git a/src/parser/tests/controlFlow/For.spec.ts b/src/parser/tests/controlFlow/For.spec.ts index 957399562..1a6dc4e49 100644 --- a/src/parser/tests/controlFlow/For.spec.ts +++ b/src/parser/tests/controlFlow/For.spec.ts @@ -1,6 +1,6 @@ import { expect } from 'chai'; import { Parser } from '../../Parser'; -import { TokenKind } from '../../../lexer'; +import { TokenKind } from '../../../lexer/TokenKind'; import { EOF, identifier, token } from '../Parser.spec'; import { Range } from 'vscode-languageserver'; import type { ForStatement } from '../../Statement'; diff --git a/src/parser/tests/controlFlow/ForEach.spec.ts b/src/parser/tests/controlFlow/ForEach.spec.ts index 6dd145527..6850a08a4 100644 --- a/src/parser/tests/controlFlow/ForEach.spec.ts +++ b/src/parser/tests/controlFlow/ForEach.spec.ts @@ -1,7 +1,7 @@ import { expect } from 'chai'; import { Parser } from '../../Parser'; -import { TokenKind } from '../../../lexer'; +import { TokenKind } from '../../../lexer/TokenKind'; import { EOF, identifier, token } from '../Parser.spec'; import { Range } from 'vscode-languageserver'; import { ForEachStatement } from '../../Statement'; diff --git a/src/parser/tests/controlFlow/If.spec.ts b/src/parser/tests/controlFlow/If.spec.ts index d3252cafb..6720222cd 100644 --- a/src/parser/tests/controlFlow/If.spec.ts +++ b/src/parser/tests/controlFlow/If.spec.ts @@ -1,10 +1,10 @@ import { expect } from 'chai'; import * as assert from 'assert'; - import { Parser } from '../../Parser'; -import { TokenKind, Lexer } from '../../../lexer'; +import { Lexer } from '../../../lexer/Lexer'; +import { TokenKind } from '../../../lexer/TokenKind'; import { EOF, identifier, rangeMatch, token } from '../Parser.spec'; -import { isBlock, isCommentStatement, isIfStatement } from '../../../astUtils'; +import { isBlock, isCommentStatement, isIfStatement } from '../../../astUtils/reflection'; import type { Block, IfStatement } from '../../Statement'; describe('parser if statements', () => { diff --git a/src/parser/tests/controlFlow/While.spec.ts b/src/parser/tests/controlFlow/While.spec.ts index 061a525ce..e3afb28ce 100644 --- a/src/parser/tests/controlFlow/While.spec.ts +++ b/src/parser/tests/controlFlow/While.spec.ts @@ -1,7 +1,7 @@ import { expect } from 'chai'; import { Parser } from '../../Parser'; -import { TokenKind } from '../../../lexer'; +import { TokenKind } from '../../../lexer/TokenKind'; import { EOF, identifier, token } from '../Parser.spec'; import { Range } from 'vscode-languageserver'; diff --git a/src/parser/tests/expression/Additive.spec.ts b/src/parser/tests/expression/Additive.spec.ts index 90730454c..b19c6cdc2 100644 --- a/src/parser/tests/expression/Additive.spec.ts +++ b/src/parser/tests/expression/Additive.spec.ts @@ -1,7 +1,7 @@ import { expect } from 'chai'; import { Parser } from '../../Parser'; -import { TokenKind } from '../../../lexer'; +import { TokenKind } from '../../../lexer/TokenKind'; import { EOF, identifier, token } from '../Parser.spec'; import { Range } from 'vscode-languageserver'; diff --git a/src/parser/tests/expression/ArrayLiterals.spec.ts b/src/parser/tests/expression/ArrayLiterals.spec.ts index 77de98fc3..d50367136 100644 --- a/src/parser/tests/expression/ArrayLiterals.spec.ts +++ b/src/parser/tests/expression/ArrayLiterals.spec.ts @@ -1,7 +1,7 @@ import { expect } from 'chai'; import { Parser } from '../../Parser'; -import { TokenKind } from '../../../lexer'; +import { TokenKind } from '../../../lexer/TokenKind'; import { EOF, identifier, token } from '../Parser.spec'; import { Range } from 'vscode-languageserver'; diff --git a/src/parser/tests/expression/AssociativeArrayLiterals.spec.ts b/src/parser/tests/expression/AssociativeArrayLiterals.spec.ts index 738dd67d4..da50c6620 100644 --- a/src/parser/tests/expression/AssociativeArrayLiterals.spec.ts +++ b/src/parser/tests/expression/AssociativeArrayLiterals.spec.ts @@ -1,12 +1,12 @@ import { expect } from 'chai'; import { Parser } from '../../Parser'; -import { TokenKind } from '../../../lexer'; +import { TokenKind } from '../../../lexer/TokenKind'; import { EOF, identifier, token } from '../Parser.spec'; import { Range } from 'vscode-languageserver'; import type { AssignmentStatement } from '../../Statement'; import type { AALiteralExpression } from '../../Expression'; -import { isCommentStatement } from '../../../astUtils'; +import { isCommentStatement } from '../../../astUtils/reflection'; describe('parser associative array literals', () => { describe('empty associative arrays', () => { diff --git a/src/parser/tests/expression/Boolean.spec.ts b/src/parser/tests/expression/Boolean.spec.ts index 170703a20..cd7fa71d4 100644 --- a/src/parser/tests/expression/Boolean.spec.ts +++ b/src/parser/tests/expression/Boolean.spec.ts @@ -1,7 +1,7 @@ import { expect } from 'chai'; import { Parser } from '../../Parser'; -import { TokenKind } from '../../../lexer'; +import { TokenKind } from '../../../lexer/TokenKind'; import { EOF, identifier, token } from '../Parser.spec'; import { Range } from 'vscode-languageserver'; diff --git a/src/parser/tests/expression/Call.spec.ts b/src/parser/tests/expression/Call.spec.ts index 136188673..b8497148b 100644 --- a/src/parser/tests/expression/Call.spec.ts +++ b/src/parser/tests/expression/Call.spec.ts @@ -1,7 +1,8 @@ import { expect } from 'chai'; import { Parser } from '../../Parser'; -import { TokenKind, Lexer } from '../../../lexer'; +import { Lexer } from '../../../lexer/Lexer'; +import { TokenKind } from '../../../lexer/TokenKind'; import { EOF, identifier, token } from '../Parser.spec'; import { Range } from 'vscode-languageserver'; diff --git a/src/parser/tests/expression/Exponential.spec.ts b/src/parser/tests/expression/Exponential.spec.ts index b7f4afedb..d2867f563 100644 --- a/src/parser/tests/expression/Exponential.spec.ts +++ b/src/parser/tests/expression/Exponential.spec.ts @@ -1,7 +1,7 @@ import { expect } from 'chai'; import { Parser } from '../../Parser'; -import { TokenKind } from '../../../lexer'; +import { TokenKind } from '../../../lexer/TokenKind'; import { EOF, identifier, token } from '../Parser.spec'; describe('parser', () => { diff --git a/src/parser/tests/expression/Function.spec.ts b/src/parser/tests/expression/Function.spec.ts index f4cd2d0f8..c8c822ddd 100644 --- a/src/parser/tests/expression/Function.spec.ts +++ b/src/parser/tests/expression/Function.spec.ts @@ -1,7 +1,7 @@ import { expect } from 'chai'; import { Parser } from '../../Parser'; -import { TokenKind } from '../../../lexer'; +import { TokenKind } from '../../../lexer/TokenKind'; import { EOF, identifier, token } from '../Parser.spec'; import { Range } from 'vscode-languageserver'; diff --git a/src/parser/tests/expression/Indexing.spec.ts b/src/parser/tests/expression/Indexing.spec.ts index debec599b..ca8f64dbe 100644 --- a/src/parser/tests/expression/Indexing.spec.ts +++ b/src/parser/tests/expression/Indexing.spec.ts @@ -1,7 +1,7 @@ import { expect } from 'chai'; import { Parser } from '../../Parser'; -import { TokenKind } from '../../../lexer'; +import { TokenKind } from '../../../lexer/TokenKind'; import { EOF, identifier, token } from '../Parser.spec'; import { Range } from 'vscode-languageserver'; import { DiagnosticMessages } from '../../../DiagnosticMessages'; diff --git a/src/parser/tests/expression/Multiplicative.spec.ts b/src/parser/tests/expression/Multiplicative.spec.ts index 96b38c3db..b0e808c2e 100644 --- a/src/parser/tests/expression/Multiplicative.spec.ts +++ b/src/parser/tests/expression/Multiplicative.spec.ts @@ -1,7 +1,7 @@ import { expect } from 'chai'; import { Parser } from '../../Parser'; -import { TokenKind } from '../../../lexer'; +import { TokenKind } from '../../../lexer/TokenKind'; import { EOF, identifier, token } from '../Parser.spec'; describe('parser', () => { diff --git a/src/parser/tests/expression/NullCoalescenceExpression.spec.ts b/src/parser/tests/expression/NullCoalescenceExpression.spec.ts index 8239fa6c9..ab649a57a 100644 --- a/src/parser/tests/expression/NullCoalescenceExpression.spec.ts +++ b/src/parser/tests/expression/NullCoalescenceExpression.spec.ts @@ -1,7 +1,7 @@ /* eslint-disable @typescript-eslint/no-for-in-array */ import { expect } from 'chai'; import { DiagnosticMessages } from '../../../DiagnosticMessages'; -import { Lexer } from '../../../lexer'; +import { Lexer } from '../../../lexer/Lexer'; import { Parser, ParseMode } from '../../Parser'; import { AssignmentStatement, ExpressionStatement, ForEachStatement } from '../../Statement'; import type { diff --git a/src/parser/tests/expression/PrefixUnary.spec.ts b/src/parser/tests/expression/PrefixUnary.spec.ts index e475ecf2c..91feef687 100644 --- a/src/parser/tests/expression/PrefixUnary.spec.ts +++ b/src/parser/tests/expression/PrefixUnary.spec.ts @@ -1,7 +1,7 @@ import { expect } from 'chai'; import { Parser } from '../../Parser'; -import { TokenKind } from '../../../lexer'; +import { TokenKind } from '../../../lexer/TokenKind'; import { EOF, identifier, token } from '../Parser.spec'; import { Range } from 'vscode-languageserver'; diff --git a/src/parser/tests/expression/Primary.spec.ts b/src/parser/tests/expression/Primary.spec.ts index 0e696ae30..2543d1f2d 100644 --- a/src/parser/tests/expression/Primary.spec.ts +++ b/src/parser/tests/expression/Primary.spec.ts @@ -1,7 +1,7 @@ import { expect } from 'chai'; import { Parser } from '../../Parser'; -import { TokenKind } from '../../../lexer'; +import { TokenKind } from '../../../lexer/TokenKind'; import { EOF, identifier, token } from '../Parser.spec'; import { Range } from 'vscode-languageserver'; diff --git a/src/parser/tests/expression/Relational.spec.ts b/src/parser/tests/expression/Relational.spec.ts index 6cf2cbe9d..52c5d00e3 100644 --- a/src/parser/tests/expression/Relational.spec.ts +++ b/src/parser/tests/expression/Relational.spec.ts @@ -1,7 +1,7 @@ import { expect } from 'chai'; import { Parser } from '../../Parser'; -import { TokenKind } from '../../../lexer'; +import { TokenKind } from '../../../lexer/TokenKind'; import { EOF, identifier, token } from '../Parser.spec'; describe('parser', () => { diff --git a/src/parser/tests/expression/TemplateStringExpression.spec.ts b/src/parser/tests/expression/TemplateStringExpression.spec.ts index 7b2970e8a..3797074b9 100644 --- a/src/parser/tests/expression/TemplateStringExpression.spec.ts +++ b/src/parser/tests/expression/TemplateStringExpression.spec.ts @@ -3,7 +3,7 @@ import { expect } from 'chai'; import { DiagnosticMessages } from '../../../DiagnosticMessages'; -import { Lexer } from '../../../lexer'; +import { Lexer } from '../../../lexer/Lexer'; import { Parser, ParseMode } from '../../Parser'; import { AssignmentStatement } from '../../Statement'; import { Program } from '../../../Program'; diff --git a/src/parser/tests/expression/TernaryExpression.spec.ts b/src/parser/tests/expression/TernaryExpression.spec.ts index 62757523c..d3d1461a2 100644 --- a/src/parser/tests/expression/TernaryExpression.spec.ts +++ b/src/parser/tests/expression/TernaryExpression.spec.ts @@ -1,7 +1,7 @@ /* eslint-disable @typescript-eslint/no-for-in-array */ import { expect } from 'chai'; import { DiagnosticMessages } from '../../../DiagnosticMessages'; -import { TokenKind } from '../../../lexer'; +import { TokenKind } from '../../../lexer/TokenKind'; import { Parser, ParseMode } from '../../Parser'; import { token, EOF } from '../Parser.spec'; import type { PrintStatement } from '../../Statement'; diff --git a/src/parser/tests/statement/AssignmentOperators.spec.ts b/src/parser/tests/statement/AssignmentOperators.spec.ts index 754a1ceef..d975cf001 100644 --- a/src/parser/tests/statement/AssignmentOperators.spec.ts +++ b/src/parser/tests/statement/AssignmentOperators.spec.ts @@ -1,7 +1,7 @@ import { expect } from 'chai'; import { Parser } from '../../Parser'; -import { TokenKind } from '../../../lexer'; +import { TokenKind } from '../../../lexer/TokenKind'; import { EOF, identifier, token } from '../Parser.spec'; describe('parser assignment operators', () => { diff --git a/src/parser/tests/statement/Declaration.spec.ts b/src/parser/tests/statement/Declaration.spec.ts index 5a4881e13..106a45868 100644 --- a/src/parser/tests/statement/Declaration.spec.ts +++ b/src/parser/tests/statement/Declaration.spec.ts @@ -1,7 +1,7 @@ import { expect } from 'chai'; import { Parser } from '../../Parser'; -import { TokenKind } from '../../../lexer'; +import { TokenKind } from '../../../lexer/TokenKind'; import { EOF, identifier, token } from '../Parser.spec'; import { Range } from 'vscode-languageserver'; diff --git a/src/parser/tests/statement/Function.spec.ts b/src/parser/tests/statement/Function.spec.ts index 74b1ff72e..d1565ebf3 100644 --- a/src/parser/tests/statement/Function.spec.ts +++ b/src/parser/tests/statement/Function.spec.ts @@ -1,7 +1,8 @@ import { expect } from 'chai'; import { Parser } from '../../Parser'; -import { TokenKind, Lexer } from '../../../lexer'; +import { Lexer } from '../../../lexer/Lexer'; +import { TokenKind } from '../../../lexer/TokenKind'; import { EOF, identifier, token } from '../Parser.spec'; describe('parser', () => { diff --git a/src/parser/tests/statement/Goto.spec.ts b/src/parser/tests/statement/Goto.spec.ts index 85e5bf5a9..4ad6ea1f8 100644 --- a/src/parser/tests/statement/Goto.spec.ts +++ b/src/parser/tests/statement/Goto.spec.ts @@ -1,7 +1,8 @@ import { expect } from 'chai'; import { Parser } from '../../Parser'; -import { TokenKind, Lexer } from '../../../lexer'; +import { Lexer } from '../../../lexer/Lexer'; +import { TokenKind } from '../../../lexer/TokenKind'; import { EOF, identifier, token } from '../Parser.spec'; describe('parser goto statements', () => { diff --git a/src/parser/tests/statement/Increment.spec.ts b/src/parser/tests/statement/Increment.spec.ts index 82749b317..b1d0f11f7 100644 --- a/src/parser/tests/statement/Increment.spec.ts +++ b/src/parser/tests/statement/Increment.spec.ts @@ -1,7 +1,7 @@ import { expect } from 'chai'; import { Parser } from '../../Parser'; -import { TokenKind } from '../../../lexer'; +import { TokenKind } from '../../../lexer/TokenKind'; import { EOF, identifier, token } from '../Parser.spec'; import { Range } from 'vscode-languageserver'; import { DiagnosticMessages } from '../../../DiagnosticMessages'; diff --git a/src/parser/tests/statement/LibraryStatement.spec.ts b/src/parser/tests/statement/LibraryStatement.spec.ts index e1fff4143..615a733cc 100644 --- a/src/parser/tests/statement/LibraryStatement.spec.ts +++ b/src/parser/tests/statement/LibraryStatement.spec.ts @@ -1,7 +1,7 @@ import { expect } from 'chai'; import { Parser } from '../../Parser'; -import { Lexer } from '../../../lexer'; +import { Lexer } from '../../../lexer/Lexer'; import { AssignmentStatement, FunctionStatement as BrsFunction } from '../../Statement'; describe('parser library statements', () => { diff --git a/src/parser/tests/statement/Misc.spec.ts b/src/parser/tests/statement/Misc.spec.ts index 81574037d..0d78de963 100644 --- a/src/parser/tests/statement/Misc.spec.ts +++ b/src/parser/tests/statement/Misc.spec.ts @@ -1,6 +1,7 @@ import { expect } from 'chai'; import { Parser } from '../../Parser'; -import { Lexer, DisallowedLocalIdentifiersText, TokenKind } from '../../../lexer'; +import { Lexer } from '../../../lexer/Lexer'; +import { DisallowedLocalIdentifiersText, TokenKind } from '../../../lexer/TokenKind'; import { Range } from 'vscode-languageserver'; import type { AAMemberExpression } from '../../Expression'; import { expectZeroDiagnostics } from '../../../testHelpers.spec'; diff --git a/src/parser/tests/statement/PrintStatement.spec.ts b/src/parser/tests/statement/PrintStatement.spec.ts index 73d043585..e11ddec20 100644 --- a/src/parser/tests/statement/PrintStatement.spec.ts +++ b/src/parser/tests/statement/PrintStatement.spec.ts @@ -1,6 +1,6 @@ import { expect } from 'chai'; import { Parser } from '../../Parser'; -import { TokenKind } from '../../../lexer'; +import { TokenKind } from '../../../lexer/TokenKind'; import { EOF, token } from '../Parser.spec'; import { Range } from 'vscode-languageserver'; import { Program } from '../../../Program'; diff --git a/src/parser/tests/statement/ReturnStatement.spec.ts b/src/parser/tests/statement/ReturnStatement.spec.ts index 9974418b2..e40bc241e 100644 --- a/src/parser/tests/statement/ReturnStatement.spec.ts +++ b/src/parser/tests/statement/ReturnStatement.spec.ts @@ -1,7 +1,7 @@ import { expect } from 'chai'; import { Parser } from '../../Parser'; -import { TokenKind } from '../../../lexer'; +import { TokenKind } from '../../../lexer/TokenKind'; import { EOF, identifier, token } from '../Parser.spec'; import type { FunctionStatement } from '../../Statement'; import { Range } from 'vscode-languageserver'; diff --git a/src/parser/tests/statement/Set.spec.ts b/src/parser/tests/statement/Set.spec.ts index 976d4a0e1..5b8715191 100644 --- a/src/parser/tests/statement/Set.spec.ts +++ b/src/parser/tests/statement/Set.spec.ts @@ -1,7 +1,7 @@ import { expect } from 'chai'; import { Parser } from '../../Parser'; -import { TokenKind } from '../../../lexer'; +import { TokenKind } from '../../../lexer/TokenKind'; import { EOF, identifier, token } from '../Parser.spec'; import { Range } from 'vscode-languageserver'; diff --git a/src/parser/tests/statement/Stop.spec.ts b/src/parser/tests/statement/Stop.spec.ts index 6dfeb46da..2a64a1e6b 100644 --- a/src/parser/tests/statement/Stop.spec.ts +++ b/src/parser/tests/statement/Stop.spec.ts @@ -1,7 +1,8 @@ import { expect } from 'chai'; import { Parser } from '../../Parser'; -import { TokenKind, Lexer } from '../../../lexer'; +import { Lexer } from '../../../lexer/Lexer'; +import { TokenKind } from '../../../lexer/TokenKind'; import { EOF, token } from '../Parser.spec'; describe('stop statement', () => { diff --git a/src/preprocessor/Chunk.ts b/src/preprocessor/Chunk.ts index 5d850e4f7..d67360d52 100644 --- a/src/preprocessor/Chunk.ts +++ b/src/preprocessor/Chunk.ts @@ -1,4 +1,4 @@ -import type { Token } from '../lexer'; +import type { Token } from '../lexer/Token'; import type { Range } from 'vscode-languageserver'; import util from '../util'; diff --git a/src/preprocessor/Preprocessor.ts b/src/preprocessor/Preprocessor.ts index fef0fc5af..1cbaf0f5f 100644 --- a/src/preprocessor/Preprocessor.ts +++ b/src/preprocessor/Preprocessor.ts @@ -1,5 +1,5 @@ -import type { Token } from '../lexer'; -import { TokenKind } from '../lexer'; +import type { Token } from '../lexer/Token'; +import { TokenKind } from '../lexer/TokenKind'; import type * as CC from './Chunk'; import type { Diagnostic } from 'vscode-languageserver'; import { DiagnosticMessages } from '../DiagnosticMessages'; diff --git a/src/preprocessor/index.ts b/src/preprocessor/index.ts deleted file mode 100644 index fac49ebfa..000000000 --- a/src/preprocessor/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from './Chunk'; -export * from './PreprocessorParser'; -export * from './Manifest'; diff --git a/src/util.ts b/src/util.ts index 2c6c07a43..e466b4100 100644 --- a/src/util.ts +++ b/src/util.ts @@ -24,9 +24,10 @@ import { VoidType } from './types/VoidType'; import { ParseMode } from './parser/Parser'; import type { DottedGetExpression, Expression, VariableExpression } from './parser/Expression'; import { Logger, LogLevel } from './Logger'; -import type { Locatable, Token } from './lexer'; -import { TokenKind } from './lexer'; -import { isDottedGetExpression, isExpression, isVariableExpression, WalkMode } from './astUtils'; +import type { Locatable, Token } from './lexer/Token'; +import { TokenKind } from './lexer/TokenKind'; +import { isDottedGetExpression, isExpression, isVariableExpression } from './astUtils/reflection'; +import { WalkMode } from './astUtils/visitors'; import { CustomType } from './types/CustomType'; import { SourceNode } from 'source-map'; import type { SGAttribute } from './parser/SGTypes'; diff --git a/src/validators/ClassValidator.ts b/src/validators/ClassValidator.ts index b028911c5..02d1c53a9 100644 --- a/src/validators/ClassValidator.ts +++ b/src/validators/ClassValidator.ts @@ -8,9 +8,9 @@ import { URI } from 'vscode-uri'; import util from '../util'; import { isCallExpression, isClassFieldStatement, isClassMethodStatement, isCustomType } from '../astUtils/reflection'; import type { BscFile, BsDiagnostic } from '../interfaces'; -import { createVisitor, WalkMode } from '../astUtils'; +import { createVisitor, WalkMode } from '../astUtils/visitors'; import type { BrsFile } from '../files/BrsFile'; -import { TokenKind } from '../lexer'; +import { TokenKind } from '../lexer/TokenKind'; import { DynamicType } from '../types/DynamicType'; export class BsClassValidator { From e6a52bceab8bf0449d1368359135a7a195887123 Mon Sep 17 00:00:00 2001 From: Bronley Plumb Date: Tue, 25 Jan 2022 14:04:58 -0500 Subject: [PATCH 009/104] Fix parser bug after interface statement. (#493) * Fix bug breaking parser after interface statement. * fix formatting issue --- src/parser/Parser.ts | 2 -- .../tests/statement/InterfaceStatement.spec.ts | 15 ++++++++++++++- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/parser/Parser.ts b/src/parser/Parser.ts index 1cf32079c..da761005e 100644 --- a/src/parser/Parser.ts +++ b/src/parser/Parser.ts @@ -474,8 +474,6 @@ export class Parser { //consume the final `end interface` token const endInterfaceToken = this.consumeToken(TokenKind.EndInterface); - this.consumeStatementSeparators(); - const statement = new InterfaceStatement( interfaceToken, nameToken, diff --git a/src/parser/tests/statement/InterfaceStatement.spec.ts b/src/parser/tests/statement/InterfaceStatement.spec.ts index aeca6749c..9cc43849a 100644 --- a/src/parser/tests/statement/InterfaceStatement.spec.ts +++ b/src/parser/tests/statement/InterfaceStatement.spec.ts @@ -1,4 +1,4 @@ -import { getTestGetTypedef } from '../../../testHelpers.spec'; +import { expectZeroDiagnostics, getTestGetTypedef } from '../../../testHelpers.spec'; import { standardizePath as s } from '../../../util'; import { Program } from '../../../Program'; @@ -61,4 +61,17 @@ describe('InterfaceStatement', () => { end interface `, undefined, undefined, undefined, true); }); + + it('allows declaring multiple interfaces in a file', () => { + program.addOrReplaceFile('source/interfaces.bs', ` + interface Iface1 + name as dynamic + end interface + interface IFace2 + prop as dynamic + end interface + `); + program.validate(); + expectZeroDiagnostics(program); + }); }); From ef62517d71ae2cd155ab3577b2532a79c5761898 Mon Sep 17 00:00:00 2001 From: Bronley Plumb Date: Thu, 27 Jan 2022 15:48:44 -0500 Subject: [PATCH 010/104] Move parse and validate events out to program level (#494) * Move parse and validate events out to program level * Fix lint issues. --- src/Program.ts | 36 ++++++++++++++++++++++++ src/astUtils/visitors.spec.ts | 20 ++++++-------- src/files/BrsFile.spec.ts | 5 ++-- src/files/BrsFile.ts | 52 ++++++++++++++++------------------- src/files/XmlFile.spec.ts | 47 +++++++++++++++---------------- src/files/XmlFile.ts | 25 ++++------------- 6 files changed, 101 insertions(+), 84 deletions(-) diff --git a/src/Program.ts b/src/Program.ts index 94e32b6ed..bde2bffbe 100644 --- a/src/Program.ts +++ b/src/Program.ts @@ -395,10 +395,27 @@ export class Program { this.logger.time(LogLevel.debug, ['parse', chalk.green(srcPath)], () => { brsFile.parse(sourceObj.source); }); + + //notify plugins that this file has finished parsing + this.plugins.emit('afterFileParse', brsFile); + file = brsFile; brsFile.attachDependencyGraph(this.dependencyGraph); + this.plugins.emit('beforeFileValidate', { + program: this, + file: file + }); + + file.validate(); + + //emit an event to allow plugins to contribute to the file validation process + this.plugins.emit('onFileValidate', { + program: this, + file: file + }); + this.plugins.emit('afterFileValidate', brsFile); } else if ( //is xml file @@ -415,10 +432,14 @@ export class Program { source: fileContents }; this.plugins.emit('beforeFileParse', sourceObj); + this.logger.time(LogLevel.debug, ['parse', chalk.green(srcPath)], () => { xmlFile.parse(sourceObj.source); }); + //notify plugins that this file has finished parsing + this.plugins.emit('afterFileParse', xmlFile); + file = xmlFile; //create a new scope for this xml file @@ -428,6 +449,21 @@ export class Program { //register this compoent now that we have parsed it and know its component name this.registerComponent(xmlFile, scope); + + //emit an event before starting to validate this file + this.plugins.emit('beforeFileValidate', { + file: file, + program: this + }); + + xmlFile.validate(); + + //emit an event to allow plugins to contribute to the file validation process + this.plugins.emit('onFileValidate', { + file: xmlFile, + program: this + }); + this.plugins.emit('afterFileValidate', xmlFile); } else { //TODO do we actually need to implement this? Figure out how to handle img paths diff --git a/src/astUtils/visitors.spec.ts b/src/astUtils/visitors.spec.ts index 83dd056ea..b37cf4547 100644 --- a/src/astUtils/visitors.spec.ts +++ b/src/astUtils/visitors.spec.ts @@ -4,7 +4,7 @@ import { CancellationTokenSource, Range } from 'vscode-languageserver'; import { expect } from 'chai'; import * as sinon from 'sinon'; import { Program } from '../Program'; -import { BrsFile } from '../files/BrsFile'; +import type { BrsFile } from '../files/BrsFile'; import type { Statement } from '../parser/Statement'; import { PrintStatement, Block, ReturnStatement } from '../parser/Statement'; import type { Expression } from '../parser/Expression'; @@ -17,7 +17,6 @@ import { createStackedVisitor } from './stackedVisitor'; describe('astUtils visitors', () => { const rootDir = process.cwd(); let program: Program; - let file: BrsFile; const PRINTS_SRC = ` sub Main() @@ -76,7 +75,6 @@ describe('astUtils visitors', () => { beforeEach(() => { program = new Program({ rootDir: rootDir }); - file = new BrsFile('abs.bs', 'rel.bs', program); }); afterEach(() => { program.dispose(); @@ -102,9 +100,9 @@ describe('astUtils visitors', () => { const walker = functionsWalker(visitor); program.plugins.add({ name: 'walker', - afterFileParse: () => walker(file) + afterFileParse: file => walker(file as BrsFile) }); - file.parse(PRINTS_SRC); + program.addOrReplaceFile('source/main.brs', PRINTS_SRC); expect(actual).to.deep.equal([ 'Block:0', // Main sub body 'PrintStatement:1', // print 1 @@ -139,9 +137,9 @@ describe('astUtils visitors', () => { const walker = functionsWalker(s => actual.push(s.constructor.name), cancel.token); program.plugins.add({ name: 'walker', - afterFileParse: () => walker(file) + afterFileParse: file => walker(file as BrsFile) }); - file.parse(PRINTS_SRC); + program.addOrReplaceFile('source/main.brs', PRINTS_SRC); expect(actual).to.deep.equal([ 'Block', // Main sub body 'PrintStatement', // print 1 @@ -184,9 +182,9 @@ describe('astUtils visitors', () => { }, cancel.token); program.plugins.add({ name: 'walker', - afterFileParse: () => walker(file) + afterFileParse: file => walker(file as BrsFile) }); - file.parse(PRINTS_SRC); + program.addOrReplaceFile('source/main.brs', PRINTS_SRC); expect(actual).to.deep.equal([ 'Block', // Main sub body 'PrintStatement', // print 1 @@ -263,10 +261,10 @@ describe('astUtils visitors', () => { }); program.plugins.add({ name: 'walker', - afterFileParse: () => walker(file) + afterFileParse: (file) => walker(file as BrsFile) }); - file.parse(EXPRESSIONS_SRC); + program.addOrReplaceFile('source/main.brs', EXPRESSIONS_SRC); expect(actual).to.deep.equal([ //The comment statement is weird because it can't be both a statement and expression, but is treated that way. Just ignore it for now until we refactor comments. //'CommentStatement:1:CommentStatement', // ' diff --git a/src/files/BrsFile.spec.ts b/src/files/BrsFile.spec.ts index 3c31eb557..e497665aa 100644 --- a/src/files/BrsFile.spec.ts +++ b/src/files/BrsFile.spec.ts @@ -2293,13 +2293,12 @@ describe('BrsFile', () => { name: 'transform callback', afterFileParse: onParsed }); - const file = new BrsFile(`absolute_path/file${ext}`, `relative_path/file${ext}`, program); - expect(file.extension).to.equal(ext); - file.parse(` + file = program.addOrReplaceFile({ src: `absolute_path/file${ext}`, dest: `relative_path/file${ext}` }, ` sub Sum() print "hello world" end sub `); + expect(file.extension).to.equal(ext); return file; } diff --git a/src/files/BrsFile.ts b/src/files/BrsFile.ts index 8d0a59df8..7aae6ca23 100644 --- a/src/files/BrsFile.ts +++ b/src/files/BrsFile.ts @@ -268,28 +268,14 @@ export class BrsFile { ...this._parser.diagnostics as BsDiagnostic[] ); - //notify AST ready - this.program.plugins.emit('afterFileParse', this); - //extract all callables from this file this.findCallables(); //find all places where a sub/function is being called this.findFunctionCalls(); - //emit an event before starting to validate this file - this.program.plugins.emit('beforeFileValidate', { - file: this, - program: this.program - }); - - //emit an event to allow plugins to contribute to the file validation process - this.program.plugins.emit('onFileValidate', { - file: this, - program: this.program - }); - - this.findAndValidateImportAndImportStatements(); + //register all import statements for use in the rest of the program + this.registerImports(); //attach this file to every diagnostic for (let diagnostic of this.diagnostics) { @@ -305,9 +291,29 @@ export class BrsFile { } } - public findAndValidateImportAndImportStatements() { - let topOfFileIncludeStatements = [] as Array; + private registerImports() { + for (const statement of this.parser?.references?.importStatements ?? []) { + //register import statements + if (isImportStatement(statement) && statement.filePathToken) { + this.ownScriptImports.push({ + filePathRange: statement.filePathToken.range, + pkgPath: util.getPkgPathFromTarget(this.pkgPath, statement.filePath), + sourceFile: this, + text: statement.filePathToken?.text + }); + } + } + } + + public validate() { + //only validate the file if it was actually parsed (skip files containing typedefs) + if (!this.hasTypedef) { + this.validateImportStatements(); + } + } + private validateImportStatements() { + let topOfFileIncludeStatements = [] as Array; for (let stmt of this.ast.statements) { //skip comments if (isCommentStatement(stmt)) { @@ -327,16 +333,6 @@ export class BrsFile { ...this._parser.references.importStatements ]; for (let result of statements) { - //register import statements - if (isImportStatement(result) && result.filePathToken) { - this.ownScriptImports.push({ - filePathRange: result.filePathToken.range, - pkgPath: util.getPkgPathFromTarget(this.pkgPath, result.filePath), - sourceFile: this, - text: result.filePathToken?.text - }); - } - //if this statement is not one of the top-of-file statements, //then add a diagnostic explaining that it is invalid if (!topOfFileIncludeStatements.includes(result)) { diff --git a/src/files/XmlFile.spec.ts b/src/files/XmlFile.spec.ts index c431d4204..d05fbfec8 100644 --- a/src/files/XmlFile.spec.ts +++ b/src/files/XmlFile.spec.ts @@ -13,6 +13,7 @@ import { standardizePath as s } from '../util'; import { expectDiagnostics, expectZeroDiagnostics, getTestTranspile, trim, trimMap } from '../testHelpers.spec'; import { ProgramBuilder } from '../ProgramBuilder'; import { LogLevel } from '../Logger'; +import { isXmlFile } from '../astUtils/reflection'; describe('XmlFile', () => { const tempDir = s`${process.cwd()}/.tmp`; @@ -40,17 +41,17 @@ describe('XmlFile', () => { describe('parse', () => { it('allows modifying the parsed XML model', () => { const expected = 'OtherName'; - file = new XmlFile('abs', 'rel', program); program.plugins.add({ name: 'allows modifying the parsed XML model', - afterFileParse: () => { - file.parser.ast.root.attributes[0].value.text = expected; + afterFileParse: (file) => { + if (isXmlFile(file) && file.parser.ast.root?.attributes?.[0]?.value) { + file.parser.ast.root.attributes[0].value.text = expected; + } } }); - file.parse(trim` + file = program.addOrReplaceFile('components/ChildScene.xml', trim` - \n\n\n\n\n```", + "events": [], + "extends": { + "name": "Group", + "url": "https://developer.roku.com/docs/references/scenegraph/layout-group-nodes/group.md" + }, + "fields": [ + { + "accessPermission": "READ\\_WRITE", + "default": "renderLast", + "description": "| Option | Description |\n| --- | --- |\n| `\"renderFirst\"` | any drawing done by this node will be done **before** the node children are rendered |\n| `\"renderLast\"` | any drawing done by this node will be done **after** the node children are rendered |", + "name": "childRenderOrder", + "type": "option as string" + }, + { + "accessPermission": "READ\\_WRITE", + "default": "\\[ 0.0, 0.0, 0.0, 0.0 \\]", + "description": "Specifies a rectangle in the node local coordinate system that is used to limit the region where this node and its children can render. If a non-empty rectangle is specified, then all drawing by this node and its children will be limited to that rectangular area. \\* \\`ClippingRects\\` can be specified by the node or by any of its ancestors in the SceneGraph. \\* \\`ClippingRects\\` are automatically set by some nodes such as lists and grids. \\* \\`ClippingRects\\` are always clipped to the screen boundaries, so if a \\`clippingRect\\` is specified that is partially or completely offscreen, it will be clipped to the screen boundaries. With respect to render tracking, although the node could be completely within the bounds of the specified \\`clippingRect\\`, it's \\`renderTracking\\` field could be set to \\`\"none\"\\` if the portion of the \\`clippingRect\\` it occupies is completely offscreen.", + "name": "clippingRect", + "type": "array of float" + }, + { + "accessPermission": "READ\\_WRITE", + "default": "false", + "description": "If true, renderTracking will be set to a string describing how much of the node is rendered on screen", + "name": "enableRenderTracking", + "type": "Boolean" + }, + { + "accessPermission": "READ\\_WRITE", + "default": "true", + "description": "If true, the node opacity is determined by multiplying opacity attribute of the node by the opacity of the parent node, which may have been determined by multiplying the opacity of its ancestor nodes. If false, the node opacity is determined by the opacity attribute set for the node or the default opacity attribute value", + "name": "inheritParentOpacity", + "type": "Boolean" + }, + { + "accessPermission": "READ\\_WRITE", + "default": "true", + "description": "If true, the node overall transformation is determined by combining the accumulated transformation matrix of all of its ancestors in the SceneGraph with the node local 2D transformation matrix described by its translation, rotation, scale and scaleRotateCenter fields. If false, the accumulated transformation of all of its ancestors in the SceneGraph is ignored and only the node local transformation matrix is used. This causes the node to be transformed relative to the root of the SceneGraph (that is, the Scene component)", + "name": "inheritParentTransform", + "type": "Boolean" + }, + { + "accessPermission": "READ\\_WRITE", + "default": "false", + "description": "Set to true to suppress the default CVAA text to speech. This allows channels to provide their own custom implementation", + "name": "muteAudioGuide", + "type": "Boolean" + }, + { + "accessPermission": "READ\\_WRITE", + "default": "1.0", + "description": "Sets the opacity of the node and its children. Opacity is the opposite of transparency. Opacity values range from 0.0 (fully transparent) to 1.0 (fully opaque). As the SceneGraph is traversed, the opacity values are combined by multiplying the current accumulated opacity with the node opacity, so that if the accumulated opacity of a node ancestors is 0.25 (75% transparent), the node will have opacity of 0.25 or less. This allows entire branches of the SceneGraph to fade in and out by animating the opacity of the node at the root of the branch", + "name": "opacity", + "type": "float" + }, + { + "accessPermission": "READ\\_WRITE", + "default": "0", + "description": "Used in combination with the numRenderPasses field of nodes extended from the \\[ArrayGrid\\](https://developer.roku.com/docs/references/scenegraph/abstract-nodes/arraygrid.md\"ArrayGrid\") abstract node class, to optimize rendering of lists and grids. This should never be set to a non-zero value unless you are optimizing the performance of a list or grid rendering by specifying the sequence of rendering operations for sub-elements of the list or grid items, and have set the numRenderPasses field value for the list or grid to a value greater than 1. If the numRenderPasses field value for the list or grid is set to a value greater than 1, you must set this field to a value greater than 0 for all sub-elements of the list or grid items, and not greater than the numRenderPasses field value. If the numRenderPasses field is set to a value greater than 1, and you set this field for a list or grid item sub-element to 0 (the default), or a value greater than the numRenderPasses field value, the list or grid item sub-element will not render", + "name": "renderPass", + "type": "integer" + }, + { + "accessPermission": "READ\\_WRITE", + "default": "disabled", + "description": "renderTracking is set to \"disabled\" when enableRenderTracking is set to false. The following options are only available when enableRenderTracking is set to true:\n\n| Option | Description |\n| --- | --- |\n| `\"none\"` | renderTracking is set to `\"none\"` if **one or more** of these conditions is true: the node's `visible` field is set to `false`the node's `opacity` field is set to `0.0`no `clippingRect` is specified and the node is completely offscreena `clippingRect` is specified and the node lies completely outside that `clippingRect's` coordinates or is completely offscreen |\n| `\"partial\"` | renderTracking is set to `\"partial\"` if **all** of the following conditions are true: the node's `visible` field is set to `true`the node's `opacity` field is greater than `0.0`no `clippingRect` is specified and the node is partially offscreena `clippingRect` is specified and the node lies partially inside the `clippingRect's` coordinates |\n| `\"full\"` | renderTracking is set to `\"full\"` if **all** of the following conditions are true: the node's `visible` field is set to `true`the node's `opacity` field is greater than `0.0`no `clippingRect` is specified and the node is completely onscreena `clippingRect` is specified and the node lies completely inside the `clippingRect's` coordinates |", + "name": "renderTracking", + "type": "option as string" + }, + { + "accessPermission": "READ\\_WRITE", + "default": "0.0", + "description": "Defines the rotation angle about the scaleRotateCenter point (in radians) of the node local coordinate system. Positive values specify a counterclockwise rotation, negative values specify a clockwise rotation. For some Roku Player hardware, specifically Roku Players without OpenGL graphics support, only rotations of 0, 90, 180 and 270 degrees (in equivalent radians) are supported. (See \\[Roku Models and Features\\](/docs/specs/hardware.md#current-models \"Roku Models and Features\") for information on OpenGL support)", + "name": "rotation", + "type": "float" + }, + { + "accessPermission": "READ\\_WRITE", + "default": "\\[1.0,1.0\\]", + "description": "Defines the scale factor to be applied to the node local coordinate", + "name": "scale", + "type": "vector2d" + }, + { + "accessPermission": "READ\\_WRITE", + "default": "\\[0.0,0.0\\]", + "description": "Describes the location of a point in the node local coordinate that serves as the center of the scale and rotation operations", + "name": "scaleRotateCenter", + "type": "vector2d" + }, + { + "accessPermission": "READ\\_WRITE", + "default": "\\[0.0,0.0\\]", + "description": "Defines the origin of the node local coordinate system relative to its parent node", + "name": "translation", + "type": "vector2d" + }, + { + "accessPermission": "READ\\_WRITE", + "default": "true", + "description": "If true, the node and its children are rendered. If false, the node and its children do not render", + "name": "visible", + "type": "Boolean" + } + ], + "interfaces": [], + "name": "SimpleLabel", + "url": "https://developer.roku.com/docs/references/scenegraph/renderable-nodes/simplelabel.md" + }, + "soundeffect": { + "description": "Extends [**Node**](https://developer.roku.com/docs/references/scenegraph/node.md\n\nThe SoundEffect node class is used to play audio sound effects that can be triggered from events that occur in the UI. Typically, these sound effects are short audio clips, but there is no inherent limit on their length. Currently, up to four simultaneous sounds can be playing at any time, in addition to audio from streaming content and TextToSpeech audio.\n\nFiles can be installed locally as part of the channel package or dynamically downloaded from the network. All files must be WAV (i.e. PCM) format.\n\nFor local files, the convention is to include the WAV files in a directory named \"sounds\".\n\nFor downloaded files, a least-recently-used (LRU) mechanism is used to keep the most recently downloaded/played sounds in temporary storage on the device. If the limits on the maximum number/size of downloaded sounds is exceeded, the least recently used sounds are removed from temporary storage. They will be automatically reloaded the next time the control field is set to \"play\".\n\nA sample demonstrating how to use the SoundEffect node can be found here: [SimpleSoundEffect](https://github.com/rokudev/samples/blob/master/media/SimpleSoundEffect.zip)", + "events": [], + "extends": { + "name": "Node", + "url": "https://developer.roku.com/docs/references/scenegraph/node.md" + }, + "fields": [ + { + "accessPermission": "READ\\_WRITE", + "default": "none", + "description": "Set to control the audio playback. Getting the value of this field returns the most recent value set, or none if no value has been set.\n\n| Option | Effect |\n| --- | --- |\n| none | No effect |\n| play | Start playing the audio. If the audio is already playing, it will be restarted. If the `loadStatus` field is not \"ready\", the sound will not be played and the `state` field will be set to \"notready\". For networked files with the `loadStatus` field set to \"flushed\", setting `control` to \"play\" will automatically trigger a reload of the network file, but will not result in the sound being played, due to the time it takes to download the file again. In this case, the sound can be played once the `loadStatus` field changes from \"flushed\" to \"ready\" |\n| stop | If the audio is playing, stop playing the audio. If the audio is not playing, no effect. |", + "name": "control", + "type": "option string" + }, + { + "accessPermission": "READ\\_ONLY", + "default": "none", + "description": "Indicates the status of the sound file.\n\n| Value | Meaning |\n| --- | --- |\n| none | No file has been requested. |\n| loading | (network files only) The file has been requested and is being downloaded. |\n| ready | The file is ready to be played (i.e. it is on the device and is a valid WAV file). |\n| failed | The file path or URI is incorrect or refers to a file that is not a valid WAV file. |\n| flushed | (network files only) The file was ready, but has been deleted from the LRU cache. Setting the `control` field to play will cause the file to be automatically reloaded, but not be played upon completion. |", + "name": "loadStatus", + "type": "value string" + }, + { + "accessPermission": "READ\\_ONLY", + "default": "none", + "description": "Can be used to track the progress of current state of local and networked sound files When the field value changes to ready, the sound is ready to be played. The possible values are:\n\n| Value | Meaning |\n| --- | --- |\n| none | No current playback state |\n| playing | Audio is currently playing. |\n| stopped | The audio playback was stopped by setting control to \"stop\". The state will also be set to \"stopped\" if audio was playing and the uri is changed. |\n| finished | The audio playback reached the end of the audio |\n| toomanysounds | Control was to \"play\" while there were already the maximum number of SoundEffect sounds playing. Currently, this limit is 4. |\n| notready | The sound file is not on the device. This is set in response to the control field being set to \"play\". For local WAV files included in a channel package, it will be occur if the path to the file is not correct, or if the file is not a valid WAV file. For network-accessed WAV files, this indicates one of these three conditions is true: * The file has been requested, but is not finished downloading. In this case, the `loadStatus` field will be set to \"loading\". * The file request has completed, but the URL is incorrect or the downloaded file is not a valid WAV filed. In this case, the `loadStatus` field will be set to \"failed\" * The file has previously been downloaded, but has been flushed from the LRU cache. In this case, the `loadStatus` field will be set to \"flushed\". |", + "name": "state", + "type": "value string" + }, + { + "accessPermission": "READ\\_WRITE", + "default": "", + "description": "Specifies the URI of the WAV file. Sounds included as part of the application package can be referenced using the \\`pkg:/sounds\\` prefix. This may also specify the location of a WAV file on a remote server.", + "name": "uri", + "type": "uri" + }, + { + "accessPermission": "READ\\_WRITE", + "default": "50", + "description": "The volume is a number between 0 and 100 (percentage of full volume). 50 should be used for normal volume.", + "name": "volume", + "type": "integer" + } + ], + "interfaces": [], + "name": "SoundEffect", + "url": "https://developer.roku.com/docs/references/scenegraph/media-playback-nodes/soundeffect.md" + }, + "standarddialog": { + "availableSince": "10.0", + "description": "_Available since Roku OS 10.0_\n\nExtends [Group](https://developer.roku.com/docs/references/scenegraph/layout-group-nodes/group.md\"**Group**\")\n\nThe **StandardDialog** node is the base for Roku's pre-built standard message, keyboard, pinpad, and progress dialogs. It can also be used directly with a custom dialog structure built with the **StdDialogItem** nodes.", + "events": [], + "extends": { + "name": "Group", + "url": "https://developer.roku.com/docs/references/scenegraph/layout-group-nodes/group.md" + }, + "fields": [ + { + "accessPermission": "READ\\_ONLY", + "default": "0", + "description": "Indicates the index of the button that gained focus when the user moved the focus onto one of the buttons in the button area.", + "name": "buttonFocused", + "type": "int" + }, + { + "accessPermission": "READ\\_ONLY", + "default": "0", + "description": "indicates the index of the selected button when the user selects one of the buttons in the button area.", + "name": "buttonSelected", + "type": "int" + }, + { + "accessPermission": "WRITE\\_ONLY", + "default": "false", + "description": "Dismisses the dialog. The dialog is dismissed whenever the close field is set, regardless of whether the field is set to true or false.", + "name": "close", + "type": "boolean" + }, + { + "accessPermission": "READ\\_WRITE", + "default": "0.0f", + "description": "Sets the height of the dialog. If this field is set to greater than 0, and the layout of the dialog for the specified width results in a dialog with a height less than the value of this field, the dialog layout is increased so that the dialog height matches the value of this field. In this case, the button area is moved to the bottom of the dialog and a blank region exists between the content area and the button area.", + "name": "height", + "type": "float" + }, + { + "accessPermission": "READ\\_WRITE", + "default": "not set", + "description": "Sets the color palette for the dialog's background, text, buttons, and other elements. By default, no palette is specified; therefore, the dialog inherits the color palette from the nodes higher in the scene graph (typically, from the dialog's \\[Scene\\](https://developer.roku.com/docs/references/scenegraph/scene.md node, which has a \\*\\*palette\\*\\* field that can be used to consistently color the standard dialogs and keyboards in the channel). The RSGPalette color values used by the StandardDialog node are as follows:\n\n| Palette Color Name | Usages |\n| --- | --- |\n| DialogBackgroundColor | Blend color for dialog's background bitmap. |\n| DialogItemColor | Blend color for the following items: * [StdDlgProgressItem's](https://developer.roku.com/docs/references/scenegraph/standard-dialog-framework-nodes/std-dlg-progress-item.md spinner bitmap * [StdDlgDeterminateProgressItem's](https://developer.roku.com/docs/references/scenegraph/standard-dialog-framework-nodes/std-dlg-determinate-progress-item.md graphic |\n| DialogTextColor | Color for the text in the following items: * [StdDlgTextItem](https://developer.roku.com/docs/references/scenegraph/standard-dialog-framework-nodes/std-dlg-text-item.md and [StdDlgGraphicItem](https://developer.roku.com/docs/references/scenegraph/standard-dialog-framework-nodes/std-dlg-graphic-item.md if the **namedTextStyle** field is set to \"normal\" or \"bold\". * All [content area items](https://developer.roku.com/docs/references/scenegraph/standard-dialog-framework-nodes/std-dlg-item-base.md, except for [StdDlgTextItem](https://developer.roku.com/docs/references/scenegraph/standard-dialog-framework-nodes/std-dlg-text-item.md and [StdDlgGraphicItem](https://developer.roku.com/docs/references/scenegraph/standard-dialog-framework-nodes/std-dlg-graphic-item.md. * [Title area](https://developer.roku.com/docs/references/scenegraph/standard-dialog-framework-nodes/std-dlg-title-area.mdfields). Unfocused button. |\n| DialogFocusColor | Blend color for the following: * The [button area](https://developer.roku.com/docs/references/scenegraph/standard-dialog-framework-nodes/std-dlg-button-area.mdfields) focus bitmap. * The focused scrollbar thumb. |\n| DialogFocusItemColor | Color for the text of the focused button. |\n| DialogSecondaryTextColor | Color for the text of in the following items: * [StdDlgTextItem](https://developer.roku.com/docs/references/scenegraph/standard-dialog-framework-nodes/std-dlg-text-item.md and [StdDlgGraphicItem](https://developer.roku.com/docs/references/scenegraph/standard-dialog-framework-nodes/std-dlg-graphic-item.md if the **namedTextStyle** field is set to \"secondary\". * Disabled button. |\n| DialogSecondaryItemColor | Color for the following items: * The divider displayed below the title area. * The unfilled portion of the [StdDlgDeterminateProgressItem's](https://developer.roku.com/docs/references/scenegraph/standard-dialog-framework-nodes/std-dlg-determinate-progress-item.md graphic. |\n| DialogInputFieldColor | The blend color for the text edit box background bitmap for keyboards used inside dialogs. |\n| DialogKeyboardColor | The blend color for the keyboard background bitmap for keyboards used inside dialogs |\n| DialogFootprintColor | The blend color for the following items: * The button focus footprint bitmap that is displayed when the [button area](https://developer.roku.com/docs/references/scenegraph/standard-dialog-framework-nodes/std-dlg-button-area.mdfields) does not have focus. * Unfocused scrollbar thumb and scrollbar track. |", + "name": "palette", + "type": "RSGPalette node" + }, + { + "accessPermission": "READ\\_ONLY", + "default": "N/A", + "description": "An event that indicates the dialog was dismissed. This event is triggered when one of the following occurs: \\* The \\*\\*close\\*\\* field is set. \\* The Back, Home, or Options key is pressed. \\* Another dialog is displayed.", + "name": "wasClosed", + "type": "event" + }, + { + "accessPermission": "READ\\_WRITE", + "default": "0.0f", + "description": "Sets the width of the dialog: \\* If set to 0, the standard system dialog width is used (1038 for FHD, 692 for HD). If the title or any button text is too wide to fit within the standard width, the dialog width will be automatically increased to show the full title or button text up to a preset maximum (1380 for FHD and 920 for HD). \\* If set to greater than 0, the specified width is used as the overall width of the dialog.", + "name": "width", + "type": "float" + } + ], + "interfaces": [], + "name": "StandardDialog", + "url": "https://developer.roku.com/docs/references/scenegraph/standard-dialog-framework-nodes/standard-dialog.md" + }, + "standardkeyboarddialog": { + "availableSince": "10.0", + "description": "_Available since Roku OS 10.0_\n\nExtends [StandardDialog](https://developer.roku.com/docs/references/scenegraph/standard-dialog-framework-nodes/standard-dialog.md\"**Standard Dialog**\")\n\nThe **StandardKeyboardDialog** node enables text and voice entry of strings consisting of alphanumeric characters as well as many commonly used symbols. It is similar to the legacy [KeyboardDialog](https://developer.roku.com/docs/references/scenegraph/dialog-nodes/keyboarddialog.md node, but includes voice entry functionality, which is provided through its internal **DynamicKeyboard** node.\n\n![keyboard-dialog](https://image.roku.com/ZHZscHItMTc2/keyboard-dialog.jpg)", + "events": [], + "extends": { + "name": "StandardDialog", + "url": "https://developer.roku.com/docs/references/scenegraph/standard-dialog-framework-nodes/standard-dialog.md" + }, + "fields": [ + { + "accessPermission": "READ\\_WRITE", + "default": "\\[ \\]", + "description": "List of buttons to be displayed in the button area at the bottom of the dialog. Each string in the buttons array adds a new button to the button area. > Minimize the number of buttons in the dialog to ensure that all buttons are visible without the user having to scroll up and down.", + "name": "buttons", + "type": "array of string" + }, + { + "accessPermission": "Access Permission", + "default": "Default", + "description": "Description", + "name": "Field", + "type": "Type" + }, + { + "accessPermission": "READ\\_WRITE", + "default": "\"generic\"", + "description": "The type of text to be entered. This may be used by the keyboard to modify the voice entry method and to determine when a valid string has been entered. This may be one of the following values: \\* \"email\": letter-by-letter dictation for emails. \\* \"numeric\": letter-by-letter dictation for PIN codes, zip codes, and other numeric input. \\* \"alphanumeric\": letter-by-letter dication for street addresses or other sequences of numbers and letters. \\* \"generic\": Full word input for search queries or other sequences of numbers, letters and symbols. \\* \"password\": letter-by-letter dication for passwords.", + "name": "keyboardDomain", + "type": "string" + }, + { + "accessPermission": "READ\\_WRITE", + "default": "\\[ \\]", + "description": "One or more blocks of text, which are typically used to describe information about the data to be entered. Each string in the array is displayed as a separate block of text with the standard amount of space left between the blocks. > Minimize the message length to avoid having a scrollbar automatically added to the content area. If multiple strings are specified or any string is too long, the dialog may not be able to fit within the height of the display.", + "name": "message", + "type": "array of string" + }, + { + "accessPermission": "READ\\_WRITE", + "default": "\"\"", + "description": "The default string to be displayed in the keyboard's text edit box. When the user enters the text, this field is updated with the currently entered string.", + "name": "text", + "type": "string" + }, + { + "accessPermission": "READ", + "default": "The keyboard item's VoiceTextEditBox node", + "description": "The internal VoiceTextEditBox node used by this dialog's internal keyboard. This field should be used only to access the fields of this internal node.", + "name": "textEditBox", + "type": "VoiceTextEditBox node" + }, + { + "accessPermission": "READ\\_WRITE", + "default": "\"\"", + "description": "The title to be displayed at the top of the dialog.", + "name": "title", + "type": "string" + } + ], + "interfaces": [], + "name": "StandardKeyboardDialog", + "url": "https://developer.roku.com/docs/references/scenegraph/standard-dialog-framework-nodes/standard-keyboard-dialog.md" + }, + "standardmessagedialog": { + "availableSince": "10.0", + "description": "_Available since Roku OS 10.0_\n\nExtends [StandardDialog](https://developer.roku.com/docs/references/scenegraph/standard-dialog-framework-nodes/standard-dialog.md\"**Standard Dialog**\")\n\nThe **StandardMessageDialog** node is used to displays a message to the user. It is similar to the legacy [Dialog](https://developer.roku.com/docs/references/scenegraph/dialog-nodes/dialog.md node. It may contain the following items (from top to bottom):\n\n* One or more blocks of text at the top.\n* One bulleted / numbered list.\n* One or more blocks of text at the bottom.\n\n![standard-message-dialog](https://image.roku.com/ZHZscHItMTc2/standard-message-dialog.jpg)", + "events": [], + "extends": { + "name": "StandardDialog", + "url": "https://developer.roku.com/docs/references/scenegraph/standard-dialog-framework-nodes/standard-dialog.md" + }, + "fields": [ + { + "accessPermission": "READ\\_WRITE", + "default": "\\[ \\]", + "description": "One or more blocks of informational text displayed at the bottom of the dialog's content area. Each string in the array is displayed as a separate block of text with the standard amount of space left between the blocks. > To separate lines of text, add each line as an element in the array. Do not use newline characters.", + "name": "bottomMessage", + "type": "array of string" + }, + { + "accessPermission": "READ\\_WRITE", + "default": "\\[ \\]", + "description": "An array of strings displayed as a bulleted or numbered list. The list is displayed in the content area below the message and above the bottom message.", + "name": "bulletText", + "type": "array of string" + }, + { + "accessPermission": "READ\\_WRITE", + "default": "\"bullet\"", + "description": "If the \\*\\*bulletText\\*\\* field is set, specifies the type of list item delimiter, which may be one of the following: \\* \"bullet\" (this is the default) \\* \"numbered\" \\* \"lettered\" .", + "name": "bulletType", + "type": "string" + }, + { + "accessPermission": "READ\\_WRITE", + "default": "\\[ \\]", + "description": "List of buttons to be displayed in the button area at the bottom of the dialog. Each string in the buttons array adds a new button to the button area. > Minimize the number of buttons in the dialog to ensure they are all visible when the dialog is displayed.", + "name": "buttons", + "type": "array of string" + }, + { + "accessPermission": "READ\\_WRITE", + "default": "\\[ \\]", + "description": "One or more blocks of informational text displayed at the top of the dialog's content area. Each string in the array is displayed as a separate block of text with the standard amount of space left between the blocks. > To separate lines of text, add each line as an element in the array. Do not use newline characters.", + "name": "message", + "type": "array of string" + }, + { + "accessPermission": "READ\\_WRITE", + "default": "\"\"", + "description": "The title to be displayed at the top of the dialog.", + "name": "title", + "type": "string" + } + ], + "interfaces": [], + "name": "StandardMessageDialog", + "url": "https://developer.roku.com/docs/references/scenegraph/standard-dialog-framework-nodes/standard-message-dialog.md" + }, + "standardpinpaddialog": { + "availableSince": "10.0", + "description": "_Available since Roku OS 10.0_\n\nExtends [StandardDialog](https://developer.roku.com/docs/references/scenegraph/standard-dialog-framework-nodes/standard-dialog.md\"**Standard Dialog**\")\n\nThe **StandardPinPadDialog** node enables text and voice entry of numeric characters—typically, short numeric PIN codes. It is similar to the legacy [PinDialog](https://developer.roku.com/docs/references/scenegraph/dialog-nodes/pindialog.md node, but includes additional voice entry of the numeric digits. This additional functionality is provided through the node's internal DynamicPinPad and VoiceTextEditBox nodes.\n\n![pin-pad-dialog](https://image.roku.com/ZHZscHItMTc2/pin-pad-dialog.jpg)", + "events": [], + "extends": { + "name": "StandardDialog", + "url": "https://developer.roku.com/docs/references/scenegraph/standard-dialog-framework-nodes/standard-dialog.md" + }, + "fields": [ + { + "accessPermission": "READ\\_WRITE", + "default": "\\[ \\]", + "description": "List of buttons to be displayed in the button area at the bottom of the dialog. Each string in the buttons array adds a new button to the button area. > Minimize the number of buttons in the dialog to ensure that all buttons are visible without the user having to scroll up and down.", + "name": "buttons", + "type": "array of string" + }, + { + "accessPermission": "READ\\_WRITE", + "default": "\\[ \\]", + "description": "One or more blocks of text, which are typically used to describe information about the data to be entered. Each string in the array is displayed as a separate block of text with the standard amount of space left between the blocks. > Minimize the message length to avoid having a scrollbar automatically added to the content area. If multiple strings are specified or any string is too long, the dialog may not be able to fit within the height of the display.", + "name": "message", + "type": "array of string" + }, + { + "accessPermission": "READ\\_WRITE", + "default": "\"\"", + "description": "Displays the entered PIN number in the text edit box. As the user enters each numeric digit, this field is updated with the currently entered value.", + "name": "pin", + "type": "string" + }, + { + "accessPermission": "READ", + "default": "The keyboard item's VoiceTextEditBox node", + "description": "The internal VoiceTextEditBox node used by this dialog's internal keyboard. This field should be used only to access the fields of this internal node > Use the \\*\\*textEditBox.maxTextLength\\*\\* field to limit the length of the pin to be entered.", + "name": "textEditBox", + "type": "VoiceTextEditBox node" + }, + { + "accessPermission": "READ\\_WRITE", + "default": "\"\"", + "description": "The title to be displayed at the top of the dialog.", + "name": "title", + "type": "string" + } + ], + "interfaces": [], + "name": "StandardPinPadDialog", + "url": "https://developer.roku.com/docs/references/scenegraph/standard-dialog-framework-nodes/standard-pinpad-dialog.md" + }, + "standardprogressdialog": { + "availableSince": "10.0", + "description": "_Available since Roku OS 10.0_\n\nExtends [StandardDialog](https://developer.roku.com/docs/references/scenegraph/standard-dialog-framework-nodes/standard-dialog.md\"**Standard Dialog**\")\n\nThe StandardProgressDialog node displays a spinning progress indicator that includes a short progress message to the user. It is similar to the legacy [ProgressDialog](https://developer.roku.com/docs/references/scenegraph/dialog-nodes/progressdialog.md) node.\n\n![progress-dialog-title](https://image.roku.com/ZHZscHItMTc2/progress-dialog-title-v2.jpg)", + "events": [], + "extends": { + "name": "StandardDialog", + "url": "https://developer.roku.com/docs/references/scenegraph/standard-dialog-framework-nodes/standard-dialog.md" + }, + "fields": [ + { + "accessPermission": "READ\\_WRITE", + "default": "\"\"", + "description": "A string to be displayed next to the spinning progress indicator. It typically tells the user why they are waiting. > Minimize the message length.", + "name": "message", + "type": "string" + }, + { + "accessPermission": "READ\\_WRITE", + "default": "\"\"", + "description": "The title to be displayed at the top of the dialog.If no title is specified, the progress dialog will be displayed without a title area and will use the minimum width needed to show the spinning progress indicator and message", + "name": "title", + "type": "string" + } + ], + "interfaces": [], + "name": "StandardProgressDialog", + "url": "https://developer.roku.com/docs/references/scenegraph/standard-dialog-framework-nodes/standard-progress-dialog.md" + }, + "stddlgareabase": { + "availableSince": "10.0", + "description": "_Available since Roku OS 10.0_\n\nExtends [Group](https://developer.roku.com/docs/references/scenegraph/layout-group-nodes/group.md\n\nThe **StdDlgAreaBase** node is the base class and provides the common functionality for the three StandardDialog area nodes: [**StdDlgTitleArea**](https://developer.roku.com/docs/references/scenegraph/standard-dialog-framework-nodes/std-dlg-title-area.md, [**StdDlgContentArea**](https://developer.roku.com/docs/references/scenegraph/standard-dialog-framework-nodes/std-dlg-content-area.md and [**StdDlgButtonArea**](https://developer.roku.com/docs/references/scenegraph/standard-dialog-framework-nodes/std-dlg-button-area.md.", + "events": [], + "extends": { + "name": "Group", + "url": "https://developer.roku.com/docs/references/scenegraph/layout-group-nodes/group.md" + }, + "fields": [], + "interfaces": [], + "name": "StdDlgAreaBase", + "url": "https://developer.roku.com/docs/references/scenegraph/standard-dialog-framework-nodes/std-dlg-area-base.md" + }, + "stddlgbullettextitem": { + "availableSince": "10.0", + "description": "_Available since Roku OS 10.0_\n\nExtends [StdDlgItemBase](https://developer.roku.com/docs/references/scenegraph/standard-dialog-framework-nodes/std-dlg-item-base.md\"**StdDlgItemBase**\")\n\nThe **StdDlgBulletTextItem** node is used to display a bulleted list of text in the dialog's content area. It should only be used as a child of a [**StdDlgContentArea**](https://developer.roku.com/docs/references/scenegraph/standard-dialog-framework-nodes/std-dlg-content-area.md node.\n\n![StdDlgBulletTextItem](https://image.roku.com/ZHZscHItMTc2/StdDlgBulletTextItem-v2.jpg)", + "events": [], + "extends": { + "name": "StdDlgItemBase", + "url": "https://developer.roku.com/docs/references/scenegraph/standard-dialog-framework-nodes/std-dlg-item-base.md" + }, + "fields": [ + { + "accessPermission": "READ\\_WRITE", + "default": "\\[ \\]", + "description": "An array of strings displayed as a bulleted or numbered list. The list is displayed in the content area below the message and above the bottom message.", + "name": "bulletText", + "type": "array of string" + }, + { + "accessPermission": "READ\\_WRITE", + "default": "\"bullet\"", + "description": "Specifies the type of list item delimiter, which may be one of the following: \\* \"bullet\" \\* \"numbered\" \\* \"lettered\"", + "name": "bulletType", + "type": "string" + } + ], + "interfaces": [], + "name": "StdDlgBulletTextItem", + "url": "https://developer.roku.com/docs/references/scenegraph/standard-dialog-framework-nodes/std-dlg-bullet-text-item.md" + }, + "stddlgbutton": { + "availableSince": "10.0", + "description": "_Available since Roku OS 10.0_\n\nExtends [Group](https://developer.roku.com/docs/references/scenegraph/layout-group-nodes/group.md\"**Group**\")\n\n**StdDlgButton** is the class used for each button in the [button area](https://developer.roku.com/docs/references/scenegraph/standard-dialog-framework-nodes/standard-dialog-framework-overview.mdstructure). The buttons are displayed in the order in which they are listed as children of the [**StdDlgButtonArea** node](https://developer.roku.com/docs/references/scenegraph/standard-dialog-framework-nodes/std-dlg-button-area.md. The size and layout of each button are controlled by the StandardDialog layout algorithm. **StdDlgButton** nodes should only be used as children of a **StdDlgButtonArea** node.\n\n![std-dlg-button](https://image.roku.com/ZHZscHItMTc2/std-dlg-button-3.jpg)", + "events": [], + "extends": { + "name": "Group", + "url": "https://developer.roku.com/docs/references/scenegraph/layout-group-nodes/group.md" + }, + "fields": [ + { + "accessPermission": "READ\\_WRITE", + "default": "false", + "description": "Specifies whether the button can receive focus. If this field is set to true, the button has an inactive appearance and is unable to receive focus.", + "name": "disabled", + "type": "boolean" + }, + { + "accessPermission": "READ\\_WRITE", + "default": "\"\"", + "description": "The text to be displayed on the button", + "name": "text", + "type": "string" + } + ], + "interfaces": [], + "name": "StdDlgButton", + "url": "https://developer.roku.com/docs/references/scenegraph/standard-dialog-framework-nodes/std-dlg-button.md" + }, + "stddlgbuttonarea": { + "availableSince": "10.0", + "description": "_Available since Roku OS 10.0_\n\nExtends [StdDlgAreaBase](https://developer.roku.com/docs/references/scenegraph/standard-dialog-framework-nodes/std-dlg-area-base.md\"**StdDlgAreaBase**\")\n\nThe **StdDlgButtonArea** node is always positioned at the bottom of the [StandardDialog](https://developer.roku.com/docs/references/scenegraph/standard-dialog-framework-nodes/standard-dialog.md. It contains zero or more child nodes of type [**StdDlgButton**](https://developer.roku.com/docs/references/scenegraph/standard-dialog-framework-nodes/std-dlg-button.md or a type that extends **StdDlgButton**. Each of the **StdDlgButton** nodes provides an option to perform some task related to the purpose of the dialog. For example, dialogs often have \"Continue\" and \"Cancel\" buttons in the bottom area. The buttons are positioned and sized so that they are arranged vertically in the order in which their **StdDlgButton** child nodes are listed.\n\nA dialog may only have a single button area, and the button area is optional.\n\n![std-dlg-button-area](https://image.roku.com/ZHZscHItMTc2/std-dlg-button-area.jpg)", + "events": [], + "extends": { + "name": "StdDlgAreaBase", + "url": "https://developer.roku.com/docs/references/scenegraph/standard-dialog-framework-nodes/std-dlg-area-base.md" + }, + "fields": [], + "interfaces": [], + "name": "StdDlgButtonArea", + "url": "https://developer.roku.com/docs/references/scenegraph/standard-dialog-framework-nodes/std-dlg-button-area.md" + }, + "stddlgcontentarea": { + "availableSince": "10.0", + "description": "_Available since Roku OS 10.0_\n\nExtends [StdDlgAreaBase](https://developer.roku.com/docs/references/scenegraph/standard-dialog-framework-nodes/std-dlg-area-base.md\"**StdDlgAreaBase**\")\n\nThe **StdDlgContentArea** node contains the main body of the dialog. It is positioned between the title area and the button area.\n\nIt contains zero or more child nodes that extend [**StdDlgItemBase**](https://developer.roku.com/docs/references/scenegraph/standard-dialog-framework-nodes/std-dlg-item-base.md (for example, [**StdDlgTextItem**](https://developer.roku.com/docs/references/scenegraph/standard-dialog-framework-nodes/std-dlg-text-item.md, [**StdDlgProgressItem**](https://developer.roku.com/docs/references/scenegraph/standard-dialog-framework-nodes/std-dlg-progress-item.md, [**StdDlgGraphicItem**](https://developer.roku.com/docs/references/scenegraph/standard-dialog-framework-nodes/std-dlg-graphic-item.md, and other dialog building blocks). The layout and position of the [**StdDlgItemBase** nodes](https://developer.roku.com/docs/references/scenegraph/standard-dialog-framework-nodes/std-dlg-item-base.md are based on the dialog's width; the nodes are arranged vertically from top to bottom in the content area based on the order in which they are listed. The content area should contain only [**StdDlgItemBase** nodes](https://developer.roku.com/docs/references/scenegraph/standard-dialog-framework-nodes/std-dlg-item-base.md; otherwise, its layout and rendering are undefined.\n\nA dialog may only have a single content area, and the content area is optional.\n\n![content-area](https://image.roku.com/ZHZscHItMTc2/content-area.jpg)", + "events": [], + "extends": { + "name": "StdDlgAreaBase", + "url": "https://developer.roku.com/docs/references/scenegraph/standard-dialog-framework-nodes/std-dlg-area-base.md" + }, + "fields": [], + "interfaces": [], + "name": "StdDlgContentArea", + "url": "https://developer.roku.com/docs/references/scenegraph/standard-dialog-framework-nodes/std-dlg-content-area.md" + }, + "stddlgdeterminateprogressitem": { + "availableSince": "10.0", + "description": "_Available since Roku OS 10.0_\n\nExtends [StdDlgItemBase](https://developer.roku.com/docs/references/scenegraph/standard-dialog-framework-nodes/std-dlg-item-base.md\"**StdDlgItemBase**\")\n\nThe **StdDlgDeterminateProgressItem** node is used to display a progress indicator in the dialog's content area. It provides the percentage of progress that has been completed for a task that takes a limited amount of time. It should only be used as a child of a [**StdDlgContentArea**](https://developer.roku.com/docs/references/scenegraph/standard-dialog-framework-nodes/std-dlg-content-area.md node.\n\n![std-dlg-determinate-progress-item](https://image.roku.com/ZHZscHItMTc2/std-dlg-determinate-progress-item-2.jpg)", + "events": [], + "extends": { + "name": "StdDlgItemBase", + "url": "https://developer.roku.com/docs/references/scenegraph/standard-dialog-framework-nodes/std-dlg-item-base.md" + }, + "fields": [ + { + "accessPermission": "READ\\_WRITE", + "default": "\"0\"", + "description": "Specifies the current completion percentage text and graphic to be displayed (for example \"35%\" with more than a third of the indicator filled). If this is set to a number less than 0 or greater than 100, the progress indicator will display \"0%\" or \"100%\" completion, respectively.", + "name": "percent", + "type": "string" + }, + { + "accessPermission": "READ\\_WRITE", + "default": "\"\"", + "description": "Specifies the text to be displayed next to the progress graphic. If the text width does not fit within the width of the content area, the text will wrap onto multiple lines.", + "name": "text", + "type": "string" + } + ], + "interfaces": [], + "name": "StdDlgDeterminateProgressItem", + "url": "https://developer.roku.com/docs/references/scenegraph/standard-dialog-framework-nodes/std-dlg-determinate-progress-item.md" + }, + "stddlggraphicitem": { + "availableSince": "10.0", + "description": "_Available since Roku OS 10.0_\n\nExtends [StdDlgItemBase](https://developer.roku.com/docs/references/scenegraph/standard-dialog-framework-nodes/std-dlg-item-base.md\"**StdDlgItemBase**\")\n\nThe **StdDlgGraphicItem** node is used to display an image in the dialog's content area with an optional text label displayed to the left, right, above, or below the image. It should only be used as a child of a [**StdDlgContentArea**](https://developer.roku.com/docs/references/scenegraph/standard-dialog-framework-nodes/std-dlg-content-area.md node.\n\n![std-dlg-graphic-item](https://image.roku.com/ZHZscHItMTc2/std-dlg-graphic-item.jpg)", + "events": [], + "extends": { + "name": "StdDlgItemBase", + "url": "https://developer.roku.com/docs/references/scenegraph/standard-dialog-framework-nodes/std-dlg-item-base.md" + }, + "fields": [ + { + "accessPermission": "READ\\_WRITE", + "default": "\"left\"", + "description": "Specifies where to position and align the graphic and its text label, relative to the content area. This may be one of the following values:\n\n| Value | Text Position |\n| --- | --- |\n| left | The graphic is left-aligned in the content area. The text label is positioned horizontally to the right of the graphic, and centered vertically. |\n| right | The graphic is right-aligned in the content area. The text label is positioned horizontally to the left of the graphic, and centered vertically. |\n| center\\_below | The graphic and text label are centered horizontally in the content area. The graphic is positioned below the text label. |\n| center\\_above | The graphic and text label are centered horizontally in the content area. The graphic is positioned above the text label. |", + "name": "graphicAlign", + "type": "string" + }, + { + "accessPermission": "READ\\_WRITE", + "default": "0", + "description": "The image height to be used instead of the image's actual height.", + "name": "graphicHeight", + "type": "float" + }, + { + "accessPermission": "READ\\_WRITE", + "default": "\"\"", + "description": "The URI of the image to be displayed.", + "name": "graphicUri", + "type": "uri" + }, + { + "accessPermission": "READ\\_WRITE", + "default": "0", + "description": "The image width to be used instead of the image's actual width.", + "name": "graphicWidth", + "type": "float" + }, + { + "accessPermission": "READ\\_WRITE", + "default": "\"\"", + "description": "Specifies the text to be displayed next to the graphic. If the text width does not fit within the width of the content area, the text will wrap onto multiple lines.", + "name": "text", + "type": "string" + } + ], + "interfaces": [], + "name": "StdDlgGraphicItem", + "url": "https://developer.roku.com/docs/references/scenegraph/standard-dialog-framework-nodes/std-dlg-graphic-item.md" + }, + "stddlgitembase": { + "availableSince": "10.0", + "description": "_Available since Roku OS 10.0_\n\nExtends [Group](https://developer.roku.com/docs/references/scenegraph/layout-group-nodes/group.md)\n\n**StdDlgItemBase** is the base class for all the content area items. It provides the common functionality for all StdDlg\\[_x_\\]Item nodes (for example, [**StdDlgBulletTextItem**](https://developer.roku.com/docs/references/scenegraph/standard-dialog-framework-nodes/std-dlg-bullet-text-item.md, [**StdDlgTextItem**](https://developer.roku.com/docs/references/scenegraph/standard-dialog-framework-nodes/std-dlg-text-item.md, [**StdDlgKeyboardItem**](https://developer.roku.com/docs/references/scenegraph/standard-dialog-framework-nodes/std-dlg-keyboard-item.md, [**StdDlgProgressItem**](https://developer.roku.com/docs/references/scenegraph/standard-dialog-framework-nodes/std-dlg-progress-item.md, [**StdDlgGraphicItem**](https://developer.roku.com/docs/references/scenegraph/standard-dialog-framework-nodes/std-dlg-graphic-item.md, and the other dialog building block nodes).", + "events": [], + "extends": { + "name": "Group", + "url": "https://developer.roku.comhttps://developer.roku.com/docs/references/scenegraph/layout-group-nodes/group.md" + }, + "fields": [ + { + "accessPermission": "READ\\_WRITE", + "default": "false", + "description": "Indicates whether the item can be scrolled vertically by the user. The StandardDialog layout algorithm reduces the height of a scrollable item as needed if the overall height of the dialog is too large to fit on the display.", + "name": "scrollable", + "type": "boolean" + } + ], + "interfaces": [], + "name": "StdDlgItemBase", + "url": "https://developer.roku.com/docs/references/scenegraph/standard-dialog-framework-nodes/std-dlg-item-base.md" + }, + "stddlgkeyboarditem": { + "availableSince": "10.0", + "description": "_Available since Roku OS 10.0_\n\nExtends [StdDlgItemBase](https://developer.roku.com/docs/references/scenegraph/standard-dialog-framework-nodes/std-dlg-item-base.md\"**StdDlgItemBase**\")\n\nThe **StdDlgKeyboardItem** node is used to display a keyboard or PINpad in the dialog's content area. It provides text and voice entry of strings containing alphanumeric characters and symbols or numeric digits. It should only be used as a child of a [**StdDlgContentArea**](https://developer.roku.com/docs/references/scenegraph/standard-dialog-framework-nodes/std-dlg-content-area.md node.\n\n![std-dlg-keyboard-item](https://image.roku.com/ZHZscHItMTc2/std-dlg-keyboard-item.jpg)", + "events": [], + "extends": { + "name": "StdDlgItemBase", + "url": "https://developer.roku.com/docs/references/scenegraph/standard-dialog-framework-nodes/std-dlg-item-base.md" + }, + "fields": [ + { + "accessPermission": "READ\\_WRITE", + "default": "\"unspecified\"", + "description": "Specifies the type of keyboard to be displayed: \\* \"unspecified\": no keyboard is displayed. \\* \"keyboard\": A \\[\\*\\*DynamicKeyboard\\*\\*\\](https://developer.roku.com/docs/references/scenegraph/dynamic-voice-keyboard-nodes/dynamic-keyboard.md node is displayed. \\* \"pinpad\": A \\[\\*\\*DynamicPinPad\\*\\*\\](https://developer.roku.com/docs/references/scenegraph/dynamic-voice-keyboard-nodes/dynamic-pinpad.md node is displayed.", + "name": "keyLayout", + "type": "string" + }, + { + "accessPermission": "READ\\_WRITE", + "default": "\"\"", + "description": "The default string to be displayed in the keyboard's text edit box. When the user enters the text, this field is updated with the currently entered string.", + "name": "text", + "type": "string" + }, + { + "accessPermission": "READ", + "default": "The [**VoiceTextEditBox**](/docs/references/scenegraph/dynamic-voice-keyboard-nodes/voice-text-edit-box.md) associated with the keyboard", + "description": "The internal \\[\\*\\*VoiceTextEditBox\\*\\* node\\](https://developer.roku.com/docs/references/scenegraph/dynamic-voice-keyboard-nodes/voice-text-edit-box.md used by this dialog's internal keyboard. This field should be used only to access the fields of this internal node.", + "name": "textEditBox", + "type": "VoiceTextEditBox node" + } + ], + "interfaces": [], + "name": "StdDlgKeyboardItem", + "url": "https://developer.roku.com/docs/references/scenegraph/standard-dialog-framework-nodes/std-dlg-keyboard-item.md" + }, + "stddlgprogressitem": { + "availableSince": "10.0", + "description": "_Available since Roku OS 10.0_\n\nExtends [StdDlgItemBase](https://developer.roku.com/docs/references/scenegraph/standard-dialog-framework-nodes/std-dlg-item-base.md\"**StdDlgItemBase**\")\n\nThe **StdDlgProgressItem** node is used to display a spinning progress indicator in the dialog's content area. It provides the status of a task that takes an indeterminate amount of time. It should only be used as a child of a [**StdDlgContentArea**](https://developer.roku.com/docs/references/scenegraph/standard-dialog-framework-nodes/std-dlg-content-area.md node.\n\n![std-dlg-progress-item](https://image.roku.com/ZHZscHItMTc2/std-dlg-progress-item.jpg)", + "events": [], + "extends": { + "name": "StdDlgItemBase", + "url": "https://developer.roku.com/docs/references/scenegraph/standard-dialog-framework-nodes/std-dlg-item-base.md" + }, + "fields": [ + { + "accessPermission": "READ\\_WRITE", + "default": "\"\"", + "description": "Specifies the text to be displayed next to the progress graphic. If the text width does not fit within the width of the content area, the text will wrap onto multiple lines.", + "name": "text", + "type": "string" + } + ], + "interfaces": [], + "name": "StdDlgProgressItem", + "url": "https://developer.roku.com/docs/references/scenegraph/standard-dialog-framework-nodes/std-dlg-progress-item.md" + }, + "stddlgtextitem": { + "availableSince": "10.0", + "description": "_Available since Roku OS 10.0_\n\nExtends [StdDlgItemBase](https://developer.roku.com/docs/references/scenegraph/standard-dialog-framework-nodes/std-dlg-item-base.md\"**StdDlgItemBase**\")\n\nThe **StdDlgTextItem** node is used to display a block of text. It should only be used as a child of a [**StdDlgContentArea**](https://developer.roku.com/docs/references/scenegraph/standard-dialog-framework-nodes/std-dlg-content-area.md node.\n\n![StdDlgTextItem](https://image.roku.com/ZHZscHItMTc2/std-dlg-text-item.jpg)\n\n> To separate lines of text, use multiple **StdDlgTextItem** nodes. Do not use newline characters.", + "events": [], + "extends": { + "name": "StdDlgItemBase", + "url": "https://developer.roku.com/docs/references/scenegraph/standard-dialog-framework-nodes/std-dlg-item-base.md" + }, + "fields": [ + { + "accessPermission": "READ\\_WRITE", + "default": "\"\"", + "description": "Specifies the string to be spoken when the audio guide reads the text item. By default, the audio guide reads the string specified in the \\*\\*text\\*\\* field.", + "name": "audioGuideText", + "type": "string" + }, + { + "accessPermission": "READ\\_WRITE", + "default": "\"normal\"", + "description": "Specifies a named style to be used for the displayed text's color and font. The supported styles include:\n\n| Style Name | Palette Color | Font |\n| --- | --- | --- |\n| \"normal\" | DialogTextColor | SmallSystemFont |\n| \"secondary\" | DialogSecondaryTextColor | SmallestSystemFont |\n| \"bold\" | DialogTextColor | SmallBoldSystemFont |", + "name": "namedTextStyle", + "type": "string" + }, + { + "accessPermission": "READ\\_WRITE", + "default": "\"\"", + "description": "Specifies the text to be displayed. If the text width does not fit within the width of the content area, the text will wrap onto multiple lines.", + "name": "text", + "type": "string" + } + ], + "interfaces": [], + "name": "StdDlgTextItem", + "url": "https://developer.roku.com/docs/references/scenegraph/standard-dialog-framework-nodes/std-dlg-text-item.md" + }, + "stddlgtitlearea": { + "availableSince": "10.0", + "description": "_Available since Roku OS 10.0_\n\nExtends [StdDlgAreaBase](https://developer.roku.com/docs/references/scenegraph/standard-dialog-framework-nodes/std-dlg-area-base.md\"**StdDlgAreaBase**\")\n\nThe **StdDlgTitleArea** node contains the dialog's title information, which is always displayed at the top of the dialog. The title area may also include optional icons that appear left or right justified. The **StdDlgTitleArea** should only be used as a child node of a [**StandardDialog**](https://developer.roku.com/docs/references/scenegraph/standard-dialog-framework-nodes/standard-dialog.md.\n\nA dialog may a single title area, and the title area is optional (but is typically used in nearly all cases)\n\n![title-area-icon](https://image.roku.com/ZHZscHItMTc2/title-area-icon.jpg)", + "events": [], + "extends": { + "name": "StdDlgAreaBase", + "url": "https://developer.roku.com/docs/references/scenegraph/standard-dialog-framework-nodes/std-dlg-area-base.md" + }, + "fields": [ + { + "accessPermission": "READ\\_WRITE", + "default": "\"\"", + "description": "Specifies a bitmap to be displayed at the left edge of the dialog's title area (to the left of dialog's primary title).", + "name": "primaryIcon", + "type": "URL" + }, + { + "accessPermission": "READ\\_WRITE", + "default": "0.0f", + "description": "Adjusts the vertical position of the primary icon relative to the baseline of the dialog's primary title. By default, the bottom of the primary icon is aligned with the primary title's baseline.", + "name": "primaryIconVertOffset", + "type": "float" + }, + { + "accessPermission": "READ\\_WRITE", + "default": "\"\"", + "description": "Specifies the title to be displayed in the dialog's title area.", + "name": "primaryTitle", + "type": "string" + }, + { + "accessPermission": "READ\\_WRITE", + "default": "\"\"", + "description": "Specifies a bitmap to be displayed at the right edge of the dialog's title area.", + "name": "secondaryIcon", + "type": "URL" + }, + { + "accessPermission": "READ\\_WRITE", + "default": "0.0f", + "description": "Adjusts the vertical position of the secondary icon relative to the baseline of the dialog's primary title. By default, the bottom of the secondary icon is aligned with the primary title's baseline.", + "name": "secondaryIconVertOffset", + "type": "float" + } + ], + "interfaces": [], + "name": "StdDlgTitleArea", + "url": "https://developer.roku.com/docs/references/scenegraph/standard-dialog-framework-nodes/std-dlg-title-area.md" + }, + "targetgroup": { + "description": "Extends [**Group**](https://developer.roku.com/docs/references/scenegraph/layout-group-nodes/group.md\"**Group**\")\n\nThe TargetGroup node class associates a set of rectangular regions that children of the group will occupy. Like MarkupList, the TargetGroup has a content field containing the data for each item and an itemComponentName field that specifies an RSG component that will be used to render a content item. It also has a targetSet field that contains a [TargetSet](https://developer.roku.com/docs/references/scenegraph/list-and-grid-nodes/targetset.md\"TargetSet\") that define a set of rectangular targets where children of the TargetGroup will be rendered.\n\nThe TargetGroup node is typically used to create a scrolling list (or row) of items where the focused item occupies more space than the other items.\n\nFor example, a TargetGroup could be used to create a full screen vertical scrolling list of item where the focused item is larger than the other items in the list. As the list items scroll, the appearance of the item moving into the focus region would be dynamically adjusted to fill the larger focus region. Simultaneously, the appearance of the item leaving the focus region would be dynamically adjust to return to the unfocused size. To set up this use case, you might set the targetSet field to a TargetSet node that specifies nine rectangles. The first rectangle would be specified to have the width and height of an unfocused item and be positioned so that it's bottom is above the top of the screen. The last rectangle would be specified to have the width and height of an unfocused item and be positioned so that's top is below the bottom of the screen. The remaining seven rectangles would define the rectangular regions of the onscreen items. Suppose the design calls for the focus item to be centered vertically at the center of the screen. To do that, you would specify the 5th rectangle to be larger than the other eight and position it so that it is centered vertically, you would specify the remaining rectangles to form a column of rectangular regions where the top three and bottom three visible items would be located.\n\nThe second step of setting up this use case would be to implement an RSG component that will be used to render each item. The TargetGroup node manages the creation of the items for the visible components, associates each with a ContentNode, and updates fields of the item component with information such as the current width and height of the item and the focus status of the item.\n\nThe TargetGroup's jumpToItem field is set to identify which content item is to be located at the TargetSet's targetRects field target rectangle identified by the TargetSet's focusindex field.\n\nThe final step of setting up this use case would be to create a VerticalList component that extends TargetGroup, sets up the TargetGroup's TargetSet node, and as the user presses up and down buttons on the remote, sets the TargetGroup's animateToTargetItem field to the prior or next index. Setting the animateToTargetItem field causes the displayed items to smoothly animate from their current target region to another target region, such that the specified index ends up at the TargetSet's target rectangle that is identified by the TargetSet's focusIndex field.\n\nThe above use case specifies the most common use case for the TargetGroup node, but only hints at the possible uses. For example, you could create your own RSG components with various custom behaviors. There might include:\n\n* A list where all the items are small when the list does not have the focus, but when the list receives the focus, all of the items smoothly adjust their size and position so that the focus item is largest, the items on either side of the focus item are slightly larger than the unfocused size and the remaining items remain the same size as the unfocused items. To do this, you would create two TargetSet's in your RSG component, one that defines the regions when the list is unfocused and one that defines the regions when the list is focused. Initially, the TargetGroup's targetSet field would be set to the unfocused TargetSet node. Then, when the list is focused, the targetSet's animateToTargetSet field would be set to the focused TargetSet node, causing all of the target regions to smoothly animate to their new size and position, taking along the associated item component's with them.\n* A horizontal scrolling list of items where the focused region floats across the screen as the user presses left/right until the focus region reaches the edge of the display, at which point the focus region remains stationary and the items scroll left or right. This would require the use of several TargetSet nodes (one for each possible position of the focus region). Initally, the TargetGroup's targetSet field would be set to one of these TargetSet's. Then while the focus region is not at one of the edges, key presses would set the animateToTargetSet field to animate the focus region to its next location. Once the focus region reaches an edge, another key press in the same direction would set the animateToTargetIndex field to cause the items to scroll so that the next content item occupies the focus region.\n* A list where when an item is selected, all of the items fly off the screen while the selected item zooms up and moves to the center of the screen. To set up this use case, you would specify a TargetSet for when the list items are onscreen and another TargetSet for the onscreen location of the focused item and the offscreen locations where each items will disappear.\n* A circular arrangement of a fixed number of items with the item at the 6 o'clock position being larger and having the focus. Note that in this case, no offscreen targets would be specified.", + "events": [], + "extends": { + "name": "Group", + "url": "https://developer.roku.com/docs/references/scenegraph/layout-group-nodes/group.md" + }, + "fields": [ + { + "accessPermission": "WRITE\\_ONLY", + "default": "0", + "description": "When set to a valid item index, causes the group to quickly scroll so that the specified index moves into the to the target region specified by the TargetSet's focusIndex", + "name": "animateToItem", + "type": "integer" + }, + { + "accessPermission": "WRITE\\_ONLY", + "default": "invalid", + "description": "When set to a valid TargetSet, causes the group to quickly animate so that the target regions of the initial TargetSet node are smoothly interpolated to the corresponding target regions of the new TargetSet node. If the two TargetSet's focusIndex fields are different, the focusIndex is also animated from the old to the new value", + "name": "animateToTargetSet", + "type": "TargetSet" + }, + { + "accessPermission": "READ\\_WRITE", + "default": "none", + "description": "Specifies the content for the group. See \\[Data Bindings\\](https://developer.roku.com/docs/references/scenegraph/layout-group-nodes/targetgroup.mddata-bindings \"Data Bindings\") below for more details", + "name": "content", + "type": "ContentNode" + }, + { + "accessPermission": "READ\\_ONLY", + "default": "\\-1.0", + "description": "As the TargetGroup animation occurs, this field is constantly updated to represent the index of the ContentNode currently occupying the focus target region. When currFocusItemIndex is an integer value, the specified ContentNode occupies the focus target. When currFocusItemIndex has a fractional part, the value indicates that an animation is in process. For example, a value of 5.7 would indicate that items 5 and 6 are currently overlapping the focus region, with item 6 occupying 70% and item 5 the other 30%", + "name": "currFocusItemIndex", + "type": "float" + }, + { + "accessPermission": "READ\\_ONLY", + "default": "invalid", + "description": "As the TargetGroup animation occurs that is initiated by setting the animateToTargetSet field, currTargetSet contains the current values of the target regions as the animation proceeds from the initial TargetSet's targets to the new TargetSet's targets", + "name": "currTargetSet", + "type": "TargetSet" + }, + { + "accessPermission": "READ\\_WRITE", + "default": "0", + "description": "For TargetSet's that do not specify a focusIndex, this value will be used as the index of the TargetSet where the focused item is located. If a TargetSet specifies any value for the focusIndex, that value will be used instead of defaultTargetSetFocusIndex", + "name": "defaultTargetSetFocusIndex", + "type": "int" + }, + { + "accessPermission": "READ\\_WRITE", + "default": "0.3 seconds", + "description": "Specifies the time, in seconds, to perform the animation when the animateToItem or animateToTargetSet fields are set", + "name": "duration", + "type": "Time" + }, + { + "accessPermission": "READ\\_WRITE", + "default": "", + "description": "Specifies the name of a XML component for the group items. An instance of this component is created on demand for each visible item of the group. The XML component must define a specific interface as detailed in \\[TargetGroup XML Component\\](https://developer.roku.com/docs/references/scenegraph/layout-group-nodes/targetgroup.mdtargetgroup-xml-component \"TargetGroup XML Component\") below", + "name": "itemComponentName", + "type": "string" + }, + { + "accessPermission": "READ\\_ONLY", + "default": "0", + "description": "When a group item gains the key focus, set to the index of the focused item", + "name": "itemFocused", + "type": "integer" + }, + { + "accessPermission": "READ\\_ONLY", + "default": "0", + "description": "When a group item is selected, set to the index of the selected item", + "name": "itemSelected", + "type": "integer" + }, + { + "accessPermission": "READ\\_ONLY", + "default": "0", + "description": "When a group item loses the key focus, set to the index of the unfocused item", + "name": "itemUnfocused", + "type": "integer" + }, + { + "accessPermission": "WRITE\\_ONLY", + "default": "0", + "description": "When set to a valid item index, causes the group to immediately update so that the specified index moves to the target region specified by the TargetSet's focusIndex", + "name": "jumpToItem", + "type": "integer" + }, + { + "accessPermission": "READ\\_WRITE", + "default": "false", + "description": "Specifies whether the current target rectangles (as defined in the read-only currTargetSet field's TargetSet) are drawn or not. Typically this would only be set to true while debugging a channel, although in some use cases its possible that you might want to display the current target rectangles. The rectangles are drawn using the color in the targetSet's TargetSet node's color field", + "name": "showTargetRects", + "type": "Boolean" + }, + { + "accessPermission": "READ\\_WRITE", + "default": "invalid", + "description": "Specifies the TargetSet to use to define the target regions of the items in the group. When set or modified, the target regions are immediately adjusted to use the new values", + "name": "targetSet", + "type": "TargetSet" + }, + { + "accessPermission": "READ\\_WRITE", + "default": "false", + "description": "Specifies whether the content items wraparound at the end of the TargetGroup to fill all of the targets rectangles", + "name": "wrap", + "type": "Boolean" + } + ], + "interfaces": [], + "name": "TargetGroup", + "url": "https://developer.roku.com/docs/references/scenegraph/layout-group-nodes/targetgroup.md" + }, + "targetlist": { + "description": "Extends [**TargetGroup**](https://developer.roku.com/docs/references/scenegraph/layout-group-nodes/targetgroup.md\n\nThe TargetList node class adds useful functionality to the TargetGroup node by making is easy to set up lists and rows of items with limited amounts of scripting required. In particular, TargetList provides a built-in focused/unfocused transition, as well as a simple way to implement various focus management policies (i.e. fixed focus, floating focus, etc.). It also provides default key handling for navigating the list or row.", + "events": [], + "extends": { + "name": "TargetGroup", + "url": "https://developer.roku.com/docs/references/scenegraph/layout-group-nodes/targetgroup.md" + }, + "fields": [ + { + "accessPermission": "READ\\_WRITE", + "default": "\"down\"", + "description": "Specifies which remote button will move the focus forward. For vertical lists, this will typically be set to \"down\". For horizontal rows, this will typically be set to \"right\".", + "name": "advanceKey", + "type": "string" + }, + { + "accessPermission": "READ\\_WRITE", + "default": "\\[ \\]", + "description": "Specifies one or more TargetSet's to be used when the TargetList has the focus. If a single TargetSet is specified, focus will stay fixed on the targetRect of that TargetSet that corresponds to the TargetGroup's focus index. The focus index will come from the TargetSet if explicitly specified or from the TargetGroup's defaultTargetSetFocusIndex field if not. If focusedTargetSet includes more than one TargetSet node, that defines a sequence of TargetSet's that will be advanced through as the user presses the advance or reverse key. When advancing, the focus floats from one TargetSet's to the next TargetSet in the array until the last element of the focusedTargetSet is reached, at which point the focus is fixed to the last element and the items begin to scroll. When reversing, the focus floats from one TargetSet to the previous TargetSet in the array until the first element of the focusedTargetSet is reached, at which point the focus is fixed to the first element and the items begin to scroll. See above for more discussion of setting up fixed and floating focus use cases.", + "name": "focusedTargetSet", + "type": "array of TargetSet nodes" + }, + { + "accessPermission": "READ\\_WRITE", + "default": "\"up\"", + "description": "Specifies which remote button will move the focus backward. For vertical lists, this will typically be set to \"up\". For horizontal rows, this will typically be set to \"left\".", + "name": "reverseKey", + "type": "string" + }, + { + "accessPermission": "READ\\_WRITE", + "default": "invalid", + "description": "Specifies the TargetSet to be used when the TargetList does not have the focus.", + "name": "unfocusedTargetSet", + "type": "TargetSet" + } + ], + "interfaces": [], + "name": "TargetList", + "url": "https://developer.roku.com/docs/references/scenegraph/list-and-grid-nodes/targetlist.md" + }, + "targetset": { + "description": "Extends [**Node**](https://developer.roku.com/docs/references/scenegraph/node.md\n\nThe TargetSet node class is used to specify a set of target regions where items in a [TargetGroup](https://developer.roku.com/docs/references/scenegraph/layout-group-nodes/targetgroup.md node are rendered. This information includes an array of rectangles that is used to define the location and size of a region that will be occupied by an item in the TargetGroup as well as an optional index that identifies one rectangle in the array to be treated as the region where the item with focus is located.", + "events": [], + "extends": { + "name": "Node", + "url": "https://developer.roku.com/docs/references/scenegraph/node.md" + }, + "fields": [ + { + "accessPermission": "READ\\_WRITE", + "default": "0xFFFFFF80", + "description": "If the TargetGroup using this TargetSet has its showTargetRects field set to true, the target rectangles of the current TargetSet will be drawn using the specified color. Drawing the TargetSet's target rectangles is generally only done when debugging an application.", + "name": "color", + "type": "Color" + }, + { + "accessPermission": "READ\\_WRITE", + "default": "\\-1", + "description": "Identifies the index of an element of the targetRects array that will be treated as the region occupied by the focus item. The default of of -1 indicates that the TargetGroup's current focus index will not be changed when the TargetGroup is set to use the TargetSet to define its target regions.", + "name": "focusIndex", + "type": "integer" + }, + { + "accessPermission": "READ\\_WRITE", + "default": "\\[ \\]", + "description": "Specifies an array of rectangles that define the target regions used by a TargetGroup node. To specify a rectangle, you can either specify a associative array with x, y, width and height elements or an array of 4 numeric values. For example, you could specify an array of two rectangles like this: \\\\\\[ \\\\\\[ x:10, y:5, width: 200, height:150 \\\\\\], \\\\\\[ x:10, y:160, width: 200, height:150 \\\\\\] \\\\\\] Alternately, you could specify the same array like this: \\\\\\[ \\\\\\[ 10, 5, 200, 150 \\\\\\], \\\\\\[ 10, 160, 200, 150 \\\\\\] \\\\\\]", + "name": "targetRects", + "type": "array of rectangles" + } + ], + "interfaces": [], + "name": "TargetSet", + "url": "https://developer.roku.com/docs/references/scenegraph/list-and-grid-nodes/targetset.md" + }, + "task": { + "description": "Extends [**Node**](https://developer.roku.com/docs/references/scenegraph/node.md\n\nThe Task node class allows you to specify a function to be spawned in a different thread, and run asynchronously with respect to both the scene rendering thread and the main application thread. A Task node also allows you to run functions that cannot be run in SceneGraph node or component, typically BrightScript code functions involving operations such as reading data from servers and file system manipulation. (You also cannot, and should not, run functions in a SceneGraph application for operations that are functionally the same as SceneGraph nodes and components, such as playing videos.) A list of all the BrightScript functions and components that cannot be used in SceneGraph applications or can only be used in a Task node can be found in [BrightScript Support](/docs/developer-program/core-concepts/scenegraph-brightscript/brightscript-support.md \"BrightScript Support\").\n\nA Task node is typically used to read data from a server to create a ContentNode node to configure a SceneGraph node or component (see [ContentNode](https://developer.roku.com/docs/references/scenegraph/control-nodes/contentnode.md\"ContentNode\")). A Task node used for this purpose can be thought of as a content reader. Since ContentNode nodes are required to configure many components rendered in a scene, such as lists, panels, and grids, and you will generally want to read the data for those types of nodes from your server, you should create a Task node as a content reader for each of those components that you use in your scene.\n\nThe Task node class was designed with three general development use cases:\n\n* A new Task node object is created for each asynchronous operation. The input data needed for the operation is set in the Task node object [](https://developer.roku.com/docs/references/scenegraph/xml-elements/interface.md\"\") fields in the render thread, along with an observer of the output field data, and the Task node control field is set to RUN. After the output data is returned to the render thread, the Task node object is not used again.\n* A Task node object is used multiple times for several identical asynchronous operations. In this case, the input data for each operation is set in the existing Task node object, with another observer for the output field data, and the Task node control field is again set to RUN. This may be more efficient than creating a new Task node object for each of the identical operations.\n* A Task node observes its input fields using the port form of the ifSGNodeField [observeField()](https://developer.roku.com/docs/references/brightscript/interfaces/ifsgnodefield.mdobservefieldfieldname-as-string-functionname-as-string-as-boolean \"observeField()\") method, and returns output data with each field change. In this case, the Task node acts like a continuous server.\n\nSince Task nodes launch asynchronous threads, and have no provisions for locks and mutexes, you must be careful to avoid race, deadlock, and other asynchronous thread errors. Here are a few tips for using Task nodes:\n\n* Avoid accessing files which must be persistent before thread completion, to avoid a subsequent Task node or other thread access of the same file before the thread completes. It is easier and safer to use a dynamically-created string or other data object to hold temporary thread data to avoid having a subsequent or existing thread overwrite and corrupt the data.\n* Be very careful if you access any object in a Task node that may exist in another thread. It is better to completely separate all objects in any other possible thread from the Task node thread by setting the fields of the Task node with copies of the minimum amount of data needed to run the thread.\n* In the Task node init() function, perform the minimum required amount of initialization of the Task node and any included thread functions. If you intend to trigger an asynchronous task based on a Task node input field change, in many cases, you should only set up the observer for the field in init().\n* Use the port form of the ifSGNodeField [observeField()](https://developer.roku.com/docs/references/brightscript/interfaces/ifsgnodefield.mdobservefieldfieldname-as-string-functionname-as-string-as-boolean \"observeField()\") rather than the onChange attribute. This will avoid triggering the thread in response to a render thread event before the Task node observers are set up.\n* It is more efficient to use a persistent Task node that is triggered by an field change than to create a new Task node every time a particular asynchronous thread is required. If needed, you can communicate that the particular asynchronous thread is no longer required through an field as well, either through the triggering field, or a special field used for control of the Task node.\n* You can use a single Task node object to run any number of different asynchronous threads by setting the functionName field to the Task node function you want before setting the control field to RUN. If you do not use the input data fields to trigger running the thread, this is equivalent to calling an asynchronous function, and passing the input data fields as arguments to the function. The output data fields can likewise be considered as the return value of a asynchronous function call, but to avoid blocking you must observe the fields, or the state field, as a callback event to handle the results in the calling thread.\n\nAlso review \"[SceneGraph threads](/docs/developer-program/core-concepts/threads.md \"SceneGraph\")\" for in-depth information on using Task nodes most efficiently.", + "events": [], + "extends": { + "name": "Node", + "url": "https://developer.roku.com/docs/references/scenegraph/node.md" + }, + "fields": [ + { + "accessPermission": "WRITE\\_ONLY", + "default": "init", + "description": "Requests a change in the run state of the spawned task. The valid options are the same as for the state field, but case-insensitive (i.e. can set \"RUN\" or \"run\")", + "name": "control", + "type": "option string" + }, + { + "accessPermission": "READ\\_WRITE", + "default": "\"\"", + "description": "The name of the function in the Task node component to be executed when the state field changes to RUN. The function must be declared within the scope of the Task node component", + "name": "functionName", + "type": "string" + }, + { + "accessPermission": "READ\\_ONLY", + "default": "init", + "description": "Inquires about the run state of the spawned task. Note that the values are in lowercase: \"init\", \"stop\", \"run\", \"done\"", + "name": "state", + "type": "value string" + } + ], + "interfaces": [], + "name": "Task", + "url": "https://developer.roku.com/docs/references/scenegraph/control-nodes/task.md" + }, + "texteditbox": { + "description": "Extends [**Group**](https://developer.roku.com/docs/references/scenegraph/layout-group-nodes/group.md\"**Group**\")\n\nThe **TextEditBox** node class is intended to display a string of characters as they are typed. When focused, it displays a flashing cursor to indicate the text insertion position.\n\n**TextEditBox** nodes are automatically included in the [**Keyboard**](https://developer.roku.com/docs/references/scenegraph/widget-nodes/keyboard.md\"**Keyboard**\") and [**MiniKeyboard**](https://developer.roku.com/docs/references/scenegraph/widget-nodes/minikeyboard.md\"**MiniKeyboard**\") node classes.\n\nThe default appearance of the **TextEditBox** is very transparent, allowing it to pick up most of its color from what is rendered underneath it. The appearance can be customized by changing the backgroundUri and other fields.", + "events": [], + "extends": { + "name": "Group", + "url": "https://developer.roku.com/docs/references/scenegraph/layout-group-nodes/group.md" + }, + "fields": [ + { + "accessPermission": "Read-Write", + "default": "false", + "description": "When active is set to true, the cursor is displayed. When set to false, the cursor is hidden. When used internal to the \\*\\*Keyboard\\*\\* and \\*\\*MiniKeyboard\\*\\* nodes, those nodes set this field to true when the keyboard has focus, and false when it does not.", + "name": "active", + "type": "boolean" + }, + { + "accessPermission": "Read-Write", + "default": "\"\"", + "description": "Specifies the URI of the image rendered as the background of the \\*\\*TextEditBox\\*\\* node.", + "name": "backgroundUri", + "type": "string" + }, + { + "accessPermission": "Read-Write", + "default": "true", + "description": "When clearOnDownKey is set to true, the textEditBox erases all the characters when down key is pressed (focus does not move down). When set to false, the characters are not erased and focus moves down.", + "name": "clearOnDownKey", + "type": "boolean" + }, + { + "accessPermission": "Read-Write", + "default": "0", + "description": "By default, this is set to the length of the text field, indicating that the next character to be entered should be appended at the end of the string. When used internal to the \\*\\*Keyboard\\*\\* and \\*\\*MiniKeyboard\\*\\* nodes, those nodes use this field to move the text insertion point.", + "name": "cursorPosition", + "type": "integer" + }, + { + "accessPermission": "Read-Write", + "default": "\"\"", + "description": "Specifies a string to be displayed if the length of the text field string is zero. The typical usage of this field is to prompt the user about what to enter (such as, \"Enter your WiFi password\").", + "name": "hintText", + "type": "string" + }, + { + "accessPermission": "Read-Write", + "default": "0xffffffff", + "description": "Specifies the color of the hint text string.", + "name": "hintTextColor", + "type": "color" + }, + { + "accessPermission": "Read-Write", + "default": "15", + "description": "Specifies the maximum length of the string that can be displayed. When used internal to the \\*\\*Keyboard\\*\\* node, maxTextLength is initialized to 75. When used in the \\*\\*MiniKeyboard\\*\\* node, maxTextLength is initialized to 25.", + "name": "maxTextLength", + "type": "integer" + }, + { + "accessPermission": "Read-Write", + "default": "false", + "description": "When set to true, the characters entered are briefly displayed, then replaced with an asterisk. When set to false, the characters entered are always displayed. When used internal to the \\*\\*Keyboard\\*\\* and \\*\\*MiniKeyboard\\*\\* nodes, you can access the keyboard \\*\\*textEditBox\\*\\* field to set its secureMode field. For example: \\`myKeyboard.textEditBox.secureMode = true\\`", + "name": "secureMode", + "type": "boolean" + }, + { + "accessPermission": "Read-Write", + "default": "\"\"", + "description": "Contains the string of characters being displayed.", + "name": "text", + "type": "string" + }, + { + "accessPermission": "Read-Write", + "default": "0xffffffff", + "description": "Specifies the color of the text string displayed.", + "name": "textColor", + "type": "color" + }, + { + "accessPermission": "Read-Write", + "default": "\\-1.0", + "description": "Specifies the width of the \\*\\*TextEditBox\\*\\* node. When used internal to the \\*\\*Keyboard\\*\\* and \\*\\*MiniKeyboard\\*\\* nodes, those nodes set this field to match the width of the keyboard.", + "name": "width", + "type": "float" + } + ], + "interfaces": [], + "name": "TextEditBox", + "url": "https://developer.roku.com/docs/references/scenegraph/widget-nodes/texteditbox.md" + }, + "timegrid": { + "description": "OTT providers can use the TimeGrid node to implement an Electronic Program Guide (EPG) in their channels. In an EPG, channels are represented as horizontal rows, one for each channel. Each row has a channel name on the left, and a set of programs airing on that channel to the right. The size of each program depends on its duration. One of these programs has a remote control focus highlight indicator on it, and this highlight can be moved around using the remote control (as long as the TimeGrid node has remote control focus).\n\nThe TimeGrid node also features an alternative Now/Next view that lists only the programs currently airing and airing next, with their respective start times. See [Now/Next mode](https://developer.roku.com/docs/references/scenegraph/list-and-grid-nodes/timegrid.mdnownext-mode) for more information.\n\n![time grid](https://image.roku.com/ZHZscHItMTc2/epg-standard.jpg \"time grid\")", + "events": [], + "fields": [], + "interfaces": [], + "name": "TimeGrid", + "url": "https://developer.roku.com/docs/references/scenegraph/list-and-grid-nodes/timegrid.md" + }, + "timer": { + "description": "Extends [**Node**](https://developer.roku.com/docs/references/scenegraph/node.md\n\nThe Timer node class generates an observable event after a specified amount of time has elapsed.", + "events": [], + "extends": { + "name": "Node", + "url": "https://developer.roku.com/docs/references/scenegraph/node.md" + }, + "fields": [ + { + "accessPermission": "READ\\_WRITE", + "default": "none", + "description": "Used to control the operation of the Timer node. Recognized values include:\n\n| Value | Effect |\n| --- | --- |\n| none | No effect |\n| start | Starts the **Timer** node operation |\n| stop | Stops a running **Timer** node |", + "name": "control", + "type": "string" + }, + { + "accessPermission": "READ\\_WRITE", + "default": "1", + "description": "Specifies the time in seconds before the Timer node fires after the control field value is set to start. To specify time values down to millisecond granularity, use a float type (0.001 equals one millisecond)", + "name": "duration", + "type": "time" + }, + { + "accessPermission": "OBSERVE\\_ONLY", + "default": "N/A", + "description": "Triggers observer callback functions when the Timer node fires. Please note that the timer observer callback executes on the render thread", + "name": "fire", + "type": "Event" + }, + { + "accessPermission": "READ\\_WRITE", + "default": "false", + "description": "If set to true, the Timer node fires repeatedly, each time the specified duration field value elapses. If set to false, the Timer node only fires once until restarted", + "name": "repeat", + "type": "Boolean" + } + ], + "interfaces": [], + "name": "Timer", + "url": "https://developer.roku.com/docs/references/scenegraph/control-nodes/timer.md" + }, + "vector2dfieldinterpolator": { + "description": "Extends [**Node**](https://developer.roku.com/docs/references/scenegraph/node.md\n\nVector2DFieldInterpolator specifies a keyframe animation sequence to be applied to a pair Vector2D field of a node. Most typically, this is used to animate the (x,y) coordinates of a node's translation field.\n\nAll field interpolators include a set of key/keyValue pairs that define a keyframe of the animation. Field interpolators are generally used as children of an Animation node. As the animation progresses, it sets the fraction field of its field interpolators to a value between 0 and 1, indicating the percentage of the Animation's progress. The keyframes of the interpolator include a \"key\", the percentage where the keyframe should occur, and a \"keyValue\", the value that the field should have at that percentage.\n\nFor example, if a Vector2DFieldInterpolator had three keyframes, (0.0, \\[0.0, 0.0\\]), (0.4, \\[500.0, 0.0\\]) and (1.0, \\[500, 200.0\\]), then when the interpolator's fraction field was 0.0 (i.e. 0%), the field would be set to \\[0.0, 0.0\\]. When fraction was 0.4 (i.e. 40%), the field would be set to \\[500.0, 0.0\\]. When fraction was 1.0 (i.e. 100%), the field would be set to \\[500.0, 200.0\\].\n\nFor values of fraction between 0.0 and 0.4 (e.g. 0.2 or 20%), the field value is determined by linearly interpolating the keyValues for the first two keyframes. In this case, since the key of 0.2 is halfway between the key at 0.0 and the key at 0.4, the field would be set to \\[250.0, 0.0\\] (halfway between the point \\[0.0, 0.0\\] and \\[200.0, 0.0\\]. Similarly, when fraction is between the second and third keys (i.e. between 0.4 and 1.0), the field value is determined by linearly interpolating the keyValues of the second and third keyframes.\n\nFor this example, if the field being interpolated were the translation field of a Poster node parented to the Scene node, the Poster would originally be positioned with its top/left corner at the upper, left corner of the screen. As the animation proceeded from 0% to 40% complete, the Poster would slide horizontally to the right until it's top/left corner was at x=500.0, y=0.0. As the animation continued from 40% to 100% complete, the Poster would slide vertically down until its top/left corner was at x=500.0, y=200.0.\n\nIf the first keyframe has a key percentage greater than zero, then the field value will be equal to the keyValue of the first keyframe until fraction reaches the first keyframe's key percentage. Similarly, if the last keyframe has a key percentage less than one, the field value will be set to the keyValue of the last keyframe from when fraction equals the the last keyframe's key percentage and will not change as fraction increases from that value to 1.0.\n\n> While linearly interpolation is used to compute the keyValue's for fraction values between successive keys, non-linear easing functions may be applied to the fraction values computed by the Animation node, so the overall animation may vary in speed.", + "events": [], + "extends": { + "name": "Node", + "url": "https://developer.roku.com/docs/references/scenegraph/node.md" + }, + "fields": [ + { + "accessPermission": "READ\\_WRITE", + "default": "\"\"", + "description": "Specifies the field to interpolate. The string should contain the ID of a node in the scene and the name of a field of that node, separated by a dot \".\". For example, \"title.width\" would indicate that the interpolator should be applied to the width field of a node whose id field was \"title\". The specified field must be of type float", + "name": "fieldToInterp", + "type": "string" + }, + { + "accessPermission": "READ\\_WRITE", + "default": "0.0", + "description": "Specifies the percentage to be used to compute a value for the field", + "name": "fraction", + "type": "float" + }, + { + "accessPermission": "READ\\_WRITE", + "default": "\\[ \\]", + "description": "Specifies the key percentages for the interpolator's keyframes. Each key percentage should be a unique value from 0 to 1 indicating the percentage of the animation where the keyValue should occur. Behavior is undefined if the number of values in the key field does not match the number of values in the keyValue field", + "name": "key", + "type": "array of float's" + }, + { + "accessPermission": "READ\\_WRITE", + "default": "\\[ \\]", + "description": "Specifies the key values or the interpolator's keyframes. Each value in the keyValue array corresponds to a value in the key field's array. The interpolator's behavior is undefined if the number of values in the key field does not match the number of values in the keyValue field", + "name": "keyValue", + "type": "array of float's" + }, + { + "accessPermission": "READ\\_WRITE", + "default": "false", + "description": "Enables animation to be played in reverse.", + "name": "reverse", + "type": "boolean" + } + ], + "interfaces": [], + "name": "Vector2DFieldInterpolator", + "url": "https://developer.roku.com/docs/references/scenegraph/animation-nodes/vector2dfieldinterpolator.md" + }, + "video": { + "description": "Extends [**Group**](https://developer.roku.com/docs/references/scenegraph/layout-group-nodes/group.md\n\nThe Video node class provides a controlled play of live or VOD video.\n\nThe Video node includes a wide variety of internal nodes to support trick play, playback buffering indicators, and so forth. Playback buffering indicators, to indicate buffering before initial playback as well as re-buffering, use an internal instance of a ProgressBar node. For trick play, an internal instance of a TrickPlayBar node is provided. For display of BIF images for DVD-like chapter selection, an internal instance of a BIFDisplay node is provided.\n\nStarting from Roku OS 8, the behavior of the Roku system overlay is such that the system overlay now slides in whenever the \\* button is pressed, the Video node is in focus, and the app does not have its OnKeyEvent() handler fired. When the Video node is not in focus, the system overlay does not slide in and the OnKeyEvent() handler is fired.", + "events": [], + "extends": { + "name": "Group", + "url": "https://developer.roku.com/docs/references/scenegraph/layout-group-nodes/group.md" + }, + "fields": [ + { + "accessPermission": "READ\\_WRITE", + "default": "NULL", + "description": "The ContentNode node with the \\[Content Meta-Data\\](/docs/developer-program/getting-started/architecture/content-metadata.md) for the video, or a video playlist (a sequence of videos) to be played. If a video playlist is to be played, the children of this ContentNode node comprise the playlist, and each ContentNode child must have all attributes required to play that video. For example, if the videos \"A\" and \"B\" are to be played, three ContentNode nodes must be created: the parent ContentNode (which is largely ignored), one ContentNode child for \"A,\" and one ContentNode child for \"B.\" The parent node is set into this content field, and when video playback is started, all of its children will be played in sequence. Any changes made to the playlist after playback has started are ignored. See the \\`contentIsPlaylist\\` and \\`contentIndex\\` fields, for more information on playlists.", + "name": "content", + "type": "ContentNode" + }, + { + "accessPermission": "READ\\_ONLY", + "default": "\\-1", + "description": "The index of the video in the video playlist that is currently playing. Generally, you would only want to check this field if video playlists are enabled (by setting the \\`contentIsPlaylist\\` field to true), but it is set to 0 when a single video is playing, and video playlists are not enabled.", + "name": "contentIndex", + "type": "integer" + }, + { + "accessPermission": "READ\\_WRITE", + "default": "false", + "description": "If set to true, enables video playlists (a sequence of videos to be played). See the \\`content\\` and \\`contentIndex\\` field for more information on playlists.", + "name": "contentIsPlaylist", + "type": "Boolean" + }, + { + "accessPermission": "READ\\_WRITE", + "default": "none", + "description": "Sets the desired play state for the video, such as starting or stopping the video play. Getting the value of this field returns the most recent value set, or none if no value has been set. To dynamically monitor the actual state of the video, see the \\`state\\` field. The play and stop commands to commence and discontinue playback should not be used to implement trick modes like rewind, or replay. For that use the \\`seek\\` field.\n\n| Option | Effect |\n| --- | --- |\n| none | No play state set |\n| play | Start video play |\n| stop | Stop video play |\n| pause | Pause video play |\n| resume | Resume video play after a pause |\n| replay | Replay video |\n| prebuffer | Starts buffering the video stream before the Video node actually begins playback. Only one video stream can be buffering in the application at any time. Setting the `control` field to `prebuffer` for another video stream after setting `prebuffer` for a previous video stream stops the buffering of the previous video stream. |\n| skipcontent | Skip the currently-playing content and begin playing the next content in the playlist. If the content is not a playlist, or if the current content is the end of the playlist, this will end playback. |", + "name": "control", + "type": "option string" + }, + { + "accessPermission": "READ\\_ONLY", + "default": "0", + "description": "The error code associated with the video play error set in the \\`state\\` field. Use the \\*\\*errorStr\\*\\* and and \\*\\*errorInfo\\*\\* fields for more descriptive diagnostic information to help identify and resolve the cause of the error.", + "name": "errorCode", + "type": "integer" + }, + { + "accessPermission": "READ-ONLY", + "default": "", + "description": "A diagnostic message to help resolve the video play error set in the \\`state\\` field. The roAssociativeArray contains the following fields:\n\n| Field | Type | Description |\n| --- | --- | --- |\n| clip\\_id | integer | The unique ID for the clip |\n| ignored | integer | Indicates whether the error generated an exception (0) or was ignored resulting in the next item in the content list being played (1). |\n| source | string | The module that generated the error. |\n| category | String | The type of error, which includes: \"http\", \"drm\", \"mediaerror\", or \"mediaplayer\". |\n| error\\_code | integer | The internal Roku code associated with the error. Use the **dbgmsg** field for debugging. |\n| dbgmsg | string | A verbose debug message that can help identify the root cause of the error. |\n| error\\_attributes | string | The error attribute, which includes the clip\\_id (the unique ID of the clip that failed to play). |", + "name": "errorInfo", + "type": "roAssociativeArray" + }, + { + "accessPermission": "READ\\_ONLY", + "default": "", + "description": "An error message describing the video play error set in the \\`state\\` field. Use the \\*\\*errorStr\\*\\* and and \\*\\*errorInfo\\*\\* fields for more descriptive diagnostic information to help identify and resolve the cause of the error.", + "name": "errorMsg", + "type": "string" + }, + { + "accessPermission": "READ-ONLY", + "default": "", + "description": "A diagnostic message to help resolve the video play error set in the \\`state\\` field. The format of the errorStr is as follows: category:{category\\\\\\_name}:error:{error\\\\\\_code}:ignored:{0|1}:{source}:{source\\\\\\_name}:{additional catcher comment}:{error\\\\\\_string}:extra:{error\\\\\\_attributes}\n\n| errorStr Field | Type | Description |\n| --- | --- | --- |\n| category\\_name | string | The type of error, which includes: \"http\", \"drm\", \"mediaerror\", or \"mediaplayer\". |\n| error\\_code | integer | The unique code associated with the error. |\n| ignored | integer | Indicates whether the error generated an exception (0) or was ignored resulting in the next item in the content list being played (1). |\n| source | string | The module that generated the error. |\n| source\\_name | string | The module that generated the error. |\n| additional catcher comment | string | Typically, the comment added when the exception is caught. |\n| error\\_string | string | A text message describing the video play error. |\n| error\\_attributes | string | The error attribute, which includes the clip\\_id (the unique ID of the clip that failed to play). |", + "name": "errorStr", + "type": "string" + }, + { + "accessPermission": "READ\\_ONL", + "default": "", + "description": "Indicates whether the DRM license was acquired. If a failure occurs, this field provides additional details about the error. The roAssociativeArray contains the following fields:\n\n| Key | Type | Value |\n| --- | --- | --- |\n| response | string | The server response. If a license is not retrieved, the response is empty and the HTTP response code is returned instead. |\n| status | string | The HTTP response code. |\n| keysystem | string | The DRM technology used. |\n| duration | string | The total time elapsed in sending a request to the license server and receiving a response (in milliseconds). |", + "name": "licenseStatus", + "type": "roAssociativeArray" + }, + { + "accessPermission": "READ\\_WRITE", + "default": "\\-1", + "description": "If the \\`contentIsPlaylist\\` field is set to true to enable video playlists, sets the index of the next video in the playlist to be played. Setting this field does not immediately change the video being played, but takes effect when the current video is completed or skipped. By default, this value is -1, which performs the default index increment operation. After the video specified by the index in this field begins playing, the field is set to the default -1 again, so the next video played will be set by the default index increment operation unless the field is set again to a different index.", + "name": "nextContentIndex", + "type": "integer" + }, + { + "accessPermission": "READ\\_ONLY", + "default": "", + "description": "Provides timing measurements related to the start of video playback. All measurements are in seconds. The roAssociativeArray contains the following fields:\n\n| Field | Type | Access Permission | Description |\n| --- | --- | --- | --- |\n| total\\_dur | float | READ\\_ONLY | Total video start duration. |\n| manifest\\_dur | float | READ\\_ONLY | Manifest download and parsing. |\n| drm\\_load\\_dur | float | READ\\_ONLY | DRM system initialization. |\n| drm\\_lic\\_acq\\_dur | float | READ\\_ONLY | License acquisition. This typically includes interactions with the license server. |\n| prebuf\\_dur | float | READ\\_ONLY | Prebuffer content. |\n| manifest\\_start (_Available since Roku OS 10.0_) | Float | READ\\_ONLY | Point at which manifest download and parsing begins. |\n| drm\\_load\\_start (_Available since Roku OS 10.0_) | Float | READ\\_ONLY | Point at which DRM system initialization begins. |\n| drm\\_lic\\_acq\\_start (_Available since Roku OS 10.0_) | Float | READ\\_ONLY | Point at which license acquisition begins. |\n| prebuf\\_start (_Available since Roku OS 10.0_) | Float | READ\\_ONLY | Point at which content pre-buffering begins. |\n\n\\> The \\\\\\_start fields correspond to the similarly named \\\\\\_dur (duration) fields in this structure. In each case, the \\\\\\_start point is the number of milliseconds elapsed from the initialization of the media player (t=0.000). If required, ending points for each interval can be derived from its associated starting-point and duration.", + "name": "playStartInfo _Available since Roku OS 9.3_", + "type": "roAssociativeArray" + }, + { + "accessPermission": "READ\\_ONLY", + "default": "none", + "description": "Describes the current video play state, such as if the video play has been paused.\n\n| Value | Meaning |\n| --- | --- |\n| none | No current play state |\n| buffering | Video stream is currently buffering |\n| playing | Video is currently playing |\n| paused | Video is currently paused |\n| stopped | Video is currently stopped |\n| finished | Video has successfully completed playback |\n| error | An error has occurred in the video play. The error code, message, and diagnostics can be found in the `errorCode`, `errorMsg`, and `errorStr` fields respectively. |", + "name": "state", + "type": "value string" + } + ], + "interfaces": [], + "name": "Video", + "url": "https://developer.roku.com/docs/references/scenegraph/media-playback-nodes/video.md" + }, + "voicetexteditbox": { + "availableSince": "9.4", + "description": "_Available since Roku OS 9.4_\n\nExtends [TextEditBox](https://developer.roku.com/docs/references/scenegraph/widget-nodes/texteditbox.md\n\nThe **VoiceTextEditBox** node is similar to the [legacy **TextEditBox** node](https://developer.roku.com/docs/references/scenegraph/widget-nodes/texteditbox.md, but with additional voice entry functionality. Only one voice-enabled **VoiceTextEditBox** node may be on the screen at a time. If another VoiceTextEditBox is rendered on the screen, its voice functionality is disabled implicitly.", + "events": [], + "extends": { + "name": "TextEditBox", + "url": "https://developer.roku.com/docs/references/scenegraph/widget-nodes/texteditbox.md" + }, + "fields": [ + { + "accessPermission": "READ\\_WRITE", + "default": "false", + "description": "The direction in which the voice hint tooltip points: \\* true. The voice hint tooltip points right. \\* false. The voice hint tooltip points left.", + "name": "flipVoiceToolTip", + "type": "boolean" + }, + { + "accessPermission": "READ\\_WRITE", + "default": "false", + "description": "Enables the text box to be voice-enabled. In this case, it will display a mic icon and have a voice UI with voice hints.", + "name": "voiceEnabled", + "type": "boolean" + }, + { + "accessPermission": "READ\\_WRITE", + "default": "\"generic\"", + "description": "The type of voice entry mode to be used: \\* \"email\": letter-by-letter dictation for emails. \\* \"numeric\": letter-by-letter dictation for PIN codes, zip codes, and other numeric input. \\* \"alphanumeric\": letter-by-letter dication for street addresses or other sequences of numbers and letters. \\* \"generic\": Full word input for search queries or other sequences of numbers, letters and symbols. \\* \"password\": letter-by-letter dication for passwords.", + "name": "voiceEntryType", + "type": "string" + }, + { + "accessPermission": "READ\\_WRITE", + "default": "FHD: 321HD: 214", + "description": "The maximum width of the voice hint tootip. The height scales based on the specified width.", + "name": "voiceToolTipWidth", + "type": "float" + } + ], + "interfaces": [], + "name": "VoiceTextEditBox", + "url": "https://developer.roku.com/docs/references/scenegraph/dynamic-voice-keyboard-nodes/voice-text-edit-box.md" + }, + "zoomrowlist": { + "description": "Extends [**ArrayGrid**](https://developer.roku.com/docs/references/scenegraph/abstract-nodes/arraygrid.md\n\nThe ZoomRowList node allows a row of the Row-Row Grid to smoothly zoom up to a larger size when that row has focus. Rows in this node are capable of gaining the focus while scrolling, and smoothly zooming up by the specified amount. The amount to zoom can be specified on a per row basis so that some rows can zoom up by a larger amount than others.", + "events": [], + "extends": { + "name": "ArrayGrid", + "url": "https://developer.roku.com/docs/references/scenegraph/abstract-nodes/arraygrid.md" + }, + "fields": [], + "interfaces": [], + "name": "ZoomRowList", + "url": "https://developer.roku.com/docs/references/scenegraph/list-and-grid-nodes/zoomrowlist.md" + } + }, + "components": { + "roappinfo": { + "constructors": [ + { + "params": [], + "returnType": "roAppInfo" + } + ], + "description": "roAppInfo retrieves the developer ID, which can be useful during development. It also retrieves manifest values, such as the title and version number, avoiding the need to parse the manifest file from BrightScript. This object is created with no parameters.", + "events": [], + "interfaces": [ + { + "name": "ifAppInfo", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifappinfo.md" + } + ], + "name": "roAppInfo", + "url": "https://developer.roku.com/docs/references/brightscript/components/roappinfo.md" + }, + "roappmanager": { + "constructors": [ + { + "params": [], + "returnType": "roAppManager" + } + ], + "description": "The Application Manager APIs set application level attributes, which mostly affect the look-and-feel of the application. The use of screen styles gives each application a consistent look-and-feel, but it's often desirable to customize attributes such as colors, fonts, and logos for each application. Setting artwork and colors allows the developer to specify a theme for their application. If these values are not set, the application will use default values.\n\nThe table below describes each attribute and its values, the screen types to which it applies, and the Roku OS version in which the attribute was first supported. Unless otherwise indicated, an attribute is supported in all Roku OS versions after the one in which it was first supported.\n\nTo save space, the screen types in the table are specified by a two letter code:\n\n| Code | Screen Type |\n| --- | --- |\n| Co | roCodeRegistrationScreen |\n| Di | roMessageDialog, roOneLineDialog, roPinEntryDialog |\n| Gr | roGridScreen |\n| Ke | roKeyboardScreen |\n| Li | roListScreen |\n| Pa | roParagraphScreen |\n| Po | roPosterScreen |\n| Se | roSearchScreen |\n| Sp | roSpringboardScreen |\n| Te | roTextScreen |\n\nAll attribute values are strings. Numeric values are specified as decimal strings.\n\n| Attribute | Screen Types | Values | Example | Version |\n| --- | --- | --- | --- | --- |\n| BackgroundColor | Gr Li Pa Po Se Sp Te | HTML HEX Color Value | #E0DFDF | 1.0 |\n| BreadcrumbDelimiter | Gr Li Pa Po Se Sp Te | HTML HEX Color Value | #FF00FF | 1.0 |\n| BreadcrumbTextLeft | Gr Li Pa Po Se Sp Te | HTML HEX Color Value | #FF00FF | 1.0 |\n| BreadcrumbTextRight | Gr Li Pa Po Se Sp Te | HTML HEX Color Value | #FF00FF | 1.0 |\n| ButtonHighlightColor | Di Se Sp | HTML HEX Color Value | #FF00FF | 1.0 |\n| ButtonMenuHighlightText | Di Se Sp | HTML HEX Color Value | #0033FF | 1.0 |\n| ButtonMenuNormalOverlayText | Di Se Sp | HTML HEX Color Value | #B0B0B0 | 1.0 |\n| ButtonMenuNormalText | Di Se Sp | HTML HEX Color Value | #686868 | 1.0 |\n| ButtonNormalColor | Di Se Sp | HTML HEX Color Value | #FF00FF | 1.0 |\n| CounterSeparator | Gr Po | HTML HEX Color Value | #00FF00 | 2.7 |\n| CounterTextLeft | Gr Po | HTML HEX Color Value | #FF0000 | 2.7 |\n| CounterTextRight | Gr Po | HTML HEX Color Value | #0000FF | 2.7 |\n| DialogBodyText | Di | HTML HEX Color Value. Must be a grayscale value | #808080 | 3.1 |\n| DialogTitleText | Di | HTML HEX Color Value. Must be a grayscale value | #363636 | 3.1 |\n| EpisodeSynopsisText | Po | HTML HEX Color Value | #FF00FF | 1.0 |\n| FilterBannerActiveColor | Po | HTML HEX Color Value | #FF00FF | 1.0 |\n| FilterBannerActiveHD | Po | URL to set HD Filter Banner Active/Focus Highlighter | pkg:/images/Filter\\_ActiveHint\\_HD.png | 1.0 |\n| FilterBannerActiveSD | Po | URL to set SD Filter Banner Active/Focus Highlighter | pkg:/images/Filter\\_ActiveHint\\_SD43.png | 1.0 |\n| FilterBannerInactiveColor | Po | HTML HEX Color Value | #FF00FF | 1.0 |\n| FilterBannerInactiveHD | Po | URL to set HD Filter Banner Inactive Highlighter | pkg:/images/Filter\\_InactiveHint\\_HD.png | 1.0 |\n| FilterBannerInactiveSD | Po | URL to set SD Filter Banner Inactive Highlighter | pkg:/images/Filter\\_ActiveHint\\_SD43.png | 1.0 |\n| FilterBannerSideColor | Po | HTML HEX Color Value | #FF00FF | 1.0 |\n| FilterBannerSliceHD | Po | URL to set HD Filter Banner Background Image | pkg:/images/Filter\\_ActiveHint\\_HD.png | 1.0 |\n| FilterBannerSliceSD | Po | URL to set SD Filter Banner Background Image | pkg:/images/Filter\\_ActiveHint\\_SD43.png | 1.0 |\n| GridScreenBackgroundColor | Gr | HTML HEX Color Value Must be a grayscale value | #363636 | 2.7 |\n| GridScreenBorderOffsetHD | Gr | String representing point \"(x, y)\" that is the offset from the upper left corner of the focused HD image. Set to the negative width & height of border | (-25,-25) | 2.8 |\n| GridScreenBorderOffsetSD | Gr | String representing point \"(x, y)\" that is the offset from the upper left corner of the focused SD image. Set to the negative width & height of border | (-20,-20) | 2.8 |\n| GridScreenDescriptionDateColor | Gr | HTML HEX Color Value | #FF005B | 2.7 |\n| GridScreenDescriptionImageHD | Gr | URL to set HD Description callout background image on Grid | pkg:/images/Description\\_Background\\_HD.ng | 2.8 |\n| GridScreenDescriptionImageSD | Gr | URL to set SD Description callout background image on Grid | pkg:/images/Description\\_Background\\_SD43.ng | 2.8 |\n| GridScreenDescriptionOffsetHD | Gr | String representing point \"(x, y)\" that is the offset from the upper left corner of the focused HD image. Negative values have the description above and to the left of the focused image | (190,255) | 2.8 |\n| GridScreenDescriptionOffsetSD | Gr | String representing point \"(x, y)\" that is the offset from the upper left corner of the focused SD image. Negative values have the description above and to the left of the focused image | (125,170) | 2.8 |\n| GridScreenDescriptionRuntimeColor | Gr | HTML HEX Color Value | #5B005B | 2.7 |\n| GridScreenDescriptionSynopsisColor | Gr | HTML HEX Color Value | #606000 | 2.7 |\n| GridScreenDescriptionTitleColor | Gr | HTML HEX Color Value | #00FFFF | 2.7 |\n| GridScreenFocusBorderHD | Gr | URL to set HD Focus image on Active Grid Poster | pkg:/images/Border\\_16x9\\_HD.png | 2.8 |\n| GridScreenFocusBorderSD | Gr | URL to set SD Focus image on Active Grid Poster | pkg:/images/Border\\_16x9\\_SD43.png | 2.8 |\n| GridScreenListNameColor | Gr | HTML HEX Color Value. Must be a grayscale value | #FFFFFF | 2.7 |\n| GridScreenLogoHD | Gr | Logo formatted for display in the overhang | pkg:/images/gridlogoHD.png | 2.7 |\n| GridScreenLogoOffsetHD\\_X | Gr | Offset in pixels from the top-left origin of the display. Range 0 to 1280 | 592 | 2.7 |\n| GridScreenLogoOffsetHD\\_Y | Gr | Offset in pixels from the top-left origin of the display. Range 0 to 720 | 31 | 2.7 |\n| GridScreenLogoOffsetSD\\_X | Gr | Offset in pixels from the top-left origin of the display. Range 0 to 720 | 324 | 2.7 |\n| GridScreenLogoOffsetSD\\_Y | Gr | Offset in pixels from the top-left origin of the display. Range 0 to 480 | 21 | 2.7 |\n| GridScreenLogoSD | Gr | Logo formatted for display in the overhang | pkg:/images/gridlogoSD.png | 2.7 |\n| GridScreenMessageColor | Gr | HTML HEX Color Value. Must be a grayscale value | #808080 | 2.7 |\n| GridScreenOverhangHeightHD | Gr | The HD overhang height. Default: \"69\" | 75 | 2.8 |\n| GridScreenOverhangHeightSD | Gr | The SD overhang height. Default: \"49\" | 55 | 2.8 |\n| GridScreenOverhangSliceHD | Gr | URI for the overhang slice (thin piece of top of screen border) | pkg:/images/gridoverhangHD.png | 2.7 |\n| GridScreenOverhangSliceSD | Gr | URI for the overhang slice (thin piece of top of screen border) | pkg:/images/gridoverhangSD.png | 2.7 |\n| GridScreenRetrievingColor | Gr | HTML HEX Color Value. Must be a grayscale value | #CCCCCC | 2.7 |\n| ListItemHighlightHD | Gr Li Po | URL to set HD highlight image | pkg:/images/listitem\\_highlight\\_hd.png | 3.1 |\n| ListItemHighlightSD | Gr Li Po | URL to set SD highlight image | pkg:/images/listitem\\_highlight\\_sd.png | 3.1 |\n| ListItemHighlightText | Gr Li Po | HTML HEX Color Value | #CCCC00 | 3.1 |\n| ListItemText | Gr Li Po | HTML HEX Color Value | #CCCC00 | 3.1 |\n| ListScreenDescriptionText | Li | HTML HEX Color Value | #CCCC00 | 3.1 |\n| ListScreenTitleColor | Li | HTML HEX Color Value | #CC0000 | 3.1 |\n| OverhangPrimaryLogoHD | Co Ke Li Pa Po Se Sp Te | Small application logo formatted for display in overhang top left | pkg:/images/co\\_logo\\_sd.png | 1.0 |\n| OverhangPrimaryLogoOffsetHD\\_X | Co Ke Li Pa Po Se Sp Te | Offset in pixels from the top-left origin of the display films.Range 0 to 1280 | 25 | 1.0 |\n| OverhangPrimaryLogoOffsetHD\\_Y | Co Ke Li Pa Po Se Sp Te | Offset in pixels from the top-left origin of the display films.Range 0 to 720 | 50 | 1.0 |\n| OverhangPrimaryLogoOffsetSD\\_X | Co Ke Li Pa Po Se Sp Te | Offset in pixels from the top-left origin of the display films.Range 0 to 720 | 25 | 1.0 |\n| OverhangPrimaryLogoOffsetSD\\_Y | Co Ke Li Pa Po Se Sp Te | Offset in pixels from the top-left origin of the display films.Range 0 to 480 | 50 | 1.0 |\n| OverhangPrimaryLogoSD | Co Ke Li Pa Po Se Sp Te | Small application logo formatted for display in overhang top left | pkg:/images/co\\_logo\\_sd.png | 1.0 |\n| OverhangSecondaryLogoHD | Co Ke Li Pa Po Se Sp Te | Small application logo formatted for display in overhang top left | pkg:/images/co\\_logo\\_hd.png | 1.0 |\n| OverhangSecondaryLogoOffsetHD\\_X | Co Ke Li Pa Po Se Sp Te | Offset in pixels from the top-left origin of the display films. Range 0 to 1280 | 25 | 1.0 |\n| OverhangSecondaryLogoOffsetHD\\_Y | Co Ke Li Pa Po Se Sp Te | Offset in pixels from the top-left origin of the display films. Range 0 to 720 | 50 | 1.0 |\n| OverhangSecondaryLogoOffsetSD\\_X | Co Ke Li Pa Po Se Sp Te | Offset in pixels from the top-left origin of the display films. Range 0 to 720 | 25 | 1.0 |\n| OverhangSecondaryLogoOffsetSD\\_Y | Co Ke Li Pa Po Se Sp Te | Offset in pixels from the top-left origin of the display films. Range 0 to 480 | 50 | 1.0 |\n| OverhangSecondaryLogoSD | Co Ke Li Pa Po Se Sp Te | Small application logo formatted for display in overhang top left | pkg:/images/co\\_logo\\_sd.png | 1.0 |\n| OverhangSliceHD | Co Ke Li Pa Po Se Sp Te | URI for the overhang slice (thin piece of border at the top of the screen in HD size) | pkg:/images/overhang\\_hd.png | 1.0 |\n| OverhangSliceSD | Co Ke Li Pa Po Se Sp Te | URI for the overhang slice (thin piece of top of screen border) | pkg:/images/overhang\\_sd.png | 1.0 |\n| ParagraphBodyText | Co Pa Te | HTML HEX Color Value | #FF00FF | 1.0 |\n| ParagraphHeaderText | Co Pa Te | HTML HEX Color Value | #FF00FF | 1.0 |\n| PosterScreenLine1Text | Po | HTML HEX Color Value | #FF00FF | 1.0 |\n| PosterScreenLine2Text | Po | HTML HEX Color Value | #FF00FF | 1.0 |\n| RegistrationCodeColor | Co | HTML HEX Color Value | #FF00FF | 1.0 |\n| RegistrationFocalColor | Co | HTML HEX Color Value | #FF00FF | 1.0 |\n| RegistrationFocalRectColor | Co | HTML HEX Color Value | #10FF80 | |\n| RegistrationFocalRectHD | Co | Position and size of the HD focal rectangle. Four integer: (x,y,width,height) | (228,360,120,82) | |\n| RegistrationFocalRectSD | Co | Position and size of the SD focal rectangle. Four integer: (x,y,width,height) | (172,220,90,76) | |\n| SpringboardActorColor | Sp | HTML HEX Color Value | #FF00FF | 1.0 |\n| SpringboardAlbumColor | Sp | HTML HEX Color Value | #FF00FF | 1.0 |\n| SpringboardAlbumLabel | Sp | Album Label | on | 1.0 |\n| SpringboardAlbumLabelColor | Sp | HTML HEX Color Value | #FF00FF | 1.0 |\n| SpringboardAllow6Buttons | Sp | boolean string | true | |\n| SpringboardArtistColor | Sp | HTML HEX Color Value | #FF00FF | 1.0 |\n| SpringboardArtistLabel | Sp | Artist Label | by | 1.0 |\n| SpringboardArtistLabelColor | Sp | HTML HEX Color Value | #FF00FF | 1.0 |\n| SpringboardDirectorColor | Sp | HTML HEX Color Value | #FF00FF | 1.0 |\n| SpringboardDirectorText | Sp | Director Label | Written by | 1.0 |\n| SpringboardDirectorLabelColor | Sp | HTML HEX Color Value | #FF00FF | 1.0 |\n| SpringboardDirectorPrefixText | Sp | HTML HEX Color Value | #FF00FF | |\n| SpringboardGenreColor | Sp | HTML HEX Color Value | #FF00FF | 1.0 |\n| SpringboardRuntimeColor | Sp | HTML HEX Color Value | #FF00FF | 1.0 |\n| SpringboardSynopsisColor | Sp | HTML HEX Color Value | #FF00FF | 1.0 |\n| SpringboardTitleText | Sp | HTML HEX Color Value | #FF00FF | 1.0 |\n| TextScreenBodyBackgroundColor | Te | HTML HEX Color Value. Must be a grayscale value | #808080 | 4.3 |\n| TextScreenBodyText | Te | HTML HEX Color Value | #363636 | 4.3 |\n| TextScreenScrollBarColor | Te | HTML HEX Color Value | #CC0000 | 4.3 |\n| TextScreenScrollThumbColor | Te | HTML HEX Color Value | #00CC00 | 4.3 |\n| ThemeType | | Theme type. Generic-dark is the only valid value. Otherwise the default theme applies | generic-dark | 2.7 |\n\n**Example**\n\n```\nSub SetApplicationTheme()\n app = CreateObject(\"roAppManager\")\n theme = CreateObject(\"roAssociativeArray\")\n theme.OverhangSliceHD = \"pkg:/images/Overhang_Slice_HD.png\"\n theme.OverhangPrimaryLogoSD = \"pkg:/images/Logo_Overhang_SD43.png\"\n theme.OverhangPrimaryLogoOffsetSD_X = \"72\"\n theme.OverhangPrimaryLogoOffsetSD_Y = \"25\"\n theme.OverhangPrimaryLogoHD = \"pkg:/images/Logo_Overhang_HD.png\"\n theme.OverhangPrimaryLogoOffsetHD_X = \"123\"\n theme.OverhangPrimaryLogoOffsetHD_Y = \"48\"\n app.SetTheme(theme)\nEnd Sub\n```", + "events": [], + "interfaces": [ + { + "name": "ifAppManager", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifappmanager.md" + } + ], + "name": "roAppManager", + "url": "https://developer.roku.com/docs/references/brightscript/components/roappmanager.md" + }, + "roarray": { + "constructors": [ + { + "params": [ + { + "isRequired": true, + "name": "size", + "type": "Integer" + }, + { + "isRequired": true, + "name": "resizeAs", + "type": "Boolean" + } + ], + "returnType": "roArray" + } + ], + "description": "An array stores an indexed collection of BrightScript objects. Each entry of an array can be a different type, or they may all of the same type.\n\nAn roArray is created with two parameters:\n\n**CreateObject(\"roArray\", size As Integer, resizeAs Boolean)**\n\nSize is the initial number of elements allocated for the array. If resize is true, the array will be resized if needed to accommodate more elements. If the array is large, this might be slow. The \"dim\" statement may be used instead of CreateObject to allocate a new array. Dim has the advantage in that it automatically creates arrays of arrays for multi-dimensional arrays.", + "events": [], + "interfaces": [ + { + "name": "ifArray", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifarray.md" + }, + { + "name": "ifArrayGet", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifarrayget.md" + }, + { + "name": "ifArrayJoin", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifarrayjoin.md" + }, + { + "name": "ifArraySet", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifarrayset.md" + }, + { + "name": "ifArraySort", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifarraysort.md" + }, + { + "name": "ifEnum", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifenum.md" + } + ], + "name": "roArray", + "url": "https://developer.roku.com/docs/references/brightscript/components/roarray.md" + }, + "roassociativearray": { + "constructors": [ + { + "params": [], + "returnType": "roAssociativeArray" + } + ], + "description": "An associative array (also known as a map, dictionary or hash table) allows objects to be associated with string keys. Associative arrays are built into the language. They can be accessed implicitly by using the dot or bracket operators, or by calling functions from the [ifAssociativeArray](https://developer.roku.com/docs/references/brightscript/interfaces/ifassociativearray.md\"ifAssociativeArray\") interface. For example, the last three lines in this example are equivalent:\n\n```\naa = { one : 1, two : 2, three : 3 }\nx = aa[\"two\"]\nx = aa.two\nx = aa.Lookup(\"two\")\n```\n\nThis object is created with no parameters:\n\n```\nCreateObject(\"roAssociativeArray\")\n```\n\nIt can also be created implicitly by using an Associative Array literal.\n\nStarting from Roku OS 8, the quoted keys in Associative Array literals are now case-preserving. This change improves the readability of your code and is compatible with JSON usage.\n\n**Example**\n\n```\n' Creation of associative arrays\n\naa1 = CreateObject(\"roAssociativeArray\") ' Explicitly \naa2 = {} ' Implicitly\naa3 = { ' With some initial values\n foo : 12,\n bar : 13\n}\n\n' Assigning values\n\naa1.AddReplace(\"Bright\", \"Script\") ' With explicit function calls\naa1.AddReplace(\"TMOL\", 42)\naa1.boo = 112 ' With dot operator\naa1[\"baz\"] = \"abcdefg\" ' With bracket operator\n\n' Accessing values\n\nprint aa1.Bright ' With dot operator (will print 'Script')\nprint aa1.Lookup(\"TMOL\") ' With function call (will print 42)\nprint aa1[\"boo\"] ' With bracket operator (will print 112)\n\n' Using ifEnum interface to walk through keys in an associative array\nfor each key in aa1\n\n print \" \" key \"=\" aa1[key]\n\nend for\n```", + "events": [], + "interfaces": [ + { + "name": "ifAssociativeArray", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifassociativearray.md" + }, + { + "name": "ifEnum", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifenum.md" + } + ], + "name": "roAssociativeArray", + "url": "https://developer.roku.com/docs/references/brightscript/components/roassociativearray.md" + }, + "roaudioguide": { + "constructors": [], + "description": "> This component is only available on the following devices: Roku Streaming Stick (3600X), Roku Express (3700X) and Express+ (3710X), Roku Premiere (4620X) and Premiere+ (4630X), Roku Ultra (4640X), and any Roku TV running Roku OS version 7.5 and later.\n\nThe roAudioGuide component provides Audio Guide support for applications that require custom speech beyond what is provided by automatic Audio Guide in SDK and Scene Graph components.\n\nThough some of the roAudioGuide API is similar to [roTextToSpeech](https://developer.roku.com/docs/references/brightscript/components/rotexttospeech.md\"roTextToSpeech\"), roAudioGuide provides support specific to Audio Guide, including:\n\n* Speaks when Audio Guide is enabled, and doesn't speak if it isn't.\n* Automatically splits up text to reduce lag.\n* Uses the correct voice, language, volume, and speech rate for Audio Guide.\n* Tries to be \"smart\" by pre-processing the text for correct pronunciation of things like currency, email addresses, acronyms, media-related names and titles, etc.\n\nUsually, roAudioGuide would be used on its own, but it can be used in conjunction with [roTextToSpeech](https://developer.roku.com/docs/references/brightscript/components/rotexttospeech.md\"roTextToSpeech\").", + "events": [], + "interfaces": [ + { + "name": "ifAudioGuide", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifaudioguide.md" + } + ], + "name": "roAudioGuide", + "url": "https://developer.roku.com/docs/references/brightscript/components/roaudioguide.md" + }, + "roaudiometadata": { + "constructors": [ + { + "params": [], + "returnType": "roAudioMetadata" + } + ], + "description": "The roAudioMetadata component provides developers access to audio file metadata included in many audio files. This should enable some audiofiles to deliver the information needed to fill out an roSpringboard screen without passing the info in a separate xml feed. roAudioMetadata currently only works with local file URLs.\n\nThe component requires the use of a dynamically loaded library that is not part of the initially booted image. Therefore, an entry must be added to the manifest of any applications that use the roAudioMetadata component so it can be loaded when the channel is launched. Here's the manifest entry:\n\n_requires\\_audiometadata=1_\n\nThis object is created without any arguments:\n\n`CreateObject(\"roAudioMetadata\")`\n\n**Example**\n\n```\nREM printAA() is from generalUtils.brs in our sample apps\nREM and used to print an associative Array\n\nSub SaveCoverArtFile(filename As String)\n meta = CreateObject(\"roAudioMetadata\")\n meta.SetUrl(filename)\n print \"------------- GetTags() -------------------------\"\n tags = meta.GetTags()\n printAA(tags)\n print \"------------- GetAudioProperties() --------------\"\n properties = meta.GetAudioProperties()\n printAA(properties)\n print \"------------- GetCoverArt() ---------------------\"\n thumbnail = meta.GetCoverArt()\n if (thumbnail <> invalid) then\n if (thumbnail.bytes = invalid) then\n return\n end if\n imgtype = thumbnail.type\n image_ext=\"\"\n if (imgtype = \"image/jpeg\" or imgtype = \"jpg\") then\n image_ext = \"jpg\"\n else if (imgtype = \"image/png\" or imgtype = \"png\") then\n image_ext = \"png\"\n else\n image_ext = \"jpg\"\n end if\n tmp_img = \"tmp:/CoverArtImage\" + \".\" + image_ext\n if (tmp_img <> invalid) then\n DeleteFile(tmp_img)\n end if\n thumbnail.bytes.Writefile(tmp_img)\n end if\nEnd Sub\n```", + "events": [], + "interfaces": [ + { + "name": "ifAudioMetadata", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifaudiometadata.md" + } + ], + "name": "roAudioMetadata", + "url": "https://developer.roku.com/docs/references/brightscript/components/roaudiometadata.md" + }, + "roaudioplayer": { + "constructors": [ + { + "params": [], + "returnType": "roAudioPlayer" + } + ], + "description": "The Audio Player object provides the ability to setup the playing of a series of audio streams. The object accepts an array of content meta-data objects, describing the audio and providing URLs for accessing each stream. The component understands the following streamformat values: \"mp3\", \"wma\", \"mp4\", \"hls\", \"es.aac-adts\", \"flac.\"\n\nThis object does not provide an interface to a screen. In order to get events both from the screen you are using and the Audio Player, you should use the same Message Port for both objects.\n\nThis object is created with no parameters:\n\n`CreateObject(\"roAudioPlayer\")`\n\n**Example**\n\n```\nSub Main()\n audioPlayer = CreateObject(\"roAudioPlayer\")\n port = CreateObject(\"roMessagePort\")\n audioPlayer.SetMessagePort(port)\n song = CreateObject(\"roAssociativeArray\")\n song.url = \"http://www.theflute.co.uk/media/BachCPE_SonataAmin_1.wma\"\n audioplayer.addcontent(song)\n audioplayer.setloop(false)\n audioPlayer.play()\n while true\n msg = wait(0, port)\n if type(msg) = \"roAudioPlayerEvent\"\n if msg.isStatusMessage() then\n print \"roAudioPlayerEvent: \"; msg.getmessage()\n if msg.getmessage() = \"end of playlist\" return\n endif\n endif\n end while\nEnd Sub\n```", + "events": [ + { + "name": "roAudioPlayerEvent", + "url": "https://developer.roku.com/docs/references/brightscript/events/roaudioplayerevent.md" + } + ], + "interfaces": [ + { + "name": "ifAudioPlayer", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifaudioplayer.md" + }, + { + "name": "ifGetMessagePort", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifgetmessageport.md" + }, + { + "name": "ifHttpAgent", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifhttpagent.md" + }, + { + "name": "ifSetMessagePort", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifsetmessageport.md" + } + ], + "name": "roAudioPlayer", + "url": "https://developer.roku.com/docs/references/brightscript/components/roaudioplayer.md" + }, + "roaudioresource": { + "constructors": [ + { + "params": [ + { + "isRequired": true, + "name": "param1", + "type": "dynamic" + } + ], + "returnType": "roAudioResource" + }, + { + "params": [ + { + "isRequired": true, + "name": "param1", + "type": "string" + } + ], + "returnType": "roAudioResource" + } + ], + "description": "The roAudioResouce allows .wav files to be cached to memory and quickly played at any time. roAudioResource is intended to support short audio clips which need to be played with very little latency. The system caches the entire wav file in memory so that playback can begin very quickly.\n\nOn Roku \"Classic\" models, roAudioResource does not support mixing of sounds. So when you play a sound effect, any background music is paused while the sound effect plays and then resumes after the sound effect ends. On later models, sound effects are mixed with background music. See the [Hardware specifications document](/docs/specs/hardware.md#current-models) for a list of Current and Classic models.\n\nThis object is created with a filename parameter that is a path to the sound resource file:\n\n`CreateObject(\"roAudioResource\", filename)`\n\nThe filename must be the name of a local file and cannot be a URL. To use a URL, you may download the file to the application's \"tmp:\" file system using [roUrlTransfer](https://developer.roku.com/docs/references/brightscript/components/rourltransfer.md and pass a filename of the form \"tmp:/file.wav\" to CreateObject.\n\n```\nsound = CreateObject(\"roAudioResource\", \"pkg:/sounds/beep1.wav\")\nsound.Trigger(75)\n```\n\nAn object can also be created using the name of a system sound effect:\n\n* \"select\" - the sound effect to be played when a selection is made, e.g. when OK is pressed.\n* \"navsingle\" - the sound effect to be played when navigating a list or grid, e.g. when left or right is pressed.\n* \"navmulti\" - the sound effect to be played when paging through a list or grid, e.g. when rewind or fast-forward is pressed.\n* \"deadend\" - the sound effect to be played when a button press could not be processed.\n\nNote that system sound effects are played at the volume selected in the user's settings, or not played at all if the user has turned sound effects off, regardless of the volume value passed to Trigger.\n\n```\nsound = CreateObject(\"roAudioResource\", \"select\")\nsound.Trigger(50)\n```\n\nMult iple sounds can be mixed and played at the same time:\n\n```\nsound1 = CreateObject(\"roAudioResource\", \"pkg:/sounds/beep1.wav\")\nsound2 = CreateObject(\"roAudioResource\", \"select\")\nsound1.Trigger(50, 0)\nif sound2.maxSimulStreams() > 1\n sound2.Trigger(50, 1)\nend if\n```", + "events": [], + "interfaces": [ + { + "name": "ifAudioResource", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifaudioresource.md" + } + ], + "name": "roAudioResource", + "url": "https://developer.roku.com/docs/references/brightscript/components/roaudioresource.md" + }, + "robitmap": { + "constructors": [ + { + "params": [ + { + "isRequired": true, + "name": "bitmapProps", + "type": "Object" + } + ], + "returnType": "roBitmap" + }, + { + "params": [ + { + "isRequired": true, + "name": "filename", + "type": "String" + } + ], + "returnType": "roBitmap" + }, + { + "params": [ + { + "isRequired": true, + "name": "param1", + "type": "string" + } + ], + "returnType": "roBitmap" + }, + { + "params": [ + { + "isRequired": true, + "name": "param1", + "type": "dynamic" + } + ], + "returnType": "roBitmap" + } + ], + "description": "The roBitmap component contains image data and provides an interface (ifDraw2D) for drawing. Bitmaps can be used for a variety of purposes, such as for sprites, compositing, or as double buffers.\n\nIt stores four color channels: red, green, blue, and alpha, with 32-bits per pixel. They can be any arbitrary size up to 2048x2048. However, the maximum size bitmap uses 16MB of memory, so there are practical memory limitations which would compel smaller bitmap sizes. Coordinates (x,y) for 2D bitmaps have an origin (0,0) at the top left. roBitmap is always offscreen. The top roScreen is the only ifDraw2D surface which is displayed. roBitmap represents something that can be drawn onto, as well as something that can be drawn.\n\nDrawing operations into a roBitmap (or other surface with ifDraw2D interface, such as an [roScreen](https://developer.roku.com/docs/references/brightscript/components/roscreen.md\"roScreen\")) are clipped so the only the part that is within its bounds is rendered. X,Y coordinates that specify a location in a bitmap to render to (for example, as used by DrawObject() or DrawText() ) may be positive or negative. Negative implies that the left and top of the rendered object will be clipped.The same bitmap cannot be used as a source and a destination in a single DrawObject() call.\n\nThere are limitations when using the onscreen bitmap as a source. For example, Alpha blending may not work.\n\nAn empty roBitmap object can be created with CreateObject():\n\n`CreateObject(\"roBitmap\", bitmapProps As Object)`\n\nbitmapProps is an roAssociativeArray with Integers width (Integer), height (Integer), and AlphaEnable (Boolean), and name (String) parameters. The contents of an empty RoBitmap are initialized to zero (transparent black).\n\nExample: `CreateObject(\"roBitmap\", {width:10, height:10, AlphaEnable:false, name:\"MyBitmapName\"})`\n\nAn roBitmap can also load its image data from a file:\n\n`CreateObject(\"roBitmap\", String filename)`\n\n**Example**\n\n```\n' Draw three bitmaps as fast as we can\n'\nScreen=CreateObject(\"roScreen\")\nbm1=CreateObject(\"roBitmap\", \"pkg:/images/myphoto1.jpg\")\nbm2=CreateObject(\"roBitmap\", \"pkg:/images/myphoto2.jpg\")\nbm3=CreateObject(\"roBitmap\", \"pkg:/images/myphoto3.jpg\")\nbmarray=[bm1, bm2, bm3]\nWhile true\n For each bitmap in bmarray\n Screen.DrawObject(0,0, bitmap)\n Screen.Finish()\n End for\nEnd While\n```\n\n**Example: Double buffering with roBitmap**\n\n```\nscreen1=CreateObject(\"roScreen\")\noff=CreateObject(\"roBitmap\", {width:1280, height:720, AlphaEnable:false})\noff.Clear(white)\ndfDrawImage(off, \"pkg:/images/myimage.png\", 50, 50)\noff.DrawRect(150, 150, 200, 200, &hFF) ' black, alpha: all source\nscreen1.DrawObject(0, 0, off)\nScreen1.Finish()\n```", + "events": [], + "interfaces": [ + { + "name": "ifDraw2D", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifdraw2d.md" + } + ], + "name": "roBitmap", + "url": "https://developer.roku.com/docs/references/brightscript/components/robitmap.md" + }, + "roboolean": { + "constructors": [], + "description": "roBoolean is the object equivalent for intrinsic type Boolean.\n\nThis is useful in the following situations:\n\n* When an object is needed, instead of an intrinsic value. For example, \"roList\" maintains a list of objects. If an Boolean is added to roList, it will be automatically wrapped in an roBoolean by the language interpreter. When a function that expects a BrightScript Component as a parameter is passed a boolean, BrightScript automatically creates the equivalent BrightScript Component.\n* If any object exposes the ifBoolean interface, that object can be used in any expression that expects an intrinsic value.", + "events": [], + "interfaces": [ + { + "name": "ifBoolean", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifboolean.md" + }, + { + "name": "ifToStr", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/iftostr.md" + } + ], + "name": "roBoolean", + "url": "https://developer.roku.com/docs/references/brightscript/components/roboolean.md" + }, + "robytearray": { + "constructors": [ + { + "params": [], + "returnType": "roByteArray" + } + ], + "description": "The byte array component is used to contain and manipulate an arbitrary array of bytes.\n\nThis object contains functions to convert strings to or from a byte array, as well as to or from ascii hex or ascii base 64. Note that if you are converting a byte array to a string, and the byte array contains a zero, the string conversion will end at that point. roByteArray will autosize to become larger as needed. If you wish to turn off this behavior, then use the SetResize() function. If you read an uninitialized index, \"invalid\" is returned. roByteArray supports the [ifArray](https://developer.roku.com/docs/references/brightscript/interfaces/ifarray.md\"ifArray\") interface, and so can be accessed with the array \\[\\] operator. The byte array is always accessed as unsigned bytes when using this interface. roByteArray also supports the ifEnum interface, and so can be used with a \"for each\" statement.\n\n**Example**\n\n```\nba=CreateObject(\"roByteArray\")\nba.FromAsciiString(\"leasure.\")\nif ba.ToBase64String()<>\"bGVhc3VyZS4=\" then stop\n\nba=CreateObject(\"roByteArray\")\nba.fromhexstring(\"00FF1001\")\nif ba[0]<>0 or ba[1]<>255 or ba[2]<>16 or ba[3]<>1 then stop\n\nba=CreateObject(\"roByteArray\")\nfor x=0 to 4000\n ba.push(x)\nend for\n\nba.WriteFile(\"tmp:/ByteArrayTestFile\")\nba2=CreateObject(\"roByteArray\")\nba2.ReadFile(\"tmp:/ByteArrayTestFile\")\nif ba.Count()<>ba2.Count() then stop\nfor x=0 to 4000\n if ba[x]<>ba2[x] then stop\nend for\n\nba2.ReadFile(\"tmp:/ByteArrayTestFile\", 10, 100)\nif ba2.count()<>100 then stop\nfor x=10 to 100\n if ba2[x-10]<>x then stop\nend for\n```", + "events": [], + "interfaces": [ + { + "name": "ifArray", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifarray.md" + }, + { + "name": "ifArrayGet", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifarrayget.md" + }, + { + "name": "ifArraySet", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifarrayset.md" + }, + { + "name": "ifByteArray", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifbytearray.md" + }, + { + "name": "ifEnum", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifenum.md" + } + ], + "name": "roByteArray", + "url": "https://developer.roku.com/docs/references/brightscript/components/robytearray.md" + }, + "rocaptionrenderer": { + "constructors": [], + "deprecatedDescription": "This component is deprecated and will be removed from Roku OS on January 1st, 2019.\n\nBeginning July 1st, 2017, any new channels using this component will be rejected during certification.\n\nBeginning January 1st, 2018, any updates to existing channels using this component will be rejected during certification.\n", + "description": "> This component is deprecated and will be removed from Roku OS on January 1st, 2019.\n> \n> Beginning July 1st, 2017, any new channels using this component will be rejected during certification.\n> \n> Beginning January 1st, 2018, any updates to existing channels using this component will be rejected during certification.\n\nThe roCaptionRenderer component provides a mechanism for BrightScript channels to render closed captions in video played back with the roVideoPlayer. Prior to the v 5.2 Roku firmware, captions could only be rendered in roVideoScreen.\n\nPrior to the 5.2 Roku OS version, closed captions could only be rendered in roVideoScreen. Now channels that use roVideoPlayer embedded in an roScreen or roImageCanvas can also take advantage of Roku's closed captioning support. roCaptionRenderer supports two different modes, which is set using the [SetMode()](https://developer.roku.com/docs/references/brightscript/interfaces/ifcaptionrenderer.mdsetmodemode-as-integer-as-void \"SetMode()\") method. Depending on the mode set, and the type of screen being used, the BrightScript channel needs to do different levels of work to render captions. These different workflows are highlighted in the tables below:\n\n**Model 1**\n\n| roScreen | roImageCanvas |\n| --- | --- |\n| Call [SetScreen()](https://developer.roku.com/docs/references/brightscript/interfaces/ifcaptionrenderer.mdsetscreenscreen-as-object-as-void \"SetScreen()\") | Call [SetScreen()](https://developer.roku.com/docs/references/brightscript/interfaces/ifcaptionrenderer.mdsetscreenscreen-as-object-as-void \"SetScreen()\") |\n| Call [UpdateCaption()](https://developer.roku.com/docs/references/brightscript/interfaces/ifcaptionrenderer.mdupdatecaption-as-void \"UpdateCaption()\") | |\n\n**Model 2**\n\n| roScreen | roImageCanvas |\n| --- | --- |\n| All caption rendering is done by the channel's BrightScript code | All caption rendering is done by the channel's BrightScript code |\n\nBrightScript channels do not create roCaptionRenderer instances directly using CreateObject(). Instead, when an roVideoPlayer is created, it contains an roCaptionRenderer. BrightScript channels call [ifVideoPlayer.GetCaptionRenderer()](https://developer.roku.com/docs/references/brightscript/interfaces/ifvideoplayer.mdgetcaptionrenderer-as-object \"ifVideoPlayer.GetCaptionRenderer()\") to get the caption renderer associated with their video player.\n\n**Example**\n\n```\nFunction Main() as void\n mode = 1\n fonts = CreateObject(\"roFontRegistry\")\n fonts.Register(\"pkg:/fonts/vSHandprinted.otf\")\n font = fonts.GetFont(\"vSHandprinted\", 28, 500, false)\n screen = CreateObject(\"roScreen\", true)\n port = CreateObject(\"roMessagePort\")\n screen.Clear(&h00)\n screen.SwapBuffers()\n screen.SetMessagePort(port)\n timer = CreateObject(\"roTimespan\")\n screenSize = {}\n screenSize.width = screen.GetWidth()\n screenSize.height = screen.GetHeight()\n\n player = CreateObject(\"roVideoPlayer\")\n player.SetContentList([\n {\n Stream : { url :\"http://ecn.channel9.msdn.com/o9/content/smf/smoothcontent/elephantsdream/Elephants_Dream_1024-h264-st-aac.ism/manifest\" }\n StreamFormat : \"ism\"\n TrackIDAudio: \"audio_eng\"\n TrackIDSubtitle: \"ism/textstream_eng\"\n }\n ])\n\n captions = player.GetCaptionRenderer()\n if (mode = 1)\n captions.SetScreen(screen)\n endif\n captions.SetMode(mode)\n captions.SetMessagePort(port)\n captions.ShowSubtitle(true)\n\n player.play()\n\n while true\n msg = wait(250, port)\n if type(msg) = \"roCaptionRendererEvent\"\n if msg.isCaptionText()\n print \"isCaptionText\"\n if msg.GetMessage() <> invalid and msg.GetMessage() <> \"\"\n DrawCaptionString(screen, screenSize, msg.GetMessage(), font)\n timer.Mark()\n else if timer.TotalSeconds() > 2\n ClearCaptionString(screen)\n endif\n else if msg.isCaptionUpdateRequest()\n print \"isCaptionUpdateRequest()\"\n UpdateCaptions(screen, captions)\n end if\n endif\n end while\nEnd Function\n\nFunction UpdateCaptions(screen as object, captions as object) as Void\n screen.Clear(&h00)\n captions.UpdateCaption()\n screen.SwapBuffers()\nEnd Function\n\nFunction DrawCaptionString(screen as object, screenSize as object, caption as String, font as object) as Void\n screen.Clear(&h00)\n textHeight = font.GetOneLineHeight()\n textWidth = font.GetOneLineWidth(caption, screenSize.width)\n x = (screenSize.width - textWidth) / 2\n y = screenSize.height - textHeight\n screen.DrawText(caption, x, y, &hd5d522ff, font)\n screen.SwapBuffers()\nEnd Function\n\nFunction ClearCaptionString(screen as object) as void\n screen.Clear(&h00)\n screen.SwapBuffers()\nEnd Function\n```", + "events": [ + { + "name": "roCaptionRendererEvent", + "url": "https://developer.roku.com/docs/references/brightscript/event/rocaptionrendererevent.md" + } + ], + "interfaces": [ + { + "name": "ifCaptionRenderer", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifcaptionrenderer.md" + } + ], + "isDeprecated": true, + "name": "roCaptionRenderer", + "url": "https://developer.roku.com/docs/references/brightscript/components/rocaptionrenderer.md" + }, + "rochannelstore": { + "constructors": [ + { + "params": [], + "returnType": "roChannelStore" + } + ], + "description": "The roChannelStore component allows the application to perform a purchase of an In-Channel Product or upgrade a channel. Most of the purchase flow, screens and messaging associated with the financial transaction are handled by the Roku OS outside of control or monitoring by BrightScript code. The BrightScript code merely initiates the purchase and receives a final result. This will engender trust with users and give them confidence that they are dealing with the Roku Channel Store.\n\nThe roChannelStore component allows purchasing only those In-Channel Products which are associated with the running channel. Please see [Adding in-channel products](/docs/developer-program/roku-pay/quickstart/in-channel-products.md \"Adding in-channel products\") for details on how to create an In-Channel Product and associate it with a channel. After one or Products are created, GetCatalog() can be used to retrieve a list of Products and their attributes. DoOrder() can be called to initiate a purchase of one or more of the Products.\n\nThe roChannelStore object has a FakeServer() method that will enable you to test the purchase flow scenarios without actually making a real transaction in the Roku channel store. This will be useful in the development of your channel, but should never be used in the actual channel you publish.\n\nThis object is created without any arguments:\n\n`CreateObject(\"roChannelStore\")`\n\n> Because [ifChannelStore.DoOrder()](https://developer.roku.com/docs/references/brightscript/interfaces/ifchannelstore.mddoorder-as-boolean \"ifChannelStore.DoOrder()\") needs to read the product type returned by GetCatalog(), only one instance of roChannelStore should ever be used for a complete purchase flow - you should never create a separate roChannelStore object to complete a purchase that was initiated by a different instance of roChannelStore.", + "events": [ + { + "name": "roChannelStoreEvent", + "url": "https://developer.roku.com/docs/references/brightscript/events/rochannelstoreevent.md" + } + ], + "interfaces": [ + { + "name": "ifChannelStore", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifchannelstore.md" + }, + { + "name": "ifGetMessagePort", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifgetmessageport.md" + }, + { + "name": "ifSetMessagePort", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifsetmessageport.md" + } + ], + "name": "roChannelStore", + "url": "https://developer.roku.com/docs/references/brightscript/components/rochannelstore.md" + }, + "rocoderegistrationscreen": { + "constructors": [ + { + "params": [], + "returnType": "roCodeRegistrationScreen" + } + ], + "deprecatedDescription": "This component is deprecated and will be removed from Roku OS on January 1st, 2019.\n\nBeginning July 1st, 2017, any new channels using this component will be rejected during certification.\n\nBeginning January 1st, 2018, any updates to existing channels using this component will be rejected during certification.\n", + "description": "> This component is deprecated and will be removed from Roku OS on January 1st, 2019.\n> \n> Beginning July 1st, 2017, any new channels using this component will be rejected during certification.\n> \n> Beginning January 1st, 2018, any updates to existing channels using this component will be rejected during certification.\n\nThe Code Registration Screen is designed to present the user a registration code, and the information required to instruct the user on how to register with a service provider. This screen is designed for a rendezvous registration process, where the user is presented a code and the URL for a registration site. The user goes to the site and enters their code, which causes the device and the account to be linked. In the background, the script is polling for completion and the screen is closed to display an activation successful screen when done.\n\n**Diagram: roCodeRegistrationScreen**\n\n![Diagram: roCodeRegistrationScreen](https://image.roku.com/ZHZscHItMTc2/roCodeRegistrationScreenImage1.png \"roCodeRegistrationScreenImage1\")\n\n**Example**\n\n```\nFunction ShowMessageDialog() As Void\n port = CreateObject(\"roMessagePort\")\n screen = CreateObject(\"roCodeRegistrationScreen\")\n screen.SetMessagePort(port)\n screen.SetTitle(\"[Registration screen title]\")\n screen.AddParagraph(\"[Registration screen paragraphs are justified to right and left edges]\")\n screen.AddFocalText(\" \", \"spacing-dense\")\n screen.AddFocalText(\"From your computer,\", \"spacing-dense\")\n screen.AddFocalText(\"go to mysite.com/roku\", \"spacing-dense\")\n screen.AddFocalText(\"and enter this code:\", \"spacing-dense\")\n screen.AddFocalText(\" \", \"spacing-dense\")\n screen.SetRegistrationCode(\"retrieving code...\")\n screen.AddParagraph(\"[Registration screen paragraphs are justified to right and left edges and may continue on multiple lines]\")\n screen.AddButton(0, \"get a new code\")\n screen.AddButton(1, \"back\")\n screen.Show()\n sleep (10000) 'simulate fetching registration code from webapi\n screen.SetRegistrationCode(\"ABC7TG\")\n screen.Show()\n while true\n dlgMsg = wait(0, dialog.GetMessagePort())\n exit while\n end while\n End Function\n```\n\n**Image: roCodeRegistrationScreen example results**\n\n![cdregistscrn1](https://image.roku.com/ZHZscHItMTc2/cdregistscrn1.jpg \"cdregistscrn1\")\n\n![cdregistscrn2](https://image.roku.com/ZHZscHItMTc2/cdregistscrn2.jpg \"cdregistscrn2\")", + "events": [ + { + "name": "roCodeRegistrationScreenEvent", + "url": "https://developer.roku.com/docs/references/brightscript/events/rocoderegistrationscreenevent.md" + } + ], + "interfaces": [ + { + "name": "ifCodeRegistrationScreen", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/iifCodeRegistrationScreen.md" + }, + { + "name": "ifGetMessagePort", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifgetmessageport.md" + }, + { + "name": "ifSetMessagePort", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifsetmessageport.md" + } + ], + "isDeprecated": true, + "name": "roCodeRegistrationScreen", + "url": "https://developer.roku.com/docs/references/brightscript/components/rocoderegistrationscreen.md" + }, + "rocompositor": { + "constructors": [ + { + "params": [], + "returnType": "roCompositor" + } + ], + "description": "The roCompositor allows the composition and animation of multiple roBitmaps and roRegions.\n\nThis object can create and manage roSprites in a z-ordered list. The sprites can be of arbitrary size and can be thought of as planes. The compositor can manage collision detection between the sprites, support scrolling the sprite bitmap source, and support animated sprites (multi-frame sprites with frame-flipping animation). You may have multiple roCompositor components, and they can composite onto the same or separate bitmaps. That said, the most common scenario is to have a single roCompositor.\n\n**Example: Scrolling a bitmap**\n\n```\nLibrary \"v30/bslCore.brs\"\nFunction main()\n black=&hFF'RGBA\n screen=CreateObject(\"roScreen\")\n compositor=CreateObject(\"roCompositor\")\n compositor.SetDrawTo(screen, black)\n http = CreateObject(\"roUrlTransfer\")\n http.SetMessagePort(CreateObject(\"roMessagePort\"))\n http.SetUrl(\"http://rokudev.roku.com/rokudev/examples/scroll/VeryBigPng.png\")\n http.AsyncGetToFile(\"tmp:/VeryBigPng.png\")\n wait(0, http.GetPort())\n bigbm=CreateObject(\"roBitmap\",\"tmp:/VeryBigPng.png\")\n region=CreateObject(\"roRegion\", bigbm, 0, 0, 1280, 720)\n region.SetWrap(True)\n\n view_sprite=compositor.NewSprite(0, 0, region)\n compositor.draw()\n screen.SwapBuffers()\n msgport = CreateObject(\"roMessagePort\")\n screen.SetMessagePort(msgport)\n codes = bslUniversalControlEventCodes()\n While True\n msg=wait(0, msgport) ' wait for a button\n print \"Msg: \"; type(msg); \" event: \"; msg.GetInt()\n If type(msg)=\"roUniversalControlEvent\" Then\n If msg.GetInt()=codes.BUTTON_UP_PRESSED Then\n Zip(screen, view_sprite, compositor, 0,-4) 'up\n Else If msg.GetInt()=codes.BUTTON_DOWN_PRESSED Then\n Zip(screen, view_sprite, compositor, 0,+4) ' down\n Else If msg.GetInt()=codes.BUTTON_RIGHT_PRESSED Then\n Zip(screen, view_sprite, compositor, +4,0) ' right\n Else If msg.GetInt()=codes.BUTTON_LEFT_PRESSED Then\n Zip(screen, view_sprite, compositor, -4, 0) ' left\n Else If msg.GetInt() = codes.BUTTON_BACK_PRESSED ' back button\n Exit While\n End If\n End If\n End While\nEnd Function\nFunction Zip(screen, view_sprite, compositor, xd, yd)\n For x=1 To 60\n view_sprite.OffsetRegion(xd, yd, 0, 0)\n compositor.draw()\n screen.SwapBuffers()\n End For\nEnd Function\n```", + "events": [], + "interfaces": [ + { + "name": "ifCompositor", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifcompositor.md" + } + ], + "name": "roCompositor", + "url": "https://developer.roku.com/docs/references/brightscript/components/rocompositor.md" + }, + "rodatagramsocket": { + "constructors": [ + { + "params": [], + "returnType": "roDataGramSocket" + } + ], + "description": "The roDataGramSocket component enables Brightscript apps to send and receive UDP packets. The interface is modeled on and works much like standard Berkeley sockets.\n\nThis object is created without any arguments:\n\n`CreateObject(\"roDataGramSocket\")`\n\n**Example**\n\n```\n' UDP 2-way peer-to-peer asynchronous comm on port 54321\n' periodically sends out a message to a specific address and port\n' prints any message it receives\nFunction UDPPeer()\n msgPort = createobject(\"roMessagePort\")\n udp = createobject(\"roDatagramSocket\")\n udp.setMessagePort(msgPort) 'notifications for udp come to msgPort\n addr = createobject(\"roSocketAddress\")\n addr.setPort(54321)\n udp.setAddress(addr) ' bind to all host addresses on port 54321\n addr.SetHostName(\"10.1.1.1\")\n udp.setSendToAddress(addr) ' peer IP and port\n udp.notifyReadable(true)\n timeout = 1 * 10 * 1000 ' ten seconds in milliseconds\n deviceName = Createobject(\"roDeviceInfo\").GetFriendlyName()\n message = \"Datagram from \" + deviceName\n udp.sendStr(message)\n continue = udp.eOK()\n While continue\n event = wait(timeout, msgPort)\n If type(event)=\"roSocketEvent\"\n If event.getSocketID()=udp.getID()\n If udp.isReadable()\n message = udp.receiveStr(512) ' max 512 characters\n print \"Received message: '\"; message; \"'\"\n End If\n End If\n Else If event=invalid\n print \"Timeout\"\n udp.sendStr(message) ' periodic send\n End If\n End While\n udp.close() ' would happen automatically as udp goes out of scope\n\nEnd Function\n```\n\n> GetDeviceUniqueId() was deprecated in Spring OS 2019.", + "events": [ + { + "name": "roSocketEvent", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifappinfo.md" + } + ], + "interfaces": [ + { + "name": "ifSocket", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifsocket.md" + }, + { + "name": "ifSocketAsync", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifsocketasync.md" + }, + { + "name": "ifSocketCastOption", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifsocketcastoption.md" + }, + { + "name": "ifSocketOption", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifsocketoption.md" + }, + { + "name": "ifSocketStatus", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifsocketstatus.md" + } + ], + "name": "roDataGramSocket", + "url": "https://developer.roku.com/docs/references/brightscript/components/rodatagramsocket.md" + }, + "rodatetime": { + "constructors": [ + { + "params": [], + "returnType": "roDateTime" + } + ], + "description": "The roDateTime provides an interface to obtain the current date/time for the player and manipulate date/times.\n\nThis component provides several options for obtaining attributes about the date/time. All times are GMT unless they are converted to the system timezone with a call to the method: toLocalTime().\n\nThis object is created with no parameters:\n\n`CreateObject(\"roDateTime\")`\n\nThe date/time of the object is set to the current system time when the object is created. The date/time represented by the object can be changed by calling Mark(), FromSeconds(), or FromISO8601String().\n\n**Example**\n\n```\ndate = CreateObject(\"roDateTime\")\nprint \"The date is now \"; date.AsDateString(\"long-date\")\n```", + "events": [], + "interfaces": [ + { + "name": "ifDateTime", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifdatetime.md" + } + ], + "name": "roDateTime", + "url": "https://developer.roku.com/docs/references/brightscript/components/rodatetime.md" + }, + "rodevicecrypto": { + "constructors": [ + { + "params": [], + "returnType": "roDeviceCrypto" + } + ], + "description": "The roDeviceCrypto component enables you to encrypt and decrypt data on a device using a key that is unique per channel, device, or model. Using a channel key for example, you can encrypt data for a channel so that it may only be decrypted by that same channel. In this case, you could provision credentials or an API key from the cloud to devices securely. With a device key for example, you could implement a secure-storage like algorithm.", + "events": [], + "interfaces": [ + { + "name": "ifDeviceCrypto", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifdevicecrypto.md" + } + ], + "name": "roDeviceCrypto", + "url": "https://developer.roku.com/docs/references/brightscript/components/rodevicecrypto.md" + }, + "rodeviceinfo": { + "constructors": [ + { + "params": [], + "returnType": "roDeviceInfo" + } + ], + "description": "The Device Info provides an interface to obtain attributes about the device.\n\nThese attributes are not changeable by the script, but may be queried to obtain values for the player. It is common for scripts to need access to the serial number and model info for negotiating with backend services.\n\nThis object is created with no parameters:\n\n`CreateObject(\"roDeviceInfo\")`\n\n**Example**\n\n```\ndi = CreateObject(\"roDeviceInfo\")\nprint di.GetModel()\nprint di.GetVersion()\nprint di.GetChannelClientId()\n```\n\n**Output**\n\nThe output from the above code would like the following:\n\n```\n N1000\n 999.99E99999X\n 20E825000036\n```", + "events": [ + { + "name": "roDeviceInfoEvent", + "url": "https://developer.roku.com/docs/references/brightscript/events/rodeviceinfoevent.md" + } + ], + "interfaces": [ + { + "name": "ifDeviceInfo", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifdeviceinfo.md" + }, + { + "name": "ifGetMessagePort", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifgetmessageport.md" + }, + { + "name": "ifSetMessagePort", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifsetmessageport.md" + } + ], + "name": "roDeviceInfo", + "url": "https://developer.roku.com/docs/references/brightscript/components/rodeviceinfo.md" + }, + "rodouble": { + "constructors": [], + "description": "roDouble is the object equivalent for intrinsic type 'Double'.\n\nIt is a legacy object name, corresponding to the intrinsic Double object. Applications should use Double literal values and/or Double-typed variables directly.", + "events": [], + "interfaces": [ + { + "name": "ifDouble", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifdouble.md" + }, + { + "name": "ifToStr", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/iftostr.md" + } + ], + "name": "roDouble", + "url": "https://developer.roku.com/docs/references/brightscript/components/rodouble.md" + }, + "roevpcipher": { + "constructors": [], + "description": "The EVP Cipher component provides an interface to the OpenSSL EVP library of symmetric cipher commands. The EVP library provides a high-level interface to cryptographic functions to implement digital \"envelopes\".\n\nThese commands allow data to be encrypted or decrypted using various block and stream ciphers using keys based on passwords or explicitly provided.\n\nSome of the ciphers do not have large keys and others have security implications if not used correctly. A beginner is advised to just use a strong block cipher in CBC mode such as bf or des3. All the block ciphers normally use PKCS#5 padding also known as standard block padding. If padding is disabled then the input data must be a multiple of the cipher block length.\n\n> For additional information on the OpenSSL library of symmetric ciphers see: [https://www.openssl.org/docs/manmaster/man1/enc.html](https://www.openssl.org/docs/manmaster/man1/enc.html).\n\n**List of supported ciphers**\n\n| Name | Cipher | Key size (bits) | Block size (bits) |\n| --- | --- | --- | --- |\n| bf-cbc | Blowfish in CBC mode | 128 | 64 |\n| bf | Alias for bf-cbc | 128 | 64 |\n| bf-cfb | Blowfish in CFB mode | 128 | 64 |\n| bf-ecb | Blowfish in ECB mode | 128 | 64 |\n| bf-ofb | Blowfish in OFB mode | 128 | 64 |\n| des-cbc | DES in CBC mode | 56 | 64 |\n| des | Alias for des-cbc | 56 | 64 |\n| des-cfb | DES in CBC mode | 56 | 64 |\n| des-ecb | DES in ECB mode | 56 | 64 |\n| des-ofb | DES in OFB mode | 56 | 64 |\n| des-ede-cbc | Two key triple DES EDE in CBC mode | 80 | 64 |\n| des-ede | Two key triple DES EDE in ECB mode | 80 | 64 |\n| des-ede-cfb | Two key triple DES EDE in CFB mode | 80 | 64 |\n| des-ede-ofb | Two key triple DES EDE in OFB mode | 80 | 64 |\n| des-ede3-cbc | Three key triple DES EDE in CBC mode | 112 | 64 |\n| des-ede3 | Three key triple DES EDE in ECB mode | 112 | 64 |\n| des3 | Alias for des-ede3-cbc | 112 | 64 |\n| des-ede3-cfb | Three key triple DES EDE in CFB mode | 112 | 64 |\n| des-ede3-ofb | Three key triple DES EDE in OFB mode | 112 | 64 |\n| desx | DESX algorithm | approx. 119 | 64 |\n| desx-cbc | DESX in CBC mode | approx. 119 | 64 |\n| aes-\\[128/192/256\\]-cbc | 128/192/256 bit AES in CBC mode | 128,192,256 | 128 |\n| aes-\\[128/192/256\\] | Alias for aes-\\[128/192/256\\]-cbc | 128,192,256 | 128 |\n| aes-\\[128/192/256\\]-cfb | 128/192/256 bit AES in 128 bit CFB mode | 128,192,256 | 128 |\n| aes-\\[128/192/256\\]-cfb1 | 128/192/256 bit AES in 1 bit CFB mode | 128,192,256 | 128 |\n| aes-\\[128/192/256\\]-cfb8 | 128/192/256 bit AES in 8 bit CFB mode | 128,192,256 | 128 |\n| aes-\\[128/192/256\\]-ecb | 128/192/256 bit AES in ECB mode | 128,192,256 | 128 |\n| aes-\\[128/192/256\\]-ofb | 128/192/256 bit AES in OFB mode | 128,192,256 | 128 |", + "events": [], + "interfaces": [ + { + "name": "ifEVPCipher", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifevpcipher.md" + } + ], + "name": "roEVPCipher", + "url": "https://developer.roku.com/docs/references/brightscript/components/roevpcipher.md" + }, + "roevpdigest": { + "constructors": [ + { + "params": [], + "returnType": "roEVPDigest" + } + ], + "description": "The EVP Digest component provides an interface to the OpenSSL EVP library of message digest algorithms. The EVP library provides a high-level interface to cryptographic hash functions.\n\nroEVPDigest processes an arbitrary amount of data and generates a hash of the data, using a selected algorithm.\n\n> For additional information on the OpenSSL library of message digest algorithms see: [http://www.openssl.org/docs/apps/dgst.html](http://www.openssl.org/docs/apps/dgst.html)\n\n**List of Supported Digest Algorithms**\n\n* md5 - MD5 message digest algorithm (default)\n* sha1 - SHA-1 message digest algorithm\n* sha224 - SHA-2, 224 bit variant\n* sha256 - SHA-2, 256 bit variant\n* sha384 - SHA-2, 384 bit variant\n* sha512 - SHA-2, 512 bit variant\n\n**Example: SHA1 Message Digest with roEVPDigest**\n\n```\nba = CreateObject(\"roByteArray\")\n' ...populate bytearray...\ndigest = CreateObject(\"roEVPDigest\")\ndigest.Setup(\"sha1\")\nresult = digest.Process(ba)\nprint result\n```\n\n**Example: MD5 Message Digest with roEVPDigest**\n\n```\nba1 = CreateOjbect(\"roByteArray\")\n' ...populate ba1...\nba2 = CreateObject(\"roByteArray\")\nba2.FromAsciiString(somestring)\ndigest = CreateObject(\"roEVPDigest\")\ndigest.Setup(\"md5\")\ndigest.Update(ba1)\ndigest.Update(ba2)\nresult = digest.Final()\nprint result\n```", + "events": [], + "interfaces": [ + { + "name": "ifEVPDigest", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifevpdigest.md" + } + ], + "name": "roEVPDigest", + "url": "https://developer.roku.com/docs/references/brightscript/components/roevpdigest.md" + }, + "rofilesystem": { + "constructors": [ + { + "params": [], + "returnType": "roFileSystem" + } + ], + "description": "The roFilesystem component implements common filesystem inspection and modificationroutines.\n\nAll paths are matched case-insensitively, regardless of the case-sensitivity of the underlying filesystem. The supported character set is limited to only those characters supported by vfat filesystems (valid Windows characters). The usbplayer sample application is a good example of roFileSystem usage. USB devices with VFAT, NTFS, HFS, and HFS Plus filesystems are supported. The USB filesystems are currently mounted read only.\n\nThis object is created with no parameters:\n\n`CreateObject(\"roFileSystem\")`", + "events": [ + { + "name": "roFileSystemEvent", + "url": "https://developer.roku.com/docs/references/brightscript/events/rofilesystemevent.md" + } + ], + "interfaces": [ + { + "name": "ifFileSystem", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/iffilesystem.md" + }, + { + "name": "ifGetMessagePort", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifgetmessageport.md" + }, + { + "name": "ifSetMessagePort", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifsetmessageport.md" + } + ], + "name": "roFileSystem", + "url": "https://developer.roku.com/docs/references/brightscript/components/rofilesystem.md" + }, + "rofloat": { + "constructors": [], + "description": "roFloat is the object equivalent for intrinsic type 'Float'.\n\nThis is useful in the following situations:\n\n* If any object exposes the ifFloat interface, that object can be used in any expression that expects an intrinsic value.", + "events": [], + "interfaces": [ + { + "name": "ifFloat", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/iffloat.md" + }, + { + "name": "ifToStr", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/iftostr.md" + } + ], + "name": "roFloat", + "url": "https://developer.roku.com/docs/references/brightscript/components/rofloat.md" + }, + "rofont": { + "constructors": [], + "description": "roFont represents a particular font, from a font-family (eg. Arial), with a particular pixel size (e.g 20), and a particular boldness or italicness.\n\nIt is used in conjunction with [roFontRegistry](https://developer.roku.com/docs/references/brightscript/components/rofontregistry.md\"roFontRegistry\") to create and manage fonts. Font files are registered with roFontRegistry and then various methods in roFontRegistry can be used to create roFont objects. Applications should not create roFonts with CreateObject() but should always use roFontRegistry to create them. roFont objects in turn can be used with [ifDraw2D.DrawText](https://developer.roku.com/docs/references/brightscript/interfaces/ifdraw2d.mddrawtextrgba-as-integer-x-as-integer-y-as-integer-text-as-string-font-as-object-as-boolean \"ifDraw2D.DrawText\") to draw text on the screen or into bitmaps.\n\n**Example**\n\n```\nscreen = CreateObject(\"roScreen\")\nwhite = &hFFFFFFFF\nblue = &h0000FFFF\nfont_registry = CreateObject(\"roFontRegistry\")\nfont = font_registry.GetDefaultFont()\n\n' Draw white text in a blue rectangle\ntext = \"Hello world\"\nw = font.GetOneLineWidth(text, screen.GetWidth())\nh = font.GetOneLineHeight()\nx = 200\ny = 100\nborder = 8\nscreen.DrawRect(x, y, w + 2*border, h + 2*border, blue)\nscreen.DrawText(text, x+border, y+border, white, font)\n```", + "events": [], + "interfaces": [ + { + "name": "ifFont", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/iffont.md" + } + ], + "name": "roFont", + "url": "https://developer.roku.com/docs/references/brightscript/components/rofont.md" + }, + "rofontmetrics": { + "constructors": [ + { + "params": [ + { + "isRequired": true, + "name": "font", + "type": "String" + } + ], + "returnType": "roFontMetrics" + }, + { + "params": [ + { + "isRequired": true, + "name": "param1", + "type": "dynamic" + } + ], + "returnType": "roFontMetrics" + } + ], + "deprecatedDescription": "This class is deprecated. Developers should use [roFont](/docs/references/brightscript/components/roFont.md \"roFont\") methods (GetOneLineHeight and GetOneLineWidth).\n", + "description": "> This class is deprecated. Developers should use [roFont](https://developer.roku.com/docs/references/brightscript/components/roFont.md\"roFont\") methods (GetOneLineHeight and GetOneLineWidth).\n\nThe roFontMetrics object allows you to get display size information for a specific font returned by the roFontRegistry.Get() method.\n\nIn order to use this object, you must first initialize the roFontMetrics object with a font name that had been previously registered with the roFontRegistry, then the total rendered size of strings in that font can be returned by roFontMetrics.Size().\n\nThis object is created with a string that represents the font to use in its size calculations:\n\n`CreateObject(\"roFontMetrics\", String font)`\n\n**Example: Simple use of roFontRegistry and roFontMetrics to render a string on the roImageCanvas**\n\n```\nhelloString = \"Hello ImageCanvas\"\n\nfontReg = CreateObject(\"roFontRegistry\")\nfontReg.Register(\"pkg:/fonts/LCDMono.ttf\")\nfont = fontReg.Get(\"LCDMono\",36,50,false) ' 36pt, 50 is normal\n ' weight, no italics\n\nfontMetrics = CreateObject(\"roFontMetrics\", font)\nstringSize = fontMetrics.size(helloString)\n\ncanvasItem = { \n Text:helloString\n TextAttrs:{Color:\"#FFCCCCCC\", Font:font, \n HAlign:\"HCenter\",\n VAlign:\"VCenter\", Direction:\"LeftToRight\"}\n TargetRect:{x:390,y:357, w:stringSize.w,h:stringSize.h}\n}\n\ncanvas = CreateObject(\"roImageCanvas\")\nport = CreateObject(\"roMessagePort\")\ncanvas.SetMessagePort(m.port)\n'Set opaque background\ncanvas.SetLayer(0, {Color:\"#FF000000\", CompositionMode:\"Source\"})\ncanvas.SetRequireAllImagesToDraw(true)\ncanvas.SetLayer(1, canvasItem)\ncanvas.Show()\n```", + "events": [], + "interfaces": [ + { + "name": "ifFontMetrics", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/iffontmetrics.md" + } + ], + "isDeprecated": true, + "name": "roFontMetrics", + "url": "https://developer.roku.com/docs/references/brightscript/components/rofontmetrics.md" + }, + "rofontregistry": { + "constructors": [ + { + "params": [], + "returnType": "roFontRegistry" + } + ], + "description": "The roFontRegistry object allows you to create roFont objects, either using the default font or using fonts in TrueType or OpenType files packaged with your application.\n\nThis object is created with no parameters:\n\n`CreateObject(\"roFontRegistry\")`\n\n**Example**\n\n```\nreg = CreateObject(\"roFontRegistry\")\nfont = reg.GetDefaultFont(30, false, false)\nscreen = CreateObject(\"roScreen\")\nscreen.DrawText(\"hello world\", 100, 100, &hFFFFFFFF, font)\n```\n\n**Example using a font file**\n\n```\nreg.Register(\"pkg:/fonts/myfont.ttf\")\nfont = reg.GetFont(\"MyFont\", 30, false, false)\nscreen = CreateObject(\"roScreen\")\nscreen.DrawText(\"hello world\", 100, 100, &hFFFFFFFF, font)\n```\n\nFont files can quickly get very large, so be conscious of the size of the font files you include with your application. You should be able to find very good font files that are 50k or less. Anything larger is probably too big. The customvideoplayer sample application is a good example of usage.", + "events": [], + "interfaces": [ + { + "name": "ifFontRegistry", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/iffontregistry.md" + } + ], + "name": "roFontRegistry", + "url": "https://developer.roku.com/docs/references/brightscript/components/rofontregistry.md" + }, + "rofunction": { + "constructors": [], + "description": "roFunction is the object equivalent for intrinsic type Function.", + "events": [], + "interfaces": [ + { + "name": "ifFunction", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/iffunction.md" + }, + { + "name": "ifToStr", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/iftostr.md" + } + ], + "name": "roFunction", + "url": "https://developer.roku.com/docs/references/brightscript/components/rofunction.md" + }, + "rogridscreen": { + "constructors": [ + { + "params": [], + "returnType": "roGridScreen" + } + ], + "deprecatedDescription": "This component is deprecated and will be removed from Roku OS on January 1st, 2019.\n\nBeginning July 1st, 2017, any new channels using this component will be rejected during certification.\n\nBeginning January 1st, 2018, any updates to existing channels using this component will be rejected during certification.\n", + "description": "> This component is deprecated and will be removed from Roku OS on January 1st, 2019.\n> \n> Beginning July 1st, 2017, any new channels using this component will be rejected during certification.\n> \n> Beginning January 1st, 2018, any updates to existing channels using this component will be rejected during certification.\n\nThe Grid Screen provides a graphical display of poster art from multiple content categories from within a single screen.\n\nUsers can browse within a category list by scrolling horizonally and between category lists by scrolling vertically. There is an optional callout box in the lower right corner of the screen that can display details about the focused item without leaving the screen. Each item in the grid screen is represented by an image (aka poster), so any type of item that can be visually represented by an image can be displayed in the poster screen. It is used to show lists of data to users and common patterns include content categories, movies, podcasts, pictures, and search results. The initial release of roGridScreen only enabled the default list style, \"portrait\", using the following art sizes:\n\n* Artwork sizes: SD=110x150; HD=210x270\n\nIt also required grid posters to be .jpg files.\n\nLater Roku OS versions added mixed aspect ratio grids, and the [ifGridScreen](https://developer.roku.com/docs/references/brightscript/interfaces/ifgridscreen.md\"ifGridScreen\") interface [SetListPosterStyles()](https://developer.roku.com/docs/references/brightscript/interfaces/ifgridscreen.mdsetlistposterstylesstyles-as-object-as-void \"SetListPosterStyles()\") to set the aspect ratio of each row in the grid. If you want a mixed aspect ratio grid, you must call SetListPosterStyles() before you call [SetContentList()](https://developer.roku.com/docs/references/brightscript/interfaces/ifgridscreen.mdsetcontentlistrowindex-as-integer-contentlist-as-object-as-void \"SetContentList()\"), to avoid possible distortion of the graphic images in the grid.\n\n**Since Roku OS version 2.8**\n\nFile types of .png and .gif files are now supported, though they are converted internally to .jpg by the roGridScreen so they have a performance penalty.\n\nIn v2.8, there are now multiple grid styles that are specified in the SetGridStyle()method below. It's also worth going back and reviewing the appManager theme parameters in [roAppManager](https://developer.roku.com/docs/references/brightscript/components/roappmanager.md\"roAppManager\"), as v2.8 adds some new grid parameters. The border around the focused poster screen can be customized with the GridScreenFocusBorder images in png format. PNG files can have a transparent color value that you will need to allow the focused poster image to show through the border image. The corresponding offsets should be negative offsets that would be up and to the left of the top left corner of the poster image. The width of the borders should be the absolute values of the offsets and the rest of the image should be transparent inside. The GridScreenDescriptionImage is also positioned relative to the top left corner of the focused image. It can be positioned up and to the left with negative x and y offsets, below and to the right with positive offsets, or in the other corners with mixed signed x and y offsets. It's recommended that you include a \"callout\" tip pointing to the focused image in the GridScreenDescriptionImage.\n\n**Diagram: roGridScreen**\n\n![Diagram: roGridScreen](https://image.roku.com/ZHZscHItMTc2/roGridScreen.png \"roGridScreen\")\n\nThis object is created with no parameters:\n\n`CreateObject(\"roGridScreen\")`\n\n**Example**\n\n```\nFunction Main()\n port = CreateObject(\"roMessagePort\")\n grid = CreateObject(\"roGridScreen\")\n grid.SetMessagePort(port)\n rowTitles = CreateObject(\"roArray\", 10, true)\n for j = 0 to 10\n rowTitles.Push(\"[Row Title \" + j.toStr() + \" ] \")\n end for\n grid.SetupLists(rowTitles.Count())\n grid.SetListNames(rowTitles)\n for j = 0 to 10\n list = CreateObject(\"roArray\", 10, true)\n for i = 0 to 10\n o = CreateObject(\"roAssociativeArray\")\n o.ContentType = \"episode\"\n o.Title = \"[Title\" + i.toStr() + \"]\"\n o.ShortDescriptionLine1 = \"[ShortDescriptionLine1]\"\n o.ShortDescriptionLine2 = \"[ShortDescriptionLine2]\"\n o.Description = \"\"\n o.Description = \"[Description] \"\n o.Rating = \"NR\"\n o.StarRating = \"75\"\n o.ReleaseDate = \"[ For additional information on the OpenSSL HMAC functions, please see: [http://www.openssl.org/docs/crypto/hmac.html](http://www.openssl.org/docs/crypto/hmac.html)\n\n**Supported Digest Algorithms**\n\nThe supported digest algorithms are the same as those supported by [roEVPDigest](https://developer.roku.com/docs/references/brightscript/components/roevpdigest.md\"roEVPDigest\").\n\n**Example**\n\n```\nhmac = CreateObject(\"roHMAC\")\nsignature_key = CreateObject(\"roByteArray\")\nsignature_key.fromAsciiString(getKey())\nIf hmac.setup(\"sha1\", signature_key) = 0\n message = CreateObject(\"roByteArray\")\n message.fromAsciiString(getMessage())\n result = hmac.process(message)\n print result.toBase64String()\nEnd If\n\n\nhmac = CreateObject(\"roHMAC\")\nsignature_key = CreateObject(\"roByteArray\")\nsignature_key.fromAsciiString(getKey())\nIf hmac.setup(\"sha1\", signature_key) = 0\n message1 = CreateObject(\"roByteArray\")\n message1.fromAsciiString(getMessage1())\n hmac.update(message1)\n message2 = CreateObject(\"roByteArray\")\n message2.fromAsciiString(getMessage2())\n hmac.update(message2)\n result = hmac.final()\n print result.toBase64String()\nEnd If\n```", + "events": [], + "interfaces": [ + { + "name": "ifHMAC", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifhmac.md" + } + ], + "name": "roHMAC", + "url": "https://developer.roku.com/docs/references/brightscript/components/rohmac.md" + }, + "rohttpagent": { + "constructors": [ + { + "params": [], + "returnType": "roHttpAgent" + } + ], + "description": "All SceneGraph nodes can use the roHttpAgent component to support cookies, custom HTTP headers, and support secure HTTP file transfer protocols, such as passing certificates to the server as part of a URL transfer. An roHttpAgent component object is created by default for all SceneGraph nodes for this purpose. The roHttpAgent object supports the [ifHttpAgent](https://developer.roku.com/docs/references/brightscript/interfaces/ifhttpagent.md\"ifHttpAgent\") interface used by many BrightScript components to allow secure HTTP file transfer protocols. Child nodes of a SceneGraph node automatically inherit the parent roHttpAgent object, unless a new roHttpAgent object is created, or an existing roHttpAgent is set for a child node. There are two roSGNode [ifSGNodeHttpAgentAccess](https://developer.roku.com/docs/references/brightscript/interfaces/ifsgnodehttpagentaccess.md\"ifSGNodeHttpAgentAccess\") interface methods that allow a specific roHttpAgent object to be selected and set for a specific SceneGraph node.\n\nAn roHttpAgent object is created automatically for all SceneGraph nodes, or can be created with no parameters:\n\n`CreateObject(\"roHttpAgent\")`\n\n> SceneGraph Audio and Video nodes always create a new roHttpAgent object and do not share it, and can use a different mechanism for HTTPS and cookie support, that involves setting certificates and cookies as Content Meta-Data attributes for the node ContentNode node.", + "events": [], + "interfaces": [ + { + "name": "ifHttpAgent", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifhttpagent.md" + } + ], + "name": "roHttpAgent", + "url": "https://developer.roku.com/docs/references/brightscript/components/rohttpagent.md" + }, + "roimagecanvas": { + "constructors": [ + { + "params": [], + "returnType": "roImageCanvas" + } + ], + "deprecatedDescription": "This component is deprecated and will be removed from Roku OS on January 1st, 2019.\n\nBeginning July 1st, 2017, any new channels using this component will be rejected during certification.\n\nBeginning January 1st, 2018, any updates to existing channels using this component will be rejected during certification.\n", + "description": "> This component is deprecated and will be removed from Roku OS on January 1st, 2019.\n> \n> Beginning July 1st, 2017, any new channels using this component will be rejected during certification.\n> \n> Beginning January 1st, 2018, any updates to existing channels using this component will be rejected during certification.\n\nThe roImageCanvas component provides an interface to render graphic elements at specific spots on the screen.\n\nAlthough it is not intended to be a full-fledged graphics component for high-performance gaming, it does provide a simple interface for building custom animations out of arrays of images displayed on the screen.\n\nAn item (graphical element) may be one of three types: image, text, or colored rectangle. The item type is determined by the [Content Meta-data](/docs/developer-program/getting-started/architecture/content-metadata.md \"Content Meta-data\") fields set on the item.", + "events": [ + { + "name": "roImageCanvasEvent", + "url": "https://developer.roku.com/docs/references/brightscript/events/roimagecanvasevent.md" + } + ], + "interfaces": [ + { + "name": "ifHttpAgent", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifhttpagent.md" + }, + { + "name": "ifImageCanvas", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifimagecanvas.md" + } + ], + "isDeprecated": true, + "name": "roImageCanvas", + "url": "https://developer.roku.com/docs/references/brightscript/components/roimagecanvas.md" + }, + "roimagemetadata": { + "constructors": [], + "description": "The roImageMetadata component provides developers access to image file metadata included in many .jpg EXIF headers.\n\nroImageMetadata currently only works with local file Urls.\n\nThis object is created without any arguments:\n\n`CreateObject(\"roImageMetadata\")`", + "events": [], + "interfaces": [ + { + "name": "ifImageMetadata", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifimagemetadata.md" + } + ], + "name": "roImageMetadata", + "url": "https://developer.roku.com/docs/references/brightscript/components/roimagemetadata.md" + }, + "roinput": { + "constructors": [ + { + "params": [], + "returnType": "roInput" + } + ], + "description": "An roInput object can be used to receive events sent from a network client using the External Control Protocol (ECP), as described in [External Control API](/docs/developer-program/debugging/external-control-api.md \"External Control API\").\n\n> The [supports\\_input\\_launch manifest flag](/docs/developer-program/getting-started/architecture/channel-manifest.md#launch-requirement-attributes) must be set for channels to accept deep linking parameters when already running. This flag enables deep linking into content without relaunching the channel. See the [Deep Linking sample channel](https://github.com/rokudev/deep-Linking-samples) for how to use roInput to handle deep links into content while the channel is already running.\n\nRefer to [External Control Service Commands](/docs/developer-program/debugging/external-control-api.md#external-control-service-commands \"External Control Service Commands\") for information about the ECP input command.\n\nThis object is created without any arguments:\n\n`CreateObject(\"roInput\")`\n\n**Example**\n\nThe following prints information received from an external device in JSON format. If the external device sends the following input command:\n\n```\ncurl -d '' ':8060/input?my_event=My%20Test&x=100&y=200&action=start'\n```\n\nThe following will be printed:\n\n```\n{\"action\":\"start\",\"my_event\":\"My Test\",\"x\":\"100\",\"y\":\"200\"}\n```\n\n**roInput Example**\n\n```\nmsgPort = CreateObject(\"roMessagePort\")\n\ninput = CreateObject(\"roInput\")\ninput.SetMessagePort(msgPort)\n\nprint \"Waiting for messages...\"\nwhile true\n msg = wait(0, msgPort)\n if type(msg) = \"roInputEvent\"\n if msg.IsInput()\n info = msg.GetInfo()\n print \"Received input: \"; FormatJSON(info)\n end if\n end if\nend while\n```", + "events": [ + { + "name": "roInputEvent", + "url": "https://developer.roku.com/docs/references/brightscript/events/roinputevent.md" + } + ], + "interfaces": [ + { + "name": "ifInput", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifinput.md" + } + ], + "name": "roInput", + "url": "https://developer.roku.com/docs/references/brightscript/components/roinput.md" + }, + "roint": { + "constructors": [ + { + "params": [], + "returnType": "roInt" + } + ], + "description": "roInt is the object equivalent for intrinsic type Integer.\n\nThis is useful in the following situations:\n\n* When an object is needed, instead of an intrinsic value. For example, \"roList\" maintains a list of objects. If an Integer is added to roList, it will be automatically wrapped in an roInt by the language interpreter. When a function that expects a BrightScript Component as a parameter is passed an int, BrightScript automatically creates the equivalent BrightScript Component.\n* If any object exposes the ifInt interface, that object can be used in any expression that expects an intrinsic value. For example, in this way an roTouchEvent can be used as an integer whose value is the userid of the roTouchEvent.\n\n> If o is an roInt, then the following statements have the following effects\n> \n> print o ' prints o.GetInt()\n> \n> i%=o ' assigns the integer i% the value of o.GetInt()\n> \n> k=o 'presumably k is dynamic typed, so it becomes another reference to the roInt o\n> \n> o=5 'this is NOT the same as o.SetInt(5). Instead it releases o, and 'changes the type of o to Integer (o is dynamically typed). And assigns it to 5.\n\n**Example**\n\n```\nBrightScript> o=CreateObject(\"roInt\")\nBrightScript> o.SetInt(555)\nBrightScript> print o\n555\nBrightScript> print o.GetInt()\n555\nBrightScript> print o-55\n500\n```", + "events": [], + "interfaces": [ + { + "name": "ifInt", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifint.md" + }, + { + "name": "ifIntOps", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifintops.md" + }, + { + "name": "ifToStr", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/iftostr.md" + } + ], + "name": "roInt", + "url": "https://developer.roku.com/docs/references/brightscript/components/roint.md" + }, + "roinvalid": { + "constructors": [], + "description": "roInvalid is the object equivalent for intrinsic type 'Invalid'.", + "events": [], + "interfaces": [ + { + "name": "ifToStr", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/iftostr.md" + } + ], + "name": "roInvalid", + "url": "https://developer.roku.com/docs/references/brightscript/components/roinvalid.md" + }, + "rokeyboardscreen": { + "constructors": [ + { + "params": [], + "returnType": "roKeyboardScreen" + } + ], + "deprecatedDescription": "This component is deprecated and will be removed from Roku OS on January 1st, 2019.\n\nBeginning July 1st, 2017, any new channels using this component will be rejected during certification.\n\nBeginning January 1st, 2018, any updates to existing channels using this component will be rejected during certification.\n", + "description": "> This component is deprecated and will be removed from Roku OS on January 1st, 2019.\n> \n> Beginning July 1st, 2017, any new channels using this component will be rejected during certification.\n> \n> Beginning January 1st, 2018, any updates to existing channels using this component will be rejected during certification.\n\nThe Keyboard Screen is designed to allow the user to enter an alpha-numeric string for searching, username/password registration or other purposes.\n\nThis component is generally used as part of a sequence of screens and the results are displayed on the subsequent screen in the sequence. In the case of a search screen, results are displayed on the roPosterScreen and categories may be used to segregate TV and Movie results.\n\n**Diagram: roKeyboardScreen**\n\n![**Diagram: roKeyboardScreen**](https://image.roku.com/ZHZscHItMTc2/roKeyboardScreenImage1.png \"roKeyboardScreenImage1\")\n\n**Example**\n\n```\nSub Main()\n screen = CreateObject(\"roKeyboardScreen\")\n port = CreateObject(\"roMessagePort\")\n screen.SetMessagePort(port)\n screen.SetTitle(\"Search Screen\")\n screen.SetText(\"default\")\n screen.SetDisplayText(\"enter text to search\")\n screen.SetMaxLength(8)\n screen.AddButton(1, \"finished\")\n screen.AddButton(2, \"back\")\n screen.Show()\n\n while true\n msg = wait(0, screen.GetMessagePort())\n print \"message received\"\n if type(msg) = \"roKeyboardScreenEvent\"\n if msg.isScreenClosed()\n return\n else if msg.isButtonPressed() then\n print \"Evt:\"; msg.GetMessage ();\" idx:\"; msg.GetIndex()\n if msg.GetIndex() = 1\n searchText = screen.GetText()\n print \"search text: \"; searchText\n return\n endif\n endif\n endif\n end while\nEnd Sub\n```\n\n**Image: roKeyboardScreen example results**\n\n![Image: roKeyboardScreen example results](https://image.roku.com/ZHZscHItMTc2/roKeyboardScreenImage2.png \"roKeyboardScreenImage2\")", + "events": [ + { + "name": "roKeyboardScreenEvent", + "url": "https://developer.roku.com/docs/references/brightscript/events/rokeyboardscreenevent.md" + } + ], + "interfaces": [ + { + "name": "ifGetMessagePort", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifgetmessageport.md" + }, + { + "name": "ifKeyboardScreen", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifkeyboardscreen.md" + }, + { + "name": "ifSetMessagePort", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifsetmessageport.md" + } + ], + "isDeprecated": true, + "name": "roKeyboardScreen", + "url": "https://developer.roku.com/docs/references/brightscript/components/rokeyboardscreen.md" + }, + "rolist": { + "constructors": [ + { + "params": [], + "returnType": "roList" + } + ], + "description": "The list object implements the interfaces: ifList, ifArray, ifEnum and therefore can behave like an array that can dynamically add members. The array operator \\[ \\] can be used to access any element in the ordered list.\n\n**Example**\n\nImplementation:\n\n```\nlist = CreateObject(\"roList\")\nlist.AddTail(\"a\")\nlist.AddTail(\"b\")\nlist.AddTail(\"c\")\nlist.AddTail(\"d\")\nlist.ResetIndex()\nx= list.GetIndex()\nwhile x <> invalid\n print x\n x = list.GetIndex()\nend while\n\n\nprint list[2]\n```\n\nOutput:\n\n```\na\nb\nc\nd\nc \n```", + "events": [], + "interfaces": [ + { + "name": "ifArray", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifarray.md" + }, + { + "name": "ifArrayGet", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifarrayget.md" + }, + { + "name": "ifArraySet", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifarrayset.md" + }, + { + "name": "ifEnum", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifenum.md" + }, + { + "name": "ifList", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/iflist.md" + }, + { + "name": "ifListToArray", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/iflisttoarray.md" + } + ], + "name": "roList", + "url": "https://developer.roku.com/docs/references/brightscript/components/rolist.md" + }, + "rolistscreen": { + "constructors": [], + "deprecatedDescription": "This component is deprecated and will be removed from Roku OS on January 1st, 2019.\n\nBeginning July 1st, 2017, any new channels using this component will be rejected during certification.\n\nBeginning January 1st, 2018, any updates to existing channels using this component will be rejected during certification.\n", + "description": "> This component is deprecated and will be removed from Roku OS on January 1st, 2019.\n> \n> Beginning July 1st, 2017, any new channels using this component will be rejected during certification.\n> \n> Beginning January 1st, 2018, any updates to existing channels using this component will be rejected during certification.\n\nThe List Screen provides a graphical display of content in a vertical list within a single screen.\n\nUsers can browse the content by scrolling the text list vertically. The vertical list is displayed on the left side of the screen and the poster is displayed on the right side of the screen. As the user scrolls through the content, the poster is updated with the poster art of the focused list item. There is an optional short description text below the poster that can display the description of the focused item and gets updated as the user scrolls the list.\n\nThe poster art uses the following art sizes:\n\n```\n Artwork sizes: SD=136x124; HD=250x250\n```\n\nroListScreen has a default dark highlight for the focused list item. The highlight can be customized by including a .png file with the following dimensions:\n\n```\n Highlight sizes: SD=304x38; HD=511x54\n```\n\n![List Screen Draft](https://image.roku.com/ZHZscHItMTc2/roListScreen.png \"roListScreen\")", + "events": [ + { + "name": "roListScreenEvent", + "url": "https://developer.roku.com/docs/references/brightscript/events/rolistscreenevent.md" + } + ], + "interfaces": [ + { + "name": "ifGetMessagePort", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifgetmessageport.md" + }, + { + "name": "ifHttpAgent", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifhttpagent.md" + }, + { + "name": "ifListScreen", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/iflistscreen.md" + }, + { + "name": "ifSetMessagePort", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifsetmessageport.md" + } + ], + "isDeprecated": true, + "name": "roListScreen", + "url": "https://developer.roku.com/docs/references/brightscript/components/rolistscreen.md" + }, + "rolocalization": { + "constructors": [ + { + "params": [], + "returnType": "roLocalization" + } + ], + "description": "The roLocalization object provides functions to assist in localization. This object provides functions to assist in localization.\n\nIt is created with no parameters:\n\n`CreateObject(\"roLocalization\")`\n\n**Example**\n\n```\nloc = CreateObject(\"roLocalization\")\nimage = loc.GetLocalizedAsset(\"images\", \"splash.png\")\n```", + "events": [], + "interfaces": [ + { + "name": "ifLocalization", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/iflocalization.md" + } + ], + "name": "roLocalization", + "url": "https://developer.roku.com/docs/references/brightscript/components/rolocalization.md" + }, + "rolonginteger": { + "constructors": [], + "description": "roLongInteger is the object name corresponding to the intrinsic LongInteger object.", + "events": [], + "interfaces": [ + { + "name": "ifLongInt", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/iflongint.md" + }, + { + "name": "ifToStr", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/iftostr.md" + } + ], + "name": "roLongInteger", + "url": "https://developer.roku.com/docs/references/brightscript/components/rolonginteger.md" + }, + "romessagedialog": { + "constructors": [ + { + "params": [], + "returnType": "roMessageDialog" + } + ], + "deprecatedDescription": "This component is deprecated and will be removed from Roku OS on January 1st, 2019.\n\nBeginning July 1st, 2017, any new channels using this component will be rejected during certification.\n\nBeginning January 1st, 2018, any updates to existing channels using this component will be rejected during certification.\n", + "description": "> This component is deprecated and will be removed from Roku OS on January 1st, 2019.\n> \n> Beginning July 1st, 2017, any new channels using this component will be rejected during certification.\n> \n> Beginning January 1st, 2018, any updates to existing channels using this component will be rejected during certification.\n\nThe Message Dialog displays a formatted, multi-line text message to the user. The dialog may optionally be displayed with a busy animation to indicate progress on a long running operation. The dialog will automatically handle formatting of text and resize to fit. It may also display buttons to get user acknowledgment or a selection choice.\n\nThe following example shows an roMessageDialog with a single done button. When the title, text and button are added, the dialog automatically formats and resizes the dialog as needed for display when Show() is called.\n\n**Diagram: roMessageDialog**\n\n![Diagram: roMessageDialog](https://image.roku.com/ZHZscHItMTc2/roMessageDialog.png \"roMessageDialog\")\n\n**Example**\n\nThe following code example creates a message dialog and displays it to the user. Note that dialogs are not full screen and that the previous screen is dimmed and displays in the background. When the user presses the message dialog button, the dialog is dismissed and the previous screen comes to the foreground. Since dialog.EnableBackButton(true) is also called, the message dialog is dismissed when the remote control's back button is pressed as well. You can of course add additional buttons to your message dialogs that do things other than dismiss the dialog. You would simply need to implement button specific event handling code for these cases in the dlgMsg.isButtonPressed() code block.\n\n```\nFunction ShowMessageDialog() As Void\n port = CreateObject(\"roMessagePort\")\n dialog = CreateObject(\"roMessageDialog\")\n dialog.SetMessagePort(port)\n dialog.SetTitle(\"[Message dialog title]\")\n dialog.SetText(\"[Message dialog text............]\")\n\n dialog.AddButton(1, \"[button text]\")\n dialog.EnableBackButton(true)\n dialog.Show()\n While True\n dlgMsg = wait(0, dialog.GetMessagePort())\n If type(dlgMsg) = \"roMessageDialogEvent\"\n if dlgMsg.isButtonPressed()\n if dlgMsg.GetIndex() = 1\n exit while\n end if\n else if dlgMsg.isScreenClosed()\n exit while\n end if\n end if\n end while\nEnd Function\n```\n\n**Image: roMessageDialog example results**\n\n![roMessageDialog example results](https://image.roku.com/ZHZscHItMTc2/roMessageDialogimage2.png \"roMessageDialogimage2\")", + "events": [ + { + "name": "roMessageDialogEvent", + "url": "https://developer.roku.com/docs/references/brightscript/events/romessagedialogevent.md" + } + ], + "interfaces": [ + { + "name": "ifGetMessagePort", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifgetmessageport.md" + }, + { + "name": "ifMessageDialog", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifmessagedialog.md" + }, + { + "name": "ifSetMessagePort", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifsetmessageport.md" + } + ], + "isDeprecated": true, + "name": "roMessageDialog", + "url": "https://developer.roku.com/docs/references/brightscript/components/romessagedialog.md" + }, + "romessageport": { + "constructors": [ + { + "params": [], + "returnType": "roMessagePort" + } + ], + "description": "A Message Port is the place messages ([events](/docs/developer-program/core-concepts/event-loops.md)) are sent.\n\nWhen using BrightScript, you would not call these functions directly. Instead, use the \"Wait\" BrightScript statement.\n\nThis object is created with no parameters:\n\n`CreateObject(\"roMessagePort\")`", + "events": [], + "interfaces": [ + { + "name": "ifMessagePort", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifmessageport.md" + } + ], + "name": "roMessagePort", + "url": "https://developer.roku.com/docs/references/brightscript/components/romessageport.md" + }, + "romicrophone": { + "constructors": [], + "description": "The roMicrophone API allows channel applications to receive audio data from the user’s microphone-supported remote control device or mobile phone. When a user initiates recording on their remote control device or mobile phone (via the Roku Mobile App) for the first time within the application, the application will request the user’s permission for the application to access the microphone by displaying a UI dialog box.\n\nThe application will only receive microphone access if the permission is granted by the user.\n\n![microphone-access](https://image.roku.com/ZHZscHItMTc2/microphone-access.jpg \"microphone-access\")\n\nAfter the permission is granted, whenever a user activates the microphone, the application will display a notice informing the user that the microphone is currently being used by the application.\n\nFrom the settings menu (Settings > Privacy > Microphone), the user can revoke microphone permissions from individual applications, at which time the particular application will not be able to access the microphone unless the user re-enables microphone permissions.\n\nFrom the settings menu, the user may also:\n\n* (a) enable universal microphone access permissions for all applications (thereby eliminating the need to request microphone permission on an application by application basis), and\n* (b) prohibit all applications from accessing the microphone.\n\n![microphone-setting](https://image.roku.com/ZHZscHItMTc2/microphone-setting.jpg \"microphone-setting\")\n\nWhen integrating the roMicrophone API, you acknowledge and agree to the following:\n\n* (i) that you will notify your users of your collection, use, and disclosure of any voice recordings or other derived data that you receive through the roMicrophone API;\n* (ii) you will not modify, circumvent, obscure, or otherwise diminish the notices provided by the roMicrophone API to users when they activate or enable microphone recording from their remote control device or mobile phone;\n* (iii) you will not collect any information from, or otherwise activate, the microphone on any remote control device or mobile phone using the roMicrophone API feature without receiving the requisite permissions from the user;\n* (iv) you have and will maintain a legally adequate privacy policy;\n* (v) you have and will maintain all necessary rights and consents from users to use the roMicrophone API features; and\n* (vi) your use of the roMicrophone API features will comply with all applicable laws, rules, and regulations.\n\nYOU FURTHER AGREE YOU WILL NOT USE THE roMicrophone API AND FEATURES IN CONNECTION WITH CONTENT OR CHANNELS DIRECTED TOWARD CHILDREN OR IN CONNECTION WITH USERS KNOWN TO BE CHILDREN. If Roku discovers or determines that you are using the roMicrophone API and features in connection with content or channels directed toward children or with users known to be children, Roku reserves the right to disable or otherwise limit your access to the roMicrophone API feature and related functionality.\n\nYOU MAY NOT ENABLE THE roMicrophone API FEATURES IF YOU DO NOT AGREE TO ABOVE. PLEASE CONTACT ROKU FOR FURTHER INFORMATION. Implementation\n\nThe application should display a focusable button or indicator in the UI that the user selects by pressing and holding the OK button. In response to the OK press event, the application can call:\n\n* [StartRecording()](https://developer.roku.com/docs/references/brightscript/interfaces/ifmicrophone.md\"StartRecording\") - to receive streamed audio data from the microphone asynchronously or\n* [RecordToFile()](https://developer.roku.com/docs/references/brightscript/interfaces/ifmicrophone.md\"RecordToFile()\") - to have the audio data directly captured to a WAV format output file.\n\n> Roku OS will display a HUD to let the user initially consent to be recorded and to subsequently be informed when the microphone is being used. Recording is performed as long as the user holds down the OK button, or until a limit is reached or if an error should occur.", + "events": [ + { + "name": "roMicrophoneEvent", + "url": "https://developer.roku.com/docs/references/brightscript/events/romicrophoneevent.md" + } + ], + "interfaces": [ + { + "name": "ifGetMessagePort", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifgetmessageport.md" + }, + { + "name": "ifMicrophone", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifmicrophone.md" + }, + { + "name": "ifSetMessagePort", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifsetmessageport.md" + } + ], + "name": "roMicrophone", + "url": "https://developer.roku.com/docs/references/brightscript/components/romicrophone.md" + }, + "roonelinedialog": { + "constructors": [], + "deprecatedDescription": "This component is deprecated and will be removed from Roku OS on January 1st, 2019.\n\nBeginning July 1st, 2017, any new channels using this component will be rejected during certification.\n\nBeginning January 1st, 2018, any updates to existing channels using this component will be rejected during certification.\n", + "description": "> This component is deprecated and will be removed from Roku OS on January 1st, 2019.\n> \n> Beginning July 1st, 2017, any new channels using this component will be rejected during certification.\n> \n> Beginning January 1st, 2018, any updates to existing channels using this component will be rejected during certification.\n\nThe One Line Dialog is a special type of dialog optimized for single line text.\n\nUnlike the message dialog ([roMessageDialog](https://developer.roku.com/docs/references/brightscript/components/roMessageDialog.md\"roMessageDialog\")) which displays formatted multi-line messages, roOneLineDialog displays a single line of text centered for the user.\n\nThis dialog is optimized for rendering of single-line text strings. It is generally used for displaying text to indicate that an operation is in progress. When the operation completes, the dialog is destroyed and the message dialog disappears.", + "events": [ + { + "name": "roOneLineDialogEvent", + "url": "https://developer.roku.com/docs/references/brightscript/events/roonelinedialogevent.md" + } + ], + "interfaces": [ + { + "name": "ifGetMessagePort", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifGetMessagePort.md" + }, + { + "name": "ifOneLineDialog", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifonelinedialog.md" + }, + { + "name": "ifSetMessagePort", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifsetmessageport.md" + } + ], + "isDeprecated": true, + "name": "roOneLineDialog", + "url": "https://developer.roku.com/docs/references/brightscript/components/roonelinedialog.md" + }, + "roparagraphscreen": { + "constructors": [ + { + "params": [], + "returnType": "roParagraphScreen" + } + ], + "deprecatedDescription": "This component is deprecated and will be removed from Roku OS on January 1st, 2019.\n\nBeginning July 1st, 2017, any new channels using this component will be rejected during certification.\n\nBeginning January 1st, 2018, any updates to existing channels using this component will be rejected during certification.\n", + "description": "> This component is deprecated and will be removed from Roku OS on January 1st, 2019.\n> \n> Beginning July 1st, 2017, any new channels using this component will be rejected during certification.\n> \n> Beginning January 1st, 2018, any updates to existing channels using this component will be rejected during certification.\n\nThe Paragraph Screen provides a way to display text and selection choices to the user.\n\nThis type of screen is frequently used for implementing wizard functionality to guide the user through a specific task. The caller may specify header text which is displayed at the top of the screen and one or more paragraphs of text on the screen. In addition, one or more buttons may be added to the screen to get user input or allow navigation. The screen is designed to automatically format the text, headings and buttons and create the photo-fit for them on screen. Some care must be taken to not provide too much text or clipping may occur.\n\n![roParagraphScreen image](https://image.roku.com/ZHZscHItMTc2/roParagraphScreenImage1.png \"roParagraphScreenImage1\")\n\nThis object is created with no parameters:\n\n`CreateObject(\"roParagraphScreen\")`\n\n**Example**\n\n```\nFunction ShowParagraphScreen() As Void\n port = CreateObject(\"roMessagePort\")\n screen = CreateObject(\"roParagraphScreen\")\n screen.SetMessagePort(port)\n screen.SetTitle(\"[Screen Title]\")\n screen.AddHeaderText(\"[Header Text]\")\n screen.AddParagraph(\"[Paragraph text 1 - Text in the paragraph screen is justified to the right and left edges]\")\n screen.AddParagraph(\"[Paragraph text 2 - Multiple paragraphs may be added to the screen by simply making additional calls]\")\n screen.AddButton(1, \"[button text 1]\")\n screen.AddButton(2, \"[button text 2]\")\n screen.Show()\n while true\n msg = wait(0, screen.GetMessagePort())\n if type(msg) = \" roParagraphScreenEvent\"\n exit while\n endif\n end while\nEnd Function\n```\n\n**Image: roParagraphScreen example results**\n\n![Image: roParagraphScreen example results](https://image.roku.com/ZHZscHItMTc2/roParagraphScreenImage2.png \"roParagraphScreenImage2\")", + "events": [ + { + "name": "roParagraphScreenEvent", + "url": "https://developer.roku.com/docs/references/brightscript/events/roparagraphscreenevent.md" + } + ], + "interfaces": [ + { + "name": "ifGetMessagePort", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifgetmessageport.md" + }, + { + "name": "ifParagraphScreen", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifparagraphscreen.md" + }, + { + "name": "ifSetMessagePort", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifsetmessageport.md" + } + ], + "isDeprecated": true, + "name": "roParagraphScreen", + "url": "https://developer.roku.com/docs/references/brightscript/components/roparagraphscreen.md" + }, + "ropath": { + "constructors": [ + { + "params": [ + { + "isRequired": true, + "name": "param1", + "type": "string" + } + ], + "returnType": "roPath" + }, + { + "params": [ + { + "isRequired": true, + "name": "param1", + "type": "dynamic" + } + ], + "returnType": "roPath" + } + ], + "description": "The roPath component provides developers an easy way to create valid file system paths.\n\nThe roPath component is a convenience class that implements [ifString](https://developer.roku.com/docs/references/brightscript/interfaces/ifstring.md\"ifString\") while providing additional validation and path inspection functionality. See [File System](docs/developer-program/getting-started/architecture/file-system.md \"File System\") for more information about valid path names.\n\nThis object is created with a string that represents the initial path:\n\n`CreateObject(\"roPath\", \"ext1:/vid\")`\n\n**Example**\n\n```\npath = CreateObject(\"roPath\", filename)\nparts = path.Split()\nif parts.phy = \"tmp:\" then print \"this is a temp file\"\nif parts.extension = \".bmp\" then print \"this is a bitmap file\"\n```", + "events": [], + "interfaces": [ + { + "name": "ifPath", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifpath.md" + }, + { + "name": "ifString", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifstring.md" + } + ], + "name": "roPath", + "url": "https://developer.roku.com/docs/references/brightscript/components/ropath.md" + }, + "ropinentrydialog": { + "constructors": [], + "deprecatedDescription": "This component is deprecated and will be removed from Roku OS on January 1st, 2019.\n\nBeginning July 1st, 2017, any new channels using this component will be rejected during certification.\n\nBeginning January 1st, 2018, any updates to existing channels using this component will be rejected during certification.\n", + "description": "> This component is deprecated and will be removed from Roku OS on January 1st, 2019.\n> \n> Beginning July 1st, 2017, any new channels using this component will be rejected during certification.\n> \n> Beginning January 1st, 2018, any updates to existing channels using this component will be rejected during certification.\n\nThe Pin Entry Dialog is designed to allow the user to enter a numeric PIN for purchasing content.\n\nUsers establish a PIN on the partner's website for purchasing transactions. The roPinEntryDialog allows the script to present the user with a pop-up, modal dialog for PIN entry and then the script can subsequently call the API's to conclude the purchase transaction. When the last digit is entered, focus jumps to the first button.\n\n**Image: roPinEntryDialog sample**\n\n![roPinEntryDialog](https://image.roku.com/ZHZscHItMTc2/roPinEntryDialog.png \"roPinEntryDialog\")", + "events": [ + { + "name": "roPinEntryDialogEvent", + "url": "https://developer.roku.com/docs/references/brightscript/events/ropinentrydialogevent.md" + } + ], + "interfaces": [ + { + "name": "ifGetMessagePort", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifgetmessageport.md" + }, + { + "name": "ifPinEntryDialog", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifpinentrydialog.md" + }, + { + "name": "ifSetMessagePort", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifsetmessageport.md" + } + ], + "isDeprecated": true, + "name": "roPinEntryDialog", + "url": "https://developer.roku.com/docs/references/brightscript/components/ropinentrydialog.md" + }, + "roposterscreen": { + "constructors": [ + { + "params": [], + "returnType": "roPosterScreen" + } + ], + "deprecatedDescription": "This component is deprecated and will be removed from Roku OS on January 1st, 2019.\n\nBeginning July 1st, 2017, any new channels using this component will be rejected during certification.\n\nBeginning January 1st, 2018, any updates to existing channels using this component will be rejected during certification.\n", + "description": "> This component is deprecated and will be removed from Roku OS on January 1st, 2019.\n> \n> Beginning July 1st, 2017, any new channels using this component will be rejected during certification.\n> \n> Beginning January 1st, 2018, any updates to existing channels using this component will be rejected during certification.\n\nThis object is created with no parameters:\n\n`CreateObject(\"roPosterScreen\")`\n\nThe Poster Screen provides a graphical display of poster art for content selection or can be used as a submenu to provide hierarchical structure to the application.\n\nIn some cases, applications may wish to present a flat single-level list of titles in a queue, but the Poster Screen can also be used at multiple levels in the application to provide hierarchical browsing. It also provides an optional \"filter banner\" for displaying categories representing filtered subsets of the data or categorized groups.\n\nEach item in the poster screen is represented by an image (aka poster), so any type of item that can be visually represented by an image can be displayed in the poster screen. It is used to show lists of data to users and common patterns include content categories, movies, podcasts, and search results.\n\nJust below the overhang is the filter banner. It allows a method of easily selecting or filtering content based on categories. The categories are set by the developer during screen initialization, and the script is notified when a new category is highlighted or selected. Based on the event notification, the script can set the desired content in the view. The filter banner is optional.\n\n**Diagram: roPosterScreen (flat-category)**\n\n![Diagram: roPosterScreen (flat-category)](https://image.roku.com/ZHZscHItMTc2/roPosterScreenImage1.png \"roPosterScreenImage1\")\n\nShortDescriptionLine1 from the content metadata. Generally the category title.\n\nShortDescriptionLine2 from the content metadata. Generally a description for the category.\n\n**Diagram: roPosterScreen (arced-landscape)**\n\n![Diagram: roPosterScreen (arced-landscape](https://image.roku.com/ZHZscHItMTc2/roPosterScreenImage2.png \"roPosterScreenImage2\")\n\n**Diagram: roPosterScreen (arced-portrait)**\n\n![Diagram: roPosterScreen (arced-portrait)](https://image.roku.com/ZHZscHItMTc2/roPosterScreenImage3.png \"roPosterScreenImage3\")\n\n**Diagram: roPosterScreen (flat-episodic)**\n\n![Diagram: roPosterScreen (flat-episodic)](https://image.roku.com/ZHZscHItMTc2/roPosterScreenImage4.png \"roPosterScreenImage4\")\n\nTV content is often displayed as a series of episodes within a season. The flat-episodic screen type provides a standard way to display episodic content, such as a TV series.\n\nThere is also a flat-episodic-16x9-episodic screen type to display episodic content with 16x9 images.\n\nThe paragraph text allows the user to view the synopsis for the currently selected episode. As the user scrolls right/left to select a new episode, the paragraph text and the short description lines are updated to reflect the description of the highlighted episode\n\nIn order to see poster art in the side posters instead of episode numbers, please ensure that the SDPosterUrl and HDPosterUrl are defined for the content and that episodeNumber is not defined for that content. EpisodeNumber overrides the poster URL.\n\n**Example**\n\n```\nFunction Main()\n port = CreateObject(\"roMessagePort\")\n poster = CreateObject(\"roPosterScreen\")\n poster.SetBreadcrumbText(\"[location1]\", \"[location2]\")\n poster.SetMessagePort(port)\n list = CreateObject(\"roArray\", 10, true)\n For i = 0 To 10\n o = CreateObject(\"roAssociativeArray\")\n o.ContentType = \"episode\"\n o.Title = \"[Title]\"\n o.ShortDescriptionLine1 = \"[ShortDescriptionLine1]\"\n o.ShortDescriptionLine2 = \"[ShortDescriptionLine2]\"\n o.Description = \"\"\n o.Description = \"[Description] \"\n o.Rating = \"NR\"\n o.StarRating = \"75\"\n o.ReleaseDate = \"[ Please see the PCRE documentation ([http://www.pcre.org/](http://www.pcre.org/)) for documentation on the PCRE library used for regular expression matching. See the [perlre documentation](http://perldoc.perl.org/perlre.html) for complete documentation of the possible regular expressions this library can parse and match. In general, most Perl compatible regular expressions are supported.\n\nThis object is created with a string that represents the matching-pattern and a string to indicate flags that modify the behavior of the matching operation(s):\n\n`CreateObject(\"roRegex\", \"[a-z]+\", \"i\")`\n\nThe match string (\"\\[a-z\\]+\" in the example above, which matches all lowercase letters) can include most Perl compatible regular expressions documented in the PCRE documentation ([http://www.pcre.org/](http://www.pcre.org/)).\n\nAny combination of the following behavior flags (\"i\" in the example above which modifies to match upper and lowercase letters) is supported:\n\n* \"i\" Case insensitive match\n* \"m\" Multiline mode. The start of line \"^\" and end of line \"$\" constructs match immediately following or before any newline in the subject string as well as the very start and end of the string. Normally, just the start and end of the string would match.\n* \"s\" Sets dot-all mode that includes newline in the \".\\*\" regular expression. This modifier is equivalent to Perl's /s modifier.\n* \"x\" Sets extended mode that ignores whitespace characters except when escaped or inside a character class. Characters between an unescaped # outside a character a character class and the next newline character, inclusive, are also ignored. This modifier is equivalent to Perl's /x modifier.", + "events": [], + "interfaces": [ + { + "name": "ifRegex", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifregex.md" + } + ], + "name": "roRegex", + "url": "https://developer.roku.com/docs/references/brightscript/components/roregex.md" + }, + "roregion": { + "constructors": [ + { + "params": [ + { + "isRequired": true, + "name": "bitmap", + "type": "Object" + }, + { + "isRequired": true, + "name": "x", + "type": "Integer" + }, + { + "isRequired": true, + "name": "y", + "type": "Integer" + }, + { + "isRequired": true, + "name": "width", + "type": "Integer" + }, + { + "isRequired": true, + "name": "height", + "type": "Integer" + } + ], + "returnType": "roRegion" + } + ], + "description": "The roRegion component is used to represent a subsection of a bitmap.\n\nThe region is specified with an x,y, width, and height as well as a time field for use with animated sprites and a wrap field which causes the region to wrap during scrolling. The roRegion is a common parameter used by the drawing functions of [roBitmap](https://developer.roku.com/docs/references/brightscript/components/robitmap.md\"roBitmap\"). Wrap and Time are used by [roCompositor](https://developer.roku.com/docs/references/brightscript/components/roCompositor.md\"roCompositor\"). roRegion is also used to specify a pretranslation (x,y) for the draw, rotate, and scale operation. The pretranslation is normally used to specify the center of the region. The scaling operation is controlled by the scalemode specified in the region.\n\nThis object is created with parameters to initialize the x,y coordinates, width, height. If time and wrap are desired, use the SetTime() and SetWrap().\n\n`CreateObject(\"roRegion\", Object bitmap, Integer x, Integer y,Integer width, Integer height)`", + "events": [], + "interfaces": [ + { + "name": "ifRegion", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifregion.md" + } + ], + "name": "roRegion", + "url": "https://developer.roku.com/docs/references/brightscript/components/roregion.md" + }, + "roregistry": { + "constructors": [ + { + "params": [], + "returnType": "roRegistry" + } + ], + "description": "The Registry is an area of non-volatile storage where a small number of persistent settings can be stored.\n\nThe Registry provides a means for an application to write and read small amounts of data such as settings, scores, etc. The data persists even if the user exits the application and even if the player is rebooted. Registry data is removed only when the application explicitly removes it, the user uninstalls the application, which remove the registry for the application, or the user performs a factory reset, which removes the registry for all applications.\n\nAccess to the registry is available through the roRegistry object. This object is created with no parameters:\n\n`CreateObject(\"roRegistry\")`\n\nThere is a separate registry for each [developer ID](/docs/developer-program/publishing/packaging-channels.md#step-3-run-the-genkey-utility-to-create-a-signing-key \"developer ID\"). This allows multiple applications to use the registry without being able to read or modify the registry from other applications. If desired, a single registry can be shared across multiple applications by using the same developer ID to package the applications. This is the conventional way that an \"application suite\" with shared preferences and other shared information should work. Each registry is divided into sections which are specified by the developer for organization and grouping of attributes. Methods in ifRegistry are provided to list the sections in the registry and to provide access to the data in each section.\n\n> The maximum size of each zlib-compressed application registry is **16K bytes**. Channels should minimize the amount of data stored in the registry and the frequency in which they update it.\n> \n> Use the **ifRegistry.GetSpaceAvailable()** function to check the number of bytes available in the registry.\n\nThe Registry also supports the use of a special transient registry section. A registry section named \"Transient\" can be used to store attributes that have the lifetime of a single boot. Within a specific boot session, these values will be persistent to the application and stored as any other registry value. Whenever the user reboots the Roku Streaming Player, all \"Transient\" registry sections are removed and the values no longer persist. This technique is useful for caching data to minimize network access, yet still ensuring that this data is always fresh after a system reboot.\n\nThe registry is encrypted, and updates are relatively performance intensive and should be used sparingly. Note that all writes to the registry are delayed, and not committed to non-volatile storage until ifRegistry.Flush() or ifRegistrySection.Flush() is explicitly called. The platform may choose opportune times to flush data on its own, but no application is technically correct unless it explicitly calls Flush() at appropriate times. Flushing the registry is a relatively time-consuming operation, so it should be done as infrequently as possible. The Registry data is stored in a fault tolerant manner by preserving a backup for each write which is automatically rolled-back in the event of a failure.", + "events": [], + "interfaces": [ + { + "name": "ifRegistry", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifregistry.md" + } + ], + "name": "roRegistry", + "url": "https://developer.roku.com/docs/references/brightscript/components/roregistry.md" + }, + "roregistrysection": { + "constructors": [ + { + "params": [ + { + "isRequired": true, + "name": "section", + "type": "String" + } + ], + "returnType": "roRegistrySection" + }, + { + "params": [ + { + "isRequired": true, + "name": "param1", + "type": "string" + } + ], + "returnType": "roRegistrySection" + } + ], + "description": "A Registry Section enables the organization of settings within the registry. Different registry sections may have their own keys with the same name. In other words, key names are scoped within the registry section to which they belong.\n\nThis object must be supplied with a \"section\" name on creation. If no such section exists, it will be created. Section names are case sensitive, so sections named \"Settings\" and \"settings\" are two different sections.\n\n`CreateObject(\"roRegistrySection\", section as String)`\n\n**Example: Get and set some user authentication in the registry**\n\n```\nFunction GetAuthData() As Dynamic\n sec = CreateObject(\"roRegistrySection\", \"Authentication\")\n if sec.Exists(\"UserRegistrationToken\")\n return sec.Read(\"UserRegistrationToken\")\n endif\n return invalid\nEnd Function\n\nFunction SetAuthData(userToken As String) As Void\n sec = CreateObject(\"roRegistrySection\", \"Authentication\")\n sec.Write(\"UserRegistrationToken\", userToken)\n sec.Flush()\nEnd Function\n```", + "events": [], + "interfaces": [ + { + "name": "ifRegistrySection", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifregistrysection.md" + } + ], + "name": "roRegistrySection", + "url": "https://developer.roku.com/docs/references/brightscript/components/roregistrysection.md" + }, + "rorsa": { + "constructors": [ + { + "params": [], + "returnType": "roRSA" + } + ], + "description": "The RSA component provides an interface to the OpenSSL RSA library of signing algorithms.\n\nThis component can be used to sign/verify using RSA.\n\nTypically, you would use the roEVPDigest component to create a message digest, then use roRSA to sign it.\n\n**Example: RSA signing using SHA1**\n\n```\nba = CreateObject(\"roByteArray\")\n\n' ...populate bytearray...\n\ndigest = CreateObject(\"roEVPDigest\")\ndigest.Setup(\"sha1\")\nhashString = digest.Process(ba)\nhashBA = CreateObject(\"roByteArray\")\nhashBA.FromHexString(hashString)\nrsa = CreateObject(\"roRSA\")\n\n' ... save private key to tmp:/privateKey.txt\n\nrsa.SetPrivateKey(\"tmp:/privateKey.txt\")\nrsa.SetDigestAlgorithm(\"sha1\")\nsignature = rsa.Sign(hashBA)\n```\n\n**Example: RSA verification using SHA1**\n\n```\nrsa = CreateObject(\"roRSA\")\nrsa.SetPublicKey(:tmp:/publicKey.txt\")\nrsa.SetDigestAlgorithm(\"sha1\")\n\n' see hashBA and signature from above example\n\nresult = rsa.Verify(hashBA, signature)\nif (result = 1)\n print \"Verified\"\nelse\n print \"Not verified, result = \" ; result\nend if\n```", + "events": [], + "interfaces": [ + { + "name": "ifRSA", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifrsa.md" + } + ], + "name": "roRSA", + "url": "https://developer.roku.com/docs/references/brightscript/components/rorsa.md" + }, + "roscreen": { + "constructors": [ + { + "params": [ + { + "isRequired": true, + "name": "param1", + "type": "boolean" + }, + { + "isRequired": true, + "name": "param2", + "type": "integer" + }, + { + "isRequired": true, + "name": "param3", + "type": "integer" + } + ], + "returnType": "roScreen" + }, + { + "params": [ + { + "isRequired": true, + "name": "param1", + "type": "boolean" + } + ], + "returnType": "roScreen" + }, + { + "params": [], + "returnType": "roScreen" + } + ], + "description": "The roScreen component provides a full screen drawing surface that can be stacked and that you can receive input events from.\n\nYou will need at least one roScreen component in your 2D game application to draw on and get events from. The origin (0,0) is the top left corner of the screen. The pixels are always RGBA 32 bits. Multiple roScreen components stack, and like other screen components only the top screen is viewable and gets events. An roScreen that is not the top most screen can still be drawn to.\n\n> Once an roScreen is created, the display stack enters \"Game Mode\", and other screen components cannot be used. Screensavers will also be disabled and will appear as a black screen in its place. Other screen components cannot be intermixed with roScreens as the roScreen display stack is maintained independently from the main screen component display stack. When the final roScreen component is closed, other screen components can be used again.\n\nWhen the roScreen constructor is called, an optional double buffer flag, and an optional resolution can be passed. If the screen is double buffered, two buffers are fully allocated when CreateObject() succeeds. If the screen is single buffered only one buffer is allocated and the \"front\" and \"back\" buffers in method descriptions below are the same buffer. When a screen is created with a different resolution than the output display, it is scaled automatically to the output display resolution.\n\nTo maintain proper aspect ratio, and take care of the different pixel aspect ratio in HD vs SD; there is a fixed set of bitmap resolutions that are allowed to be created for screens:\n\n**HD mode screensizes**\n\n* 1280x720PAR=1:1 (default for HD)\n* 854x480 PAR=1:1 useful for higher performance HD games, also for 640x480 games\n* 940x480 PAR=1.1:1 used for displaying a RokuSD (720x480) games\n\n**SD mode screensizes**\n\n* 720x480 PAR=1.1:1 (default for SD)\n* 640x480 PAR=1:1 (used for 640x480 games)\n* 854x626 PAR=1:1 (used for 854x480 HD games)\n\nThe screen dimensions correspond to the drawable area that applications see. The dimensions were chosen so that applications do not need to compensate for screen aspect ratio or pixel aspect ratio.\n\nIt's likely that when porting games from other platforms, the active game area may be smaller and correspond to more traditional dimensions. In this case, the application can supply letterbox or pillarbox artwork and use an [roRegion](https://developer.roku.com/docs/references/brightscript/components/roregion.md\"roRegion\") to define the active area. The roRegion will translate and clip graphics to the proper area for the game. Similarly, roRegions are used to describe the left and right pillars for an SD game in HD mode, or the upper and lower letterbox regions for an HD game in SD mode.\n\nGames that require more performance should use smaller dimensions. Games should run in HD and SD mode. The screensizes HD 854x480 paired with SD 854x626 and HD 940x480 paired with SD 720x480 were designed for this purpose.\n\nThe game creates a single active game roRegion to do all graphics operations in. roRegions for pillar or letter boxes are used to fill the rest of the screen area depending on if the app is in HD or SD mode. Please refer to the dfSetupDisplayRegions() function in [v30/bslDefender.brs](https://developer.roku.com/docs/references/brightscript/language/component-architecture.mdv30bslcorebrs \"v30/bslDefender.brs\") for help in setting up the drawable regions in screen scaling.\n\nThere are some useful rules of thumb to be aware of to get the best performance when rendering your games:\n\n* Alpha enabled regions are expensive to render\n\nIt is a requirement that the destination be alpha enabled in order for non-rectangular sprites to be properly rendered with transparency. However the sprite used for a background would typically have all pixels be fully nontransparent. Since alpha blending is expensive, a quick way to blit the background in this scenario is to first disable alpha on the screen, manually draw the background, and then enable alpha for the screen before drawing the rest of the sprites.\n\n* Use smaller resolution images wherever possible. Scaling a large image down at run time is expensive with no benefit to the user\n* Rendering text with DrawText() is expensive\n\nFortunately, many of these calls are redundant and can be eliminated. The static text for a particular level can be drawn on the background once and this newly created background can be used for refreshing the screen. This will eliminate almost all text redraws.\n\nA screen can be created with one of three constructors. If it is created with no parameters, the screen will be single buffered, and its output resolution will match the current display resolution (if the current resolution is specified in the manifest file ui\\_resolutions entry, otherwise the size will be 720p).\n\n`CreateObject(\"roScreen\")`\n\nIf a single parameter is passed, it is a Boolean that indicates if the screen is double buffered or not. See SwapBuffers():\n\n`CreateObject(\"roScreen\", true) ' double buffered screen`\n\nIf four parameters are passed, the last two specify the screen's resolution. The dimensions must be one of the screen sizes specified above:\n\n`CreateObject(\"roScreen\", true, 720, 480) ' db & SD res`\n\n**Example: Display an image**\n\n```\nScreen=CreateObject(\"roScreen\")\ndfDrawImage(screen, \"myphoto.jpg\",0,0)\nScreen.Finish()\n```\n\n**Example: Alpha blending**\n\n```\nwhite=&hFFFFFFFF\nscreen0=CreateObject(\"roScreen\")\nscreen0.SetAlphaEnable(true)\nscreen0.Clear(white)\nscreen0.DrawRect(100,100, screen0.GetWidth()-200, screen0.GetHeight()-200, &h80)\n' &h80 is black with a 50% alpha mix (RGBA)\nscreen0.finish()\n```", + "events": [ + { + "name": "roUniversalControlEvent", + "url": "https://developer.roku.com/docs/references/brightscript/events/rouniversalcontrolevent.md" + } + ], + "interfaces": [ + { + "name": "ifDraw2D", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifdraw2d.md" + }, + { + "name": "ifGetMessagePort", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifgetmessageport.md" + }, + { + "name": "ifScreen", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifscreen.md" + }, + { + "name": "ifSetMessagePort", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifsetmessageport.md" + } + ], + "name": "roScreen", + "url": "https://developer.roku.com/docs/references/brightscript/components/roscreen.md" + }, + "rosearchhistory": { + "constructors": [ + { + "params": [], + "returnType": "roSearchHistory" + } + ], + "deprecatedDescription": "This component is deprecated and will be removed from Roku OS on January 1st, 2019.\n\nBeginning July 1st, 2017, any new channels using this component will be rejected during certification.\n\nBeginning January 1st, 2018, any updates to existing channels using this component will be rejected during certification.\n", + "description": "> This component is deprecated and will be removed from Roku OS on January 1st, 2019.\n> \n> Beginning July 1st, 2017, any new channels using this component will be rejected during certification.\n> \n> Beginning January 1st, 2018, any updates to existing channels using this component will be rejected during certification.\n\nThe Search History object implements the system wide storage of search terms for use in implementing the roSearchScreen.\n\nAs the user searches for content, recent searches are placed into the search history. This allows the user to easily re-execute these commands later without typing on the keyboard. The initial list of recent searches is displayed on the roSearchScreen to assist the user in finding content to watch. This history is used system wide, so that the user can find references to their search in multiple types of content.\n\nThis object is created with no parameters:\n\n`CreateObject(\"roSearchHistory\")`\n\n**Example**\n\n```\nhistory = CreateObject(\"roSearchHistory\")\nlist = history.GetAsArray()\nprint \"There are \"; list.Count(); \" items in the history\"\n```", + "events": [], + "interfaces": [ + { + "name": "ifSearchHistory", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifsearchhistory.md" + } + ], + "isDeprecated": true, + "name": "roSearchHistory", + "url": "https://developer.roku.com/docs/references/brightscript/components/rosearchhistory.md" + }, + "rosearchscreen": { + "constructors": [ + { + "params": [], + "returnType": "roSearchScreen" + } + ], + "deprecatedDescription": "This component is deprecated and will be removed from Roku OS on January 1st, 2019.\n\nBeginning July 1st, 2017, any new channels using this component will be rejected during certification.\n\nBeginning January 1st, 2018, any updates to existing channels using this component will be rejected during certification.\n", + "description": "> This component is deprecated and will be removed from Roku OS on January 1st, 2019.\n> \n> Beginning July 1st, 2017, any new channels using this component will be rejected during certification.\n> \n> Beginning January 1st, 2018, any updates to existing channels using this component will be rejected during certification.\n\nThe Search Screen provides a standard way to allow users to enter text for searching.\n\nThis screen features a simplified keyboard (a-z, 0-9) designed to provide just the keys necessary to perform case-insensitive searches without punctuation.\n\nIdeally, the user would enter a search string and the backend service would perform that query in a case-insensitive manner ignoring special characters like punctuation. The script is notified as each key is pressed so that a progress disclosure search can be performed if supported by the back-end service. In addition, the script can control the text displayed on the screen and will receive events when the text entry is complete.\n\nIn addition to entering search strings, this screen features a list that can be used to display search results or show the most recent searches. It's desirable for the screen to maintain a list of recent searches for the user to allow them to easily repeat a recent query without typing. In some implementations, it may be desirable to use this list to show a progressive set of results after each character while the user is typing.\n\nThis object is created with no parameters:\n\n`CreateObject(\"roSearchScreen\")`\n\n**Example**\n\n```\nREM ******************************************************\nREM Main routine - example of search screen usage\nREM ******************************************************\nSub Main()\n print \"start\"\n 'toggle the search suggestions vs. search history behavior\n 'this allow you to generate both versions of the example below\n displayHistory = false\n history = CreateObject(\"roArray\", 1, true)\n 'prepopulate the search history with sample results\n history.Push(\"seinfeld\")\n history.Push(\"fraiser\")\n history.Push(\"cheers\")\n port = CreateObject(\"roMessagePort\")\n screen = CreateObject(\"roSearchScreen\")\n 'commenting out SetBreadcrumbText() hides breadcrumb on screen\n screen.SetBreadcrumbText(\"\", \"search\")\n screen.SetMessagePort(port)\n if displayHistory\n screen.SetSearchTermHeaderText(\"Recent Searches:\")\n screen.SetSearchButtonText(\"search\")\n screen.SetClearButtonText(\"clear history\")\n screen.SetClearButtonEnabled(true) 'defaults to true\n screen.SetSearchTerms(history)\n else\n screen.SetSearchTermHeaderText(\"Suggestions:\")\n screen.SetSearchButtonText(\"search\")\n screen.SetClearButtonEnabled(false)\n endif\n print \"Doing show screen...\"\n screen.Show()\n print \"Waiting for a message from the screen...\"\n ' search screen main event loop\n done = false\n while done = false\n msg = wait(0, screen.GetMessagePort())\n if type(msg) = \"roSearchScreenEvent\"\n if msg.isScreenClosed()\n print \"screen closed\"\n done = true\n else if msg.isCleared()\n print \"search terms cleared\"\n history.Clear()\n else if msg.isPartialResult()\n print \"partial search: \"; msg.GetMessage()\n if not displayHistory\n screen.SetSearchTerms(GenerateSearchSuggestions(msg.GetMessage()))\n endif\n else if msg.isFullResult()\n print \"full search: \"; msg.GetMessage()\n history.Push(msg.GetMessage())\n if displayHistory\n screen.AddSearchTerm(msg.GetMessage())\n end if\n 'uncomment to exit the screen after a full search result:\n 'done = true\n else\n print \"Unknown event: \"; msg.GetType(); \" msg: \"; msg.GetMessage()\n endif\n endif\n endwhile\n print \"Exiting...\"\nEnd Sub\n\nFunction GenerateSearchSuggestions(partSearchText As String) As Object\n availableContent = [\n \"ghost in the shell\"\n \"parasite dolls\"\n \"final fantasy\"\n \"ninja scroll\"\n \"space ghost\"\n \"hellboy\"\n \"star wars\"\n \"terminator\"\n \"house of cards\"\n \"dexter\"\n ]\n suggestions = []\n if partSearchText <> \"\"\n partSearchText = LCase(partSearchText)\n for each available in availableContent\n if available.Instr(partSearchText) >= 0\n suggestions.Push(available)\n end if\n end for\n end if\n return suggestions\nEnd Function\n```\n\n**Image: roSearchScreen example results (search suggestions)**\n\n![Image: roSearchScreen example results (search suggestions)](https://image.roku.com/ZHZscHItMTc2/roSearchScreen.png \"roSearchScreen\")", + "events": [ + { + "name": "roSearchScreenEvent", + "url": "https://developer.roku.com/docs/references/brightscript/events/rosearchscreenevent.md" + } + ], + "interfaces": [ + { + "name": "ifGetMessagePort", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifgetmessageport.md" + }, + { + "name": "ifSearchScreen", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifsearchscreen.md" + }, + { + "name": "ifSetMessagePort", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifsetmessageport.md" + } + ], + "isDeprecated": true, + "name": "roSearchScreen", + "url": "https://developer.roku.com/docs/references/brightscript/components/rosearchscreen.md" + }, + "rosgnode": { + "constructors": [ + { + "params": [ + { + "isRequired": true, + "name": "param1", + "type": "string" + } + ], + "returnType": "roSGNode" + } + ], + "description": "The roSGNode object is the BrightScript equivalent of SceneGraph XML file node creation. To create an roSGNode object for a specific node class, call:\n\n`CreateObject(\"roSGNode\", \"nodetype\")`\n\nWhere nodetype is a string specifying the node class to be created. For example, the following creates an object of the SceneGraph Poster node class:\n\n`CreateObject(\"roSGNode\", \"Poster\")`\n\nReference information on all SceneGraph node classes can be found in [SceneGraph API Reference](https://developer.roku.com/docs/references/scenegraph/node.md.\n\nPrior to creating an roSGScreen object and calling its `show()` function, creating roSGNode objects and using their interfaces is not guaranteed to work correctly. If you need to create some roSGNode objects and/or use roSGNode interfaces prior to calling an roSGScreen object `show()` function, you can use an roSGScreen object `createScene()` function to create an instance of a SceneGraph XML component that does any required setup and initialization prior to the roSGScreen object being displayed.\n\nIn addition, roSGNode implements the ifAssociativeArray interface as a wrapper for ifSGNodeFIeld so that the convenient node.field notation may be using for setting, getting, and observing fields.", + "events": [ + { + "name": "roSGNodeEvent", + "url": "https://developer.roku.com/docs/references/brightscript/events/rosgnodeevent.md" + } + ], + "interfaces": [ + { + "name": "ifAssociativeArray", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifassociativearray.md" + }, + { + "name": "ifSGNodeBoundingRect", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifsgnodeboundingrect.md" + }, + { + "name": "ifSGNodeChildren", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifsgnodechildren.md" + }, + { + "name": "ifSGNodeDict", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifsgnodedict.md" + }, + { + "name": "ifSGNodeField", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifsgnodefield.md" + }, + { + "name": "ifSGNodeFocus", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifsgnodefocus.md" + }, + { + "name": "ifSGNodeHttpAgentAccess", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifsgnodehttpagentaccess.md" + } + ], + "name": "roSGNode", + "url": "https://developer.roku.com/docs/references/brightscript/components/rosgnode.md" + }, + "rosgscreen": { + "constructors": [ + { + "params": [], + "returnType": "roSGScreen" + } + ], + "description": "The roSGScreen object is a SceneGraph canvas that displays the contents of a SceneGraph Scene node instance. The object is created by calling:\n\n`CreateObject(\"roSGScreen\")`\n\n`CreateScene()` takes one argument, the name of the scene component. A channel will typically extend Scene to define its own channel specific Scene type (such as MyScene, etc.) This Scene component name is passed to `CreateScene().`\n\n**roSGScreen typical usage example**\n\n```\nscreen = CreateObject(\"roSGScreen\")\nscene = screen.CreateScene(\"Scene\")\nscreen.show()\n```", + "events": [ + { + "name": "roSGScreenEvent", + "url": "https://developer.roku.com/docs/references/brightscript/events/rosgscreenevent.md" + } + ], + "interfaces": [ + { + "name": "ifSgScreen", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifsgscreen.md" + } + ], + "name": "roSGScreen", + "url": "https://developer.roku.com/docs/references/brightscript/components/rosgscreen.md" + }, + "roslideshow": { + "constructors": [ + { + "params": [], + "returnType": "roSlideShow" + } + ], + "deprecatedDescription": "This component is deprecated and will be removed from Roku OS on January 1st, 2019.\n\nBeginning July 1st, 2017, any new channels using this component will be rejected during certification.\n\nBeginning January 1st, 2018, any updates to existing channels using this component will be rejected during certification.\n", + "description": "> This component is deprecated and will be removed from Roku OS on January 1st, 2019.\n> \n> Beginning July 1st, 2017, any new channels using this component will be rejected during certification.\n> \n> Beginning January 1st, 2018, any updates to existing channels using this component will be rejected during certification.\n\nThe Slide Show screen provides the ability to setup a photo slide show to playback a series of images.\n\nImages may be jpg, png or gif files. The developer can control the sequencing and timing of the slideshow. The object is designed to accept an array of [Content Meta-Data](/docs/developer-program/getting-started/architecture/content-metadata.md \"Content Meta-Data\") objects, describing the images and providing URLs for accessing each image. TextOverlayUL, TextOverlayUR, and TextOverlayBody are content meta-data properties used to display a text overlay.\n\nThis object is created with no parameters:\n\n`CreateObject(\"roSlideShow\")`", + "events": [ + { + "name": "roSlideShowEvent", + "url": "https://developer.roku.com/docs/references/brightscript/events/roslideshowevent.md" + } + ], + "interfaces": [ + { + "name": "ifHttpAgent", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifhttpagent.md" + }, + { + "name": "ifSlideShow", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifslideshow.md" + } + ], + "isDeprecated": true, + "name": "roSlideShow", + "url": "https://developer.roku.com/docs/references/brightscript/components/roslideshow.md" + }, + "rosocketaddress": { + "constructors": [ + { + "params": [], + "returnType": "roSocketAddress" + } + ], + "description": "The roSocketAddress is used by the roStreamSocket and roDataGramSocket components for TCP and UDP traffic respectively.\n\nThis object is created without any arguments:\n\n`CreateObject(\"roSocketAddress\")`\n\nMethods in [ifSocketAddress](https://developer.roku.com/docs/references/brightscript/interfaces/ifsocketaddress.md\"ifSocketAddress\") are used to assign an IP address to the object. roSocketAddress currently supports only IPV4 addresses.", + "events": [], + "interfaces": [ + { + "name": "ifSocketAddress", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifsocketaddress.md" + } + ], + "name": "roSocketAddress", + "url": "https://developer.roku.com/docs/references/brightscript/components/rosocketaddress.md" + }, + "rospringboardscreen": { + "constructors": [ + { + "params": [], + "returnType": "roSpringboardScreen" + } + ], + "description": "The Springboard Screen shows detailed information about an individual piece of content and provides options for actions that may be taken on that content.\n\nThe detailed description of the content is displayed with poster art for the title. Artwork may be displayed portrait or landscape orientation depending on the ContentType set in the [Content Meta-Data](/docs/developer-program/getting-started/architecture/content-metadata.md \"Content Meta-Data\").\n\nThe caller may add one or more buttons to the screen with actions such as Play, Resume, Purchase or More Info. The script is notified via an event when a button is selected and it is the responsibility of the script writer to handle that event as desired and perform the requested action.\n\n![worddav-button-actions](https://image.roku.com/ZHZscHItMTc2/worddav3570180012b8208f098d035b989f8fa8.png \"worddav3570180012b8208f098d035b989f8fa8\")\n\nThis object is created with no parameters:\n\n`CreateObject(\"roSpringboardScreen\")`\n\n* Orientation for artwork is based on ContentType setting and may be portrait or landscape.\n \n* The audio springboard is capable of adding a progress bar.\n \n* If the ContentType is audio, the album art dimensions are:\n \n\n```\n SD: 124 x 112\n HD: 188 x 188\n```\n\n* If the ContentType is episode, the album art dimensions are:\n\n```\n SD: 180 x 122\n HD: 264 x 198\n```\n\n* If the ContentType is any other value, the album art dimensions are:\n\n```\n SD: 112 x 142\n HD: 148 x 212\n```\n\n* Up to 5 user-defined buttons may be displayed. Buttons are displayed in the order they are added and always appear in a fixed region of the screen\n \n* The description text will be formatted and justified (right and left edges) to fit between the margins. When the maximum length is reached, the text will be clipped and terminated with an ellipsis. The font is variable pitch, so the maximum number of characters is dependent on the text. The spacing is approximately 85 characters per line x 4 lines = 340 characters. The fonts and character spacing for HD and SD are similar, and display approximately the same number of characters, but the relationship is not exactly 1:1.\n \n* The star rating can show either community StarRating (red) or UserStarRating (yellow). If both values are set, the control will display the UserStarRating. If ratings are not desired, it can be removed by calling SetStaticRatingEnabled(false), providing more space to display actor names.\n \n* The Length attribute will display a formatted string or show length. If the value is zero, this field will display 0m, if the attribute is not set/missing then this field will not be displayed.\n \n\n**Example**\n\nThe following example shows the process of creating an roSpringboardScreen, setting up the content meta-data, showing the screen and waiting for an event. This example is simplified for clarity and it's assumed the real-world applications will use techniques like getting data from web services using roUrlTransfer.\n\n![springboard-audio](https://image.roku.com/ZHZscHItMTc2/springboard-audio.png \"springboard-audio\")\n\n```\nFunction Main()\n port = CreateObject(\"roMessagePort\")\n springBoard = CreateObject(\"roSpringboardScreen\")\n springBoard.SetBreadcrumbText(\"[location 1]\", \"[location2]\")\n springBoard.SetMessagePort(port)\n o = CreateObject(\"roAssociativeArray\")\n o.ContentType = \"episode\"\n o.Title = \"[Title]\"\n o.ShortDescriptionLine1 = \"[ShortDescriptionLine1]\"\n o.ShortDescriptionLine2 = \"[ShortDescriptionLine2]\"\n o.Description = \"\"\n For i = 1 To 15\n o.Description = o.Description + \"[Description] \"\n End For\n o.SDPosterUrl = \"\"\n o.HDPosterUrl = \"\"\n o.Rating = \"NR\"\n o.StarRating = \"75\"\n o.ReleaseDate = \"[mm/dd/yyyy]\"\n o.Length = 5400\n o.Categories = CreateObject(\"roArray\", 10, true)\n o.Categories.Push(\"[Category1]\")\n o.Categories.Push(\"[Category2]\")\n o.Categories.Push(\"[Category3]\")\n o.Actors = CreateObject(\"roArray\", 10, true)\n o.Actors.Push(\"[Actor1]\")\n o.Actors.Push(\"[Actor2]\")\n o.Actors.Push(\"[Actor3]\")\n o.Director = \"[Director]\"\n springBoard.SetContent(o)\n springBoard.Show()\n While True\n msg = wait(0, port)\n If msg.isScreenClosed() Then\n Return -1\n Elseif msg.isButtonPressed()\n print \"msg: \"; msg.GetMessage(); \"idx: \"; msg.GetIndex()\n Endif\n End While\nEnd Function\n```\n\nThe following screen is displayed when this code is executed:\n\n![worddav-code-displayed](https://image.roku.com/ZHZscHItMTc2/worddav256ada1e0e0cdc53d79428655ca7702b.png \"worddav256ada1e0e0cdc53d79428655ca7702b\")", + "events": [ + { + "name": "roSpringboardScreenEvent", + "url": "https://developer.roku.com/docs/references/brightscript/events/rospringboardscreenevent.md" + } + ], + "interfaces": [ + { + "name": "ifGetMessagePort", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifgetmessageport.md" + }, + { + "name": "ifHttpAgent", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifhttpagent.md" + }, + { + "name": "ifSetMessagePort", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifsetmessageport.md" + }, + { + "name": "ifSpringboardScreen", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifspringboardscreen.md" + } + ], + "name": "roSpringboardScreen", + "url": "https://developer.roku.com/docs/references/brightscript/components/rospringboardscreen.md" + }, + "rosprite": { + "constructors": [], + "description": "The roSprite object cannot be created directly with a CreateObject() call. It must be associated with a managing roCompositor object. This association is implicitly created by creating an roSprite object with the roCompositor methods NewSprite() or NewAnimatedSprite().", + "events": [], + "interfaces": [ + { + "name": "ifSprite", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifsprite.md" + } + ], + "name": "roSprite", + "url": "https://developer.roku.com/docs/references/brightscript/components/rosprite.md" + }, + "rostreamsocket": { + "constructors": [ + { + "params": [], + "returnType": "roStreamSocket" + } + ], + "description": "The roStreamSocket component enables BrightScript apps to accept and connect to TCP streams as well as send and receive data with them. The interface is modeled on and works much like standard Berkeley sockets.\n\nThis object is created without any arguments:\n\n`CreateObject(\"roStreamSocket\")`\n\n**Example: Open TCP Connection to Server**\n\n```\nsendAddress = CreateObject(\"roSocketAddress\")\nsendAddress.SetAddress(\"www.google.com:80\")\nsocket = CreateObject(\"roStreamSocket\")\nsocket.setSendToAddress(sendAddress)\nIf socket.Connect()\n Print \"Connected Successfully\"\nEnd If\n```\n\n**Example: Echo Server**\n\n```\nfunction main()\n messagePort = CreateObject(\"roMessagePort\")\n connections = {}\n buffer = CreateObject(\"roByteArray\")\n buffer[512] = 0\n tcpListen = CreateObject(\"roStreamSocket\")\n tcpListen.setMessagePort(messagePort)\n addr = CreateObject(\"roSocketAddress\")\n addr.setPort(54321)\n tcpListen.setAddress(addr)\n tcpListen.notifyReadable(true)\n tcpListen.listen(4)\n if not tcpListen.eOK()\n print \"Error creating listen socket\"\n stop\n end if\n while True\n event = wait(0, messagePort)\n if type(event) = \"roSocketEvent\"\n changedID = event.getSocketID()\n if changedID = tcpListen.getID() and tcpListen.isReadable()\n ' New\n newConnection = tcpListen.accept()\n if newConnection = Invalid\n print \"accept failed\"\n else\n print \"accepted new connection \" newConnection.getID()\n newConnection.notifyReadable(true)\n newConnection.setMessagePort(messagePort)\n connections[Stri(newConnection.getID())] = newConnection\n end if\n else\n ' Activity on an open connection\n connection = connections[Stri(changedID)]\n closed = False\n if connection.isReadable()\n received = connection.receive(buffer, 0, 512)\n print \"received is \" received\n if received > 0\n print \"Echo input: '\"; buffer.ToAsciiString(); \"'\"\n ' If we are unable to send, just drop data for now.\n ' You could use notifywritable and buffer data, but that is\n ' omitted for clarity.\n connection.send(buffer, 0, received)\n else if received=0 ' client closed\n closed = True\n end if\n end if\n if closed or not connection.eOK()\n print \"closing connection \" changedID\n connection.close()\n connections.delete(Stri(changedID))\n end if\n end if\n end if\n end while\n\n print \"Main loop exited\"\n tcpListen.close()\n for each id in connections\n connections[id].close()\n end for\nEnd Function\n```", + "events": [ + { + "name": "roSocketEvent", + "url": "https://developer.roku.com/docs/references/brightscript/events/rosocketevent.md" + } + ], + "interfaces": [ + { + "name": "ifSocket", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifsocket.md" + }, + { + "name": "ifSocketAsync", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifsocketasync.md" + }, + { + "name": "ifSocketConnection", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifsocketconnection.md" + }, + { + "name": "ifSocketConnectionOption", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifsocketconnectionoption.md" + }, + { + "name": "ifSocketConnectionStatus", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifsocketconnectionstatus.md" + }, + { + "name": "ifSocketStatus", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifsocketstatus.md" + } + ], + "name": "roStreamSocket", + "url": "https://developer.roku.com/docs/references/brightscript/components/rostreamsocket.md" + }, + "rostring": { + "constructors": [], + "description": "roString is the object equivalent for intrinsic type 'String'.\n\nThis is useful in the following situations:\n\n* When an object is needed, instead of an intrinsic value. For example, \"roList\" maintains a list of objects. If an String is added to roList, it will be automatically wrapped in an roString by the language interpreter. When a function that expects a BrightScript Component as a parameter is passed a string, BrightScript automatically creates the equivalent BrightScript Component.\n \n* If any object exposes the ifString interface, that object can be used in any expression that expects an intrinsic value.", + "events": [], + "interfaces": [ + { + "name": "ifString", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifstring.md" + }, + { + "name": "ifStringOps", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifstringops.md" + }, + { + "name": "ifToStr", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/iftostr.md" + } + ], + "name": "roString", + "url": "https://developer.roku.com/docs/references/brightscript/components/rostring.md" + }, + "rosystemlog": { + "constructors": [], + "description": "The roSystemLog component enables the application to receive events from the Roku Streaming Player that are intended for reporting errors and trends, rather than trigger a response to a user action.\n\nAll of the log event messages are sent to the roMessagePort that is registered on the [roSystemLogEvent](https://developer.roku.com/docs/references/brightscript/events/rosystemlogevent.md\"roSystemLogEvent\") object. See roSystemLogEvent for details on the messages.\n\nThis object is created with no parameters:\n\n`CreateObject(\"roSystemLog\")`\n\nThe roSystemLog component requires specific Design Patterns in your BrightScript Application. Take care to:\n\n* Use one roMessagePort throughout the application (instead of creating a new roMessagePort for each screen).\n* Create one roSystemLog instance at startup that remains for the entire lifetime of the application.\n* Pass the global roMessagePort referenced in the first bullet point to SetMessagePort() on the roSystemLog component.\n* Enable the desired log types using EnableType().\n* Handle the [roSystemLogEvents](https://developer.roku.com/docs/references/brightscript/events/rosystemlogevent.md\"roSystemLogEvents\") in all message loops.", + "events": [], + "interfaces": [ + { + "name": "ifSystemLog", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifsystemlog.md" + } + ], + "name": "roSystemLog", + "url": "https://developer.roku.com/docs/references/brightscript/components/rosystemlog.md" + }, + "rotextscreen": { + "constructors": [], + "deprecatedDescription": "This component is deprecated and will be removed from Roku OS on January 1st, 2019.\n\nBeginning July 1st, 2017, any new channels using this component will be rejected during certification.\n\nBeginning January 1st, 2018, any updates to existing channels using this component will be rejected during certification.\n", + "description": "> This component is deprecated and will be removed from Roku OS on January 1st, 2019.\n> \n> Beginning July 1st, 2017, any new channels using this component will be rejected during certification.\n> \n> Beginning January 1st, 2018, any updates to existing channels using this component will be rejected during certification.\n\nroTextScreen provides a way of displaying large amounts of scrollable text.\n\nThis type of screen can be used to display help text, credits, license agreements, or other large amounts of text that require scrolling.\n\nThe interface allows you to set the text and specify zero or more buttons.\n\nIf no buttons are specified, then the user can exit the screen by pressing BACK or OK.", + "events": [ + { + "name": "roTextScreenEvent", + "url": "https://developer.roku.com/docs/references/brightscript/events/rotextscreenevent.md" + } + ], + "interfaces": [ + { + "name": "ifGetMessagePort", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifgetmessageport.md" + }, + { + "name": "ifSetMessagePort", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifsetmessageport.md" + }, + { + "name": "ifTextScreen", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/iftextscreen.md" + } + ], + "isDeprecated": true, + "name": "roTextScreen", + "url": "https://developer.roku.com/docs/references/brightscript/components/rotextscreen.md" + }, + "rotexttospeech": { + "constructors": [ + { + "params": [], + "returnType": "roTextToSpeech" + } + ], + "description": "> Please note this component is only available on the following devices: Roku Streaming Stick (3600X), Roku Express (3700X) and Express+ (3710X), Roku Premiere (4620X) and Premiere+ (4630X), Roku Ultra (4640X), and any Roku TV running Roku OS version 7.2 and later.\n\nThe roTextToSpeech component provides text to speech capabilities to applications.\n\nAn roTextToSpeech component object is created with no parameters:\n\n`CreateObject(\"roTextToSpeech\")`", + "events": [ + { + "name": "roTextToSpeechEvent", + "url": "https://developer.roku.com/docs/references/brightscript/events/rotexttospeechevent.md" + } + ], + "interfaces": [ + { + "name": "ifGetMessagePort", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifgetmessageport.md" + }, + { + "name": "ifSetMessagePort", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifsetmessageport.md" + }, + { + "name": "ifTextToSpeech", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/iftexttospeech.md" + } + ], + "name": "roTextToSpeech", + "url": "https://developer.roku.com/docs/references/brightscript/components/rotexttospeech.md" + }, + "rotexturemanager": { + "constructors": [ + { + "params": [], + "returnType": "roTextureManager" + } + ], + "description": "The Texture Manager provides a set of API's for managing an roBitmap cache.\n\n**Example: Requesting an roBitmap from the roTextureManager**\n\n```\nSub Main()\n mgr = CreateObject(\"roTextureManager\")\n msgport = CreateObject(\"roMessagePort\")\n mgr.SetMessagePort(msgport)\n\n request = CreateObject(\"roTextureRequest\",\"pkg:/assets/comet.jpg\")\n mgr.RequestTexture(request)\n\n msg=wait(0, msgport)\n if type(msg)=\"roTextureRequestEvent\" then\n print \"request id\";msg.GetId()\n print \"request state:\";msg.GetState()\n print \"request URI:\";msg.GetURI()\n state = msg.GetState()\n if state = 3 then\n bitmap = msg.GetBitmap()\n if type(bitmap)<>\"roBitmap\" then\n print \"Unable to create robitmap\"\n stop ' stop exits to the debugger\n end if\n end if\n end if\nEnd Sub\n```", + "events": [ + { + "name": "roTextureRequestEvent", + "url": "https://developer.roku.com/docs/references/brightscript/events/rotexturerequestevent.md" + } + ], + "interfaces": [ + { + "name": "ifGetMessagePort", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifgetmessageport.md" + }, + { + "name": "ifHttpAgent", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifhttpagent.md" + }, + { + "name": "ifSetMessagePort", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifsetmessageport.md" + }, + { + "name": "ifTextureManager", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/iftexturemanager.md" + } + ], + "name": "roTextureManager", + "url": "https://developer.roku.com/docs/references/brightscript/components/rotexturemanager.md" + }, + "rotexturerequest": { + "constructors": [ + { + "params": [ + { + "isRequired": true, + "name": "param1", + "type": "string" + } + ], + "returnType": "roTextureRequest" + } + ], + "description": "An roTextureRequest is used to make requests to the roTextureManager.\n\nAn roTextureRequest object is created using the CreateObject() method and passing it a URI string:\n\n`CreateObject(\"roTextureRequest\", \"pkg:/assets/comet.jpg\")`\n\n**Example: Requesting a URL from the roTextureManager**\n\n```\nSub Main()\n mgr = CreateObject(\"roTextureManager\")\n msgport = CreateObject(\"roMessagePort\")\n mgr.SetMessagePort(msgport)\n\n request = CreateObject(\"roTextureRequest\",\"http://192.168.1.10/ball.png\")\n mgr.RequestTexture(request)\n\n msg=wait(0, msgport)\n if type(msg)=\"roTextureRequestEvent\" then\n print \"request id\";msg.GetId()\n print \"request state:\";msg.GetState()\n print \"request URI:\";msg.GetURI()\n state = msg.GetState()\n if state = 3 then\n bitmap = msg.GetBitmap()\n if type(bitmap)<>\"roBitmap\" then\n print \"Unable to create robitmap\"\n stop ' stop exits to the debugger\n end if\n end if\n end if\nEnd Sub\n```\n\n**Example: Requesting a scaled image from the roTextureManager**\n\n```\nSub Main()\n mgr = CreateObject(\"roTextureManager\")\n msgport = CreateObject(\"roMessagePort\")\n mgr.SetMessagePort(msgport)\n\n request = CreateObject(\"roTextureRequest\",\"pkg:/assets/ball.png\")\n request.SetSize(100, 100)\n request.SetScaleMode(1)\n mgr.RequestTexture(request)\nEnd Sub\n```\n\n**Example: Making an HTTPS request from the roTextureManager**\n\n```\nSub Main()\n mgr = CreateObject(\"roTextureManager\")\n msgport = CreateObject(\"roMessagePort\")\n mgr.SetMessagePort(msgport)\n\n request = CreateObject(\"roTextureRequest\",\"https://192.168.1.10/ball.png\")\n request.SetCertificatesFile(\"common:/certs/ca-bundle.crt\")\n request.InitClientCertificates()\n\n mgr.RequestTexture(request)\nEnd Sub\n```", + "events": [], + "interfaces": [ + { + "name": "ifHttpAgent", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifhttpagent.md" + }, + { + "name": "ifTextureRequest", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/iftexturerequest.md" + } + ], + "name": "roTextureRequest", + "url": "https://developer.roku.com/docs/references/brightscript/components/rotexturerequest.md" + }, + "rotimespan": { + "constructors": [ + { + "params": [], + "returnType": "roTimespan" + } + ], + "description": "The Timespan object provides an interface to a simple timer for tracking the duration of activities. It's useful for tracking how an action has taken or if a specified time has elapsed from some starting event.\n\n**Example: Timing an activity**\n\n```\nREM ******************************************************\nREM Compute the number of millisecs to perform a task\nREM ******************************************************\ntimer = CreateObject(\"roTimespan\")\ntimer.Mark()\nDoTimeConsumingTask()\nPrint \"Task took: \" + timer.TotalMilliseconds().ToStr()\n\nREM ******************************************************\nREM Compute how many seconds until rental expires\nREM ******************************************************\nFunction secondsLeft(String expirationDate) As Integer\n str = expirationDate\n if str = invalid return -1\n ts = CreateObject(\"roTimespan\")\n seconds = ts.GetSecondsToISO8601Date(str)\n print \"Expires: \" + str + \" secs: \" + Stri(seconds)\n return seconds\nEnd Function\n```", + "events": [], + "interfaces": [ + { + "name": "ifTimespan", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/iftimespan.md" + } + ], + "name": "roTimespan", + "url": "https://developer.roku.com/docs/references/brightscript/components/rotimespan.md" + }, + "rourltransfer": { + "constructors": [ + { + "params": [], + "returnType": "roUrlTransfer" + } + ], + "description": "A roUrlTransfer object transfers data to or from remote servers specified by URLs. It can perform mutual authentication with a web server.\n\nThis object is created with no parameters:\n\n`CreateObject(\"roUrlTransfer\")`\n\nIf using HTTPS, the developer must specify a certificate file by calling SetCertificatesFile() with a .pem file that includes the certificate authority cert (like Verisign, Thawte, etc., or your own with OpenSSL) that signed the web server certificate. This must be called before making a request. The developer can also use the Roku standard cert bundle (which contains certificates for most common signing authorities) stored in common:/certs/ca-bundle.crt; or download the CA certificate [here](https://github.com/rokudev/ca-certificate/blob/master/ca-bundle.crt).\n\nThe web server can authenticate that the requested connection is from a Roku Streaming Player and that the request is from your application by taking the following actions:\n\n* Add the Roku CA certificate to the web server's certificate authorities keychain, download the CA certificate.\n* Configure your web server to reject any connection that does not have a valid client certificate.\n* Check the X-Roku-Reserved-Dev-Id header in the request. It should contain the Developer ID of your application. If it does not, another application on the Roku is attempting to access the server, and the request is rejected.\n\n**Example**\n\nIn order for your web server to perform the steps above to authenticate your Roku Streaming Player, your application needs to call the following functions before performing any https requests:\n\n```\nobject.SetCertificatesFile(\"common:/certs/ca-bundle.crt\")\nobject.AddHeader(\"X-Roku-Reserved-Dev-Id\", \"\")\nobject.InitClientCertificates()\n```", + "events": [ + { + "name": "roUrlEvent", + "url": "https://developer.roku.com/docs/references/brightscript/events/rourlevent.md" + } + ], + "interfaces": [ + { + "name": "ifGetMessagePort", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifgetmessageport.md" + }, + { + "name": "ifHttpAgent", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifhttpagent.md" + }, + { + "name": "ifSetMessagePort", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifsetmessageport.md" + }, + { + "name": "ifUrlTransfer", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifurltransfer.md" + } + ], + "name": "roUrlTransfer", + "url": "https://developer.roku.com/docs/references/brightscript/components/rourltransfer.md" + }, + "rovideoplayer": { + "constructors": [ + { + "params": [], + "returnType": "roVideoPlayer" + } + ], + "description": "The roVideoPlayer component implements a video player with more programmatic control, but less user control than the roVideoScreen component.\n\nThe roVideoPlayer can be used in conjunction with the roImageCanvas to do graphical overlays, windowed video, zoom, and programmatic control of playlists and trick play. When using with the roImageCanvas, you can put the roVideoPlayer is at a lower z-order layer than other imageCanvas layers and implement overlays on top of the playing video.\n\nUnlike the roVideoScreen component roVideoPlayer does not have automatic trick play modes and built in controls to support that trick play. Any trick play requires the developer to build his own controls using buttons on the roImageCanvas.\n\nNote that all the video playback notes under roVideoScreen apply to the roVideoPlayer. The customvideoplayer sample application is a good example of roVideoPlayer usage.\n\nThis object is created with no parameters:\n\n`CreateObject(\"roVideoPlayer\")`", + "events": [ + { + "name": "roVideoPlayerEvent", + "url": "https://developer.roku.com/docs/references/brightscript/events/rovideoplayerevent.md" + } + ], + "interfaces": [ + { + "name": "ifGetMessagePort", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifgetmessageport.md" + }, + { + "name": "ifHttpAgent", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifhttpagent.md" + }, + { + "name": "ifSetMessagePort", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifsetmessageport.md" + }, + { + "name": "ifVideoPlayer", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifvideoplayer.md" + } + ], + "name": "roVideoPlayer", + "url": "https://developer.roku.com/docs/references/brightscript/components/rovideoplayer.md" + }, + "rovideoscreen": { + "constructors": [ + { + "params": [], + "returnType": "roVideoScreen" + } + ], + "deprecatedDescription": "This component is deprecated and will be removed from Roku OS on January 1st, 2019.\n\nBeginning July 1st, 2017, any new channels using this component will be rejected during certification.\n\nBeginning January 1st, 2018, any updates to existing channels using this component will be rejected during certification.\n", + "description": "> This component is deprecated and will be removed from Roku OS on January 1st, 2019.\n> \n> Beginning July 1st, 2017, any new channels using this component will be rejected during certification.\n> \n> Beginning January 1st, 2018, any updates to existing channels using this component will be rejected during certification.\n\nThe Video Screen object implements the video playback portion of the user interface.\n\nThis object is created with no parameters:\n\n`CreateObject(\"roVideoScreen\")`\n\nThe API's to the video screen allow the developer to setup a fully featured playback environment with minimal coding. The developer is responsible for initial playback setup and providing the required data (e.g. StreamURLs, SteamsBitrates, etc.) as part of the [Content Meta-Data](/docs/developer-program/getting-started/architecture/content-metadata.md \"Content Meta-Data\"). Once created and displayed, the screen will respond to events and manage the playback experience for the user.\n\nThe roVideoScreen is designed for streaming content. The preferred implementation should provide multiple bitrates (ideally four) of video to provide a high quality user experience under a variety of network conditions. Using the StreamBitrates and StreamURLs provided in the content meta-data for the item, the roVideoScreen will automatically monitor and select the best stream based on the users measured bandwidth. If network performance changes, the system will adapt and rebuffer to stream at a different bandwidth if necessary. Note that the StreamURLs, StreamBitrates, StreamQualities and StreamStickyHttpRedirects are all arrays that are aligned with each other. For example, the first stream listed would be the 0th element of all of these arrays.\n\nThe bitrates should represent the actual bitrate of the stream. The bitrate is used for both the display of the dots as well as the stream selection algorithm. The dots work a follows; If the stream bitrate equals:\n\n* 0 = no dots\n* < 500 Kbps= 1 dot\n* < 800 Kbps = 2 dots\n* <1.1 Mbps = 3 dots\n* > \\= 1.1 Mbps = 4 dots\n \n\nThe dots are displayed automatically based on the bitrate of the stream selected unless there is a single stream and the bitrate is set to zero, then it won't show any dots. The StreamQuality attribute is used to select streams and indicates if a stream is HD or not. If the attribute for HDBranded is set to true and the stream is HD, the HD icon will show beside the quality dots. If the StreamQuality is set to HD, and the user display type is set to SD, the HD stream will not be selected.\n\nThe roVideoScreen automatically provides trick mode for all supported content types. There are two type of trick modes supported; scene based selection and time-based selection. If BIF image files are provided for a title, scene-based trick modes will appear. (See the BIF File format Documentation for more information) The user will be presented with the images and progress bar needed for SEEK, FF, REW within a stream. The following image shows how trick modes are rendered with BIF files:\n\n![IMAGE](https://image.roku.com/ZHZscHItMTc2/worddavdc8a50b63d70082736fbebee19c18eff.png \"worddavdc8a50b63d70082736fbebee19c18eff\")\n\nThe FF/REW functionality provides three speeds; slow, medium and fast. At slower speeds, the system displays the current frame in the center of the screen and additional frames on the side for contextual information. At higher speeds, the side frames disappear and only the center image is displayed. The I-frames within the video do not need to precisely align with the time stamp of the image frames in the BIF file. When the user stops and selects a frame, the video playback begins at the first I-frame less than or equal to the time position of the selected frame.\n\nWhen BIF images are not available, the system will default to a time based trick play behavior. The user control is still the same, but only the progress bar is displayed and the user will not see individual scenes within the video. This mode is the default, so if images are not available for an individual title, the system will always provide this functionality by default.\n\nThe system will only seek to locations on an I-Frame boundary. Window Media (WMA9 or VC-1) uses the simple index object to determine the I-frame locations and H.264 uses the MOOV atom to determine the correct offsets. If the BIF images are at a consistent time intervals which do not align to I-Frame boundaries, the system will use the nearest I-Frame less than or equal to the time of the BIF image. MP4 or Windows Media are the preferred formats.\n\n**Important Notes on Video Playback**\n\n* The dimensions vary on a title-by-title basis depending on the source material and the target aspect ratio for the encode (e.g. 4:3 or 16:9). Content is always encoded at full width and the height is adjusted. For example, a 1.66 aspect ratio source is encoded as a 720x432 video and displayed as letterboxed for a 4:3 display.\n \n* The frame rate used for encoding is dependent on the source material. Film content is generally 23.976 fps, while video content is generally at 29.97.\n \n* For typical streaming video applications, we recommend a range of 384Kbps to 4.5Mbps. For USB playback, we recommend that you stay under 8.0 Mbps. This provides a good balance between quality and support for a wide number of users. In some cases lower and higher bitrates have been used, but this frequently results in poor quality or limits the % of the installed base that can view this encoding.\n \n* It is critical that the StreamURLs, StreamBitrates, StreamQualities and StreamStickyHttpRedirects arrays are all aligned with each other. For example, the first stream listed would be the 0th element of all of these arrays. You may have multiple streams in the arrays and the system will automatically pick the most appropriate stream based on the users available bandwidth and video settings.\n \n* The StreamQualities array identifies streams as either SD or HD. If the user is configured for SD the system will not select HD streams for playback.\n \n* The optional StreamStartTimeOffset is the offset into the stream which is considered to be the new origin of playback.\n \n* Live – declares the video as live and replaces the time remaining text in the progress bar with \"live\".\n \n* HLS Http Live Streaming support is included in the Roku OS (Introduced in Roku OS2.6). We currently support version 3 of the Http Live Streaming protocol (Pantos – Draft submitted to IETF November 19, 2010 [http://tools.ietf.org/html/draft-pantos-http-live-streaming-05](http://tools.ietf.org/html/draft-pantos-http-live-streaming-05) ). When using HLS, the StreamUrls and StreamQualities array should each have exactly one element. If the HLS stream has only a single bitrate stream, the StreamBitrates array should contain one element specifying that bitrate. If the stream contains more than one variant stream at multiple bitrates, the StreamBitrates array should contain one element with a value of zero. Please see the Video Encoding Guide for information about creating HLS .m3u8 files and segmented .ts files from your current h264 encoded video or distributing live video over HLS to the Roku box.\n \n* In addition to the support for version 2 of the HLS Pantos draft spec, the Roku box supports .m3u8 files that are compressed via deflate or gzip.\n \n * The HTTP response for a query that returns a gzip-compressed file must contain the header: Content-Encoding: gzip\n * The HTTP response for a query that returns a deflate-compressed file must contain the header: Content-Encoding: deflate\n* \"Trick Modes\" and seeking work a little differently with HLS streams. There are a couple of ways that seeking works with HLS and they are different than other streams.\n \n One way of seeking uses the \"target duration\" specified in the .m3u8 file. The first segment in an m3u8 file is assigned a time offset:\n \n T = G \\* N\n \n where G is the \"target duration\" value and N is the sequence number of the segment. Each subsequent segment is assigned a time offset equal to T (the time offset of the first segment) plus the duration value of all earlier segments. The duration of a segment is determined by the EXTINF line before that segment.\n \n* Smooth Streaming (since v4.7) and later by setting the StreamFormat to \"ism\" and setting the streamURL to the MANIFEST url.\n \n * The player type (ContentMetaData.StreamFormat) is \"ism\"\n * The stream URL is the URL that points to the manifest\n * Only H.264 and/or AAC encoding formats are currently supported.\n * Only direct PlayReady licensing is supported. Indirect licensing is currently unsupported. That is, for decryption to work, the ProtectionHeader must be available in the manifest and the LA\\_URL should contain a valid URL to an accessible PlayReady license server.\n * If there are multiple audio tracks, a track will be chosen based on the StreamIndex.Language attribute in the manifest. If the StreamIndex.Language attribute is not populated, the audio track will be chosen arbitrarily. To select a specific audio track before playback, set the ContentMetaData.TrackIDAudio field to the desired track's StreamIndex.Name attribute.\n * If there are multiple video tracks, a track will be chosen arbitrarily. To select a specific video track before playback, set the ContentMetaData.TrackIDVideo field to the desired track's StreamIndex.Name attribute.\n* Standard PlayReady SDK 2.0 Direct License Acquisition Over-the-Air (since v4.8) works by reading the Rights Management Protection Header in the Smooth Streaming Manifest Url. The Roku OS retrieves the license from the PlayReady license server at the license acquisition url endpoint in the Protection Header.\n \n\n```\n#EXT-X_TARGETDURATION:10\n#EXT-X-MEDIA-SEQUENCE:37\n#EXTINF:10\nurl1\n#EXTINF:8\nurl2\n#EXTINF:10\nurl3\n```\n\nThe segment url1 has a time offset of 370, url2 is 380, and url3 is 388. Note that if no TARGETDURATION is specified, the default is 1, so the first segment in the file will have a nonzero time offset (equal to the target duration). The PlayStart content-meta data value allows direct seeking to an offset that is valid within the window of data in the current .m3u8 file.\n\nThere is a second way to seek in an HLS stream. If the m3u8 file has #EXT-X-PROGRAM-DATE-TIME entries, you can seek to a particular date/time by passing a value equal to a modified Unix epoch value. The modified epoch is 1/1/2004 rather than the standard Unix epoch of 1/1/1970. A Unix time value can be converted to an HLS seek time by subtracting 1072915200 (the number of seconds between 1/1/1970 and 1/1/2004). Once again, setting the PlayStart content meta data value allows direct seeking to a specific time offset.\n\nFor example, to seek to the segment marked with the date/time of 7/4/2010 11:30, set PlayStart to 205327800. An example shell expression showing this arithmetic is:\n\n```\n% expr `date -d \"7/4/2010Z11:30:00.000\" +%s` - 1072915200\n205327800\n```\n\nIn BrightScript, the same calculation might be:\n\n```\ndt = CreateObject(\"roDateTime\")\ndt.fromISO8601String(\"7/4/2010T11:30:00.000\")\nitemContentMetaData.PlayStart = dt. asSeconds() - 1072915200 '205327800\n```\n\n1. In Roku OS version 2.6, we've introduced support for SRT files. Please see the content meta-data parameter SubtitleUrl for pointing to a matching SRT file for your video content.\n \n2. In Roku OS version 2.7, we've introduced 1080p support. Please see the content meta-data parameter FullHD for specifying 1080p resolution. Playback at 1080p resolution will only occur when the user has set the display type to HDTV 1080p. Another content meta-data parameter, FrameRate, specifies the frames per second of the video. Valid values are 24 and 30. If the user's display type is set to 1080p and FullHD for the content is false or not set, HD playback will be at 720p resolution. If the user's display type is set to HDTV 720p and FullHD content is set to 1080p resolution, the box will downscale the content to 720p resolution.\n \n\n**Example**\n\n```\n'**********************************************************************\n' This example function is passed an associative array representing a ' piece of content (e.g. a TV episode) There are other attributes\n' (title, description, etc.) but this example focuses on showing\n' attributes required for initiating playback. It creates a video\n' screen, sets the content and starts playback by calling Show()\n'**********************************************************************\nFunction showVideoScreen(episode As Object)\n if type(episode) <> \"roAssociativeArray\" then\n print \"invalid data passed to showVideoScreen\"\n return -1\n endif\n port = CreateObject(\"roMessagePort\")\n screen = CreateObject(\"roVideoScreen\")\n ' Note: HDBranded controls whether the \"HD\" logo is displayed for a\n ' title. This is separate from IsHD because its possible to\n' have an HD title where you don't want to show the HD logo\n' branding for the title. Set these two as appropriate for\n' your content\n episode.HDBranded = false\n episode.IsHD = false\n ' Note: The preferred way to specify stream info in v2.6 is to use\n' the Stream roAssociativeArray content meta data parameter.\n\nepisode.Stream = { url:\"http://myserver.mydomain.com/mycontent.mp4\",\nbitrate:2000\nquality:false\ncontentid:\"mycontent-2000\"\n}\nepisode.StreamFormat: \"mp4\"\n ' now just tell the screen about the title to be played, set the\n ' message port for where you will receive events and call show to\n ' begin playback. You should see a buffering screen and then\n ' playback will start immediately when we have enough data buffered.\n screen.SetContent(episode)\n screen.SetMessagePort(port)\n screen.Show()\n ' Wait in a loop on the message port for events to be received.\n ' We will just quit the loop and return to the calling function\n ' when the users terminates playback, but there are other things\n ' you could do here like monitor playback position and see events\n ' from the streaming player. Look for status messages from the video\n ' player for status and failure events that occur during playback\n while true\n msg = wait(0, port)\n\n if type(msg) = \"roVideoScreenEvent\" then\n print \"showVideoScreen | msg = \"; msg.GetMessage() \" | index = \"; msg.GetIndex()\n if msg.isScreenClosed()\n print \"Screen closed\"\n exit while\n else if msg.isStatusMessage()\n print \"status message: \"; msg.GetMessage()\n else if msg.isPlaybackPosition()\n print \"playback position: \"; msg.GetIndex()\n else if msg.isFullResult()\n print \"playback completed\"\n exit while\n else if msg.isPartialResult()\n print \"playback interrupted\"\n exit while\n else if msg.isRequestFailed()\n print \"request failed - error: \"; msg.GetIndex();\" - \"; msg.GetMessage()\n exit while\n end if\n end if\n end while\nEnd Function\n```", + "events": [ + { + "name": "roVideoScreenEvent", + "url": "https://developer.roku.com/docs/references/brightscript/events/rovideoscreenevent.md" + } + ], + "interfaces": [ + { + "name": "ifGetMessagePort", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifgetmessageport.md" + }, + { + "name": "ifHttpAgent", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifhttpagent.md" + }, + { + "name": "ifSetMessagePort", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifsetmessageport.md" + }, + { + "name": "ifVideoScreen", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifvideoscreen.md" + } + ], + "isDeprecated": true, + "name": "roVideoScreen", + "url": "https://developer.roku.com/docs/references/brightscript/components/rovideoscreen.md" + }, + "roxmlelement": { + "constructors": [], + "description": "roXMLElement is used to contain an XML tree.\n\nFor instance,\n\n```\nthis is some text\n```\n\nWould parse such that:\n\n```\n Name = \"tag1\"\n Attributes = invalid\n Body = roString with \"this is some text\"\n```\n\n**Example**\n\n```\n \n```\n\nWould parse such that:\n\n```\n Name = \"emptytag\"\n Attributes = roAssociativeArray, with one entry { caveman: \"barney\" }\n Body = invalid\n```\n\nIf the tag contains other tags, body will be of type roXMLList.\n\nTo generate XML, create an roXMLElement, then use functions like SetName(), AddAttribute(), SetBody(), AddElementWithBody(), AddElement(), AddBodyElement(), and AddText() functions to build the XML object hierarchy.\n\nThen call GenXML() to return the XML as a string.\n\nGenXML() takes one parameter (boolean) that indicates whether the generated xml should have the tag at the top.\n\n**Example: Subroutine to print out the contents of an roXMLElement tree**\n\n```\nPrintXML(root, 0)\n\nSub PrintXML(element As Object, depth As Integer)\n print tab(depth*3);\"Name: \";element.GetName()\n if not element.GetAttributes().IsEmpty() then\n print tab(depth*3);\"Attributes: \";\n for each a in element.GetAttributes()\n print a;\"=\";left(element.GetAttributes()[a], 20);\n if element.GetAttributes().IsNext() then print \", \";\n end for\n print\n end if\n if element.GetText()<>invalid then\n print tab(depth*3);\"Contains Text: \";left(element.GetText(), 40)\n end if\n if element.GetChildElements()<>invalid\n print tab(depth*3);\"Contains roXMLList:\"\n for each e in element.GetChildElements()\n PrintXML(e, depth+1)\n end for\n end if\n print\nend sub\n```\n\n**Example: Generating XML**\n\n```\nroot.SetName(\"myroot\")\nroot.AddAttribute(\"key1\", \"value1\")\nroot.AddAttribute(\"key2\", \"value2\")\nne = root.AddBodyElement()\nne.SetName(\"sub\")\nne.SetBody(\"this is the sub1 text\")\nne = root.AddBodyElement()\nne.SetName(\"subelement2\")\nne.SetBody(\"more sub text\")\nne.AddAttribute(\"k\", \"v\")\nne = root.AddElement(\"subelement3\")\nne.SetBody(\"more sub text 3\")\nroot.AddElementWithBody(\"sub\", \"another sub (#4)\")\nPrintXML(root, 0)\nprint root.GenXML(false)\n```", + "events": [], + "interfaces": [ + { + "name": "ifXMLElement", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifxmlelement.md" + } + ], + "name": "roXMLElement", + "url": "https://developer.roku.com/docs/references/brightscript/components/roxmlelement.md" + }, + "roxmllist": { + "constructors": [], + "description": "Contains a list of roXML objects.\n\nNormally roXMLList objects are not created via CreateObject(), but are returned from various ifXMLElement functions such as GetChildElements() and GetBod", + "events": [], + "interfaces": [ + { + "name": "ifList", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/iflist.md" + }, + { + "name": "ifListToArray", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/iflisttoarray.md" + }, + { + "name": "ifXMLList", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifxmllist.md" + } + ], + "name": "roXMLList", + "url": "https://developer.roku.com/docs/references/brightscript/components/roxmllist.md" + } + }, + "interfaces": { + "AppManagerTheme": { + "implementers": [], + "methods": [], + "name": "AppManagerTheme", + "properties": [ + { + "default": "invalid", + "description": "HTML HEX Color Value. Screen types: Gr Li Pa Po Se Sp Te. Example: #E0DFDF", + "name": "BackgroundColor", + "type": "string" + }, + { + "default": "invalid", + "description": "HTML HEX Color Value. Screen types: Gr Li Pa Po Se Sp Te. Example: #FF00FF", + "name": "BreadcrumbDelimiter", + "type": "string" + }, + { + "default": "invalid", + "description": "HTML HEX Color Value. Screen types: Gr Li Pa Po Se Sp Te. Example: #FF00FF", + "name": "BreadcrumbTextLeft", + "type": "string" + }, + { + "default": "invalid", + "description": "HTML HEX Color Value. Screen types: Gr Li Pa Po Se Sp Te. Example: #FF00FF", + "name": "BreadcrumbTextRight", + "type": "string" + }, + { + "default": "invalid", + "description": "HTML HEX Color Value. Screen types: Di Se Sp. Example: #FF00FF", + "name": "ButtonHighlightColor", + "type": "string" + }, + { + "default": "invalid", + "description": "HTML HEX Color Value. Screen types: Di Se Sp. Example: #0033FF", + "name": "ButtonMenuHighlightText", + "type": "string" + }, + { + "default": "invalid", + "description": "HTML HEX Color Value. Screen types: Di Se Sp. Example: #B0B0B0", + "name": "ButtonMenuNormalOverlayText", + "type": "string" + }, + { + "default": "invalid", + "description": "HTML HEX Color Value. Screen types: Di Se Sp. Example: #686868", + "name": "ButtonMenuNormalText", + "type": "string" + }, + { + "default": "invalid", + "description": "HTML HEX Color Value. Screen types: Di Se Sp. Example: #FF00FF", + "name": "ButtonNormalColor", + "type": "string" + }, + { + "default": "invalid", + "description": "HTML HEX Color Value. Screen types: Gr Po. Example: #00FF00", + "name": "CounterSeparator", + "type": "string" + }, + { + "default": "invalid", + "description": "HTML HEX Color Value. Screen types: Gr Po. Example: #FF0000", + "name": "CounterTextLeft", + "type": "string" + }, + { + "default": "invalid", + "description": "HTML HEX Color Value. Screen types: Gr Po. Example: #0000FF", + "name": "CounterTextRight", + "type": "string" + }, + { + "default": "invalid", + "description": "HTML HEX Color Value. Must be a grayscale value. Screen types: Di. Example: #808080", + "name": "DialogBodyText", + "type": "string" + }, + { + "default": "invalid", + "description": "HTML HEX Color Value. Must be a grayscale value. Screen types: Di. Example: #363636", + "name": "DialogTitleText", + "type": "string" + }, + { + "default": "invalid", + "description": "HTML HEX Color Value. Screen types: Po. Example: #FF00FF", + "name": "EpisodeSynopsisText", + "type": "string" + }, + { + "default": "invalid", + "description": "HTML HEX Color Value. Screen types: Po. Example: #FF00FF", + "name": "FilterBannerActiveColor", + "type": "string" + }, + { + "default": "invalid", + "description": "URL to set HD Filter Banner Active/Focus Highlighter. Screen types: Po. Example: pkg:/images/Filter\\_ActiveHint\\_HD.png", + "name": "FilterBannerActiveHD", + "type": "string" + }, + { + "default": "invalid", + "description": "URL to set SD Filter Banner Active/Focus Highlighter. Screen types: Po. Example: pkg:/images/Filter\\_ActiveHint\\_SD43.png", + "name": "FilterBannerActiveSD", + "type": "string" + }, + { + "default": "invalid", + "description": "HTML HEX Color Value. Screen types: Po. Example: #FF00FF", + "name": "FilterBannerInactiveColor", + "type": "string" + }, + { + "default": "invalid", + "description": "URL to set HD Filter Banner Inactive Highlighter. Screen types: Po. Example: pkg:/images/Filter\\_InactiveHint\\_HD.png", + "name": "FilterBannerInactiveHD", + "type": "string" + }, + { + "default": "invalid", + "description": "URL to set SD Filter Banner Inactive Highlighter. Screen types: Po. Example: pkg:/images/Filter\\_ActiveHint\\_SD43.png", + "name": "FilterBannerInactiveSD", + "type": "string" + }, + { + "default": "invalid", + "description": "HTML HEX Color Value. Screen types: Po. Example: #FF00FF", + "name": "FilterBannerSideColor", + "type": "string" + }, + { + "default": "invalid", + "description": "URL to set HD Filter Banner Background Image. Screen types: Po. Example: pkg:/images/Filter\\_ActiveHint\\_HD.png", + "name": "FilterBannerSliceHD", + "type": "string" + }, + { + "default": "invalid", + "description": "URL to set SD Filter Banner Background Image. Screen types: Po. Example: pkg:/images/Filter\\_ActiveHint\\_SD43.png", + "name": "FilterBannerSliceSD", + "type": "string" + }, + { + "default": "invalid", + "description": "HTML HEX Color Value Must be a grayscale value. Screen types: Gr. Example: #363636", + "name": "GridScreenBackgroundColor", + "type": "string" + }, + { + "default": "invalid", + "description": "String representing point \"(x, y)\" that is the offset from the upper left corner of the focused HD image. Set to the negative width & height of border. Screen types: Gr. Example: (-25,-25)", + "name": "GridScreenBorderOffsetHD", + "type": "string" + }, + { + "default": "invalid", + "description": "String representing point \"(x, y)\" that is the offset from the upper left corner of the focused SD image. Set to the negative width & height of border. Screen types: Gr. Example: (-20,-20)", + "name": "GridScreenBorderOffsetSD", + "type": "string" + }, + { + "default": "invalid", + "description": "HTML HEX Color Value. Screen types: Gr. Example: #FF005B", + "name": "GridScreenDescriptionDateColor", + "type": "string" + }, + { + "default": "invalid", + "description": "URL to set HD Description callout background image on Grid. Screen types: Gr. Example: pkg:/images/Description\\_Background\\_HD.ng", + "name": "GridScreenDescriptionImageHD", + "type": "string" + }, + { + "default": "invalid", + "description": "URL to set SD Description callout background image on Grid. Screen types: Gr. Example: pkg:/images/Description\\_Background\\_SD43.ng", + "name": "GridScreenDescriptionImageSD", + "type": "string" + }, + { + "default": "invalid", + "description": "String representing point \"(x, y)\" that is the offset from the upper left corner of the focused HD image. Negative values have the description above and to the left of the focused image. Screen types: Gr. Example: (190,255)", + "name": "GridScreenDescriptionOffsetHD", + "type": "string" + }, + { + "default": "invalid", + "description": "String representing point \"(x, y)\" that is the offset from the upper left corner of the focused SD image. Negative values have the description above and to the left of the focused image. Screen types: Gr. Example: (125,170)", + "name": "GridScreenDescriptionOffsetSD", + "type": "string" + }, + { + "default": "invalid", + "description": "HTML HEX Color Value. Screen types: Gr. Example: #5B005B", + "name": "GridScreenDescriptionRuntimeColor", + "type": "string" + }, + { + "default": "invalid", + "description": "HTML HEX Color Value. Screen types: Gr. Example: #606000", + "name": "GridScreenDescriptionSynopsisColor", + "type": "string" + }, + { + "default": "invalid", + "description": "HTML HEX Color Value. Screen types: Gr. Example: #00FFFF", + "name": "GridScreenDescriptionTitleColor", + "type": "string" + }, + { + "default": "invalid", + "description": "URL to set HD Focus image on Active Grid Poster. Screen types: Gr. Example: pkg:/images/Border\\_16x9\\_HD.png", + "name": "GridScreenFocusBorderHD", + "type": "string" + }, + { + "default": "invalid", + "description": "URL to set SD Focus image on Active Grid Poster. Screen types: Gr. Example: pkg:/images/Border\\_16x9\\_SD43.png", + "name": "GridScreenFocusBorderSD", + "type": "string" + }, + { + "default": "invalid", + "description": "HTML HEX Color Value. Must be a grayscale value. Screen types: Gr. Example: #FFFFFF", + "name": "GridScreenListNameColor", + "type": "string" + }, + { + "default": "invalid", + "description": "Logo formatted for display in the overhang. Screen types: Gr. Example: pkg:/images/gridlogoHD.png", + "name": "GridScreenLogoHD", + "type": "string" + }, + { + "default": "invalid", + "description": "Offset in pixels from the top-left origin of the display. Range 0 to 1280. Screen types: Gr. Example: 592", + "name": "GridScreenLogoOffsetHD\\_X", + "type": "string" + }, + { + "default": "invalid", + "description": "Offset in pixels from the top-left origin of the display. Range 0 to 720. Screen types: Gr. Example: 31", + "name": "GridScreenLogoOffsetHD\\_Y", + "type": "string" + }, + { + "default": "invalid", + "description": "Offset in pixels from the top-left origin of the display. Range 0 to 720. Screen types: Gr. Example: 324", + "name": "GridScreenLogoOffsetSD\\_X", + "type": "string" + }, + { + "default": "invalid", + "description": "Offset in pixels from the top-left origin of the display. Range 0 to 480. Screen types: Gr. Example: 21", + "name": "GridScreenLogoOffsetSD\\_Y", + "type": "string" + }, + { + "default": "invalid", + "description": "Logo formatted for display in the overhang. Screen types: Gr. Example: pkg:/images/gridlogoSD.png", + "name": "GridScreenLogoSD", + "type": "string" + }, + { + "default": "invalid", + "description": "HTML HEX Color Value. Must be a grayscale value. Screen types: Gr. Example: #808080", + "name": "GridScreenMessageColor", + "type": "string" + }, + { + "default": "invalid", + "description": "The HD overhang height. Default: \"69\". Screen types: Gr. Example: 75", + "name": "GridScreenOverhangHeightHD", + "type": "string" + }, + { + "default": "invalid", + "description": "The SD overhang height. Default: \"49\". Screen types: Gr. Example: 55", + "name": "GridScreenOverhangHeightSD", + "type": "string" + }, + { + "default": "invalid", + "description": "URI for the overhang slice (thin piece of top of screen border). Screen types: Gr. Example: pkg:/images/gridoverhangHD.png", + "name": "GridScreenOverhangSliceHD", + "type": "string" + }, + { + "default": "invalid", + "description": "URI for the overhang slice (thin piece of top of screen border). Screen types: Gr. Example: pkg:/images/gridoverhangSD.png", + "name": "GridScreenOverhangSliceSD", + "type": "string" + }, + { + "default": "invalid", + "description": "HTML HEX Color Value. Must be a grayscale value. Screen types: Gr. Example: #CCCCCC", + "name": "GridScreenRetrievingColor", + "type": "string" + }, + { + "default": "invalid", + "description": "URL to set HD highlight image. Screen types: Gr Li Po. Example: pkg:/images/listitem\\_highlight\\_hd.png", + "name": "ListItemHighlightHD", + "type": "string" + }, + { + "default": "invalid", + "description": "URL to set SD highlight image. Screen types: Gr Li Po. Example: pkg:/images/listitem\\_highlight\\_sd.png", + "name": "ListItemHighlightSD", + "type": "string" + }, + { + "default": "invalid", + "description": "HTML HEX Color Value. Screen types: Gr Li Po. Example: #CCCC00", + "name": "ListItemHighlightText", + "type": "string" + }, + { + "default": "invalid", + "description": "HTML HEX Color Value. Screen types: Gr Li Po. Example: #CCCC00", + "name": "ListItemText", + "type": "string" + }, + { + "default": "invalid", + "description": "HTML HEX Color Value. Screen types: Li. Example: #CCCC00", + "name": "ListScreenDescriptionText", + "type": "string" + }, + { + "default": "invalid", + "description": "HTML HEX Color Value. Screen types: Li. Example: #CC0000", + "name": "ListScreenTitleColor", + "type": "string" + }, + { + "default": "invalid", + "description": "Small application logo formatted for display in overhang top left. Screen types: Co Ke Li Pa Po Se Sp Te. Example: pkg:/images/co\\_logo\\_sd.png", + "name": "OverhangPrimaryLogoHD", + "type": "string" + }, + { + "default": "invalid", + "description": "Offset in pixels from the top-left origin of the display films.Range 0 to 1280. Screen types: Co Ke Li Pa Po Se Sp Te. Example: 25", + "name": "OverhangPrimaryLogoOffsetHD\\_X", + "type": "string" + }, + { + "default": "invalid", + "description": "Offset in pixels from the top-left origin of the display films.Range 0 to 720. Screen types: Co Ke Li Pa Po Se Sp Te. Example: 50", + "name": "OverhangPrimaryLogoOffsetHD\\_Y", + "type": "string" + }, + { + "default": "invalid", + "description": "Offset in pixels from the top-left origin of the display films.Range 0 to 720. Screen types: Co Ke Li Pa Po Se Sp Te. Example: 25", + "name": "OverhangPrimaryLogoOffsetSD\\_X", + "type": "string" + }, + { + "default": "invalid", + "description": "Offset in pixels from the top-left origin of the display films.Range 0 to 480. Screen types: Co Ke Li Pa Po Se Sp Te. Example: 50", + "name": "OverhangPrimaryLogoOffsetSD\\_Y", + "type": "string" + }, + { + "default": "invalid", + "description": "Small application logo formatted for display in overhang top left. Screen types: Co Ke Li Pa Po Se Sp Te. Example: pkg:/images/co\\_logo\\_sd.png", + "name": "OverhangPrimaryLogoSD", + "type": "string" + }, + { + "default": "invalid", + "description": "Small application logo formatted for display in overhang top left. Screen types: Co Ke Li Pa Po Se Sp Te. Example: pkg:/images/co\\_logo\\_hd.png", + "name": "OverhangSecondaryLogoHD", + "type": "string" + }, + { + "default": "invalid", + "description": "Offset in pixels from the top-left origin of the display films. Range 0 to 1280. Screen types: Co Ke Li Pa Po Se Sp Te. Example: 25", + "name": "OverhangSecondaryLogoOffsetHD\\_X", + "type": "string" + }, + { + "default": "invalid", + "description": "Offset in pixels from the top-left origin of the display films. Range 0 to 720. Screen types: Co Ke Li Pa Po Se Sp Te. Example: 50", + "name": "OverhangSecondaryLogoOffsetHD\\_Y", + "type": "string" + }, + { + "default": "invalid", + "description": "Offset in pixels from the top-left origin of the display films. Range 0 to 720. Screen types: Co Ke Li Pa Po Se Sp Te. Example: 25", + "name": "OverhangSecondaryLogoOffsetSD\\_X", + "type": "string" + }, + { + "default": "invalid", + "description": "Offset in pixels from the top-left origin of the display films. Range 0 to 480. Screen types: Co Ke Li Pa Po Se Sp Te. Example: 50", + "name": "OverhangSecondaryLogoOffsetSD\\_Y", + "type": "string" + }, + { + "default": "invalid", + "description": "Small application logo formatted for display in overhang top left. Screen types: Co Ke Li Pa Po Se Sp Te. Example: pkg:/images/co\\_logo\\_sd.png", + "name": "OverhangSecondaryLogoSD", + "type": "string" + }, + { + "default": "invalid", + "description": "URI for the overhang slice (thin piece of border at the top of the screen in HD size). Screen types: Co Ke Li Pa Po Se Sp Te. Example: pkg:/images/overhang\\_hd.png", + "name": "OverhangSliceHD", + "type": "string" + }, + { + "default": "invalid", + "description": "URI for the overhang slice (thin piece of top of screen border). Screen types: Co Ke Li Pa Po Se Sp Te. Example: pkg:/images/overhang\\_sd.png", + "name": "OverhangSliceSD", + "type": "string" + }, + { + "default": "invalid", + "description": "HTML HEX Color Value. Screen types: Co Pa Te. Example: #FF00FF", + "name": "ParagraphBodyText", + "type": "string" + }, + { + "default": "invalid", + "description": "HTML HEX Color Value. Screen types: Co Pa Te. Example: #FF00FF", + "name": "ParagraphHeaderText", + "type": "string" + }, + { + "default": "invalid", + "description": "HTML HEX Color Value. Screen types: Po. Example: #FF00FF", + "name": "PosterScreenLine1Text", + "type": "string" + }, + { + "default": "invalid", + "description": "HTML HEX Color Value. Screen types: Po. Example: #FF00FF", + "name": "PosterScreenLine2Text", + "type": "string" + }, + { + "default": "invalid", + "description": "HTML HEX Color Value. Screen types: Co. Example: #FF00FF", + "name": "RegistrationCodeColor", + "type": "string" + }, + { + "default": "invalid", + "description": "HTML HEX Color Value. Screen types: Co. Example: #FF00FF", + "name": "RegistrationFocalColor", + "type": "string" + }, + { + "default": "invalid", + "description": "HTML HEX Color Value. Screen types: Co. Example: #10FF80", + "name": "RegistrationFocalRectColor", + "type": "string" + }, + { + "default": "invalid", + "description": "Position and size of the HD focal rectangle. Four integer: (x,y,width,height). Screen types: Co. Example: (228,360,120,82)", + "name": "RegistrationFocalRectHD", + "type": "string" + }, + { + "default": "invalid", + "description": "Position and size of the SD focal rectangle. Four integer: (x,y,width,height). Screen types: Co. Example: (172,220,90,76)", + "name": "RegistrationFocalRectSD", + "type": "string" + }, + { + "default": "invalid", + "description": "HTML HEX Color Value. Screen types: Sp. Example: #FF00FF", + "name": "SpringboardActorColor", + "type": "string" + }, + { + "default": "invalid", + "description": "HTML HEX Color Value. Screen types: Sp. Example: #FF00FF", + "name": "SpringboardAlbumColor", + "type": "string" + }, + { + "default": "invalid", + "description": "Album Label. Screen types: Sp. Example: on", + "name": "SpringboardAlbumLabel", + "type": "string" + }, + { + "default": "invalid", + "description": "HTML HEX Color Value. Screen types: Sp. Example: #FF00FF", + "name": "SpringboardAlbumLabelColor", + "type": "string" + }, + { + "default": "invalid", + "description": "boolean string. Screen types: Sp. Example: true", + "name": "SpringboardAllow6Buttons", + "type": "string" + }, + { + "default": "invalid", + "description": "HTML HEX Color Value. Screen types: Sp. Example: #FF00FF", + "name": "SpringboardArtistColor", + "type": "string" + }, + { + "default": "invalid", + "description": "Artist Label. Screen types: Sp. Example: by", + "name": "SpringboardArtistLabel", + "type": "string" + }, + { + "default": "invalid", + "description": "HTML HEX Color Value. Screen types: Sp. Example: #FF00FF", + "name": "SpringboardArtistLabelColor", + "type": "string" + }, + { + "default": "invalid", + "description": "HTML HEX Color Value. Screen types: Sp. Example: #FF00FF", + "name": "SpringboardDirectorColor", + "type": "string" + }, + { + "default": "invalid", + "description": "HTML HEX Color Value. Screen types: Sp. Example: #FF00FF", + "name": "SpringboardDirectorLabelColor", + "type": "string" + }, + { + "default": "invalid", + "description": "HTML HEX Color Value. Screen types: Sp. Example: #FF00FF", + "name": "SpringboardDirectorPrefixText", + "type": "string" + }, + { + "default": "invalid", + "description": "Director Label. Screen types: Sp. Example: Written by", + "name": "SpringboardDirectorText", + "type": "string" + }, + { + "default": "invalid", + "description": "HTML HEX Color Value. Screen types: Sp. Example: #FF00FF", + "name": "SpringboardGenreColor", + "type": "string" + }, + { + "default": "invalid", + "description": "HTML HEX Color Value. Screen types: Sp. Example: #FF00FF", + "name": "SpringboardRuntimeColor", + "type": "string" + }, + { + "default": "invalid", + "description": "HTML HEX Color Value. Screen types: Sp. Example: #FF00FF", + "name": "SpringboardSynopsisColor", + "type": "string" + }, + { + "default": "invalid", + "description": "HTML HEX Color Value. Screen types: Sp. Example: #FF00FF", + "name": "SpringboardTitleText", + "type": "string" + }, + { + "default": "invalid", + "description": "HTML HEX Color Value. Must be a grayscale value. Screen types: Te. Example: #808080", + "name": "TextScreenBodyBackgroundColor", + "type": "string" + }, + { + "default": "invalid", + "description": "HTML HEX Color Value. Screen types: Te. Example: #363636", + "name": "TextScreenBodyText", + "type": "string" + }, + { + "default": "invalid", + "description": "HTML HEX Color Value. Screen types: Te. Example: #CC0000", + "name": "TextScreenScrollBarColor", + "type": "string" + }, + { + "default": "invalid", + "description": "HTML HEX Color Value. Screen types: Te. Example: #00CC00", + "name": "TextScreenScrollThumbColor", + "type": "string" + }, + { + "default": "invalid", + "description": "Theme type. Generic-dark is the only valid value. Otherwise the default theme applies. Screen types: . Example: generic-dark", + "name": "ThemeType", + "type": "string" + } + ] + }, + "ifappinfo": { + "implementers": [ + { + "description": "Returns information about the application", + "name": "roAppInfo", + "url": "https://developer.roku.com/docs/references/brightscript/components/roappinfo.md" + } + ], + "methods": [ + { + "description": "Returns the app's developer ID, or the keyed developer ID, if the application is sideloaded.", + "name": "GetDevID", + "params": [], + "returnDescription": "Channel's Developer ID", + "returnType": "String" + }, + { + "description": "Returns the app's channel ID.", + "name": "GetID", + "params": [], + "returnDescription": "Channel ID; e.g., \"12345\" or \"dev\"", + "returnType": "String" + }, + { + "description": "Returns the subtitle value from the manifest.", + "name": "GetSubtitle", + "params": [], + "returnDescription": "Possible subtitle configuration", + "returnType": "String" + }, + { + "description": "Returns the title value from the manifest.", + "name": "GetTitle", + "params": [], + "returnDescription": "Title of the channel", + "returnType": "String" + }, + { + "description": "Returns the named manifest value, or an empty string if the entry is does not exist.", + "name": "GetValue", + "params": [ + { + "default": null, + "description": "The manifest value to be returned.", + "isRequired": true, + "name": "key", + "type": "String" + } + ], + "returnDescription": "Manifest value; empty string", + "returnType": "String" + }, + { + "description": "Returns the conglomerate version number from the manifest, as formatted major\\_version + minor\\_version + build\\_version.", + "name": "GetVersion", + "params": [], + "returnDescription": "Channel version number. e.g. \"1.2.3\"", + "returnType": "String" + }, + { + "description": "Returns true if the application is sideloaded, i.e. the channel ID is \"dev\".", + "name": "IsDev", + "params": [], + "returnDescription": "True/ False", + "returnType": "Boolean" + } + ], + "name": "ifAppInfo", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifappinfo.md" + }, + "ifappmanager": { + "implementers": [ + { + "description": "Returns information about the application", + "name": "roAppManager", + "url": "https://developer.roku.com/docs/references/brightscript/components/roappmanager.md" + } + ], + "methods": [ + { + "description": "Clears a previously set attribute and reverts to its default value.", + "name": "ClearThemeAttribute", + "params": [ + { + "default": null, + "description": "The theme attribute to be cleared.", + "isRequired": true, + "name": "attributeName", + "type": "String" + } + ], + "returnType": "Void" + }, + { + "description": "Returns the user's screensaver wait time setting in number of minutes, or zero if the screensaver is disabled.", + "name": "GetScreensaverTimeout", + "params": [], + "returnDescription": "The number of minutes set for the screensaver wait time.", + "returnType": "Integer" + }, + { + "description": "Returns an [roTimespan](https://developer.roku.com/docs/references/brightscript/components/rotimespan.md\"roTimespan\") object, which is \"marked\" when the user clicked on the application button on the home screen.Calling the TotalMilliseconds() method on the returned roTimespan object returns the total number of milliseconds since the application started.", + "name": "GetUptime", + "params": [], + "returnDescription": "An [roTimespan](/docs/references/brightscript/components/rotimespan.md \"roTimespan\") object.", + "returnType": "Object" + }, + { + "description": "This method returns true if a channel with the specified channelID and the minimum version required is installed.", + "name": "IsAppInstalled", + "params": [ + { + "default": null, + "description": "The unique id of the channel.", + "isRequired": true, + "name": "channelID", + "type": "String" + }, + { + "default": null, + "description": "The minimum version number of the channel to be used for the query.", + "isRequired": true, + "name": "version", + "type": "String" + } + ], + "returnDescription": "A boolean indicating whether the specified channel is installed.", + "returnType": "Boolean" + }, + { + "description": "Launches the channel with the specified channelID and the specified version, with the playback experience upon launching the channel based on the provided params.", + "name": "LaunchApp", + "params": [ + { + "default": null, + "description": "The unique ID of the channel to be launched.", + "isRequired": true, + "name": "channelID", + "type": "String" + }, + { + "default": null, + "description": "The minimum version of the channel required to launch the channel. If the specified version (or later) is not being used, the channel is not launched. To skip the version check, pass an empty string.", + "isRequired": true, + "name": "version", + "type": "String" + }, + { + "default": null, + "description": "Key-value pairs specifying the playback experience upon launching the channel. For example, if deep linking parameters are passed into the method, the content ID specifies the content to be played upon launching the channel, and the mediaType determines whether the content is launched directly into playback, launched into playback using bookmarks, or an episode selection screen for the content is displayed). To launch the channel store springboard of a channel, use the **ShowChannelStoreSpringboard()** method. You can also do this by passing a channelID of \"11\" is passed into this method (`LaunchApp(\"11\", \"\", params)`). In this case, the params field would include a content ID (`params = {contentID: \"myAwesomeMovie_123\"}`).", + "isRequired": true, + "name": "params", + "type": "roAssociative Array" + } + ], + "returnType": "Void" + }, + { + "description": "Enables or disables automatic Audio Guide and override any manifest setting.This is useful for channels that want to temporarily turn off automatic Audio Guide for specific screens.", + "name": "SetAutomaticAudioGuideEnabled", + "params": [ + { + "default": null, + "description": "A flag indicating whether to enable or disable the automatic audio guide.", + "isRequired": true, + "name": "enabled", + "type": "Boolean" + } + ], + "returnType": "Void" + }, + { + "description": "Updates video or audio [content metadata](/docs/developer-program/getting-started/architecture/content-metadata.md) during playback. This method takes a subset of content metadata parameters to be updated. These values override any previously ones sent to the Roku Media Player, and they are used until this function is called again or until the [**roAppManager**](https://developer.roku.com/docs/references/brightscript/components/roappmanager.md instance is deleted.", + "name": "SetNowPlayingContentMetaData", + "params": [ + { + "default": null, + "description": "The video or audio [content metadata](/docs/developer-program/getting-started/architecture/content-metadata.md) parameters to be updated (for example, the title and contentType)", + "isRequired": true, + "name": "contentMetaData", + "type": "roAssociativeArray" + } + ], + "returnType": "Void" + }, + { + "description": "Sets a group of theme attributes for the application.", + "name": "SetTheme", + "params": [ + { + "default": null, + "description": "The attributeArray is an [roAssociativeArray](https://developer.roku.com/docs/references/brightscript/components/roassociativearray.md\"roAssociativeArray\") of attribute/value pairs. The program may create the roAssociativeArray at runtime or read it from an XML file using the [roXMLElement](https://developer.roku.com/docs/references/brightscript/components/roxmlelement.md\"roXMLElement\") object. Existing values for attributes will be overwritten by the values provided. Any values set by a previous SetTheme or SetThemeAttribute call, but not included in the array currently provided by with the subsequent call will remain unchanged. See [roAppManager](https://developer.roku.com/docs/references/brightscript/components/roappmanager.md\"roAppManager\") the list of valid attributes.", + "isRequired": true, + "name": "attributeArray", + "type": "Object" + } + ], + "returnType": "Void" + }, + { + "description": "Set an individual theme attribute for the application.", + "name": "SetThemeAttribute", + "params": [ + { + "default": null, + "description": "The attributeName is the name of one of the settable theme attributes and the value is the desired setting. If the attributeName is not valid, no action is performed.", + "isRequired": true, + "name": "attributeName", + "type": "String" + }, + { + "default": null, + "description": "This attributeValue will override the default value for that attribute or modify the value provided by a previous SetTheme or SetThemeAttribute call to the new value provided.", + "isRequired": true, + "name": "attributeValue", + "type": "String" + } + ], + "returnType": "Void" + }, + { + "description": "This method allows a channel to tell Roku when the user is signed in or signed out of the channelIf the channel is removed, the Roku OS will call SetUserSignedIn(false) on the channel's behalf.", + "name": "SetUserSignedIn", + "params": [ + { + "default": null, + "description": "Set to true to indicate that the user is signed in; set to false to indicate the user is signed out.", + "isRequired": true, + "name": "signedIn", + "type": "Boolean" + } + ], + "returnType": "Void" + }, + { + "description": "Launches the channel store springboard of the specified channel. The channel store springboard contains detailed information about the channel, including ratings, version, date of last update, developer name, and a description.", + "name": "ShowChannelStoreSpringboard", + "params": [ + { + "default": null, + "description": "The unique ID of the channel to be launched.", + "isRequired": true, + "name": "channelID", + "type": "String" + } + ], + "returnType": "Void" + } + ], + "name": "ifAppManager", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifappmanager.md" + }, + "ifarray": { + "implementers": [ + { + "description": "An array stores an indexed collection of BrightScript objects. Each entry of an array can be a different type, or they may all of the same type", + "name": "roArray", + "url": "https://developer.roku.com/docs/references/brightscript/components/roarray.md" + }, + { + "description": "The byte array component is used to contain and manipulate an arbitrary array of bytes", + "name": "roByteArray", + "url": "https://developer.roku.com/docs/references/brightscript/components/robytearray.md" + }, + { + "description": "The list object implements the interfaces: ifList, ifArray, ifEnum and therefore can behave like an array that can dynamically add members", + "name": "roList", + "url": "https://developer.roku.com/docs/references/brightscript/components/rolist.md" + }, + { + "description": "Contains a list of roXML objects", + "name": "roXMLList", + "url": "https://developer.roku.com/docs/references/brightscript/components/roxmllist.md" + } + ], + "methods": [ + { + "description": "Appends the entries in one **roArray** to another. If the passed array contains entries that have not been set to a value, they are not appended.", + "name": "Append", + "params": [ + { + "default": null, + "description": "The **roArray** to be appended to the target array.", + "isRequired": true, + "name": "array", + "type": "Object" + } + ], + "returnType": "Void" + }, + { + "description": "Deletes all the entries in the array.", + "name": "Clear", + "params": [], + "returnType": "Void" + }, + { + "description": "Returns the length of the array, which is one more than the index of highest entry.", + "name": "Count", + "params": [], + "returnDescription": "The length of the array.", + "returnType": "Integer" + }, + { + "description": "Deletes the indicated array entry, and shifts all entries up. This decreases the array length by one.", + "name": "Delete", + "params": [ + { + "default": null, + "isRequired": true, + "name": "index", + "type": "Integer" + } + ], + "returnDescription": "A flag indicating whether the specified array entry has been removed. If the entry was successfully deleted, returns true. If index is out of range, returns false and does not change the array.", + "returnType": "Boolean" + }, + { + "description": "Returns the last (highest index) array entry without removing it. If the array is empty, returns invalid", + "name": "Peek", + "params": [], + "returnDescription": "Invalid", + "returnType": "Dynamic" + }, + { + "description": "Returns the last entry (highest index) from the array and removes it from the array. If the array is empty, returns invalid and does not change the array.", + "name": "Pop", + "params": [], + "returnDescription": "The last (highest index) array entry.", + "returnType": "Dynamic" + }, + { + "description": "Adds the specified value to the end of the array.", + "name": "Push", + "params": [ + { + "default": null, + "description": "The value to be added to the beginning of the array.", + "isRequired": true, + "name": "tvalue", + "type": "Dynamic" + } + ], + "returnType": "Void" + }, + { + "description": "Removes the first entry (zero index) from the beginning of the array and shifts the other entries up. This method is similar to the [Pop method](#pushtvalue-as-dynamic-as-void), but removes the first entry in the array instead of the last.", + "name": "Shift", + "params": [], + "returnDescription": "The first entry (zero index) removed from the array.", + "returnType": "Dynamic" + }, + { + "description": "Adds the specified value to the beginning of the array (at the zero index) and shifts the other entries down. This method is similar to the [Push method](#push-as-dynamic), but removes the first entry in the array instead of the last.", + "name": "Unshift", + "params": [ + { + "default": null, + "description": "The value to be added to the beginning of the array.", + "isRequired": true, + "name": "tvalue", + "type": "Dynamic" + } + ], + "returnType": "Void" + } + ], + "name": "ifArray", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifarray.md" + }, + "ifarrayget": { + "description": "The ifArrayGet interface supports the array indexing operator \\[ \\]\n\n(See [Array Operator](https://developer.roku.com/docs/references/brightscript/language/expressions-variables-types.mdeffects-of-type-conversions-on-accuracy \"Array Operator\"))", + "implementers": [ + { + "description": "An array stores an indexed collection of BrightScript objects. Each entry of an array can be a different type, or they may all of the same type", + "name": "roArray", + "url": "https://developer.roku.com/docs/references/brightscript/components/roarray.md" + }, + { + "description": "The byte array component is used to contain and manipulate an arbitrary array of bytes", + "name": "roByteArray", + "url": "https://developer.roku.com/docs/references/brightscript/components/robytearray.md" + }, + { + "description": "The list object implements the interfaces: ifList, ifArray, ifEnum and therefore can behave like an array that can dynamically add members", + "name": "roList", + "url": "https://developer.roku.com/docs/references/brightscript/components/rolist.md" + }, + { + "description": "Contains a list of roXML objects", + "name": "roXMLList", + "url": "https://developer.roku.com/docs/references/brightscript/components/roxmllist.md" + } + ], + "methods": [ + { + "description": "Returns an array entry based on the provided index.", + "name": "GetEntry", + "params": [ + { + "default": null, + "description": "The index of the array entry to be returned.", + "isRequired": true, + "name": "index", + "type": "Integer" + } + ], + "returnDescription": "The array entry corresponding to the provided index, or invalid if the entry has not been set.", + "returnType": "Dynamic" + } + ], + "name": "ifArrayGet", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifarrayget.md" + }, + "ifarrayjoin": { + "implementers": [ + { + "description": "Returns information about the application", + "name": "roArray", + "url": "https://developer.roku.com/docs/references/brightscript/components/roarray.md" + } + ], + "methods": [ + { + "description": "Creates a string by joining all array elements together separated by the specified separator. All elements must be of type string; otherwise, an empty string is returned", + "name": "Join", + "params": [ + { + "default": null, + "description": "The string used to separate elements in an array.", + "isRequired": true, + "name": "separator", + "type": "String" + } + ], + "returnDescription": "A String containing the array elements.", + "returnType": "String" + } + ], + "name": "ifArrayJoin", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifarrayjoin.md" + }, + "ifarrayset": { + "description": "The ifArraySet interface supports the array indexing operator \\[\\].\n\n(See ArrayOperator)", + "implementers": [ + { + "description": "An array stores an indexed collection of BrightScript objects. Each entry of an array can be a different type, or they may all of the same type", + "name": "roArray", + "url": "https://developer.roku.com/docs/references/brightscript/components/roarray.md" + }, + { + "description": "The byte array component is used to contain and manipulate an arbitrary array of bytes", + "name": "roByteArray", + "url": "https://developer.roku.com/docs/references/brightscript/components/robytearray.md" + }, + { + "description": "The list object implements the interfaces: ifList, ifArray, ifEnum and therefore can behave like an array that can dynamically add members", + "name": "roList", + "url": "https://developer.roku.com/docs/references/brightscript/components/rolist.md" + }, + { + "description": "Contains a list of roXML objects", + "name": "roXMLList", + "url": "https://developer.roku.com/docs/references/brightscript/components/roxmllist.md" + } + ], + "methods": [ + { + "description": "Sets an entry at a given index to the passed value. If index is beyond the bounds of the array, the array is expanded to accommodate it.", + "name": "SetEntry", + "params": [ + { + "default": null, + "description": "The entry to be updated.", + "isRequired": true, + "name": "index", + "type": "Integer" + }, + { + "default": null, + "description": "The new value for the specified entry.", + "isRequired": true, + "name": "tvalue", + "type": "Dynamic" + } + ], + "returnType": "Void" + } + ], + "name": "ifArraySet", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifarrayset.md" + }, + "ifarraysort": { + "implementers": [ + { + "description": "Returns information about the application", + "name": "roArray", + "url": "https://developer.roku.com/docs/references/brightscript/components/roarray.md" + } + ], + "methods": [ + { + "description": "Reverses the order of elements in an array.", + "name": "Reverse", + "params": [], + "returnType": "Void" + }, + { + "description": "Performs a stable sort on an array.", + "name": "Sort", + "params": [ + { + "default": null, + "description": "Items are arbitrarily grouped by comparable type of number or string, and are sorted within the group with a logical comparison. If \"r\" is included in flags, a reverse sort is performed. If \"i\" is included in flags, a case-insensitive sort is performed. If invalid flags are specified, the sort is not performed.", + "isRequired": true, + "name": "flags", + "type": "Dynamic" + } + ] + }, + { + "description": "Performs a stable sort of an array of associative arrays by value of a common field.", + "name": "SortBy", + "params": [ + { + "default": null, + "description": "The field to be used for sorting.", + "isRequired": true, + "name": "fieldName", + "type": "String" + }, + { + "default": null, + "description": "Items are arbitrarily grouped by comparable type of number or string, and are sorted within the group with a logical comparison. If \"r\" is included in flags, a reverse sort is performed. If \"i\" is included in flags, a case-insensitive sort is performed. If invalid flags are specified, the sort is not performed.", + "isRequired": true, + "name": "flags", + "type": "Dynamic" + } + ] + } + ], + "name": "ifArraySort", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifarraysort.md" + }, + "ifassociativearray": { + "implementers": [ + { + "description": "An associative array allows objects to be associated with string keys", + "name": "roAssociativeArray", + "url": "https://developer.roku.com/docs/references/brightscript/components/roassociativearray.md" + }, + { + "description": "The roSGNode object is the BrightScript equivalent of SceneGraph XML file node creation", + "name": "roSGNode", + "url": "https://developer.roku.com/docs/references/brightscript/components/rosgnode.md" + } + ], + "methods": [ + { + "description": "Adds a new entry to the array associating the supplied value with the supplied key string. Only one value may be associated with a key. If the key is already associated with a value, the existing value is discarded.", + "name": "AddReplace", + "params": [ + { + "default": null, + "description": "The key to be added to the associative array.", + "isRequired": true, + "name": "key", + "type": "String" + }, + { + "default": null, + "description": "The value of the key to be added to the associative array.", + "isRequired": true, + "name": "value", + "type": "Dynamic" + } + ], + "returnType": "Void" + }, + { + "description": "Appends an associative array to this calling object. If any key in the **aa** parameter is already associated with a value in the calling object, the current value is discarded and is replaced with the value provided in the **aa** parameter.", + "name": "Append", + "params": [ + { + "default": null, + "description": "The associative array to be appended to the calling object.", + "isRequired": true, + "name": "aa", + "type": "Object" + } + ] + }, + { + "description": "Remove all key/values from the associative array.", + "name": "Clear", + "params": [], + "returnType": "Void" + }, + { + "description": "Returns the number of keys in the associative array.", + "name": "Count", + "params": [], + "returnDescription": "The number of keys in the associative array.", + "returnType": "Integer" + }, + { + "description": "Deletes an entry from an associative array based on the key.", + "name": "Delete", + "params": [ + { + "default": null, + "description": "The key associated with the entry to be deleted.", + "isRequired": true, + "name": "key", + "type": "String" + } + ], + "returnDescription": "A flag indicating whether an entry is associated with the specified key exists. If there is no associated object then false is returned. If there is such an object then true is returned.", + "returnType": "Boolean" + }, + { + "description": "Looks for an entry in the associative array associated with the specified key.", + "name": "DoesExist", + "params": [ + { + "default": null, + "description": "The key associated with the entry to be checked.", + "isRequired": true, + "name": "key", + "type": "String" + } + ], + "returnDescription": "A flag indicating whether an entry is associated with the specified key exists. If there is no associated object then false is returned. If there is such an object then true is returned.", + "returnType": "Boolean" + }, + { + "description": "Returns an array containing the associative array key/value pairs in lexicographical order of key.", + "name": "Items", + "params": [], + "returnDescription": "An array of associative array keys/value pairs.", + "returnType": "Object" + }, + { + "description": "Returns an array containing the associative array keys in lexicographical order.", + "name": "Keys", + "params": [], + "returnDescription": "An array of associative array keys.", + "returnType": "Object" + }, + { + "description": "Returns the value in the array associated with the specified key. The key comparison is case-insensitive, unless the **SetModeCaseSensitive()** method has been called.", + "name": "Lookup", + "params": [ + { + "default": null, + "description": "The key associated with the value to be retrieved from the associative array.", + "isRequired": true, + "name": "key", + "type": "String" + } + ], + "returnDescription": "Returns the value in the array associated with the specified key. If there is no value associated with the key, the type \"invalid\" is returned.", + "returnType": "Dynamic" + }, + { + "description": "Same as the [Lookup()](#lookupkey-as-string-as-dynamic) method except that the key comparison is always case insensitive, regardless of the case mode.", + "name": "LookupCI", + "params": [ + { + "default": null, + "description": "The key (case-insensitive) associated with the value to be retrieved from the associative array.", + "isRequired": true, + "name": "key", + "type": "String" + } + ], + "returnDescription": "Returns the value in the array associated with the specified key. If there is no value associated with the key, the type \"invalid\" is returned.", + "returnType": "Dynamic" + }, + { + "description": "Makes all subsequent associative array lookups case sensitive (by default, lookups are case insensitive).", + "name": "SetModeCaseSensitive", + "params": [], + "returnType": "Void" + } + ], + "name": "ifAssociativeArray", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifassociativearray.md" + }, + "ifaudioguide": { + "description": "> Please note this component is only available on the following devices: Roku Streaming Stick (3600X), Roku Express (3700X) and Express+ (3710X), Roku Premiere (4620X) and Premiere+ (4630X), Roku Ultra (4640X), and any Roku TV running Roku OS version 7.5 and later.", + "implementers": [ + { + "description": "Returns information about the application", + "name": "roAudioGuide", + "url": "https://developer.roku.com/docs/references/brightscript/components/roaudioguide.md" + } + ], + "methods": [ + { + "description": "Interrupts and stops any current text to speech spoken string, to be used when the application does not want the text to speech to continue.", + "name": "Flush", + "params": [] + }, + { + "description": "Returns an ID for the spoken string to notify observer callbacks about a specific spoken string. This ID can be used with the [roTextToSpeechEvent](https://developer.roku.com/docs/references/brightscript/events/rotexttospeechevent.md\"roTextToSpeechEvent\").This method will automatically split up text to reduce lag. Due to this automatic splitting, the roTextToSpeechEvent 0 (\"Started speech\") event for the returned ID may not be sent until later than expected. The roTextToSpeechEvents 1 (\"Speech has completed\") and 2 (\"Speech has been flushed\") events are sent at the expected times.", + "name": "Say", + "params": [ + { + "default": null, + "description": "The string to be spoken.", + "isRequired": true, + "name": "text", + "type": "String" + }, + { + "default": null, + "description": "Set to true to make the Audio Guide immediately stop speaking any other speech before speaking. Set to false to make the Audio Guide wait until any current speech is done before speaking.", + "isRequired": true, + "name": "flushSpeech", + "type": "Boolean" + }, + { + "default": null, + "description": "Set to true to ignore calls to the say() method with the same text. Set to false to speak when calls to the say() method are sent with the same text.", + "isRequired": true, + "name": "dontRepeat", + "type": "Boolean" + } + ], + "returnDescription": "An ID associated with the spoken string to be used to notify observer callbacks.", + "returnType": "Integer" + }, + { + "description": "If Audio Guide is enabled, causes text to speech to continue to suppress any application background sound for the amount of time specified by duration (in milliseconds).This can be used to add clarity for longer spoken text that may have pauses that might otherwise allow application background sound to be heard. This method does nothing if Audio Guide is currently disabled.", + "name": "Silence", + "params": [ + { + "default": null, + "description": "The number of milliseconds to suppress application background sounds.", + "isRequired": true, + "name": "duration", + "type": "Integer" + } + ], + "returnDescription": "The number of milliseconds that the background sound has been silenced.", + "returnType": "Integer" + } + ], + "name": "ifAudioGuide", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifaudioguide.md" + }, + "ifaudiometadata": { + "implementers": [ + { + "description": "This component provides developers access to audio file metadata included in many audio files", + "name": "roAudioMetadata", + "url": "https://developer.roku.com/docs/references/brightscript/components/roaudiometadata.md" + } + ], + "methods": [ + { + "description": "Returns an associative array with a simple set of audio properties.", + "name": "GetAudioProperties", + "params": [], + "returnDescription": "An associative array that may be set to one of the following values (these are values that may involve reading a larger portion of the file and thus may take longer to retrieve than tags):", + "returnType": "Object" + }, + { + "description": "Returns the cover art, if available.", + "name": "GetCoverArt", + "params": [], + "returnDescription": "An associative array with two entries: \"bytes\" and \"type\".", + "returnType": "Object" + }, + { + "description": "Returns an associative array that contains a simple set of tags that are common to most audio formats.", + "name": "GetTags", + "params": [], + "returnDescription": "An associative array that may be set to one of the following values:", + "returnType": "Object" + }, + { + "description": "Sets the URL to the audio file. Only file URLs are initially supported", + "name": "SetUrl", + "params": [ + { + "default": null, + "description": "The URL of the audio file.", + "isRequired": true, + "name": "url", + "type": "String" + } + ], + "returnType": "Void" + } + ], + "name": "ifAudioMetaData", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifaudiometadata.md" + }, + "ifaudioplayer": { + "implementers": [ + { + "description": "The Audio Player object provides the ability to setup the playing of a series of audio streams", + "name": "roAudioMetadata", + "url": "https://developer.roku.com/docs/references/brightscript/components/roaudiometadata.md" + } + ], + "methods": [ + { + "description": "Adds a new ContentMetaData item to the end of the content list for the Audio Player.", + "name": "AddContent", + "params": [ + { + "default": null, + "description": "The new ContentMetaData item to be added to the content list.", + "isRequired": true, + "name": "contentItem", + "type": "Object" + } + ], + "returnType": "Void" + }, + { + "description": "Clears the content list.", + "name": "ClearContent", + "params": [], + "returnType": "Void" + }, + { + "description": "Puts the Audio Player into pause mode. It is an error to Pause if player is not in play mode.", + "name": "Pause", + "params": [], + "returnDescription": "A flag indicating whether the Audio Player was successfully set to pause mode.", + "returnType": "Boolean" + }, + { + "description": "Puts the Audio Player into play mode starting at the current item in the Content List. This will stop any currently playing content.", + "name": "Play", + "params": [], + "returnDescription": "A flag indicating whether the Audio Player was successfully set to play mode.", + "returnType": "Boolean" + }, + { + "description": "Puts the Audio Player into play mode starting from the pause point. It is an error to Resume if the player is not in pause mode.", + "name": "Resume", + "params": [], + "returnDescription": "A flag indicating whether the Audio Player was successfully set to play mode.", + "returnType": "Boolean" + }, + { + "description": "Set the start point of playback for the current item to offsetMs milliseconds.", + "name": "Seek", + "params": [ + { + "default": null, + "description": "The offset to be used to determine the start point of the current content item.", + "isRequired": true, + "name": "offsetMs", + "type": "Integer" + } + ], + "returnDescription": "A flag indicating whether the Audio Player was successfully set to the specified offset.", + "returnType": "Boolean" + }, + { + "description": "Sets the content list to be played by the Audio Player.", + "name": "SetContentList", + "params": [ + { + "default": null, + "isRequired": true, + "name": "contentList", + "type": "Object" + } + ], + "returnType": "Void" + }, + { + "description": "Enables/disables the automatic replaying of the Content List.", + "name": "SetLoop", + "params": [ + { + "default": null, + "description": "Set to true to have the Audio Player automatically begin playing the first item in the content list after playing the last item. Set to false to have the Audio Player stop after playing the last item in the content list.", + "isRequired": true, + "name": "enable", + "type": "Boolean" + } + ], + "returnType": "Void" + }, + { + "description": "Sets the next item in the Content List to be played.", + "name": "SetNext", + "params": [ + { + "default": null, + "description": "Item is the zero-based index of the item in the content list. This item will be played after the currently playing item finishes.", + "isRequired": true, + "name": "item", + "type": "Integer" + } + ], + "returnType": "Void" + }, + { + "description": "Specifies the timedMetaData keys that the channel is interested in receiving from the timedMetaData event.", + "name": "SetTimedMetaDataForKeys", + "params": [ + { + "default": null, + "isRequired": true, + "name": "keys" + } + ] + }, + { + "description": "Stops the Audio Player from playing or pausing and cleanup.", + "name": "Stop", + "params": [], + "returnDescription": "A flag indicating whether the Audio Player was successfully stopped.", + "returnType": "Boolean" + } + ], + "name": "ifAudioPlayer", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifaudioplayer.md" + }, + "ifaudioresource": { + "implementers": [ + { + "description": "The roAudioResouce allows .wav files to be cached to memory and quickly played at any time", + "name": "roAudioResource", + "url": "https://developer.roku.com/docs/references/brightscript/components/roaudioresource.md" + } + ], + "methods": [ + { + "description": "Returns an [roAssociativeArray](https://developer.roku.com/docs/references/brightscript/components/roassociativearray.md\"roAssociativeArray\") array containing the indicated metadata parameters about the audio resource.", + "name": "GetMetaData", + "params": [], + "returnDescription": "An associative array with the following integer values:", + "returnType": "Object" + }, + { + "description": "Checks whether this audio resource is currently playing.", + "name": "IsPlaying", + "params": [], + "returnDescription": "A flag indicating whether the calling audio resource is playing.", + "returnType": "Boolean" + }, + { + "description": "Returns the device-dependent maximum number of audio streams that can be mixed together and presented simultaneously.", + "name": "MaxSimulStreams", + "params": [], + "returnDescription": "Typically, 1-2.", + "returnType": "Integer" + }, + { + "description": "Stops playing the audio resource. If the resource is not currently playing, has no effect.", + "name": "Stop", + "params": [], + "returnType": "Void" + }, + { + "description": "This method triggers the start of the audio resource sound playback. The effect of Trigger(volume) is identical to Trigger(volume, 0).", + "name": "Trigger", + "params": [ + { + "default": null, + "description": "The volume is a number between 0 and 100 (percentage of full volume). A value of 50 should be used for normal volume.", + "isRequired": true, + "name": "volume", + "type": "Integer" + } + ], + "returnType": "Void" + }, + { + "description": "Triggers the start of the audio resource sound playback. This method will interrupt any playing sound when the index is the same. It will mix with any playing sound if the index is different.", + "name": "Trigger", + "params": [ + { + "default": null, + "description": "The volume is a number between 0 and 100 (percentage of full volume). 50 should be used for normal volume.", + "isRequired": true, + "name": "volume", + "type": "Integer" + }, + { + "default": null, + "description": "The index is a value between 0 and [MaxSimulStreams()](#maxsimulstreams-as-integer) allowing for multiple sounds to be mixed.", + "isRequired": true, + "name": "index", + "type": "Integer" + } + ], + "returnType": "Void" + } + ], + "name": "ifAudioResource", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifaudioresource.md" + }, + "ifboolean": { + "description": "Interface equivalent for intrinsic type Boolean.", + "implementers": [ + { + "description": "Object equivalent for intrinsic type Boolean", + "name": "roBoolean", + "url": "https://developer.roku.com/docs/references/brightscript/components/roboolean.md" + } + ], + "methods": [ + { + "description": "Gets the boolean value stored in the calling boolean object.", + "name": "GetBoolean", + "params": [], + "returnDescription": "The boolean value stored in the calling boolean object.", + "returnType": "Boolean" + }, + { + "description": "Sets the calling boolean object to the specified true/false value.", + "name": "SetBoolean", + "params": [ + { + "default": null, + "description": "True/false.", + "isRequired": true, + "name": "value", + "type": "Boolean" + } + ], + "returnType": "Void" + } + ], + "name": "ifBoolean", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifboolean.md" + }, + "ifbytearray": { + "implementers": [ + { + "description": "The byte array component is used to contain and manipulate an arbitrary array of bytes", + "name": "roByteArray", + "url": "https://developer.roku.com/docs/references/brightscript/components/robytearray.md" + } + ], + "methods": [ + { + "description": "Appends the contents of the Byte Array to the specified file.", + "name": "AppendFile", + "params": [ + { + "default": null, + "description": "The path to the file to be appended to the ByteArray.", + "isRequired": true, + "name": "path", + "type": "String" + } + ], + "returnDescription": "A flag indicating whether the file was successfully appended to the calling ByteArray.", + "returnType": "Boolean" + }, + { + "description": "Appends the contents of the Byte Array to the specified file.", + "name": "AppendFile", + "params": [ + { + "default": null, + "description": "The path to the file to be appended to the Byte Array.", + "isRequired": true, + "name": "path", + "type": "String" + }, + { + "default": null, + "isRequired": true, + "name": "start" + } + ], + "returnDescription": "A flag indicating whether the file was successfully appended to the calling ByteArray." + }, + { + "description": "Sets the contents of the Byte Array to the specified string using UTF-8 encoding. Any data currently in the Byte Array is discarded.", + "name": "FromAsciiString", + "params": [ + { + "default": null, + "description": "The string to which the ByteArray is to be set.", + "isRequired": true, + "name": "s", + "type": "String" + } + ] + }, + { + "description": "Sets the contents of the Byte Array to the specified value. Any data currently in the Byte Array is discarded.", + "name": "FromBase64String", + "params": [ + { + "default": null, + "description": "A valid base-64 encoding", + "isRequired": true, + "name": "s", + "type": "String" + } + ], + "returnType": "Void" + }, + { + "description": "Sets the contents of the Byte Array to the specified value. Any data currently in the Byte Array is discarded.", + "name": "FromHexString", + "params": [ + { + "default": null, + "description": "An even number of hexadecimal digits. The string must contain valid hexadecimal digits, or the result is undefined", + "isRequired": true, + "name": "hexstring", + "type": "String" + } + ], + "returnType": "Void" + }, + { + "description": "Calculates a CRC-32 of the contents of the Byte Array.", + "name": "GetCRC32", + "params": [], + "returnDescription": "The calculated CRC-32 checksum.", + "returnType": "Integer" + }, + { + "description": "Calculates a CRC-32 of a subset of bytes within the Byte Array.", + "name": "GetCRC32", + "params": [ + { + "default": null, + "description": "The starting index of the subset of bytes to be used in the CRC-32 calculation.", + "isRequired": true, + "name": "start", + "type": "Integer" + }, + { + "default": null, + "description": "The length of the bytes to be included.", + "isRequired": true, + "name": "length", + "type": "Integer" + } + ], + "returnDescription": "The calculated CRC-32 checksum.", + "returnType": "Integer" + }, + { + "description": "Returns the signed byte at the specified zero-based index in the Byte ArrayUse the [ifArrayGet.GetEntry()](https://developer.roku.com/docs/references/brightscript/interfaces/ifarrayget.mdgetentryindex-as-integer-as-dynamic) method or the \\[ \\] array operator to read an unsigned byte in the Byte Array.", + "name": "GetSignedByte", + "params": [ + { + "default": null, + "description": "The index of the signed byte to be returned.", + "isRequired": true, + "name": "index", + "type": "Integer" + } + ], + "returnDescription": "The signed byte at the specified zero-based index in the Byte Array.", + "returnType": "Integer" + }, + { + "description": "Returns the signed long (four bytes) starting at the specified zero-based index in the Byte Array.", + "name": "GetSignedLong", + "params": [ + { + "default": null, + "description": "The index of the ByteArray from which to start retrieving the signed long.", + "isRequired": true, + "name": "index", + "type": "Integer" + } + ], + "returnDescription": "A signed long.", + "returnType": "Integer" + }, + { + "description": "Returns true if the CPU architecture is little-endian.", + "name": "IsLittleEndianCPU", + "params": [], + "returnDescription": "A flag indicating whether the CPU architecture is little-endian.", + "returnType": "Boolean" + }, + { + "description": "Reads the specified file into the Byte Array. Any data currently in the Byte Array is discarded.", + "name": "ReadFile", + "params": [ + { + "default": null, + "description": "The path to the file to be read.", + "isRequired": true, + "name": "path", + "type": "String" + } + ], + "returnDescription": "A flag indicating whether the bytes were successfully read into the Byte Array.", + "returnType": "Boolean" + }, + { + "description": "Reads the specified file into the Byte Array. Any data currently in the Byte Array is discarded.", + "name": "ReadFile", + "params": [ + { + "default": null, + "description": "The path to the file to be read.", + "isRequired": true, + "name": "path", + "type": "String" + }, + { + "default": null, + "isRequired": true, + "name": "start" + } + ], + "returnDescription": "A flag indicating whether the bytes were successfully read into the Byte Array." + }, + { + "description": "If the size of the Byte Array is less than min\\_size, expands the Byte Array to min\\_size. Also sets the auto-resize attribute of the Byte Array to the specified value.", + "name": "SetResize", + "params": [ + { + "default": null, + "isRequired": true, + "name": "min" + } + ] + }, + { + "description": "Returns the contents of the Byte Array as a string. The contents must be valid UTF-8 (or ASCII subset), or the result is undefined", + "name": "ToAsciiString", + "params": [], + "returnDescription": "A String containing the contents of the ByteArray.", + "returnType": "String" + }, + { + "description": "Returns a base-64 string representing the contents of the Byte Array.", + "name": "ToBase64String", + "params": [], + "returnDescription": "A base-64 string representing the contents of the Byte Array.", + "returnType": "String" + }, + { + "description": "Returns a hexadecimal string representing the contents of the Byte Array, two digits per byte.", + "name": "ToHexString", + "params": [], + "returnDescription": "A hexadecimal string.", + "returnType": "String" + }, + { + "description": "Writes the bytes contained in the Byte Array to the specified file.", + "name": "WriteFile", + "params": [ + { + "default": null, + "description": "The path to the file to which the bytes are to be written.", + "isRequired": true, + "name": "path", + "type": "String" + } + ], + "returnDescription": "A flag indicating whether the bytes were successfully written to the file.", + "returnType": "Boolean" + }, + { + "description": "Writes a subset of the bytes contained in the Byte Array to the specified file.", + "name": "WriteFile", + "params": [ + { + "default": null, + "description": "The path to the file to which the bytes are to be written.", + "isRequired": true, + "name": "path", + "type": "String" + }, + { + "default": null, + "isRequired": true, + "name": "start" + } + ], + "returnDescription": "A flag indicating whether the bytes were successfully written to the file." + } + ], + "name": "ifByteArray", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifbytearray.md" + }, + "ifcaptionrenderer": { + "description": "> This component is no longer updated and will be deprecated on January 1st, 2019.Beginning July 1st, 2017, any new channels using this component will be rejected during certification.Beginning January 1st, 2018, any updates to existing channels using this component will be rejected during certification.", + "implementers": [ + { + "description": "Returns information about the application", + "name": "roCaptionRenderer", + "url": "https://developer.roku.com/docs/references/brightscript/components/rocaptionrenderer.md" + } + ], + "methods": [ + { + "description": "The ChangeSubtitleTrack function is used to change the caption source after playback has begun.", + "name": "ChangeSubtitleTrack", + "params": [ + { + "default": null, + "description": "One of the 608 channels or ttml text tracks to be selected. The 608 channels are specified as 'eia608/' where is 1, 2, 3, or 4. The ttml text tracks are specified as 'ism/'.", + "isRequired": true, + "name": "track", + "type": "String" + } + ], + "returnType": "Void" + }, + { + "description": "Returns an roArray of roAssociativeArrays for each closed caption track found in the stream. This function can also be used to retrieve caption URLs for external (sideloaded) caption files.", + "name": "GetSubtitleTracks", + "params": [], + "returnDescription": "Each associative array in the returned array contains track information similar to that specified in the SubtitleTracks content metadata structure:", + "returnType": "Object" + }, + { + "description": "Sets the [roMessagePort](https://developer.roku.com/docs/references/brightscript/components/romessageport.md that should receive [roCaptionRendererEvents](https://developer.roku.com/docs/references/brightscript/events/rocaptionrendererevent.md from the roCaptionRenderer.", + "name": "SetMessagePort", + "params": [ + { + "default": null, + "isRequired": true, + "name": "port", + "type": "Object" + } + ], + "returnType": "Void" + }, + { + "description": "Sets the rendering mode for the [roCaptionRenderer](https://developer.roku.com/docs/references/brightscript/components/rocaptionrenderer.md\"roCaptionRenderer\").", + "name": "SetMode", + "params": [ + { + "default": null, + "isRequired": true, + "name": "mode", + "type": "Integer" + } + ], + "returnType": "Void" + }, + { + "description": "Sets the [roScreen](https://developer.roku.com/docs/references/brightscript/components/roscreen.md or [roImageCanvas](https://developer.roku.com/docs/references/brightscript/components/roimagecanvas.md instance associated with this caption renderer.This function only needs to be called if the roCaptionRenderer mode is set to 1 (the default value). In this case, the Roku OS is responsible for all of the closed caption text rendering, and thus must know what screen to draw on.If the mode is set to 2, the BrightScript channel is responsible for all of the caption drawing, and thus the Roku OS does not need to be informed as to what screen is being rendered on.", + "name": "SetScreen", + "params": [ + { + "default": null, + "description": "The [roScreen](https://developer.roku.com/docs/references/brightscript/components/roscreen.md or [roImageCanvas](https://developer.roku.com/docs/references/brightscript/components/roimagecanvas.md instance to be associated with this caption renderer.", + "isRequired": true, + "name": "screen", + "type": "roScreen or roImageCanvas" + } + ], + "returnType": "Void" + }, + { + "description": "Specifies whether the roCaptionRenderer displays captions. This function behaves the same as [ifVideoScreen.ShowSubtitle()](https://developer.roku.com/docs/references/brightscript/interfaces/ifvideoscreen.md\"ifVideoScreen.ShowSubtitle/(/)\").", + "name": "ShowSubtitle", + "params": [ + { + "default": null, + "description": "A flag indicating whether the roCaptionRenderer displays captions.", + "isRequired": true, + "name": "enable", + "type": "Boolean" + } + ], + "returnType": "Void" + }, + { + "description": "For roCaptionRenderer instances with the mode set to 1, this method tells the Roku OS to render the current caption. If the mode is 2, this function does nothing", + "name": "UpdateCaption", + "params": [], + "returnType": "Void" + } + ], + "name": "ifCaptionRenderer", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifcaptionrenderer.md" + }, + "ifchannelstore": { + "implementers": [ + { + "description": "allows the application to perform a purchase of an In-Channel Product or upgrade a channel", + "name": "roChannelStore", + "url": "https://developer.roku.com/docs/references/brightscript/components/rochannelstore.md" + } + ], + "methods": [ + { + "name": "ClearOrder", + "params": [], + "returnType": "Void" + }, + { + "description": "Applies a change in quantity to one item in the current Order (shopping cart).", + "name": "DeltaOrder", + "params": [ + { + "default": null, + "description": "The product identifier.", + "isRequired": true, + "name": "code", + "type": "String" + }, + { + "default": null, + "description": "The quantity purchased. This may be a negative number.", + "isRequired": true, + "name": "qty", + "type": "Integer" + } + ], + "returnType": "Integer" + }, + { + "description": "Displays the Roku Channel Store Product Purchase Screen populated with information from the current Order.", + "name": "DoOrder", + "params": [], + "returnDescription": "A flag indicating whether the user approved the order (true if the order was approved; false otherwise).", + "returnType": "Boolean" + }, + { + "description": "This test mode short circuits communication to the Roku Channel store. It makes other methods get their responses to async queries and operations from configuration files, rather than actual server communication.", + "name": "FakeServer", + "params": [ + { + "default": null, + "description": "If enable is true, enables a test mode for the roChannelStore component.", + "isRequired": true, + "name": "enable", + "type": "Boolean" + } + ], + "returnType": "Void" + }, + { + "description": "Requests the list of In-Channel products that are linked to the running channel.", + "name": "GetCatalog", + "params": [], + "returnType": "Void" + }, + { + "description": "Retrieves a Roku Partner Unique Customer Identifier (roku\\_pucid), or retrieves an access token, oAuth token, or other authentication artifact (channel\\_data).", + "name": "GetChannelCred", + "params": [], + "returnDescription": "An associative array that contains the following fields:", + "returnType": "Object" + }, + { + "description": "Returns a unique number for this object that can be used to identify whether a roChannelStoreEvent event originated from this object, by comparing with the roChannelStoreEvent object's GetSourceIdentity() value.", + "name": "GetIdentity", + "params": [], + "returnDescription": "The unique number generated for the object.", + "returnType": "Integer" + }, + { + "description": "Retrieves the current Order.", + "name": "GetOrder", + "params": [], + "returnDescription": "The returned object is an roList of roAssociativeArray items, where each item contains the following parameter names with specified value type:", + "returnType": "Object" + }, + { + "description": "This function works like GetUserData(), but allows the caller to specify which user data elements to return. The specified values are also displayed in the user data dialog screen.", + "name": "GetPartialUserData", + "params": [ + { + "default": null, + "description": "A comma-separated list of the attribute names to be returned. For example, to return only the email address and first name of the user's account, you would call GetPartialUserData(\"email, firstname\"). The full set of user account properties that can be queried with the function is: * firstname * lastname * email * street * city * state * zip * country * phone * birth (_Available since Roku OS 10.0_) * gender (_Available since Roku OS 10.0_)", + "isRequired": true, + "name": "properties", + "type": "String" + }, + { + "default": null, + "isRequired": true, + "name": "requestInfo", + "type": "Object" + } + ], + "returnDescription": "An roAssociativeArray containing the Roku account information passed in the method.", + "returnType": "Object" + }, + { + "description": "Requests the list of purchases associated with the current user account.", + "name": "GetPurchases", + "params": [], + "returnType": "Void" + }, + { + "description": "Requests the list of globally available In-Channel products, which are available to all channels.", + "name": "GetStoreCatalog", + "params": [], + "returnType": "Void" + }, + { + "description": "The GetUserData() function provides a way to request user authorization to share the user’s account information with the calling channel.", + "name": "GetUserData", + "params": [], + "returnDescription": "When called, the method presents a dialog screen containing the user’s account information, along with two buttons labeled Share and Don’t Share.", + "returnType": "Object" + }, + { + "description": "Retrieves the state, zip code, and country associated with the customer's Roku account. The location information returned by this command can be used to determine a customer's eligibility for regional-specific subscription products and content.", + "name": "GetUserRegionData", + "params": [], + "returnDescription": "An associative array that contains the following fields:", + "returnType": "Object" + }, + { + "description": "Sets the current Order (shopping cart) to the elements specified in the parameter, which must be an roList of roAssociativeArray items.Passing an empty roList clears the Order, like calling ClearOrder().", + "name": "SetOrder", + "params": [ + { + "default": null, + "description": "Each roAssociativeArray in the roList contains the following fields:
NameTypeDescription
codeStringThe product identifier
qtyIntegerThe quantity purchased
", + "isRequired": true, + "name": "order", + "type": "roList of roAssociativeArray items" + }, + { + "default": null, + "description": "_Available since Roku OS 9.3_ This parameter is used for subscription upgrades and downgrades. If it is not specified, the action is a product purchase. It contains the following fields:
NameTypeDescription
actionStringThe action to be performed, which may be one of the following:
  • \"Upgrade\": The order is an upgrade from one subscription product to another.
  • \"Downgrade\": The order is a subscription downgrade.
**Example** ``` m.store = CreateObject(\"roChannelStore\")​ ' Populate myOrderItems myOrderInfo.action = \"Upgrade\" m.store.setOrder(myOrderItems, myOrderInfo) ``` See [On-device upgrade and downgrade](/docs/developer-program/roku-pay/implementation/on-device-upgrade-downgrade.md#calling-the-roku-web-service-validate-transaction-api) for how to implement Roku Pay web services for upgrades/downgrades.", + "isRequired": true, + "name": "orderInfo", + "type": "roAssociativeArray" + } + ], + "returnType": "Void" + }, + { + "description": "Stores an access token, oAuth token, or other authentication artifact that can be retrieved by calling the [GetChannelCred()](https://developer.roku.com/docs/references/brightscript/interfaces/ifchannelstore.mdgetchannelcred-as-object)method. This data is stored securely in the Roku cloud and can be retrieved by other devices linked to the same Roku account. This method can be used to store an authentication artifact with Roku for a signed in user, associating that user with a particular Roku account. For more information, see [Automatic Account Link](/docs/developer-program/authentication/universal-authentication-protocol-for-single-sign-on.md).", + "name": "StoreChannelCredData", + "params": [ + { + "default": null, + "description": "An OAuth token, custom token, or other custom data to be stored.", + "isRequired": true, + "name": "data", + "type": "String" + } + ], + "returnDescription": "This command returns an roAssociativeArray with the following values:", + "returnType": "Object" + } + ], + "name": "ifChannelStore", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifchannelstore.md" + }, + "ifcoderegistrationscreen": { + "deprecatedDescription": "This component is deprecated.\n\nBeginning July 1st, 2017, any new channels using this component will be rejected during certification.\n\nBeginning January 1st, 2018, any updates to existing channels using this component will be rejected during certification.\n", + "description": "> This component is deprecated.\n> \n> Beginning July 1st, 2017, any new channels using this component will be rejected during certification.\n> \n> Beginning January 1st, 2018, any updates to existing channels using this component will be rejected during certification.", + "implementers": [ + { + "description": "The Code Registration Screen is designed to present the user a registration code, and the information required to instruct the user on how to register with a service provider", + "name": "roCodeRegistrationScreen", + "url": "https://developer.roku.com/docs/references/brightscript/components/rocoderegistrationscreen.md" + } + ], + "isDeprecated": true, + "methods": [ + { + "description": "Adds a button to the screen identified by the title and ID provided. The buttons are at the bottom of the screen and appear in the order added", + "name": "AddButton", + "params": [ + { + "default": null, + "description": "The ID of the button.", + "isRequired": true, + "name": "id", + "type": "Integer" + }, + { + "default": null, + "description": "The title of the button.", + "isRequired": true, + "name": "title", + "type": "String" + } + ], + "returnDescription": "When the button is pressed, the script will receive an event from the application indicating the ID of the button pressed.", + "returnType": "Boolean" + }, + { + "description": "Adds high visibility focal text to the screen to be placed above the registration code.", + "name": "AddFocalText", + "params": [ + { + "default": null, + "description": "This text is intended to provide the user important instructions on where to use the registration code. It is generally a few words of instruction followed by the URL for the registration site on the web.", + "isRequired": true, + "name": "text", + "type": "String" + }, + { + "default": null, + "description": "Multiple lines of text may be added and the spacing between each is controlled by specifying the spacing format as one of the following: spacing-dense, spacing–normal or spacing-sparse.", + "isRequired": true, + "name": "spacingFormat", + "type": "String" + } + ], + "returnType": "Void" + }, + { + "description": "Add a string of bold, high visibility text to the screen as a header to introduce the subsequent paragraph(s).", + "name": "AddHeaderText", + "params": [ + { + "default": null, + "description": "The text to be displayed in the header of the code registration screen.", + "isRequired": true, + "name": "text", + "type": "String" + } + ], + "returnType": "Void" + }, + { + "description": "Adds a paragraph of text to the screen. A paragraph is specified as a single string and are ordered on the screen in the same order as they are added. The roCodeRegistrationScreen handles all text formatting and justification. Spacing is automatically inserted between paragraphs for readability.", + "name": "AddParagraph", + "params": [ + { + "default": null, + "description": "The paragraph of text to be displayed on the code registration screen.", + "isRequired": true, + "name": "text", + "type": "String" + } + ], + "returnType": "Void" + }, + { + "description": "Closes the screen and deletes the associated object. This is useful for avoiding screen flicker when the display order of your screens does not resemble a stack.", + "name": "Close", + "params": [], + "returnType": "Void" + }, + { + "description": "Breadcrumbs allow the application to display a two-part navigational title which shows the current and the previous locations in the application hierarchy (e.g. TV – Friends). If both location values are set, the application will display the title in breadcrumb format. If only the first location is set, the application will display the specified text in the title area like the SetTitle API call", + "name": "SetBreadcrumbText", + "params": [ + { + "default": null, + "description": "The second location value.", + "isRequired": true, + "name": "String", + "type": "location2" + } + ] + }, + { + "description": "Sets the registration code (e.g. XM3RT) or text (e.g. retrieving…) to be displayed on the screen.", + "name": "SetRegistrationCode", + "params": [ + { + "default": null, + "isRequired": true, + "name": "regCode", + "type": "String" + } + ], + "returnType": "Void" + }, + { + "description": "Sets the title for the screen to the specified string.", + "name": "SetTitle", + "params": [ + { + "default": null, + "description": "The title to be displayed on the code registration screen.", + "isRequired": true, + "name": "title", + "type": "String" + } + ], + "returnType": "Void" + }, + { + "description": "Displays or refreshes the screen after creation or state changes.", + "name": "Show", + "params": [], + "returnDescription": "A flag indicating whether the screen is displayed (returns true if the screen is displayed, otherwise false).", + "returnType": "Boolean" + } + ], + "name": "ifCodeRegistrationScreen", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifcoderegistrationscreen.md" + }, + "ifcompositor": { + "implementers": [ + { + "description": "The roCompositor allows the composition and animation of multiple roBitmaps and roRegions", + "name": "roCompositor", + "url": "https://developer.roku.com/docs/references/brightscript/components/rocompositor.md" + } + ], + "methods": [ + { + "description": "Moves all animated sprites. Sprites will not animate unless you call this function regularly.", + "name": "AnimationTick", + "params": [ + { + "default": null, + "description": "The number of ms since the last call.", + "isRequired": true, + "name": "duration", + "type": "Integer" + } + ], + "returnType": "Void" + }, + { + "description": "Provides a global search and replace of sprite [roRegions](https://developer.roku.com/docs/references/brightscript/components/roregion.md\"roRegions\"). Replaces regions that match oldRegion with newRegion", + "name": "ChangeMatchingRegions", + "params": [ + { + "default": null, + "description": "The sprite roRegion to be replaced.", + "isRequired": true, + "name": "oldRegion", + "type": "Object" + }, + { + "default": null, + "description": "The new sprite roRegion to be used.", + "isRequired": true, + "name": "newRegion", + "type": "Object" + } + ], + "returnType": "Void" + }, + { + "description": "Draws any dirty sprites (that is, whatever is new or has changed since the last Draw). No compositor or sprite operations will be reflected on the display until Draw() is called. After calling Draw(), you must call Finish() (if single buffered) or SwapBuffers() (if double buffered) before the changes will be user visible", + "name": "Draw", + "params": [], + "returnType": "Void" + }, + { + "description": "Redraws all sprites even if not dirty. After calling Draw(), you must call Finish() (if single buffered) or SwapBuffers() (if double buffered) before the changes will be user visible", + "name": "DrawAll", + "params": [], + "returnType": "Void" + }, + { + "description": "Creates a new sprite that consists of a sequence of frames to be animated. The frames are defined by the regionArray which is an [roArray](https://developer.roku.com/docs/references/brightscript/components/roarray.md\"roArray\") of [roRegions](https://developer.roku.com/docs/references/brightscript/components/roregion.md\"roRegions\"). Position the sprite at coordinate x,y. If z is provided, position the sprite in front of all other sprites with equal or lower z value", + "name": "NewAnimatedSprite", + "params": [ + { + "default": null, + "description": "The x-coordinate of the sprite.", + "isRequired": true, + "name": "x", + "type": "Integer" + }, + { + "default": null, + "description": "The y-coordinate of the sprite.", + "isRequired": true, + "name": "y", + "type": "Integer" + }, + { + "default": null, + "description": "The frames to be animated.", + "isRequired": true, + "name": "regionArray", + "type": "Object" + }, + { + "default": null, + "description": "The z-coordinate of the sprite.", + "isRequired": true, + "name": "z", + "type": "Integer" + } + ], + "returnDescription": "Returns an [roSprite](/docs/references/brightscript/components/rosprite.md \"roSprite\") object.", + "returnType": "Object" + }, + { + "description": "Creates a new sprite, using an roRegion to define the sprite's bitmap. Position the sprite at coordinate x,y. If z is provided, position the sprite in front of all other sprites with equal or lower z value. Sprites with negative z values are not rendered or displayed on the screen.", + "name": "NewSprite", + "params": [ + { + "default": null, + "description": "The x-coordinate of the sprite.", + "isRequired": true, + "name": "x", + "type": "Integer" + }, + { + "default": null, + "description": "The y-coordinate of the sprite.", + "isRequired": true, + "name": "y", + "type": "Integer" + }, + { + "default": null, + "description": "The region to be used to define the sprite's bitmap.", + "isRequired": true, + "name": "region", + "type": "Object" + }, + { + "default": null, + "description": "The z-coordinate of the sprite.", + "isRequired": true, + "name": "z", + "type": "Integer" + } + ], + "returnDescription": "Returns an [roSprite](/docs/references/brightscript/components/rosprite.md \"roSprite\") object.", + "returnType": "Object" + }, + { + "description": "Sets the destBitmap ([roBitmap](https://developer.roku.com/docs/references/brightscript/components/robitmap.md\"roBitmap\") or [roScreen](https://developer.roku.com/docs/references/brightscript/components/roscreen.md\"roScreen\")) and the background color.", + "name": "SetDrawTo", + "params": [ + { + "default": null, + "description": "The bitmap to be drawn.", + "isRequired": true, + "name": "destBitmap", + "type": "Object" + }, + { + "default": null, + "description": "The background color to be used.", + "isRequired": true, + "name": "rgbaBackground", + "type": "Integer" + } + ], + "returnType": "Void" + } + ], + "name": "ifCompositor", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifcompositor.md" + }, + "ifdatetime": { + "implementers": [ + { + "description": "The roDateTime provides an interface to obtain the current date/time for the player and manipulate date/times", + "name": "roDateTime", + "url": "https://developer.roku.com/docs/references/brightscript/components/rodatetime.md" + } + ], + "methods": [ + { + "description": "Returns the date/time formatted string.", + "name": "AsDateString", + "params": [ + { + "default": null, + "description": "
Format
long-date
short-weekday
no-weekday
short-month
short-month-short-weekday
short-month-no-weekday
short-date
short-date-dashes
", + "isRequired": true, + "name": "format", + "type": "String" + } + ], + "returnDescription": "A dateString corresponding to the specified format.", + "returnType": "String" + }, + { + "description": "Returns the date/time in long-date format.", + "name": "AsDateStringNoParam", + "params": [], + "returnDescription": "A date/time string in long-date format (for example, Tuesday October 9, 2012)", + "returnType": "String" + }, + { + "description": "Returns the date/time as the number of seconds from the Unix epoch (00:00:00 1/1/1970 GMT).", + "name": "AsSeconds", + "params": [], + "returnDescription": "Number of seconds as Integer.", + "returnType": "Integer" + }, + { + "description": "Sets the date/time using a string in the ISO 8601 format. For example \"YYYY-MM-DD HH:MM:SS\" e.g \"2009-01-01 01:00:00.000\" or \"2009-01-01T01:00:00.000\".", + "name": "FromISO8601String", + "params": [ + { + "default": null, + "description": "The ISO-8601 string to be used to set the date and time.", + "isRequired": true, + "name": "dateString", + "type": "String" + } + ], + "returnType": "Void" + }, + { + "description": "Sets the date/time value using the number of seconds from the Unix epoch.", + "name": "FromSeconds", + "params": [ + { + "default": null, + "description": "The number of seconds from the Unix epoch.", + "isRequired": true, + "name": "numSeconds", + "type": "Integer" + } + ], + "returnType": "Void" + }, + { + "description": "Returns the date/time value's day of the month.", + "name": "GetDayOfMonth", + "params": [], + "returnDescription": "Month value as an Integer (1-31).", + "returnType": "Integer" + }, + { + "description": "Returns the date/time value's day of week.", + "name": "GetDayOfWeek", + "params": [], + "returnDescription": "Day value as an Integer (Sunday=0, Monday=1, ..., Saturday=6).", + "returnType": "Integer" + }, + { + "description": "Returns the date/time value's hour within the day.", + "name": "GetHours", + "params": [], + "returnDescription": "Hour value as an Integer (0-23)", + "returnType": "Integer" + }, + { + "description": "Returns the date/time value's last day of the month.", + "name": "GetLastDayOfMonth", + "params": [], + "returnDescription": "Day as an Integer (28-31)", + "returnType": "Integer" + }, + { + "description": "Returns the date/time value's millisecond within the second.", + "name": "GetMilliseconds", + "params": [], + "returnDescription": "Millisecond value as an Integer (0-999).", + "returnType": "Integer" + }, + { + "description": "Returns the date/time value's minute within the hour.", + "name": "GetMinutes", + "params": [], + "returnDescription": "Minute value as an Integer (0-59)", + "returnType": "Integer" + }, + { + "description": "Returns the date/time value's month.", + "name": "GetMonth", + "params": [], + "returnDescription": "Month value as an Integer (1=Jan, 12=Dec).", + "returnType": "Integer" + }, + { + "description": "Returns the date/time value's second within the minute.", + "name": "GetSeconds", + "params": [], + "returnDescription": "Second value as an Integer (0-59).", + "returnType": "Integer" + }, + { + "description": "Returns the offset in minutes from the system time zone to UTC. For example, if the system time zone is in PDT / UTC-7 the value returned would be 420.", + "name": "GetTimeZoneOffset", + "params": [], + "returnDescription": "Minutes of offset as Integer.", + "returnType": "Integer" + }, + { + "description": "Returns the day of the week.", + "name": "GetWeekday", + "params": [], + "returnDescription": "Week value as a String (e.g. \"Monday\").", + "returnType": "String" + }, + { + "description": "Return Value", + "name": "GetYear", + "params": [], + "returnType": "Integer" + }, + { + "description": "Sets the date/time value to the current UTC date and time.", + "name": "Mark", + "params": [], + "returnType": "Void" + }, + { + "description": "Returns an ISO 8601 representation of the date/time value. As of Roku OS 10.0, this now resolves to milliseconds.", + "name": "ToISOString", + "params": [], + "returnDescription": "ISO 8601 as String, e.g. \"2021-03-25T18:53:03+0000\"", + "returnType": "String" + }, + { + "description": "Offsets the date/time value from an assumed UTC date/time to a local date/time using the system time zone setting. This function is not idempotent, and multiple calls will do multiple timezone adjustments to the time yielding an incorrect result.", + "name": "ToLocalTime", + "params": [], + "returnType": "Void" + } + ], + "name": "ifDateTime", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifdatetime.md" + }, + "ifdevicecrypto": { + "implementers": [ + { + "description": "Encrypts and decrypts data on a device using a key that is unique per channel, device, or model.", + "name": "roDeviceCrypto", + "url": "https://developer.roku.com/docs/references/brightscript/components/rodevicecrypto.md" + } + ], + "methods": [], + "name": "ifDeviceCrypto", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifdevicecrypto.md" + }, + "ifdeviceinfo": { + "implementers": [ + { + "description": "The roDeviceInfo component provides an interface to obtain attributes about the device", + "name": "roDeviceInfo", + "url": "https://developer.roku.com/docs/references/brightscript/components/rodeviceinfo.md" + } + ], + "methods": [ + { + "description": "Checks if the device can decode and play the specified audio format.", + "name": "CanDecodeAudio", + "params": [ + { + "default": null, + "isRequired": true, + "name": "audio" + } + ], + "returnDescription": "An associative array that includes a flag indicating whether the audio format can be played, and the closest audio format supported by the device." + }, + { + "description": "Checks whether the device can decode and play the specified video format.", + "name": "CanDecodeVideo", + "params": [ + { + "default": null, + "isRequired": true, + "name": "video" + } + ], + "returnDescription": "An associative array that includes a flag indicating whether the video format can be played, and the closest video format supported by the device." + }, + { + "description": "Notifies the channel when a system overlay event (such as the [confirm partner button HUD](/docs/developer-program/getting-started/architecture/channel-manifest.md#special-purpose-attributes) or the caption control overlay) is displayed. This notification gives the channel the opportunity to do any processing they may want to when the channel loses or regains focus.", + "name": "EnableAppFocusEvent", + "params": [ + { + "default": null, + "description": "A flag specifying whether to enable/disable system overlay event notifications.", + "isRequired": true, + "name": "enable", + "type": "Boolean" + } + ], + "returnDescription": "A flag indicating whether the system overlay event notifications are enabled (true) or disabled (false).", + "returnType": "Dynamic" + }, + { + "description": "Notifies the channel when the audio guide changes. This function enables the sending of an [roDeviceInfoEvent](https://developer.roku.com/docs/references/brightscript/events/rodeviceinfoevent.md when the audio guide changes. To receive events, you must have first called [SetMessagePort](https://developer.roku.com/docs/references/brightscript/interfaces/ifsetmessageport.md on the roDeviceInfo object specifying the message port that is to receive the events", + "name": "EnableAudioGuideChangedEvent", + "params": [ + { + "default": null, + "description": "A flag indicating whether to enable/disable audio guide change event notifications.", + "isRequired": true, + "name": "enable", + "type": "Boolean" + } + ], + "returnDescription": "A flag indicating whether audio guide change event notifications are enabled (true) or disabled (false).", + "returnType": "Dynamic" + }, + { + "description": "Notifies the channel when the audio or video codec changes. This function enables the sending of an [roDeviceInfoEvent](https://developer.roku.com/docs/references/brightscript/events/rodeviceinfoevent.md when the codec changes. To receive events, you must have first called [SetMessagePort](https://developer.roku.com/docs/references/brightscript/interfaces/ifsetmessageport.md on the roDeviceInfo object specifying the message port that is to receive the events", + "name": "EnableCodecCapChangedEvent", + "params": [ + { + "default": null, + "description": "A flag indicating whether to enable/disable codec change event notifications.", + "isRequired": true, + "name": "enable", + "type": "Boolean" + } + ], + "returnDescription": "A flag indicating whether codec change event notifications are enabled (true) or disabled (false)." + }, + { + "description": "Notifies the channel when an internet connection status event occurs. This function enables the sending of an [roDeviceInfoEvent](https://developer.roku.com/docs/references/brightscript/events/rodeviceinfoevent.md) when the network connection status changes, as indicated by `roDeviceInfoEvent.internetStatus`. To receive events, the channel must have first called [SetMessagePort](https://developer.roku.com/docs/references/brightscript/interfaces/ifsetmessageport.md) on the roDeviceInfo object specifying the message port that is to receive the events.", + "name": "EnableInternetStatusEvent", + "params": [ + { + "default": null, + "description": "A flag specifying whether to enable/disable network connection status event notifications.", + "isRequired": true, + "name": "enable", + "type": "Boolean" + } + ], + "returnDescription": "A flag indicating whether network connection status event notifications are enabled (true) or disabled (false).", + "returnType": "Boolean" + }, + { + "description": "Notifies the channel when a network connection status event occurs. This function enables the sending of an [roDeviceInfoEvent](https://developer.roku.com/docs/references/brightscript/events/rodeviceinfoevent.md when the network connection status changes. To receive events, you must have first called [SetMessagePort](https://developer.roku.com/docs/references/brightscript/interfaces/ifsetmessageport.md on the roDeviceInfo object specifying the message port that is to receive the events", + "name": "EnableLinkStatusEvent", + "params": [ + { + "default": null, + "description": "A flag specifying whether to enable/disable network connection status event notifications.", + "isRequired": true, + "name": "enable", + "type": "Boolean" + } + ], + "returnDescription": "A flag indicating whether network connection status event notifications are enabled (true) or disabled (false).", + "returnType": "Boolean" + }, + { + "description": "Notifies the channel when a lowGeneralMemoryLevel event occurs. This function enables the sending of an [roDeviceInfoEvent](https://developer.roku.com/docs/references/brightscript/events/rodeviceinfoevent.md when a low general memory event occurs.", + "name": "EnableLowGeneralMemoryEvent", + "params": [ + { + "default": null, + "isRequired": true, + "name": "enabled", + "type": "Boolean" + } + ], + "returnDescription": "A flag indicating whether lowGeneralMemoryLevel event notifications are enabled (true) or disabled (false).", + "returnType": "Dynamic" + }, + { + "description": "Notifies the channel when a screensaver exit event occurs. This function enables the sending of an [roDeviceInfoEvent](https://developer.roku.com/docs/references/brightscript/events/rodeviceinfoevent.md when a user has exited the screensaver.", + "name": "EnableScreensaverExitedEvent", + "params": [ + { + "default": null, + "description": "A flag specifying whether to enable/disable screensaver exit event notifications.", + "isRequired": true, + "name": "enable", + "type": "Boolean" + } + ], + "returnDescription": "A flag indicating whether screensaver exit event notifications are enabled (true) or disabled (false).", + "returnType": "Dynamic" + }, + { + "description": "Forces a new internet connection check. A new check will only be initiated if the cached internet status is older than 10 seconds.", + "name": "ForceInternetStatusCheck", + "params": [], + "returnDescription": "True indicates only that a new internet check has been initiated; otherwise, false. To get the actual internet connection status, use the [**GetInternetStatus()**](getinternetstatus-as-boolean) method.", + "returnType": "Boolean" + }, + { + "deprecatedDescription": "**This method is deprecated**.\n\nDevelopers must update their channels to use the [GetRIDA()](/docs/references/brightscript/interfaces/ifdeviceinfo.md#getrida-as-string) method to get the unique identifier.\n", + "description": "Returns a unique identifier for the device. This identifier is persistent but can be reset by the user from the device's Settings menu or by performing a factory reset on the device.", + "isDeprecated": true, + "name": "GetAdvertisingId", + "params": [], + "returnDescription": "A Universally Unique Identifier (UUID) as specified in IETF-RFC 4122 with 36 characters (32 alphanumeric characters and four hyphens). The characters are grouped in the form 8-4-4-4-12, for example \"123e4567-e89b-12d3-a456-426655440000\"", + "returnType": "String" + }, + { + "deprecatedDescription": "**This method is deprecated**.\n\nChannel developers should use the [CanDecodeAudio()](#candecodeaudioaudio_format-as-object-as-object) function instead.\n", + "description": "Lists each audio decoder supported by the device, with up to four numbers describing the decoder from the EDID SAD (Short Audio Descriptor). Each value is of the form \"::::\"", + "isDeprecated": true, + "name": "GetAudioDecodeInfo", + "params": [], + "returnDescription": "An associative array with EDID (EIA.2FCEA-861) audio decoder information for the device connected to the HDMI port (or the device itself for a Roku TV).", + "returnType": "Object" + }, + { + "description": "Checks for the type of audio output.", + "name": "GetAudioOutputChannel", + "params": [], + "returnDescription": "The selected audio output, which may be one of the following values:", + "returnType": "String" + }, + { + "description": "Determines whether global captions are turned on or off, or are in instant replay mode.", + "name": "GetCaptionsMode", + "params": [], + "returnDescription": "The current global setting for the Mode property, which may be one of the following values:", + "returnType": "String" + }, + { + "description": "Checks the current value of the specified global setting property.", + "name": "GetCaptionsOption", + "params": [ + { + "default": null, + "description": "The global setting property to be checked, which may be one of the following values: * Mode * Text/Font * Text/Effect * Text/Size * Text/Color * Text/Opacity * Background/Color * Background/Opacity * Window/Color * Window/Opacity * Track * Track\\_Composite * Track\\_Analog * Muted", + "isRequired": true, + "name": "option", + "type": "String" + } + ], + "returnDescription": "The value of the specified global setting property, which may be as follows:", + "returnType": "String" + }, + { + "description": "Returns a unique identifier for the device. The ID is persistent and cannot be reset. This value can be used to manage or identify devices linked to the channel’s content services.", + "name": "GetChannelClientId", + "params": [], + "returnDescription": "A unique device identifier. This identifier is different across channels so each channel will get a different identifier when calling this function", + "returnType": "String" + }, + { + "deprecatedDescription": "**This method is deprecated**.\n\nDevelopers must update their channels to use the [GetChannelClientId](/docs/references/brightscript/interfaces/ifdeviceinfo.md#getchannelclientid-as-string) method to get the unique identifier.\n", + "description": "Returns a unique identifier for the device.", + "isDeprecated": true, + "name": "GetClientTrackingId", + "params": [], + "returnDescription": "A unique device identifier. This identifier is different across channels so each channel will get a different identifier when calling this function", + "returnType": "String" + }, + { + "description": "Checks whether the system settings for Time (**Setting > System > Time**) is set to a 12 or 24-hour format.", + "name": "GetClockFormat", + "params": [], + "returnDescription": "The time format:", + "returnType": "String" + }, + { + "description": "Checks for the information associated with the hardware's connection", + "name": "GetConnectionInfo", + "params": [], + "returnDescription": "An associative array with the following key-value pairs:", + "returnType": "Object" + }, + { + "description": "Checks whether the device has a WiFi or wired connection, or if it is not connected through any type of network.", + "name": "GetConnectionType", + "params": [], + "returnDescription": "The type of internet connection the device is using. This may be one of the following values:", + "returnType": "String" + }, + { + "description": "Checks for the country code of the channel.", + "name": "GetCountryCode", + "params": [], + "returnDescription": "A value that indicates the Roku Channel Store associated with a user’s Roku account. Typically, the value returned will be an ISO 3166-1 (2-letter) country code representing the country. Alternatively, if the channel owner entered into an additional agreement to have the channel published to a curated [Roku Powered Channel Store](https://www.roku.com/roku-powered) instead of the user country, then a Roku Powered Channel Store Identifier will instead be returned. This may be one of the following values:", + "returnType": "String" + }, + { + "description": "Gets the current locale value based on the user's language setting.", + "name": "GetCurrentLocale", + "params": [], + "returnDescription": "A string representing the current locale based on the user's language setting. The string is an ISO 639-1 (2-letter) language code followed by an underscore and a ISO 3166-1 (2-letter) country code. This may be one of the following values:", + "returnType": "String" + }, + { + "deprecatedDescription": "**This method is deprecated**.\n\nDevelopers must update their channels to use the 32-character alphanumeric unique identifier returned by [GetChannelClientId()](/docs/references/brightscript/interfaces/ifdeviceinfo.md#getchannelclientid-as-string).\n", + "description": "Returns a string of 12 zeroes (it no longer returns the unique identifier for the channel on a device).", + "isDeprecated": true, + "name": "GetDeviceUniqueId", + "params": [], + "returnDescription": "A string of 12 zeros (\"000000000000\")", + "returnType": "String" + }, + { + "description": "Checks the aspect ratio for the display screen.", + "name": "GetDisplayAspectRatio", + "params": [], + "returnDescription": "The aspect ratio, which may be one of the following values:", + "returnType": "String" + }, + { + "description": "Checks the UI resolution of the device.", + "name": "GetDisplayMode", + "params": [], + "returnDescription": "The configured graphics layer resolution, which may be one of the following values:", + "returnType": "String" + }, + { + "description": "Checks for the display properties of the screen.", + "name": "GetDisplayProperties", + "params": [], + "returnDescription": "An associative array with the following key/value pairs for the display properties of the screen:", + "returnType": "Object" + }, + { + "description": "Checks the display size of a screen.", + "name": "GetDisplaySize", + "params": [], + "returnDescription": "An associative array with the screen width and height. Specifically, the keys \"w\" and \"h\" contain the values for the screen width and height respectively, either 720 and 480, or 1280 and 720", + "returnType": "Object" + }, + { + "description": "Gets the text corresponding to the button selection in the Player Info Settings/Display Type page.", + "name": "GetDisplayType", + "params": [], + "returnDescription": "The display type, which may be one of the following values:", + "returnType": "String" + }, + { + "deprecatedDescription": "**This method is deprecated**.\n\nDevelopers must update their channels to use the replacement API [GetDrmInfoEx()](/docs/references/brightscript/interfaces/ifdeviceinfo.md#getdrminfoex-as-object) to return the supported DRM system and features.\n", + "description": "Checks for the supported DRM system and its features.", + "isDeprecated": true, + "name": "GetDrmInfo", + "params": [], + "returnDescription": "An associative array with the supported DRM system and features. For example, a device that supports PlayReady inside a trusted environment with secure stop returns:", + "returnType": "Object" + }, + { + "name": "GetDrmInfoEx", + "params": [], + "returnType": "Object" + }, + { + "description": "Checks the IP address assigned to the device by your internet service provider (ISP). This IP address is visible to the internet and all other computers outside your local network.", + "name": "GetExternalIp", + "params": [], + "returnDescription": "The external IP address assigned to the device.", + "returnType": "String" + }, + { + "description": "Returns a string describing the device that may be used for network device selection. The string is subject to change and should not be used as a persistent key or ID", + "name": "GetFriendlyName", + "params": [], + "returnDescription": "A user-assigned device name or a description of the device such as model name and/or serial number.", + "returnType": "String" + }, + { + "description": "Checks the general memory levels of the channel.", + "name": "GetGeneralMemoryLevel", + "params": [], + "returnDescription": "Returns the general memory levels of the channel, which may be one of the following values:", + "returnType": "String" + }, + { + "description": "Checks the graphics platform of the device.", + "name": "GetGraphicsPlatform", + "params": [], + "returnDescription": "The device's graphics platform, which may be one of the following values:", + "returnType": "String" + }, + { + "description": "Checks the internet connection status of the device.", + "name": "GetInternetStatus", + "params": [], + "returnDescription": "True if the cached internet status shows a connection; false, otherwise.", + "returnType": "Boolean" + }, + { + "description": "Checks the local IP address of the device. This can be used in conjunction with the ECP (see the External Control Protocol Guide) \"launch\" command (or the \"install\" command for uninstalled channels) to start a different channel from the current channel.", + "name": "GetIPAddrs", + "params": [], + "returnDescription": "An associative array, where each key is the name of a network interface and the value is the IP-address of the interface. Typically, the associative array only contains a single interface.", + "returnType": "Object" + }, + { + "description": "Checks if the device has an active connection.", + "name": "GetLinkStatus", + "params": [], + "returnDescription": "A flag indicating whether the device has an active connection.", + "returnType": "Boolean" + }, + { + "description": "Returns the model name of the Roku device. See the [Hardware Specification](/docs/specs/hardware.md) for the list of the current, updatable, and legacy Roku models.", + "name": "GetModel", + "params": [], + "returnDescription": "A five-character alphanumeric string (for example, \"3050X\") .", + "returnType": "String" + }, + { + "description": "Returns detailed information about the device model.", + "name": "GetModelDetails", + "params": [], + "returnDescription": "An associative array containing the following information about the device model:", + "returnType": "Object" + }, + { + "description": "Returns the model display name of the Roku device.", + "name": "GetModelDisplayName", + "params": [], + "returnDescription": "The model display name (for example, \"Roku 2 XD\")", + "returnType": "String" + }, + { + "description": "Returns a string describing the type of device. For future compatibility, the caller should by default assume \"STB\" when anything other than described value is returned", + "name": "GetModelType", + "params": [], + "returnDescription": "The device type, which may be one of the following values:", + "returnType": "String" + }, + { + "description": "Returns an roAssociativeArray containing the **major**, **minor**, **revision**, and **build** numbers of the Roku OS running on the device.", + "name": "GetOSVersion", + "params": [], + "returnDescription": "An roAssociativeArray containing the following fields:", + "returnType": "Object" + }, + { + "description": "Checks the three-letter ISO 639-2 language terminology code of the preferred caption language set on the Roku device.", + "name": "GetPreferredCaptionLanguage", + "params": [], + "returnDescription": "The three-letter ISO 639-2 language terminology code, which may be one of the following values:", + "returnType": "String" + }, + { + "description": "Returns a randomly generated unique identifier. Each time this function is called, a different identifier is returned", + "name": "GetRandomUUID", + "params": [], + "returnDescription": "A Universally Unique Identifier (UUID) version 4 as specified in IETF-RFC 4122 with 36 characters (32 alphanumeric characters and four hyphens). The characters are grouped in the form 8-4-4-4-12, for example \"123e4567-e89b-12d3-a456-426655440000\"", + "returnType": "String" + }, + { + "description": "Returns a unique identifier for the device.", + "name": "GetRIDA", + "params": [], + "returnDescription": "A Universally Unique Identifier (UUID). This identifier is persistent, but it can be reset by the user from the device's **Settings** menu or by performing a factory reset on the device", + "returnType": "String" + }, + { + "description": "Checks for the user interface sound effects volume level.", + "name": "GetSoundEffectsVolume", + "params": [], + "returnDescription": "The UI sounds effects volume as a percentage. A return value of 0 indicates that UI sound effects are muted, and a value of 100 indicates that they are set to the maximum volume level", + "returnType": "Integer" + }, + { + "description": "Checks the supported graphics resolutions.", + "name": "GetSupportedGraphicsResolutions", + "params": [], + "returnDescription": "A list of associative arrays. Each associative array contains the following key/value pairs for the graphics resolutions:", + "returnType": "Object" + }, + { + "description": "Checks for the user's current system time zone setting.", + "name": "GetTimeZone", + "params": [], + "returnDescription": "A string representing the user's current system time zone setting. For example, this method may return values such as:", + "returnType": "String" + }, + { + "description": "Checks for the UI resolution of the screen.", + "name": "GetUIResolution", + "params": [], + "returnDescription": "An associative array with the following key-value pairs describing the current UI resolution:", + "returnType": "Object" + }, + { + "description": "Returns the ISO 3166-1 (2-letter) country code associated with the user's Roku account.", + "name": "GetUserCountryCode", + "params": [], + "returnDescription": "An ISO 3166-1 (2-letter) country code.", + "returnType": "String" + }, + { + "deprecatedDescription": "**This method is deprecated**.\n\nDevelopers must update their channels to use [GetOSVersion()](/docs/references/brightscript/interfaces/ifdeviceinfo.md#getosversion-as-object) method to get the current Roku OS version running on a device.\n", + "description": "Returns the version number of the device.", + "isDeprecated": true, + "name": "GetVersion", + "params": [], + "returnDescription": "A 13-character string (for example \"034.08E01185A\"). The third through sixth characters are the major/minor version number (\"4.08\") and the ninth through twelfth are the build number (\"1185\")", + "returnType": "String" + }, + { + "deprecatedDescription": "**This method is deprecated**.\n\nChannel developers should use the [CanDecodeVideo()](#candecodevideovideo_format-as-object-as-object) function instead.\n", + "description": "See [http://en.wikipedia.org/wiki/Extended\\_display\\_identification\\_data#EIA.2FCEA-861\\_extension\\_block](http://en.wikipedia.org/wiki/Extended_display_identification_data#EIA.2FCEA-861_extension_block) for an explanation of the information returned.", + "isDeprecated": true, + "name": "GetVideoDecodeInfo", + "params": [], + "returnDescription": "An associative array with the EDID (EIA.2FCEA-861) information describing the video display", + "returnType": "Object" + }, + { + "description": "Checks the video playback resolution.", + "name": "GetVideoMode", + "params": [], + "returnDescription": "The video playback resolution, which maybe one of the following values:", + "returnType": "String" + }, + { + "description": "Checks if the current device/firmware supports the passed in feature string.", + "name": "HasFeature", + "params": [ + { + "default": null, + "description": "The feature to be checked, which may be one of the following values: * \"5.1\\_surround\\_sound\" * \"can\\_output\\_5.1\\_surround\\_sound\" * \"sd\\_only\\_hardware\" * \"usb\\_hardware\" * \"sdcard\\_hardware\" * \"ethernet\\_hardware\" * \"gaming\\_hardware\" * \"energy\\_star\\_compliant\" * \"soundbar\\_hardware\"", + "isRequired": true, + "name": "feature", + "type": "String" + } + ], + "returnDescription": "A flag indicating whether the current device/firmware supports the passed in feature string.", + "returnType": "Boolean" + }, + { + "deprecatedDescription": "**This method is deprecated**.\n\nDevelopers must update their channels to use [IsRIDADisabled()](/docs/references/brightscript/interfaces/ifdeviceinfo.md#isridadisabled-as-boolean) to get the Ad Id tracking status.\n", + "description": "If Ad Id tracking is disabled, the identifier returned by GetAdvertisingId() should not be used for Ad targeting", + "isDeprecated": true, + "name": "IsAdIdTrackingDisabled", + "params": [], + "returnDescription": "Returns true if the user has disabled Ad Id tracking by selecting \"Limit ad tracking\" from the Roku Settings menu, false otherwise.", + "returnType": "Boolean" + }, + { + "description": "Checks if the audio guide is enabled.", + "name": "IsAudioGuideEnabled", + "params": [], + "returnDescription": "A flag indicating whether the audio guide is enabled.", + "returnType": "Dynamic" + }, + { + "deprecatedDescription": "**This method is deprecated**.\n\nChannel developers must use the [ifHdmiStatus](/docs/references/brightscript/interfaces/ifhdmistatus.md) interface functions instead.\n", + "description": "Checks for an HDMI connection.", + "isDeprecated": true, + "name": "IsHDMIConnected", + "params": [], + "returnDescription": "A flag indicating whether an HDMI connection to a TV has been detected.", + "returnType": "Boolean" + }, + { + "description": "Indicates whether tracking via Roku's ID for Advertisers (RIDA) is disabled on the device.", + "name": "IsRIDADisabled", + "params": [], + "returnDescription": "A flag indicating whether RIDA tracking is disabled on the device (RIDA tracking can be disabled by selecting \"Limit ad tracking\" from the **Settings>Privacy>Advertising** menu). If RIDA tracking is disabled, this returns true; false otherwise.", + "returnType": "Boolean" + }, + { + "description": "Checks whether the device is in demo mode.", + "name": "IsStoreDemoMode", + "params": [], + "returnDescription": "A flag indicating whether the device is in demo mode.", + "returnType": "Boolean" + }, + { + "description": "Sets the current global setting for the Mode property.", + "name": "SetCaptionsMode", + "params": [ + { + "default": null, + "description": "The current global setting for the Mode property, which may be one of the following values: * On * Off * Instant replay * When mute (Roku TVs only)", + "isRequired": true, + "name": "mode", + "type": "String" + } + ], + "returnDescription": "A flag indicating whether the Mode property was successfully set.", + "returnType": "Boolean" + }, + { + "description": "Checks for the number of seconds passed since the last remote keypress.", + "name": "TimeSinceLastKeypress", + "params": [], + "returnDescription": "The number of seconds since the last remote keypress was received.", + "returnType": "Integer" + } + ], + "name": "ifDeviceInfo", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifdeviceinfo.md" + }, + "ifdouble": { + "description": "> Interface equivalent for intrinsic type Double", + "implementers": [ + { + "description": "roDouble is a legacy object name, corresponding to the intrinsic Double object", + "name": "roDouble", + "url": "https://developer.roku.com/docs/references/brightscript/components/rodouble.md" + } + ], + "methods": [ + { + "description": "Gets the double value stored in the calling Double object.", + "name": "GetDouble", + "params": [], + "returnDescription": "The double value stored in the calling Double object.", + "returnType": "Double" + }, + { + "description": "Sets the calling Double object to the specified double value.", + "name": "SetDouble", + "params": [ + { + "default": null, + "description": "The double value to be set on the calling Double object.", + "isRequired": true, + "name": "value", + "type": "Double" + } + ], + "returnType": "Void" + } + ], + "name": "ifDouble", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifdouble.md" + }, + "ifdraw2d": { + "description": "Coordinates (x,y) for this interface are based on an origin (0,0) at the top, left. (This is common for 2D drawing APIs, but is different than OpenGL's default coordinate system).\n\nBitmap pixel values and color values are always represented as 32-bit integer RGBA color values. That is, red is in the most significant byte and alpha is in the least significant byte.", + "implementers": [ + { + "description": "The roBitmap component contains image data and provides an interface (ifDraw2D) for drawing", + "name": "roBitmap", + "url": "https://developer.roku.com/docs/references/brightscript/components/robitmap.md" + }, + { + "description": "The roRegion component is used to represent a subsection of a bitmap", + "name": "roRegion", + "url": "https://developer.roku.com/docs/references/brightscript/components/roregion.md" + }, + { + "description": "The roScreen component provides a full screen drawing surface that can be stacked and that you can receive input events from", + "name": "roScreen", + "url": "https://developer.roku.com/docs/references/brightscript/components/roscreen.md" + } + ], + "methods": [ + { + "description": "Clears the bitmap, and fills it with the specified RGBA color.", + "name": "Clear", + "params": [ + { + "default": null, + "description": "The RGBA color to be used to fill the bitmap.", + "isRequired": true, + "name": "rgba", + "type": "Integer" + } + ], + "returnType": "Void" + }, + { + "description": "Draws a line from (xStart, yStart) to (xEnd, yEnd) with RGBA color.", + "name": "DrawLine", + "params": [ + { + "default": null, + "description": "The x-coordinate of the line's start point.", + "isRequired": true, + "name": "xStart", + "type": "Integer" + }, + { + "default": null, + "description": "The y-coordinate of the line's start point.", + "isRequired": true, + "name": "yStart", + "type": "Integer" + }, + { + "default": null, + "description": "The x-coordinate of the line's end point.", + "isRequired": true, + "name": "xEnd", + "type": "Integer" + }, + { + "default": null, + "description": "The y-coordinate of the line's end point.", + "isRequired": true, + "name": "yEnd", + "type": "Integer" + }, + { + "default": null, + "description": "The RGBA color of the line.", + "isRequired": true, + "name": "rgba", + "type": "Integer" + } + ], + "returnType": "Void" + }, + { + "description": "Draws the source object, where src is an [roBitmap](https://developer.roku.com/docs/references/brightscript/components/robitmap.md\"roBitmap\") or an [roRegion](https://developer.roku.com/docs/references/brightscript/components/roregion.md\"roRegion\") object, at position x,y.", + "name": "DrawObject", + "params": [ + { + "default": null, + "description": "The x-coordinate of the source object.", + "isRequired": true, + "name": "x", + "type": "Integer" + }, + { + "default": null, + "description": "The y-coordinate of the source object.", + "isRequired": true, + "name": "y", + "type": "Integer" + }, + { + "default": null, + "description": "The [roBitmap](https://developer.roku.com/docs/references/brightscript/components/robitmap.md\"roBitmap\") or an [roRegion](https://developer.roku.com/docs/references/brightscript/components/roregion.md\"roRegion\") object to be drawn.", + "isRequired": true, + "name": "src", + "type": "Object" + } + ], + "returnDescription": "A flag indicating whether the object was successfully drawn.", + "returnType": "Boolean" + }, + { + "description": "Draws a point at (x,y) with the given size and RGBA color.", + "name": "DrawPoint", + "params": [ + { + "default": null, + "description": "The x-coordinate of the point.", + "isRequired": true, + "name": "x", + "type": "Integer" + }, + { + "default": null, + "description": "The y-coordinate of the point.", + "isRequired": true, + "name": "y", + "type": "Integer" + }, + { + "default": null, + "description": "The size of the point.", + "isRequired": true, + "name": "size", + "type": "Float" + }, + { + "default": null, + "description": "The RGBA color of the point.", + "isRequired": true, + "name": "rgba", + "type": "Integer" + } + ], + "returnType": "Void" + }, + { + "description": "Fills the specified rectangle from left (x), top (y) to right (x + width), bottom (y + height) with the RGBA color.", + "name": "DrawRect", + "params": [ + { + "default": null, + "description": "The x-coordinate of the rectangle.", + "isRequired": true, + "name": "x", + "type": "Integer" + }, + { + "default": null, + "description": "The y-coordinate of the rectangle.", + "isRequired": true, + "name": "y", + "type": "Integer" + }, + { + "default": null, + "description": "The width of the rectangle.", + "isRequired": true, + "name": "width", + "type": "Integer" + }, + { + "default": null, + "description": "The height of the rectangle.", + "isRequired": true, + "name": "height", + "type": "Integer" + }, + { + "default": null, + "description": "The RGBA color to be used to fill the rectangle.", + "isRequired": true, + "name": "rgba", + "type": "Integer" + } + ], + "returnType": "Void" + }, + { + "description": "Draws the source object, where src is an [roBitmap](https://developer.roku.com/docs/references/brightscript/components/robitmap.md\"roBitmap\") or an [roRegion](https://developer.roku.com/docs/references/brightscript/components/roregion.md\"roRegion\") object, at position x,y rotated by angle theta degrees.", + "name": "DrawRotatedObject", + "params": [ + { + "default": null, + "description": "The x-coordinate of the source object.", + "isRequired": true, + "name": "x", + "type": "Integer" + }, + { + "default": null, + "description": "The y-coordinate of the source object.", + "isRequired": true, + "name": "y", + "type": "Integer" + }, + { + "default": null, + "description": "The position which to rotate the source object. This may be 0, 90, 180, and 270 degrees.", + "isRequired": true, + "name": "theta", + "type": "Float" + }, + { + "default": null, + "description": "The [roBitmap](https://developer.roku.com/docs/references/brightscript/components/robitmap.md\"roBitmap\") or an [roRegion](https://developer.roku.com/docs/references/brightscript/components/roregion.md\"roRegion\") object to be drawn.", + "isRequired": true, + "name": "src", + "type": "Object" + } + ], + "returnDescription": "A flag indicating whether the object was successfully drawn.", + "returnType": "Boolean" + }, + { + "description": "Draws the source object, where src is an [roBitmap](https://developer.roku.com/docs/references/brightscript/components/robitmap.md\"roBitmap\") or an [roRegion](https://developer.roku.com/docs/references/brightscript/components/roregion.md\"roRegion\") object, at position x,y, scaled in the x direction by scaleX and in the y direction by scaleY. scaleX and scaleY should each be greater than zero and less than one to reduce the object size, or greater than one to increase the object size", + "name": "DrawScaledObject", + "params": [ + { + "default": null, + "description": "The x-coordinate of the source object.", + "isRequired": true, + "name": "x", + "type": "Integer" + }, + { + "default": null, + "description": "The y-coordinate of the source object.", + "isRequired": true, + "name": "y", + "type": "Integer" + }, + { + "default": null, + "description": "The x direction in which the source object is to be scaled.", + "isRequired": true, + "name": "scaleX", + "type": "Float" + }, + { + "default": null, + "description": "The y direction in which the source object is to be scaled.", + "isRequired": true, + "name": "scaleY", + "type": "Float" + }, + { + "default": null, + "description": "The [roBitmap](https://developer.roku.com/docs/references/brightscript/components/robitmap.md\"roBitmap\") or an [roRegion](https://developer.roku.com/docs/references/brightscript/components/roregion.md\"roRegion\") object to be drawn.", + "isRequired": true, + "name": "src", + "type": "Object" + } + ], + "returnDescription": "A flag indicating whether the object was successfully drawn.", + "returnType": "Boolean" + }, + { + "description": "Draws the source object, where src is an [roBitmap](https://developer.roku.com/docs/references/brightscript/components/robitmap.md\"roBitmap\") or an [roRegion](https://developer.roku.com/docs/references/brightscript/components/roregion.md\"roRegion\") object, at position x,y, scaled in the x direction by scaleX and in the y direction by scaleY. scaleX and scaleY should each be greater than zero and less than one to reduce the object size, or greater than one to increase the object size.", + "name": "DrawScaledObject", + "params": [ + { + "default": null, + "description": "The x-coordinate of the source object.", + "isRequired": true, + "name": "x", + "type": "Integer" + }, + { + "default": null, + "description": "The y-coordinate of the source object.", + "isRequired": true, + "name": "y", + "type": "Integer" + }, + { + "default": null, + "description": "The x direction in which the source object is to be scaled.", + "isRequired": true, + "name": "scaleX", + "type": "Float" + }, + { + "default": null, + "description": "The y direction in which the source object is to be scaled.", + "isRequired": true, + "name": "scaleY", + "type": "Float" + }, + { + "default": null, + "description": "The [roBitmap](https://developer.roku.com/docs/references/brightscript/components/robitmap.md\"roBitmap\") or an [roRegion](https://developer.roku.com/docs/references/brightscript/components/roregion.md\"roRegion\") object to be drawn.", + "isRequired": true, + "name": "src", + "type": "Object" + }, + { + "default": null, + "description": "The RGBA color of the source object.", + "isRequired": true, + "name": "rgba", + "type": "Integer" + } + ], + "returnDescription": "A flag indicating whether the object was successfully drawn.", + "returnType": "Boolean" + }, + { + "description": "Draws the text at position (x,y) using the specified RGBA color and [roFont](https://developer.roku.com/docs/references/brightscript/components/rofont.md\"roFont\") font object. Text is drawn anti-aliased. The background image/color behind the text will show through the spaces and holes in the text. To have the text erase the background, make a call to [DrawRect()](#drawrectx-as-integer-y-as-integer-width-as-integer-height-as-integer-rgba-as-integer-as-void) before calling DrawText(). The size, bold, and italic attributes are specified when creating the [roFont](https://developer.roku.com/docs/references/brightscript/components/rofont.md\"roFont\").", + "name": "DrawText", + "params": [ + { + "default": null, + "description": "The text to be drawn.", + "isRequired": true, + "name": "text", + "type": "String" + }, + { + "default": null, + "description": "The x-coordinate of the source object.", + "isRequired": true, + "name": "x", + "type": "Integer" + }, + { + "default": null, + "description": "The y-coordinate of the source object.", + "isRequired": true, + "name": "y", + "type": "Integer" + }, + { + "default": null, + "description": "The color of the text.", + "isRequired": true, + "name": "rgba", + "type": "Integer" + }, + { + "default": null, + "description": "The [roFont](https://developer.roku.com/docs/references/brightscript/components/rofont.md\"roFont\") object to be used for the text.", + "isRequired": true, + "name": "font", + "type": "Object" + } + ], + "returnDescription": "A flag indicating whether the object was successfully drawn.", + "returnType": "Boolean" + }, + { + "description": "Realizes the bitmap by finishing all queued draw calls. Until Finish() is called, prior graphics operations may not be user visible. For example, they may be in the graphics display pipeline, or in a server queue.", + "name": "Finish", + "params": [], + "returnType": "Void" + }, + { + "description": "Checks if the alpha blending is enabled.", + "name": "GetAlphaEnable", + "params": [], + "returnDescription": "A flag indicating whether alpha blending is enabled.", + "returnType": "Boolean" + }, + { + "description": "Gets the RGBA pixel values for the specified rectangle.", + "name": "GetByteArray", + "params": [ + { + "default": null, + "description": "The x-coordinate of the rectangle.", + "isRequired": true, + "name": "x", + "type": "Integer" + }, + { + "default": null, + "description": "The y-coordinate of the rectangle.", + "isRequired": true, + "name": "y", + "type": "Integer" + }, + { + "default": null, + "description": "The width of the rectangle.", + "isRequired": true, + "name": "width", + "type": "Integer" + }, + { + "default": null, + "description": "The height of the rectangle.", + "isRequired": true, + "name": "height", + "type": "Integer" + } + ], + "returnDescription": "An roByteArray representing the RGBA pixel values for the specified rectangle.", + "returnType": "Object" + }, + { + "description": "Gets the height of the bitmap in pixels.", + "name": "GetHeight", + "params": [], + "returnDescription": "The height of the bitmap in pixels.", + "returnType": "Integer" + }, + { + "description": "Gets PNG image data for the specified area of the bitmap. The PNG is in 32-bit RGBA format.", + "name": "GetPng", + "params": [ + { + "default": null, + "description": "The x-coordinate of the rectangle.", + "isRequired": true, + "name": "x", + "type": "Integer" + }, + { + "default": null, + "description": "The width of the rectangle.", + "isRequired": true, + "name": "width", + "type": "Integer" + }, + { + "default": null, + "description": "The y-coordinate of the rectangle.", + "isRequired": true, + "name": "y", + "type": "Integer" + }, + { + "default": null, + "description": "The height of the rectangle.", + "isRequired": true, + "name": "height", + "type": "Integer" + } + ], + "returnDescription": "An roByteArray object containing PNG image data for the specified area of the bitmap. If the coordinates are out of bounds, or the PNG conversion fails for any reason, then invalid is returned", + "returnType": "Object" + }, + { + "description": "Gets the width of the bitmap.", + "name": "GetWidth", + "params": [], + "returnDescription": "The width of the bitmap in pixels.", + "returnType": "Integer" + }, + { + "description": "Enables alpha blending when the source bitmap is the destination. The setting of the source bitmap's alpha enable is ignored.", + "name": "SetAlphaEnable", + "params": [ + { + "default": null, + "description": "A flag specifying whether alpha blending is enabled.", + "isRequired": true, + "name": "enable", + "type": "Boolean" + } + ], + "returnType": "Void" + } + ], + "name": "ifDraw2D", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifdraw2d.md" + }, + "ifenum": { + "implementers": [ + { + "description": "An array stores an indexed collection of BrightScript objects", + "name": "roArray", + "url": "https://developer.roku.com/docs/references/brightscript/components/roarray.md" + }, + { + "description": "An associative array (also known as a map, dictionary or hash table) allows objects to be associated with string keys", + "name": "roAssociativeArray", + "url": "https://developer.roku.com/docs/references/brightscript/components/roassociativearray.md" + }, + { + "description": "The byte array component is used to contain and manipulate an arbitrary array of bytes", + "name": "roByteArray", + "url": "https://developer.roku.com/docs/references/brightscript/components/robytearray.md" + }, + { + "description": "The list object implements the interfaces: ifList, ifArray, ifEnum and therefore can behave like an array that can dynamically add members", + "name": "roList", + "url": "https://developer.roku.com/docs/references/brightscript/components/rolist.md" + }, + { + "description": "A Message Port is the place messages (events) are sent", + "name": "roMessagePort", + "url": "https://developer.roku.com/docs/references/brightscript/components/romessageport.md" + }, + { + "description": "Contains a list of roXML objects", + "name": "roXMLList", + "url": "https://developer.roku.com/docs/references/brightscript/components/roxmllist.md" + } + ], + "methods": [ + { + "description": "Checks whether the enumeration contains no elements.", + "name": "IsEmpty", + "params": [], + "returnDescription": "A flag indicating whether the enumeration contains no elements (true), or contains elements (false).", + "returnType": "Boolean" + }, + { + "description": "Checks whether the current position is not past the end of the enumeration.", + "name": "IsNext", + "params": [], + "returnDescription": "A flag indicating whether the current position is not past the end (true), or is past the end (false).", + "returnType": "Boolean" + }, + { + "description": "Increments the position of an enumeration. If the last element of the enumeration is returned, this method sets the current position to indicate that it is now past the end.", + "name": "Next", + "params": [], + "returnDescription": "The value at the current position of the enumeration. If the current position is already past the end (that is, the last element has already been returned by a previous call to this method), \"invalid\" is returned.", + "returnType": "Dynamic" + }, + { + "description": "Resets the current position to the first element of the enumeration.", + "name": "Reset", + "params": [], + "returnType": "Void" + } + ], + "name": "ifEnum", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifenum.md" + }, + "ifevpcipher": { + "implementers": [ + { + "description": "The EVP Cipher component provides an interface to the OpenSSL EVP library of symmetric cipher commands", + "name": "roEVPCipher", + "url": "https://developer.roku.com/docs/references/brightscript/components/roevpdigest.md" + } + ], + "methods": [ + { + "description": "Signals that all data has been submitted by previous calls to Update().", + "name": "Final", + "params": [], + "returnDescription": "The last remaining encrypted or decrypted bytes.", + "returnType": "Object" + }, + { + "description": "Processes the included [roByteArray](https://developer.roku.com/docs/references/brightscript/components/robytearray.md containing encrypted/decrypted data.", + "name": "Process", + "params": [ + { + "default": null, + "description": "An [roByteArray](https://developer.roku.com/docs/references/brightscript/components/robytearray.md containing data that is encrypted or decrypted.", + "isRequired": true, + "name": "bytes", + "type": "Object" + } + ], + "returnDescription": "An [roByteArray](/docs/references/brightscript/components/robytearray.md \"roByteArray\") containing the result.", + "returnType": "Object" + }, + { + "description": "Reinitializes an existing cipher context. This can be called to reuse an existing [roEVPCipher](https://developer.roku.com/docs/references/brightscript/components/roevpdigest.md\"roEVPCipher\") object to encrypt new data", + "name": "Reinit", + "params": [], + "returnDescription": "Returns 0 on success or non-zero on failure.", + "returnType": "Integer" + }, + { + "description": "Configures and initializes a new cipher context.", + "name": "Setup", + "params": [ + { + "default": null, + "description": "True for encryption; false for decryption", + "isRequired": true, + "name": "encrypt", + "type": "Boolean" + }, + { + "default": null, + "description": "Cipher format string, from openssl, listed at roEVPCipher", + "isRequired": true, + "name": "format", + "type": "String" + }, + { + "default": null, + "description": "A hex-encoded key", + "isRequired": true, + "name": "key", + "type": "String" + }, + { + "default": null, + "description": "A hex-encoded initialization vector, which can be an empty string", + "isRequired": true, + "name": "iv", + "type": "String" + }, + { + "default": null, + "description": "1 to use standard padding; 0 for no padding)", + "isRequired": true, + "name": "padding", + "type": "Integer" + } + ], + "returnDescription": "Returns 0 on success or non-zero on failure.", + "returnType": "Integer" + }, + { + "description": "Updates the included [roByteArray](https://developer.roku.com/docs/references/brightscript/components/robytearray.md containing encrypted/decrypted data.", + "name": "Update", + "params": [ + { + "default": null, + "description": "An [roByteArray](https://developer.roku.com/docs/references/brightscript/components/robytearray.md containing data that is encrypted or decrypted.", + "isRequired": true, + "name": "bytes", + "type": "Object" + } + ], + "returnDescription": "An [roByteArray](/docs/references/brightscript/components/robytearray.md \"roByteArray\") containing a subset of the result. Some or all of the result may not be returned until the next call to Update().", + "returnType": "Object" + } + ], + "name": "ifEVPCipher", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifevpcipher.md" + }, + "ifevpdigest": { + "implementers": [ + { + "description": "The EVP Digest component provides an interface to the OpenSSL EVP library of message digest algorithms", + "name": "roEVPDigest", + "url": "https://developer.roku.com/docs/references/brightscript/components/roevpdigest.md" + } + ], + "methods": [ + { + "description": "Returns the digest of data passed in by previous calls to [Update()](#updatebytes-as-object-as-void) as a hex string.", + "name": "Final", + "params": [], + "returnDescription": "Hex string (digest of data)", + "returnType": "String" + }, + { + "description": "Digests the provided data.", + "name": "Process", + "params": [ + { + "default": null, + "description": "An [roByteArray](https://developer.roku.com/docs/references/brightscript/components/robytearray.md containing digested data", + "isRequired": true, + "name": "bytes", + "type": "Object" + } + ], + "returnDescription": "A Hex string (Digested array data).", + "returnType": "String" + }, + { + "description": "Re-initializes an existing message digest context. This can be called to reuse an existing [roEVPDigest](https://developer.roku.com/docs/references/brightscript/components/roevpdigest.md\"roEVPDigest\") object to digest new data.", + "name": "Reinit", + "params": [], + "returnDescription": "Returns 0 on success or non-zero on failure.", + "returnType": "Integer" + }, + { + "description": "Initializes a new message digest context.", + "name": "Setup", + "params": [ + { + "default": null, + "description": "The supported digest algorithm from openssl, listed at roEVPDigest.", + "isRequired": true, + "name": "digestType", + "type": "String" + } + ], + "returnDescription": "Returns 0 on success or non-zero on failure.", + "returnType": "Integer" + }, + { + "description": "Adds more data to be digested.", + "name": "Update", + "params": [ + { + "default": null, + "description": "An [roByteArray](https://developer.roku.com/docs/references/brightscript/components/robytearray.md containing data to be added to the current digest", + "isRequired": true, + "name": "bytes", + "type": "Object" + } + ], + "returnType": "Void" + } + ], + "name": "ifEVPDigest", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifevpdigest.md" + }, + "iffilesystem": { + "implementers": [ + { + "description": "The roFilesystem component implements common filesystem inspection and modification routines", + "name": "roFile System", + "url": "https://developer.roku.com/docs/developer-program/getting-started/architecture/file-system.md" + } + ], + "methods": [ + { + "description": "Copies the files from one directory to another.", + "name": "CopyFile", + "params": [ + { + "default": null, + "description": "The source path containing the files to be copied.", + "isRequired": true, + "name": "fromPath", + "type": "String" + }, + { + "default": null, + "description": "The target path to which files are to be copied.", + "isRequired": true, + "name": "toPath", + "type": "String" + } + ], + "returnDescription": "A flag indicating whether the files were successfully copied.", + "returnType": "Boolean" + }, + { + "description": "Creates the directory specified by the path parameter. All directories in path except the last one must already exist; that is, only one directory can be created.", + "name": "CreateDirectory", + "params": [ + { + "default": null, + "description": "The path of the directory to be created.", + "isRequired": true, + "name": "path", + "type": "String" + } + ], + "returnDescription": "A flag indicating whether the path was successfully created.", + "returnType": "Boolean" + }, + { + "description": "Permanently removes the file or directory specified by the path parameter. If path is a directory, its contents are recursively removed.", + "name": "Delete", + "params": [ + { + "default": null, + "description": "The path of the directory to be deleted.", + "isRequired": true, + "name": "path", + "type": "String" + } + ], + "returnDescription": "A flag indicating whether the path was successfully deleted.", + "returnType": "Boolean" + }, + { + "description": "Checks if the specified directory path exists on the device.", + "name": "Exists", + "params": [ + { + "default": null, + "description": "The directory path to be checked.", + "isRequired": true, + "name": "path", + "type": "String" + } + ], + "returnDescription": "A flag indicating whether the specified path directory exists on the device.", + "returnType": "Boolean" + }, + { + "description": "Returns the file names in the specified directory path matching the provided regex.", + "name": "Find", + "params": [ + { + "default": null, + "description": "The directory path from which to get a list of file names.", + "isRequired": true, + "name": "dirPath", + "type": "String" + }, + { + "default": null, + "description": "The regex to be used to search for files.", + "isRequired": true, + "name": "regEx", + "type": "String" + } + ], + "returnDescription": "An [roList](/docs/references/brightscript/components/rolist.md \"roList\") of Strings representing the directory listing of names in dirPath that match the regex.", + "returnType": "Object" + }, + { + "description": "Returns the file names in the specified directory path and any sudirectories matching the provided regex.", + "name": "FindRecurse", + "params": [ + { + "default": null, + "description": "The directory path from which to get a list of file names.", + "isRequired": true, + "name": "dirPath", + "type": "String" + }, + { + "default": null, + "description": "The regex to be used to search for files.", + "isRequired": true, + "name": "regEx", + "type": "String" + } + ], + "returnDescription": "An [roList](/docs/references/brightscript/components/rolist.md \"roList\") of Strings representing the directory listing of names in dirPath that match the regex. Each item in the list is the name of the file relative to dirPath.", + "returnType": "Object" + }, + { + "description": "Returns the file names in the specified directory path.", + "name": "GetDirectoryListing", + "params": [ + { + "default": null, + "description": "The directory path from which to get a list of file names.", + "isRequired": true, + "name": "dirPath", + "type": "String" + } + ], + "returnDescription": "An [roList](/docs/references/brightscript/components/rolist.md \"roList\") of strings representing the directory listing of names in dirPath.", + "returnType": "Object" + }, + { + "description": "Returns information about the specified volume. The function can only be called on external volumes; internal volumes do not return meaningful information.", + "name": "GetVolumeInfo", + "params": [ + { + "default": null, + "description": "The external volume for which to get information. This should be specified as the volume name plus a directory separator (for example, \"ext1:/\").", + "isRequired": true, + "name": "path", + "type": "String" + } + ], + "returnDescription": "An roAssociativeArray containing the following key-value pairs about the specified external volume:", + "returnType": "Object" + }, + { + "description": "Returns the available volumes on the device.", + "name": "GetVolumeList", + "params": [], + "returnDescription": "An [roList](/docs/references/brightscript/components/rolist.md \"roList\") containing strings representing the available volumes.", + "returnType": "Object" + }, + { + "description": "Returns the file names in the specified directory path matching the provided shell-like pattern. This method is similar to the [Find()](#finddirpath-as-string-regex-as-string-as-object) method except that it uses shell-like pattern matching rather than regular expression matching.", + "name": "Match", + "params": [ + { + "default": null, + "description": "The directory path from which to get a list of file names.", + "isRequired": true, + "name": "path", + "type": "String" + }, + { + "default": null, + "description": "The shell-like pattern to be used to search for files. The pattern may contain wildcards such as `*`and `?`.", + "isRequired": true, + "name": "pattern", + "type": "String" + } + ], + "returnDescription": "An [roList](/docs/references/brightscript/components/rolist.md \"roList\") of Strings representing the directory listing of names in dirPath that match the shell-like pattern.", + "returnType": "Object" + }, + { + "description": "Renames the directory.", + "name": "Rename", + "params": [ + { + "default": null, + "description": "The current name of the path to be renamed.", + "isRequired": true, + "name": "fromPath", + "type": "String" + }, + { + "default": null, + "description": "The new name of the path.", + "isRequired": true, + "name": "toPath", + "type": "String" + } + ], + "returnDescription": "A flag indicating whether the directory was successfully renamed. If the provided target directory (**toPath**) exists, it is not overwritten; instead the operation fails and this method returns false", + "returnType": "Boolean" + }, + { + "description": "Returns the keys in the specified directory path.", + "name": "Stat", + "params": [ + { + "default": null, + "description": "The directory path to be checked.", + "isRequired": true, + "name": "path", + "type": "String" + } + ], + "returnDescription": "An [roAssociativeArray](/docs/references/brightscript/components/roassociativearray.md \"roAssociativeArray\") containing the following key-value pairs for the specified path:", + "returnType": "Object" + } + ], + "name": "ifFileSystem", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/iffilesystem.md" + }, + "iffloat": { + "description": "Interface equivalent for intrinsic type Float", + "implementers": [ + { + "description": "Object equivalent for intrinsic type 'Float'", + "name": "roFloat", + "url": "https://developer.roku.com/docs/references/brightscript/components/rofloat.md" + } + ], + "methods": [ + { + "description": "Gets the float value stored in the calling Float object.", + "name": "GetFloat", + "params": [], + "returnDescription": "The float value stored in the calling Float object.", + "returnType": "Float" + }, + { + "description": "Sets the calling Float object to the specified float value.", + "name": "SetFloat", + "params": [ + { + "default": null, + "description": "The float value to be set on the calling Float object.", + "isRequired": true, + "name": "value", + "type": "Float" + } + ], + "returnType": "Void" + } + ], + "name": "ifFloat", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/iffloat.md" + }, + "iffont": { + "implementers": [ + { + "description": "roFont represents a particular font, from a font-family (eg. Arial), with a particular pixel size (e.g 20), and a particular boldness or italicness", + "name": "roFont", + "url": "https://developer.roku.com/docs/references/brightscript/components/rofont.md" + } + ], + "methods": [ + { + "description": "Returns the number of pixels of the font ascent.", + "name": "GetAscent", + "params": [], + "returnDescription": "The number of pixels.", + "returnType": "Integer" + }, + { + "description": "Returns the number of pixels of the font descent.", + "name": "GetDescent", + "params": [], + "returnDescription": "The number of pixels.", + "returnType": "Integer" + }, + { + "description": "Returns the font maximum advance width in pixels.", + "name": "GetMaxAdvance", + "params": [], + "returnDescription": "The number of pixels.", + "returnType": "Integer" + }, + { + "description": "Returns the number of pixels from one line to the next when drawing with this font.", + "name": "GetOneLineHeight", + "params": [], + "returnDescription": "The number of pixels.", + "returnType": "Integer" + }, + { + "description": "Returns the number of pixels from one line to the next when drawing with this font. Each glyph and the needed spacing between glyphs is measured.", + "name": "GetOneLineWidth", + "params": [ + { + "default": null, + "description": "The subject text.", + "isRequired": true, + "name": "text", + "type": "String" + }, + { + "default": null, + "description": "Generally, the amount of pixels available for rendering on this line.", + "isRequired": true, + "name": "MaxWidth", + "type": "Integer" + } + ], + "returnDescription": "The number of pixels. This will be less than provided MaxWidth.", + "returnType": "Integer" + } + ], + "name": "ifFont", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/iffont.md" + }, + "iffontmetrics": { + "deprecatedDescription": "This interface is deprecated. Developers should use [roFont](/docs/references/brightscript/components/rofont.md \"roFont\") methods (GetOneLineHeight and GetOneLineWidth).\n", + "description": "> This interface is deprecated. Developers should use [roFont](https://developer.roku.com/docs/references/brightscript/components/rofont.md\"roFont\") methods (GetOneLineHeight and GetOneLineWidth).", + "implementers": [ + { + "description": "The roFontMetrics object allows you to get display size information for a specific font returned by the roFontRegistry.Get() method", + "name": "roFontMetrics", + "url": "https://developer.roku.com/docs/references/brightscript/components/rofontmetrics.md" + } + ], + "isDeprecated": true, + "methods": [ + { + "description": "Returns the width and height of the **stringToDraw** parameter rendered in the font passed on the CreateObject() call.", + "name": "Size", + "params": [ + { + "default": null, + "description": "The string to be drawn.", + "isRequired": true, + "name": "stringToDraw", + "type": "String" + } + ], + "returnDescription": "An [roAssociativeArray](/docs/references/brightscript/components/roassociativearray.md \"roAssociativeArray\") with width and height parameters. The following example demonstrates this:", + "returnType": "Object" + } + ], + "name": "ifFontMetrics", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/iffontmetrics.md" + }, + "iffontregistry": { + "implementers": [ + { + "description": "The roFontRegistry object allows you to create roFont objects, either using the default font or using fonts in TrueType or OpenType files packaged with your application", + "name": "roFontRegistry", + "url": "https://developer.roku.com/docs/references/brightscript/components/rofontregistry.md" + } + ], + "methods": [ + { + "description": "Returns a valid font string that can be used as the value of the Font content meta-data parameter recognized by the [roImageCanvas](https://developer.roku.com/docs/references/brightscript/components/roimagecanvas.md\"roImageCanvas\") method.", + "name": "Get", + "params": [ + { + "default": null, + "description": "The font family name.", + "isRequired": true, + "name": "family", + "type": "String" + }, + { + "default": null, + "description": "The requested font size, in pixels, not points.", + "isRequired": true, + "name": "size", + "type": "Integer" + }, + { + "default": null, + "description": "\"bold\" specifies a font variant that may be (but is not always) supported by the font file.", + "isRequired": true, + "name": "bold", + "type": "Boolean" + }, + { + "default": null, + "description": "\"italic\" specifies a font variant that may be (but is not always) supported by the font file.", + "isRequired": true, + "name": "italic", + "type": "Boolean" + } + ], + "returnDescription": "A valid font string.", + "returnType": "String" + }, + { + "description": "Returns the system font at its default size. Calling this method is the same as calling the [GetDefaultFont()](#getdefaultfontsize-as-integer-bold-as-boolean-italic-as-boolean-as-object) method with the following syntax: `reg.GetDefaultFont(reg.GetDefaultFontSize(), false, false)`.", + "name": "GetDefaultFont", + "params": [], + "returnDescription": "The system font as its default size.", + "returnType": "Object" + }, + { + "description": "Returns the system font. The system font is always available, even if the [Register()](#registerpath-as-string-as-boolean) method has not been called", + "name": "GetDefaultFont", + "params": [ + { + "default": null, + "description": "The requested font size, in pixels, not points.", + "isRequired": true, + "name": "size", + "type": "Integer" + }, + { + "default": null, + "description": "\"bold\" specifies a font variant that may be (but is not always) supported by the font file.", + "isRequired": true, + "name": "bold", + "type": "Boolean" + }, + { + "default": null, + "description": "\"italic\" specifies a font variant that may be (but is not always) supported by the font file.", + "isRequired": true, + "name": "italic", + "type": "Boolean" + } + ], + "returnDescription": "An roFont object representing the system font.", + "returnType": "Object" + }, + { + "description": "Returns the default font size.", + "name": "GetDefaultFontSize", + "params": [], + "returnDescription": "The default font size.", + "returnType": "Integer" + }, + { + "description": "Returns the names of the font families that have been registered via the [Register()](#registerpath-as-string-as-boolean) method. Each name can be passed as the first parameter to the [GetFont()](#getfontfamily-as-string-size-as-integer-bold-as-boolean-italic-as-boolean-as-object) method.", + "name": "GetFamilies", + "params": [], + "returnDescription": "An [roArray](/docs/references/brightscript/components/roarray.md \"roArray\") of strings that represent the names of the font families that have been registered.", + "returnType": "Object" + }, + { + "description": "Returns a font from the specified family, selected from the fonts previously registered via the [Register()](#registerpath-as-string-as-boolean) method.", + "name": "GetFont", + "params": [ + { + "default": null, + "description": "The font family name.", + "isRequired": true, + "name": "family", + "type": "String" + }, + { + "default": null, + "description": "The requested font size, in pixels, not points.", + "isRequired": true, + "name": "size", + "type": "Integer" + }, + { + "default": null, + "description": "\"bold\" specifies a font variant that may be (but is not always) supported by the font file.", + "isRequired": true, + "name": "bold", + "type": "Boolean" + }, + { + "default": null, + "description": "\"italic\" specifies a font variant that may be (but is not always) supported by the font file.", + "isRequired": true, + "name": "italic", + "type": "Boolean" + } + ], + "returnDescription": "An [roFont](/docs/references/brightscript/components/rofont.md \"roFont\") object representing a font from the specified family.", + "returnType": "Object" + }, + { + "description": "Registers a font file (.ttf or .otf format). Each font file defines one or more font families (usually one).", + "name": "Register", + "params": [ + { + "default": null, + "isRequired": true, + "name": "path", + "type": "String" + } + ], + "returnDescription": "A flag indicating whether the fonts in the specified file were successfully installed.", + "returnType": "Boolean" + } + ], + "name": "ifFontRegistry", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/iffontregistry.md" + }, + "iffunction": { + "description": "Interface equivalent for intrinsic type Function.", + "implementers": [ + { + "description": "Object equivalent for intrinsic type Function", + "name": "roFunction", + "url": "https://developer.roku.com/docs/references/brightscript/components/rofunction.md" + } + ], + "methods": [ + { + "name": "GetSub", + "params": [], + "returnType": "Function" + }, + { + "name": "SetSub", + "params": [ + { + "default": null, + "isRequired": true, + "name": "value", + "type": "Function" + } + ], + "returnType": "Void" + } + ], + "name": "ifFunction", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/iffunction.md" + }, + "ifgetmessageport": { + "implementers": [ + { + "description": "The HDMI status component provides an interface to the current HDMI operational status", + "name": "roHdmiStatus", + "url": "https://developer.roku.com/docs/references/brightscript/components/rohdmistatus.md" + }, + { + "description": "The roScreen component provides a full screen drawing surface that can be stacked and that you can receive input events from", + "name": "roScreen", + "url": "https://developer.roku.com/docs/references/brightscript/components/roscreen.md" + }, + { + "description": "The roTextToSpeech component provides text to speech capabilities to applications", + "name": "roTextToSpeech", + "url": "https://developer.roku.com/docs/references/brightscript/components/rotexttospeech.md" + }, + { + "description": "A roUrlTransfer object transfers data to or from remote servers specified by URLs", + "name": "roUrlTransfer", + "url": "https://developer.roku.com/docs/references/brightscript/components/rourltransfer.md" + } + ], + "methods": [ + { + "description": "Returns the message port (if any) currently associated with the object", + "name": "GetMessagePort", + "params": [], + "returnDescription": "The message port.", + "returnType": "Object" + } + ], + "name": "ifGetMessagePort", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifgetmessageport.md" + }, + "ifgridscreen": { + "deprecatedDescription": "This interface is deprecated.\n\nBeginning July 1st, 2017, any new channels using this component will be rejected during certification.\n\nBeginning January 1st, 2018, any updates to existing channels using this component will be rejected during certification.\n", + "description": "> This interface is deprecated.\n> \n> Beginning July 1st, 2017, any new channels using this component will be rejected during certification.\n> \n> Beginning January 1st, 2018, any updates to existing channels using this component will be rejected during certification.", + "implementers": [ + { + "description": "The Grid Screen provides a graphical display of poster art from multiple content categories from within a single screen", + "name": "roGridScreen", + "url": "https://developer.roku.com/docs/references/brightscript/components/rogridscreen.md" + } + ], + "isDeprecated": true, + "methods": [ + { + "name": "ClearMessage", + "params": [], + "returnType": "Void" + }, + { + "description": "Closes the screen and deletes the associated object.", + "name": "Close", + "params": [], + "returnType": "Void" + }, + { + "description": "Enables the breadcrumb text specified with [SetBreadcrumbText()](#setbreadcrumbtextlocation1-as-string-location2-as-string-as-void) method to be displayed.", + "name": "SetBreadcrumbEnabled", + "params": [ + { + "default": null, + "description": "Set this flag to true in order to display the breadcrumb text.", + "isRequired": true, + "name": "enabled", + "type": "Boolean" + } + ], + "returnType": "Void" + }, + { + "description": "If SetBreadcrumbEnabled() is true, display Location1 and Location2 in the right of the overhang.", + "name": "SetBreadcrumbText", + "params": [ + { + "default": null, + "description": "The first location value.", + "isRequired": true, + "name": "Location1", + "type": "String" + }, + { + "default": null, + "description": "The second location value.", + "isRequired": true, + "name": "Location2", + "type": "String" + } + ], + "returnType": "Void" + }, + { + "description": "Sets the content list for the specified row.", + "name": "SetContentList", + "params": [ + { + "default": null, + "description": "The row to be updated with the provided content list.", + "isRequired": true, + "name": "rowIndex", + "type": "Integer" + }, + { + "default": null, + "description": "An roArray of items, where each item is an roAssociativeArray containing the [content metadata](/docs/developer-program/getting-started/architecture/content-metadata.md \"Content Meta-Data\") used to display the item (for example, Title, Description, SDPosterUrl, and HDPosterUrl). See [Content metadata](/docs/developer-program/getting-started/architecture/content-metadata.md \"Content Metadata\") for details.", + "isRequired": true, + "name": "contentList", + "type": "Object" + } + ], + "returnType": "Void" + }, + { + "description": "Set or update items in the content list for the specified row. Enables performance improvements when dealing with your backend services by asking only for only a screenful worth of data at a time, and then update the rest of the content list content in the background.", + "name": "SetContentListSubset", + "params": [ + { + "default": null, + "isRequired": true, + "name": "rowIndex", + "type": "Integer" + }, + { + "default": null, + "isRequired": true, + "name": "contentList", + "type": "Object" + }, + { + "default": null, + "isRequired": true, + "name": "offset", + "type": "Integer" + }, + { + "default": null, + "isRequired": true, + "name": "length", + "type": "Integer" + } + ], + "returnType": "Void" + }, + { + "description": "Specifies whether the item counter should be displayed. The item counter shows the focused item number and count of items in the row.", + "name": "SetCounterVisible", + "params": [ + { + "default": null, + "description": "Set this flag to true in order to display the item counter.", + "isRequired": true, + "name": "visible", + "type": "Boolean" + } + ], + "returnType": "Void" + }, + { + "description": "Description", + "name": "SetDescriptionVisible", + "params": [ + { + "default": null, + "description": "Set this flag to true in order to display the description box for the focused item.", + "isRequired": true, + "name": "visible", + "type": "Boolean" + } + ], + "returnType": "Void" + }, + { + "description": "Sets the mode for displaying images in the grid screen. This allows images to be either scaled to completely fill the poster frame (scale-to-fill) or scaled to fit inside the poster frame (scale-to-fit) while maintaining aspect ratio.", + "name": "SetDisplayMode", + "params": [ + { + "default": null, + "description": "The mode to be used for displaying images, which maybe one of the following values: * \"scale-to-fill\": scales image to completely fill the rectangle of the bounding frame (Default) * \"scale-to-fit\": scale image to fit horizontally or vertically as appropriate while still maintaining aspect ratio. Note that scale-to-fit may result in pillar-box or letter-box display of images. * \"zoom-to-fill\": scales and crops image to maintain aspect ratio and completely fill the rectangle of the bounding frame. * \"photo-fit\": Uses several methods to fit the image with a different aspect ratio to the screen. First, it will asymmetrically scale up to a maximum of 5%. Second, for landscape images, if vertical cropping is necessary, it will remove two lines off the bottom for every one line off the top up to a maximum of 30% of the image. For all images, if horizontal cropping is necessary it will crop an equal amount from both sides.", + "isRequired": true, + "name": "displayMode", + "type": "String" + } + ], + "returnType": "Void" + }, + { + "description": "Specifies the default images to be shown in the grid when the grid screen content fails to load.", + "name": "SetErrorPoster", + "params": [ + { + "default": null, + "description": "The URL of the standard definition poster image to be shown.", + "isRequired": true, + "name": "sdPosterUrl", + "type": "String" + }, + { + "default": null, + "description": "The URL of the high definition poster image to be shown.", + "isRequired": true, + "name": "hdPosterUrl", + "type": "String" + } + ], + "returnType": "Void" + }, + { + "description": "Set the focus to the specified row and item.", + "name": "SetFocusedListItem", + "params": [ + { + "default": null, + "description": "The row to be updated.", + "isRequired": true, + "name": "rowIndex", + "type": "Integer" + }, + { + "default": null, + "description": "The items within the specified row to be updated.", + "isRequired": true, + "name": "itemIndex", + "type": "Integer" + } + ], + "returnType": "Void" + }, + { + "description": "Specifies whether the focus ring is displayed for the focused item.", + "name": "SetFocusRingVisible", + "params": [ + { + "default": null, + "description": "Set this flag to true in order to display the focus ring for the focused item.", + "isRequired": true, + "name": "visible", + "type": "Boolean" + } + ], + "returnType": "Void" + }, + { + "description": "Sets the style or theme for displaying images in the grid screen. This allows different appearances of the overall grid for different sized images.", + "name": "SetGridStyle", + "params": [ + { + "default": null, + "description": "The image size, which may be one of the following values: * flat-movie – movie posters as seen in the Netflix channel (Default) * Image sizes: SD 110x150 HD 210x270 * SD 5 posters across, by 2 rows * HD 5 posters across, by 2 rows", + "isRequired": true, + "name": "style", + "type": "String" + } + ], + "returnType": "Void" + }, + { + "description": "Sets the list of row titles. The first name is displayed for the first row, the second name for the second row, and so on. The list should contain as many titles as the number of rows in the grid.", + "name": "SetListName", + "params": [ + { + "default": null, + "isRequired": true, + "name": "rowIndex", + "type": "Integer" + }, + { + "default": null, + "isRequired": true, + "name": "name", + "type": "String" + } + ], + "returnType": "Void" + }, + { + "description": "Sets the list of row titles. The first name is displayed for the first row, the second name for the second row, etc. The list should contain as many titles as the number of rows in the grid", + "name": "SetListNames", + "params": [ + { + "default": null, + "description": "An roArray of strings containing the titles to be displayed in the grid.", + "isRequired": true, + "name": "names", + "type": "Object" + } + ], + "returnType": "Void" + }, + { + "description": "Changes the current position (both row and column) of the downloading thread in populating image posters of the grid.", + "name": "SetListOffset", + "params": [ + { + "default": null, + "description": "The row to be updated.", + "isRequired": true, + "name": "rowIndex", + "type": "Integer" + }, + { + "default": null, + "description": "The items within the specified row to be updated.", + "isRequired": true, + "name": "itemIndex", + "type": "Integer" + } + ], + "returnType": "Void" + }, + { + "description": "Sets the images size and orientation for each row in the grid. This method is used in conjunction with the mixed-apect-ratio grid style.", + "name": "SetListPosterStyles", + "params": [ + { + "default": null, + "description": "The style to be used for the row, which may be one of the following values: landscape, portrait, or square", + "isRequired": true, + "name": "styles", + "type": "Object" + } + ], + "returnType": "Void" + }, + { + "description": "Sets the visibility of the specified row.", + "name": "SetListVisible", + "params": [ + { + "default": null, + "description": "The row to be updated.", + "isRequired": true, + "name": "rowIndex", + "type": "Integer" + }, + { + "default": null, + "description": "A flag indicating whether the row is to be made visible.", + "isRequired": true, + "name": "visible", + "type": "Boolean" + } + ], + "returnType": "Void" + }, + { + "description": "Specifies the default images to be shown in the grid while the grid screen content is loading.", + "name": "SetLoadingPoster", + "params": [ + { + "default": null, + "description": "The URL of the standard definition poster image to be shown.", + "isRequired": true, + "name": "sdPosterUrl", + "type": "String" + }, + { + "default": null, + "description": "The URL of the high definition poster image to be shown.", + "isRequired": true, + "name": "hdPosterUrl", + "type": "String" + } + ], + "returnType": "Void" + }, + { + "description": "Controls how the remote \"up\" key behaves when it is pressed with the top row selected.", + "name": "SetUpBehaviorAtTopRow", + "params": [ + { + "default": null, + "description": "Specifies the behavior of the \"up\" key. This may be one of the following values: * \"stop\": stop scrolling up, and stay on the roGridScreen (default behavior) * \"exit\": exit the roGridScreen", + "isRequired": true, + "name": "behavior", + "type": "String" + } + ], + "returnType": "Void" + }, + { + "description": "Sets the number of rows in the grid. The number of rows must be set before calling other functions to populate grid data.", + "name": "SetupLists", + "params": [ + { + "default": null, + "description": "The number of rows to be used in the grid.", + "isRequired": true, + "name": "count", + "type": "Integer" + } + ], + "returnType": "Void" + }, + { + "description": "Displays or refreshes the screen after the initial creation or the state changes.", + "name": "Show", + "params": [], + "returnDescription": "A flag indicating whether the screen is displayed (true).", + "returnType": "Boolean" + }, + { + "description": "Displays a semi-transparent popup message box to the user in the center of the screen over the poster screen. This is generally used for error messages.", + "name": "ShowMessage", + "params": [ + { + "default": null, + "description": "The text to be displayed in the popup message box.", + "isRequired": true, + "name": "message", + "type": "String" + } + ], + "returnType": "Void" + } + ], + "name": "ifGridScreen", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifgridscreen.md" + }, + "ifhdmistatus": { + "implementers": [ + { + "description": "The HDMI status component provides an interface to the current HDMI operational status", + "name": "roHdmiStatus", + "url": "https://developer.roku.com/docs/references/brightscript/components/rohdmistatus.md" + } + ], + "methods": [ + { + "description": "Returns the version number of the currently established HDCP link.", + "name": "GetHdcpVersion", + "params": [], + "returnDescription": "The version number of the HDCP link: 1.4 or 2.2.", + "returnType": "String" + }, + { + "description": "Checks whether the HDMI or MHL output is connected to an HDMI device.", + "name": "IsConnected", + "params": [], + "returnDescription": "A flag indicating whether the HDMI or MHL output is connected to an HDMI device.", + "returnType": "Boolean" + }, + { + "description": "Checks if the current established HDCP link is the specified version or higher", + "name": "IsHdcpActive", + "params": [ + { + "default": null, + "description": "The HDCP link version to be checked (for example, \"1.4\" or \"2.2\").", + "isRequired": true, + "name": "version", + "type": "String" + } + ], + "returnDescription": "A flag indicating whether the current established HDCP link is the specified `version`.", + "returnType": "Boolean" + } + ], + "name": "ifHdmiStatus", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifhdmistatus.md" + }, + "ifhmac": { + "implementers": [ + { + "description": "The HMAC component provides an interface to the OpenSSL HMAC functions", + "name": "roHMAC", + "url": "https://developer.roku.com/docs/references/brightscript/components/rohmac.md" + } + ], + "methods": [ + { + "description": "Returns an [roByteArray](https://developer.roku.com/docs/references/brightscript/components/robytearray.md\"roByteArray\") containing the final MAC.", + "name": "Final", + "params": [], + "returnDescription": "The final MAC.", + "returnType": "Object" + }, + { + "description": "Digests the data in an array generates a MAC. Calling this method is the same as making the following calls:", + "name": "Process", + "params": [ + { + "default": null, + "description": "An [roByteArray](https://developer.roku.com/docs/references/brightscript/components/robytearray.md\"roByteArray\") with the data to be digested.", + "isRequired": true, + "name": "message", + "type": "Object" + } + ], + "returnDescription": "An [roByteArray](/docs/references/brightscript/components/robytearray.md \"roByteArray\") containing the generated MAC.", + "returnType": "Object" + }, + { + "description": "Re-initializes an existing HMAC context. This can be called to reuse an existing roHMAC object to authenticate new data.", + "name": "Reinit", + "params": [], + "returnDescription": "An integer indicating whether the function succeeded (0) or failed (1).", + "returnType": "Integer" + }, + { + "description": "Initializes new HMAC context.", + "name": "Setup", + "params": [ + { + "default": null, + "description": "Selects one of the supported digest algorithms, as documented in [roEVPDigest](https://developer.roku.com/docs/references/brightscript/components/roevpdigest.md\"roEVPDigest\").", + "isRequired": true, + "name": "digestType", + "type": "String" + }, + { + "default": null, + "description": "An roByteArray containing the key for the MAC.", + "isRequired": true, + "name": "key", + "type": "Object" + } + ], + "returnDescription": "An integer indicating whether the function succeeded (0) or failed (1).", + "returnType": "Integer" + }, + { + "description": "Adds more data to be digested. The data in the array is added to the current digest.", + "name": "Update", + "params": [ + { + "default": null, + "description": "An [roByteArray](https://developer.roku.com/docs/references/brightscript/components/robytearray.md\"roByteArray\") with the additional data to be digested.", + "isRequired": true, + "name": "partialMesssage", + "type": "Object" + } + ], + "returnType": "Void" + } + ], + "name": "ifHMAC", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifhmac.md" + }, + "ifhttpagent": { + "description": "The ifHttpAgent methods modify the way that URLs are accessed", + "implementers": [ + { + "description": "The Application Manager APIs set application level attributes, which mostly affect the look-and-feel of the application", + "name": "roAppManager", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifappmanager.md" + }, + { + "description": "The Audio Player object provides the ability to setup the playing of a series of audio streams", + "name": "roAudioPlayer", + "url": "https://developer.roku.com/docs/references/brightscript/components/roaudioplayer.md" + }, + { + "description": "The Grid Screen provides a graphical display of poster art from multiple content categories from within a single screen", + "name": "roGridScreen", + "url": "https://developer.roku.com/docs/references/brightscript/components/rogridscreen.md" + }, + { + "description": "The roImageCanvas component provides an interface to render graphic elements at specific spots on the screen", + "name": "roImageCanvas", + "url": "https://developer.roku.com/docs/references/brightscript/components/roimagecanvas.md" + }, + { + "description": "The List Screen provides a graphical display of content in a vertical list within a single screen", + "name": "roListScreen", + "url": "https://developer.roku.com/docs/references/brightscript/components/rolistscreen.md" + }, + { + "description": "The Paragraph Screen provides a way to display text and selection choices to the user", + "name": "roParagraphScreen", + "url": "https://developer.roku.com/docs/references/brightscript/components/roparagraphscreen.md" + }, + { + "description": "The Poster Screen provides a graphical display of poster art for content selection or can be used as a submenu to provide hierarchical structure to the application", + "name": "roPosterScreen", + "url": "https://developer.roku.com/docs/references/brightscript/components/roposterscreen.md" + }, + { + "description": "The roSGNode object is the BrightScript equivalent of SceneGraph XML file node creation", + "name": "roSGNode", + "url": "https://developer.roku.com/docs/references/brightscript/components/rosgnode.md" + }, + { + "description": "The Slide Show screen provides the ability to setup a photo slide show to playback a series of images", + "name": "roSlideShow", + "url": "https://developer.roku.com/docs/references/brightscript/components/roslideshow.md" + }, + { + "description": "The Springboard Screen shows detailed information about an individual piece of content and provides options for actions that may be taken on that content", + "name": "roSpringboardScreen", + "url": "https://developer.roku.com/docs/references/brightscript/components/rospringboardscreen.md" + }, + { + "description": "roTextScreen provides a way of displaying large amounts of scrollable text", + "name": "roTextScreen", + "url": "https://developer.roku.com/docs/references/brightscript/components/rotextscreen.md" + }, + { + "description": "The Texture Manager provides a set of API's for managing an roBitmap cache.", + "name": "roTextureManager", + "url": "https://developer.roku.com/docs/references/brightscript/components/rotexturemanager.md" + }, + { + "description": "An roTextureRequest is used to make requests to the roTextureManager", + "name": "roTextureRequest", + "url": "https://developer.roku.com/docs/references/brightscript/components/rotexturerequest.md" + }, + { + "description": "A roUrlTransfer object transfers data to or from remote servers specified by URLs", + "name": "roUrlTransfer", + "url": "https://developer.roku.com/docs/references/brightscript/components/rourltransfer.md" + }, + { + "description": "The roVideoPlayer component implements a video player with more programmatic control, but less user control than the roVideoScreen component", + "name": "roVideoPlayer", + "url": "https://developer.roku.com/docs/references/brightscript/components/rovideoplayer.md" + }, + { + "description": "The Video Screen object implements the video playback portion of the user interface", + "name": "roVideoScreen", + "url": "https://developer.roku.com/docs/references/brightscript/components/rovideoscreen.md" + } + ], + "methods": [ + { + "description": "Adds the specified cookies to the cookie cache.", + "name": "AddCookies", + "params": [ + { + "default": null, + "description": "An roArray of roAssociativeArrays, where each associative array represents a cookie to be added. Each associative array must contain the following key-value pairs:
NameTypeDescription
VersionIntegerCookie version number
DomainStringDomain to which cookie applies
PathStringPath to which cookie applies
NameStringName of the cookie
ValueStringValue of the cookie
ExpiresroDateTimeCookie expiration date, if any
", + "isRequired": true, + "name": "cookies", + "type": "Object" + } + ], + "returnDescription": "A flag indicating whether the cookies were successfully added to the cache.", + "returnType": "Boolean" + }, + { + "name": "AddHeader", + "params": [ + { + "default": null, + "description": "The name of the HTTP header to be added to the list of headers. If \"x-roku-reserved-dev-id\" is passed as the name, the value parameter is ignored and in its place, the devid of the currently running channel is used as the value. This allows the developer's server to know which client app is talking to it. Any other headers with names beginning with \"x-roku-reserved-\" are reserved and may not be set.", + "isRequired": true, + "name": "name", + "type": "String" + }, + { + "default": null, + "description": "The value of the HTTP header being added.", + "isRequired": true, + "name": "value", + "type": "String" + } + ], + "returnDescription": "A flag indicating whether the HTTP header was successfully added.", + "returnType": "Boolean" + }, + { + "description": "Removes all cookies from the cookie cache.", + "name": "ClearCookies", + "params": [], + "returnType": "Void" + }, + { + "description": "Enables any Set-Cookie headers returned from the request to be interpreted and the resulting cookies to be added to the cookie cache.", + "name": "EnableCookies", + "params": [], + "returnType": "Void" + }, + { + "name": "GetCookies", + "params": [ + { + "default": null, + "description": "The domain of the cookies to be retrieved. To match all domains, provide an empty string.", + "isRequired": true, + "name": "domain", + "type": "String" + }, + { + "default": null, + "description": "The path of the cookies to be retrieved.", + "isRequired": true, + "name": "path", + "type": "String" + } + ], + "returnDescription": "An roArray of roAssociativeArrays, where each associative array represents a cookie. The roAssociativeArrays contain the following key-value pairs:", + "returnType": "Object" + }, + { + "description": "Initializes the object to be sent to the Roku client certificate.", + "name": "InitClientCertificates", + "params": [], + "returnDescription": "A flag indicating whether the object sent to to the Roku client certificate was successfully initialized.", + "returnType": "Boolean" + }, + { + "description": "Sets the maximum depth of the certificate chain that will be accepted.", + "name": "SetCertificatesDepth", + "params": [ + { + "default": null, + "description": "The maximum depth to be used.", + "isRequired": true, + "name": "depth", + "type": "Integer" + } + ], + "returnType": "Void" + }, + { + "name": "SetCertificatesFile", + "params": [ + { + "default": null, + "description": "The directory path of the .pem file to be used.", + "isRequired": true, + "name": "path", + "type": "String" + } + ], + "returnDescription": "A flag indicating whether the certificate was successfully set.", + "returnType": "Boolean" + }, + { + "description": "Sets the HTTP headers to be sent in the HTTP request.", + "name": "SetHeaders", + "params": [ + { + "default": null, + "description": "An associative array containing the HTTP headers and values to be included in the HTTP request. If \"x-roku-reserved-dev-id\" is passed as a key, the value parameter is ignored and in its place, the devid of the currently running channel is used as the value. This allows the developer's server to know which client app is talking to it. Any other headers with names beginning with \"x-roku-reserved-\" are reserved and may not be set.", + "isRequired": true, + "name": "nameValueMap", + "type": "Object" + } + ], + "returnDescription": "A flag indicating whether the HTTP header was successfully set.", + "returnType": "Boolean" + } + ], + "name": "ifHttpAgent", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifhttpagent.md" + }, + "ifimagecanvas": { + "deprecatedDescription": "This interface is deprecated.\n\nBeginning July 1st, 2017, any new channels using this component will be rejected during certification.\n\nBeginning January 1st, 2018, any updates to existing channels using this component will be rejected during certification.\n", + "description": "> This interface is deprecated.\n> \n> Beginning July 1st, 2017, any new channels using this component will be rejected during certification.\n> \n> Beginning January 1st, 2018, any updates to existing channels using this component will be rejected during certification.", + "implementers": [ + { + "description": "The roImageCanvas component provides an interface to render graphic elements at specific spots on the screen", + "name": "roImageCanvas", + "url": "https://developer.roku.com/docs/references/brightscript/components/roimagecanvas.md" + } + ], + "isDeprecated": true, + "methods": [ + { + "description": "Adds a button to the specified screen.", + "name": "AddButton", + "params": [ + { + "default": null, + "description": "The ID of the button to be added to the screen.", + "isRequired": true, + "name": "id", + "type": "Integer" + }, + { + "default": null, + "description": "The title of the button to be added to the screen.", + "isRequired": true, + "name": "title", + "type": "String" + } + ], + "returnDescription": "A flag indicating whether the button was successfully added.", + "returnType": "Boolean" + }, + { + "description": "Turns updates on or off. Surrounding changes to several layers with AllowUpdates(false) and AllowUpdates(true) calls makes complex display modification atomic. This gives the application protection against the image canvas trying to render a partial update", + "name": "AllowUpdates", + "params": [ + { + "default": null, + "description": "Set this flag to true in order to enable updates.", + "isRequired": true, + "name": "updatesEnabled", + "type": "Boolean" + } + ], + "returnType": "Void" + }, + { + "name": "Clear", + "params": [], + "returnType": "Void" + }, + { + "description": "Clears all of the buttons from the screen and resets the array of buttons back to default with no buttons set.", + "name": "ClearButtons", + "params": [], + "returnType": "Void" + }, + { + "description": "Clears all content from a layer (see [SetLayer](#setlayerzorder-as-integer-contentmetadata-as-object-as-void) for the layer definition).", + "name": "ClearLayer", + "params": [ + { + "default": null, + "description": "The layer to be cleared.", + "isRequired": true, + "name": "zOrder", + "type": "Integer" + } + ], + "returnType": "Void" + }, + { + "description": "Closes the screen and deletes the associated object. This method is useful for avoiding screen flicker when the display order of your screens does not resemble a stack", + "name": "Close", + "params": [], + "returnType": "Void" + }, + { + "description": "Returns the width and height of the image canvas.", + "name": "GetCanvasRect", + "params": [], + "returnDescription": "An roAssociativeArray with names w for width and h for height.", + "returnType": "Object" + }, + { + "description": "Purges the internal cache of all images related to URLs in the current content list. If the content list is empty, then calling this method has no affect.", + "name": "PurgeCachedImages", + "params": [], + "returnType": "Void" + }, + { + "description": "Redraws the screen. Each call to this method replaces the previous content metadata that previously existed at that z-order layer.", + "name": "SetLayer", + "params": [ + { + "default": null, + "description": "A z-order specifier with higher z-orders closer to the viewer. Negative z-orders are \"behind the display\" and are thus invisible.", + "isRequired": true, + "name": "zOrder", + "type": "Integer" + }, + { + "default": null, + "description": "An [roAssociativeArray](https://developer.roku.com/docs/references/brightscript/components/roassociativearray.md\"roAssociativeArray\") ([Content Meta-Data](/docs/developer-program/getting-started/architecture/content-metadata.md \" Content Meta-Data\") objects) representing the information for each image to be displayed on the [roImageCanvas](https://developer.roku.com/docs/references/brightscript/components/roimagecanvas.md\"roImageCanvas\")", + "isRequired": true, + "name": "contentMetaData", + "type": "Object" + } + ], + "returnType": "Void" + }, + { + "description": "This method is similar to the [SetLayer()](#setlayerzorder-as-integer-contentlist-as-object-as-void) method, except it takes an [roArray](https://developer.roku.com/docs/references/brightscript/components/roarray.md\"roArray\") of [roAssociativeArrays](https://developer.roku.com/docs/references/brightscript/components/roassociativearray.md\"roAssociativeArrays\") instead of just a single [roAssociativeArray](https://developer.roku.com/docs/references/brightscript/components/roassociativearray.md\"roAssociativeArray\") of [Content Meta-Data](/docs/developer-program/getting-started/architecture/content-metadata.md \" Content Meta-Data\").", + "name": "SetLayer", + "params": [ + { + "default": null, + "description": "A z-order specifier with higher z-orders closer to the viewer. Negative z-orders are \"behind the display\" and are thus invisible.", + "isRequired": true, + "name": "zOrder", + "type": "Integer" + }, + { + "default": null, + "description": "An [roArray](https://developer.roku.com/docs/references/brightscript/components/roarray.md\"roArray\") of [roAssociativeArrays](https://developer.roku.com/docs/references/brightscript/components/roassociativearray.md\"roAssociativeArrays\") representing the information for each image to be displayed on the [roImageCanvas](https://developer.roku.com/docs/references/brightscript/components/roimagecanvas.md\"roImageCanvas\").", + "isRequired": true, + "name": "contentList", + "type": "Object" + } + ], + "returnType": "Void" + }, + { + "description": "Waits to draw the screen until all images in the content-meta-data array are downloaded, decoded, and loaded into memory. There is a large performance penalty for setting this to true", + "name": "SetRequireAllImagesToDraw", + "params": [ + { + "default": null, + "description": "A flag enabling the **requireAllImages** feature. It is recommended that this flag be disabled (false) for better performance.", + "isRequired": true, + "name": "requireAllImages", + "type": "Boolean" + } + ], + "returnType": "Void" + }, + { + "description": "Displays or refreshes the screen after initial creation or state changes.", + "name": "Show", + "params": [], + "returnDescription": "A flag indicating whether the screen is displayed.", + "returnType": "Boolean" + }, + { + "description": "Swaps the content metadata stored in one zOrder with another. This enables changing the layer that is displayed \"On Top\". This method can be used to swap empty (unspecified) layers", + "name": "SwapLayers", + "params": [ + { + "default": null, + "description": "The current zOrder that is displayed on top.", + "isRequired": true, + "name": "zOrderA", + "type": "Integer" + }, + { + "default": null, + "description": "The new zOrder to be displayed on top.", + "isRequired": true, + "name": "zOrderB", + "type": "Integer" + } + ], + "returnType": "Void" + } + ], + "name": "ifImageCanvas", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifimagecanvas.md" + }, + "ifimagemetadata": { + "implementers": [ + { + "description": "The roImageMetadata component provides developers access to image file metadata included in many .jpg EXIF headers", + "name": "roImageMetadata", + "url": "https://developer.roku.com/docs/references/brightscript/components/roimagemetadata.md" + } + ], + "methods": [ + { + "description": "Returns a set of simple and common image metadata", + "name": "GetMetadata", + "params": [], + "returnDescription": "An associative array containing the following key-value pairs with image metadata:", + "returnType": "Object" + }, + { + "description": "Returns all of the raw EXIF metadata.", + "name": "GetRawExif", + "params": [], + "returnDescription": "An associative array with all of the raw EXIF metadata. See the [EXIF section](/docs/references/brightscript/components/roimagemetadata.md#exif-background) for details about EXIF metadata.", + "returnType": "Object" + }, + { + "description": "Returns the raw data for an Exif tag. The method provides direct access to a specific raw EXIF tag", + "name": "GetRawExifTag", + "params": [ + { + "default": null, + "description": "The ifd of the Exif tag.", + "isRequired": true, + "name": "ifd", + "type": "Integer" + }, + { + "default": null, + "description": "The tag number of the Exif tag.", + "isRequired": true, + "name": "tagnum", + "type": "Integer" + } + ], + "returnDescription": "The raw data of an Exif tag. It the Exif tag doesn't exist it returns invalid.", + "returnType": "Dynamic" + }, + { + "description": "Returns a thumbnail image if one is embedded in the image metadata and the corresponding associative array with image data. This only generates a thumbnail if one exists.", + "name": "GetThumbnail", + "params": [], + "returnDescription": "An associative array that with **bytes** and **type** keys with the image data:", + "returnType": "Object" + }, + { + "description": "Sets the URL to the image. Only file URLs are supported", + "name": "SetUrl", + "params": [ + { + "default": null, + "description": "The URL of the image.", + "isRequired": true, + "name": "url", + "type": "String" + } + ], + "returnType": "Void" + } + ], + "name": "ifImageMetaData", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifimagemetadata.md" + }, + "ifinput": { + "implementers": [ + { + "description": "An roInput object can be used to receive events sent from a network client using the External Control Protocol (ECP), as described in External Control API", + "name": "roInput", + "url": "https://developer.roku.com/docs/references/brightscript/components/roinput.md" + } + ], + "methods": [ + { + "description": "Registers a channel to receive `roInput transport` events, which are voice commands sent via the Roku remote control, Roku mobile app, or a virtual assistant such as Amazon Alexa or Google Assistant.", + "name": "EnableTransportEvents", + "params": [], + "returnDescription": "A flag indicating whether transport event notifications were successfully registered.", + "returnType": "Boolean" + }, + { + "description": "Marks a transport command as handled, unhandled, or handled with an error.", + "name": "EventResponse", + "params": [ + { + "default": null, + "isRequired": true, + "name": "roAssociativeArray" + } + ], + "returnDescription": "A flag indicating whether the event response operation was successful." + }, + { + "description": "Returns the message port (if any) currently associated with the object.", + "name": "GetMessagePort", + "params": [], + "returnDescription": "The message port value.", + "returnType": "Object" + }, + { + "description": "Sets the roMessagePort to be used to receive events.", + "name": "SetMessagePort", + "params": [ + { + "default": null, + "description": "The port to be used to receive events.", + "isRequired": true, + "name": "port", + "type": "Object" + } + ], + "returnType": "Void" + } + ], + "name": "ifInput", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifinput.md" + }, + "ifint": { + "description": "> Interface equivalent for intrinsic type 'Integer'", + "implementers": [ + { + "description": "Object equivalent for intrinsic type Integer", + "name": "roInt", + "url": "https://developer.roku.com/docs/references/brightscript/components/roint.md" + } + ], + "methods": [ + { + "description": "Gets the integer value stored in the calling Integer object.", + "name": "GetInt", + "params": [], + "returnDescription": "The integer value stored in the calling Integer object.", + "returnType": "Integer" + }, + { + "description": "Sets the calling Integer object to the specified integer value.", + "name": "SetInt", + "params": [ + { + "default": null, + "description": "The integer value to be set on the calling Integer object.", + "isRequired": true, + "name": "value", + "type": "Integer" + } + ], + "returnType": "Void" + } + ], + "name": "ifInt", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifint.md" + }, + "ifintops": { + "implementers": [ + { + "description": "Object equivalent for intrinsic type Integer", + "name": "roInt", + "url": "https://developer.roku.com/docs/references/brightscript/components/roint.md" + } + ], + "methods": [ + { + "description": "Returns the integer value formatted as a decimal string. No leading space is appended for non-negative numbers.", + "name": "ToStr", + "params": [], + "returnDescription": "A decimal string.", + "returnType": "String" + } + ], + "name": "ifIntOps", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifintops.md" + }, + "ifkeyboardscreen": { + "description": "> This component is no longer updated and will be deprecated on January 1st, 2019.\n> \n> Beginning July 1st, 2017, any new channels using this component will be rejected during certification.\n> \n> Beginning January 1st, 2018, any updates to existing channels using this component will be rejected during certification.", + "implementers": [ + { + "description": "The Keyboard Screen is designed to allow the user to enter an alpha-numeric string for searching, username/password registration or other purposes", + "name": "roKeyboardScreen", + "url": "https://developer.roku.com/docs/references/brightscript/components/rokeyboardscreen.md" + } + ], + "methods": [ + { + "description": "Adds a button to the screen identified by the title and ID provided. The buttons are displayed at the bottom of the screen and appear in the order added. When the button is pressed, the script will receive an event from the application indicating the ID of the button pressed.", + "name": "AddButton", + "params": [ + { + "default": null, + "description": "The ID of the button to be added to the keyboard screen.", + "isRequired": true, + "name": "id", + "type": "Integer" + }, + { + "default": null, + "description": "The title of the button to be added to the keyboard screen.", + "isRequired": true, + "name": "title", + "type": "String" + } + ], + "returnType": "Void" + }, + { + "description": "Removes all buttons from the keyboard screen.", + "name": "ClearButtons", + "params": [], + "returnType": "Void" + }, + { + "name": "Close", + "params": [], + "returnType": "Void" + }, + { + "description": "Returns the current value in the keyboard text entry field.", + "name": "GetText", + "params": [], + "returnDescription": "Current value string.", + "returnType": "String" + }, + { + "description": "Sets the descriptive text displayed to the user for prompting regarding the required entry.", + "name": "SetDisplayText", + "params": [ + { + "default": null, + "description": "The descriptive text to be displayed on the keyboard screen.", + "isRequired": true, + "name": "displayText", + "type": "String" + } + ], + "returnType": "Void" + }, + { + "description": "Sets the maximum length for text entry. The default is 20 characters.", + "name": "SetMaxLength", + "params": [ + { + "default": null, + "description": "The maximum number of characters for text entered into the keyboard screen.", + "isRequired": true, + "name": "maxLen", + "type": "Integer" + } + ], + "returnType": "Void" + }, + { + "description": "Displays user-entered text with bullet characters.", + "name": "SetSecureText", + "params": [ + { + "default": null, + "description": "A flag indicating whether to obfuscate the text entered into the keyboard screen. If **isSecure** is set to true, the user-entered text is obscured with bullet characters. If false, it is treated as plain text. The default value is false.", + "isRequired": true, + "name": "isSecure", + "type": "Boolean" + } + ], + "returnType": "Void" + }, + { + "name": "SetText", + "params": [ + { + "default": null, + "description": "The default text to be displayed in the keyboard entry field.", + "isRequired": true, + "name": "title", + "type": "String" + } + ], + "returnDescription": "The default text that was set for the keyboard entry field.", + "returnType": "String" + }, + { + "description": "Sets the title for the screen to the specified string.", + "name": "SetTitle", + "params": [ + { + "default": null, + "description": "The title to be displayed on the keyboard screen.", + "isRequired": true, + "name": "title", + "type": "String" + } + ], + "returnType": "Void" + }, + { + "description": "Displays or refreshes the screen after creation or state changes.", + "name": "Show", + "params": [], + "returnDescription": "A flag indicating whether the screen was displayed.", + "returnType": "Boolean" + } + ], + "name": "ifKeyboardScreen", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifkeyboardscreen.md" + }, + "iflist": { + "implementers": [ + { + "description": "The list object implements the interfaces: ifList, ifArray, ifEnum and therefore can behave like an array that can dynamically add members", + "name": "roList", + "url": "https://developer.roku.com/docs/references/brightscript/components/rolist.md" + }, + { + "description": "Contains a list of roXML objects", + "name": "roXMLList", + "url": "https://developer.roku.com/docs/references/brightscript/components/roxmllist.md" + } + ], + "methods": [ + { + "description": "Adds an element to the head of the list.", + "name": "AddHead", + "params": [ + { + "default": null, + "isRequired": true, + "name": "tval", + "type": "Dynamic" + } + ], + "returnType": "Void" + }, + { + "description": "Adds an element to the tail of the list.", + "name": "AddTail", + "params": [ + { + "default": null, + "isRequired": true, + "name": "tval", + "type": "Dynamic" + } + ], + "returnType": "Void" + }, + { + "name": "Clear", + "params": [], + "returnType": "Void" + }, + { + "description": "Returns the number of elements in the list.", + "name": "Count", + "params": [], + "returnDescription": "The number of elements in the list.", + "returnType": "Integer" + }, + { + "description": "Retrieves the entry at the head of the list.", + "name": "GetHead", + "params": [], + "returnDescription": "The entry retrieved from the head of the list.", + "returnType": "Dynamic" + }, + { + "description": "Gets the entry at current index or position from the list and increments the index or position in the list.", + "name": "GetIndex", + "params": [], + "returnDescription": "The entry retrieved from the list. This method returns invalid if the end of the list is reached.", + "returnType": "Dynamic" + }, + { + "description": "Retrieves the entry at the tail of the list.", + "name": "GetTail", + "params": [], + "returnDescription": "The entry retrieved from the tail of the list.", + "returnType": "Dynamic" + }, + { + "description": "Removes the entry at the head of the list.", + "name": "RemoveHead", + "params": [], + "returnDescription": "The entry removed from the head of the list.", + "returnType": "Dynamic" + }, + { + "description": "Removes the entry at the current index or position from the list and increments the index or position in the list.", + "name": "RemoveIndex", + "params": [], + "returnDescription": "The entry removed from the list. This method returns invalid if the end of the list is reached.", + "returnType": "Dynamic" + }, + { + "description": "Removes the entry at the tail of the list.", + "name": "RemoveTail", + "params": [], + "returnDescription": "The entry removed from the tail of the list.", + "returnType": "Dynamic" + }, + { + "description": "Resets the current index or position in list to the head element.", + "name": "ResetIndex", + "params": [], + "returnDescription": "A flag indicating whether the index has been reset.", + "returnType": "Boolean" + } + ], + "name": "ifList", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/iflist.md" + }, + "iflistscreen": { + "deprecatedDescription": "This interface is deprecated.\n\nBeginning July 1st, 2017, any new channels using this component will be rejected during certification.\n\nBeginning January 1st, 2018, any updates to existing channels using this component will be rejected during certification.\n", + "description": "> This interface is deprecated.\n> \n> Beginning July 1st, 2017, any new channels using this component will be rejected during certification.\n> \n> Beginning January 1st, 2018, any updates to existing channels using this component will be rejected during certification.", + "implementers": [ + { + "description": "The List Screen provides a graphical display of content in a vertical list within a single screen", + "name": "roListScreen", + "url": "https://developer.roku.com/docs/references/brightscript/components/rolistscreen.md" + } + ], + "isDeprecated": true, + "methods": [ + { + "description": "Adds an item to the end of the list to be displayed on screen.", + "name": "AddContent", + "params": [ + { + "default": null, + "isRequired": true, + "name": "item", + "type": "Object" + } + ], + "returnType": "Void" + }, + { + "description": "Clears all the content in the list and displays an empty screen.", + "name": "ClearContent", + "params": [], + "returnType": "Void" + }, + { + "description": "Closes the screen and deletes the associated object. This is useful for avoiding screen flicker when the display order of your screens does not resemble a stack.", + "name": "Close", + "params": [], + "returnType": "Void" + }, + { + "description": "Removes an item from the list. The screen refreshes immediately if the item is visible", + "name": "RemoveContent", + "params": [ + { + "default": null, + "description": "The index of the item to be removed from the list. If the index is not within the range of 0 – list size, this function has no effect.", + "isRequired": true, + "name": "index", + "type": "Integer" + } + ], + "returnType": "Void" + }, + { + "name": "SetBreadcrumbText", + "params": [ + { + "default": null, + "isRequired": true, + "name": "breadcrumb1", + "type": "String" + }, + { + "default": null, + "isRequired": true, + "name": "breadcrumb2", + "type": "String" + } + ], + "returnType": "Void" + }, + { + "description": "Sets the list of content to be displayed on the screen. See “Content Meta-Data” for details on the attributes for each element. The screen is responsible for fetching the poster art from the URL’s specified.", + "name": "SetContent", + "params": [ + { + "default": null, + "description": "An roArray of roAssociativeArrays (Content Meta-Data objects) representing the information for each item to be displayed on screen.", + "isRequired": true, + "name": "contentList", + "type": "Object" + } + ], + "returnType": "Void" + }, + { + "description": "Sets the focused list item to the given index. If the item is not visible, focus jumps to the item and item becomes visible.", + "name": "SetFocusedListItem", + "params": [ + { + "default": null, + "description": "The item in the list to be given focus. If the index is not within the range of 0 – list size, this function has no effect.", + "isRequired": true, + "name": "index", + "type": "Integer" + } + ], + "returnType": "Void" + }, + { + "description": "Sets the header text of the screen. This can be used as an information text for the screen.", + "name": "SetHeader", + "params": [ + { + "default": null, + "description": "A one-line text (string) displayed on top of the screen below the overhang.", + "isRequired": true, + "name": "header", + "type": "String" + } + ], + "returnType": "Void" + }, + { + "description": "Updates the content of an item in the list.", + "name": "SetItem", + "params": [ + { + "default": null, + "description": "An roAssociativeArray (Content Meta-Data object) representing the information of the item to be updated.", + "isRequired": true, + "name": "item", + "type": "Object" + }, + { + "default": null, + "description": "The index of the item to be updated. If the index is not within the range of 0 – list size, this function has no effect.", + "isRequired": true, + "name": "index", + "type": "Integer" + } + ], + "returnType": "Void" + }, + { + "description": "Sets the title of the screen. The title is displayed on the top right corner of the screen on the overhang.", + "name": "SetTitle", + "params": [ + { + "default": null, + "description": "The title to be displayed on the screen.", + "isRequired": true, + "name": "title", + "type": "String" + } + ], + "returnType": "Void" + }, + { + "description": "Controls how the remote \"up\" key behaves when it is pressed with the top row selected.", + "name": "SetupBehaviorAtTopRow", + "params": [ + { + "default": null, + "description": "Specifies the behavior of the \"up\" key. This may be one of the following values: * \"stop\": stop scrolling up, and stay on the list screen (default behavior) * \"exit\": exit the list screen", + "isRequired": true, + "name": "behavior", + "type": "String" + } + ], + "returnType": "Void" + }, + { + "description": "Displays or refreshes the screen after initial creation or state changes.", + "name": "Show", + "params": [], + "returnDescription": "A flag indicating whether the screen was displayed.", + "returnType": "Boolean" + } + ], + "name": "ifListScreen", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/iflistscreen.md" + }, + "iflisttoarray": { + "implementers": [ + { + "description": "The list object implements the interfaces: ifList, ifArray, ifEnum and therefore can behave like an array that can dynamically add members", + "name": "roList", + "url": "https://developer.roku.com/docs/references/brightscript/components/rolist.md" + }, + { + "description": "Contains a list of roXML objects", + "name": "roXMLList", + "url": "https://developer.roku.com/docs/references/brightscript/components/roxmllist.md" + } + ], + "methods": [ + { + "description": "Returns an roArray containing the same elements as the list.", + "name": "ToArray", + "params": [], + "returnDescription": "An element list as an array.", + "returnType": "Object" + } + ], + "name": "ifListToArray", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/iflisttoarray.md" + }, + "iflocalization": { + "implementers": [ + { + "description": "The roLocalization object provides functions to assist in localization", + "name": "roLocalization", + "url": "https://developer.roku.com/docs/references/brightscript/components/rolocalization.md" + } + ], + "methods": [ + { + "name": "GetLocalizedAsset", + "params": [ + { + "default": null, + "description": "The name of a subdirectory in the directory pkg:/locale/XX\\_YY/ where XX\\_YY is the current language setting.", + "isRequired": true, + "name": "dirName", + "type": "String" + }, + { + "default": null, + "description": "The name of the file.", + "isRequired": true, + "name": "fileName", + "type": "String" + } + ], + "returnDescription": "An asset path.", + "returnType": "String" + }, + { + "description": "Replaces \"^n\" in pluralString with count and returns the result.", + "name": "GetPluralString", + "params": [ + { + "default": null, + "isRequired": true, + "name": "count", + "type": "Integer" + }, + { + "default": null, + "isRequired": true, + "name": "zeroString", + "type": "String" + }, + { + "default": null, + "isRequired": true, + "name": "oneString", + "type": "String" + }, + { + "default": null, + "isRequired": true, + "name": "pluralString", + "type": "String" + } + ], + "returnDescription": "The result of the operation. If count is 0, this returns zeroString. If count is 1, it returns oneString.", + "returnType": "String" + } + ], + "name": "ifLocalization", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/iflocalization.md" + }, + "iflongint": { + "implementers": [ + { + "description": "Object equivalent for intrinsic type LongInteger", + "name": "roLongInteger", + "url": "https://developer.roku.com/docs/references/brightscript/components/rolonginteger.md" + } + ], + "methods": [ + { + "description": "Gets the longinteger value stored in the calling Longinteger object.", + "name": "GetLongInt", + "params": [], + "returnDescription": "The longinteger value stored in the calling Loninteger object.", + "returnType": "LongInteger" + }, + { + "description": "Sets the calling Longinteger object to the specified longinteger value.", + "name": "SetLongInt", + "params": [ + { + "default": null, + "description": "The longinteger value to be set on the calling Longinteger object.", + "isRequired": true, + "name": "value", + "type": "Longinteger" + } + ], + "returnType": "Void" + } + ], + "name": "ifLongInt", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/iflongint.md" + }, + "ifmessagedialog": { + "description": "> This component is no longer updated and will be deprecated on January 1st, 2019.\n> \n> Beginning July 1st, 2017, any new channels using this component will be rejected during certification.\n> \n> Beginning January 1st, 2018, any updates to existing channels using this component will be rejected during certification.", + "implementers": [ + { + "description": "The Message Dialog component is used to display a formatted, multi-line text message to the user", + "name": "roMessageDialog", + "url": "https://developer.roku.com/docs/references/brightscript/components/romessagedialog.md" + } + ], + "methods": [ + { + "description": "Adds a button to the right-justified side of the dialog box. The buttons are at the bottom of the dialog and appear in the order added. When the button is pressed, the script will receive an event from the application indicating the ID of the button pressed.", + "name": "AddButton", + "params": [ + { + "default": null, + "description": "The ID of the button to be added to the screen.", + "isRequired": true, + "name": "id", + "type": "Integer" + }, + { + "default": null, + "description": "The title of the button to be added to the screen.", + "isRequired": true, + "name": "title", + "type": "String" + } + ], + "returnDescription": "A flag indicating whether the button was successfully added to the screen.", + "returnType": "Boolean" + }, + { + "description": "Adds horizontal line separating buttons into sections on the dialog.", + "name": "AddButtonSeparator", + "params": [], + "returnDescription": "A flag indicating whether the horizontal line was successfully added.", + "returnType": "Boolean" + }, + { + "description": "Adds a button to the left-justified side of the dialog box. The buttons are at the bottom of the dialog and appear in the order added. When the button is pressed, the script will receive an event from the application indicating the ID of the button pressed.", + "name": "AddLeftButton", + "params": [ + { + "default": null, + "description": "The ID of the button to be added to the screen.", + "isRequired": true, + "name": "id", + "type": "Integer" + }, + { + "default": null, + "description": "The title of the button to be added to the screen.", + "isRequired": true, + "name": "title", + "type": "String" + } + ], + "returnDescription": "A flag indicating whether the button was successfully added to the screen.", + "returnType": "Boolean" + }, + { + "description": "Adds a star rating button to the left-justified side of the dialog. The rating is specified as an integer 1-100 which indicates the number of stars (1 to 5) to be displayed, or 0 if unrated. Think of this as a percentage value (for example, <20% = 1 star).", + "name": "AddLeftRatingButton", + "params": [ + { + "default": null, + "description": "The ID of the rating button to be added to the dialog.", + "isRequired": true, + "name": "id", + "type": "Integer" + }, + { + "default": null, + "description": "The value the user rated the title, while the aggregate Rating represents the total for all users. The userRating takes precedence and determines the color of the buttons if set.", + "isRequired": true, + "name": "userRating", + "type": "Integer" + }, + { + "default": null, + "description": "The overall rating of the title. The aggregateRating may display half-stars", + "isRequired": true, + "name": "aggregateRating", + "type": "Integer" + }, + { + "default": null, + "description": "The tip associated with the rating button.", + "isRequired": true, + "name": "tip", + "type": "String" + } + ], + "returnDescription": "A flag indicating whether the star rating button was successfully added.", + "returnType": "Boolean" + }, + { + "description": "Adds a star rating button to the right-justified side of the dialog. The rating is specified as an integer 1-100 which indicates the number of stars (1 to 5) to be displayed, or 0 if unrated. Think of this as a percentage value (for example, <20% = 1 star).", + "name": "AddRatingButton", + "params": [ + { + "default": null, + "isRequired": true, + "name": "id", + "type": "Integer" + }, + { + "default": null, + "isRequired": true, + "name": "userRating", + "type": "Integer" + }, + { + "default": null, + "isRequired": true, + "name": "aggregateRating", + "type": "Integer" + }, + { + "default": null, + "isRequired": true, + "name": "tip", + "type": "String" + } + ], + "returnDescription": "A flag indicating whether the star rating button was successfully added.", + "returnType": "Boolean" + }, + { + "description": "Appends a static paragraph with the specified text. This static text does not get changed by subsequent calls to the [SetText()](#settexttext-as-string-as-void) or [UpdateText()](#updatetexttext-as-string-as-void) methods.", + "name": "AddStaticText", + "params": [ + { + "default": null, + "description": "The text to be included in the static paragraph.", + "isRequired": true, + "name": "text", + "type": "String" + } + ], + "returnType": "Void" + }, + { + "description": "Closes the screen and deletes the associated object. This method is useful for avoiding screen flicker when the display order of your screens does not resemble a stack", + "name": "Close", + "params": [], + "returnType": "Void" + }, + { + "description": "Sends an [isScreenClosed()](https://developer.roku.com/docs/references/brightscript/events/romessagedialogevent.mdisscreenclosed-as-boolean) event when the remote control's back button is pressed.", + "name": "EnableBackButton", + "params": [ + { + "default": null, + "isRequired": true, + "name": "enableBackButton", + "type": "Boolean" + } + ], + "returnType": "Void" + }, + { + "description": "With overlay enabled, the background screen is no longer dimmed.", + "name": "EnableOverlay", + "params": [ + { + "default": null, + "description": "A flag specifying whether to enable overlays.", + "isRequired": true, + "name": "enable", + "type": "Boolean" + } + ], + "returnType": "Void" + }, + { + "description": "Sets the button to be highlighted. The default is the first button from the top.", + "name": "SetFocusedMenuItem", + "params": [ + { + "default": null, + "description": "The ID of the button to gain focus.", + "isRequired": true, + "name": "item", + "type": "Integer" + } + ], + "returnType": "Boolean" + }, + { + "description": "Sets the format of the buttons to top-left justified. Otherwise the format defaults to bottom-right justified.", + "name": "SetMenuTopLeft", + "params": [ + { + "default": null, + "description": "A flag specifying the format of the buttons. * true: Makes the buttons top-left justified. * false: Makes the buttons bottom-right justified.", + "isRequired": true, + "name": "topLeft", + "type": "Boolean" + } + ], + "returnType": "Void" + }, + { + "description": "Appends a paragraph with the specified text. The dialog will automatically resize to accommodate the text, up to the limit of available display space.", + "name": "SetText", + "params": [ + { + "default": null, + "description": "The text to be displayed in the message dialog.", + "isRequired": true, + "name": "text", + "type": "String" + } + ], + "returnType": "Void" + }, + { + "description": "Sets the title for the dialog to the specified string.", + "name": "SetTitle", + "params": [ + { + "default": null, + "description": "The title to be displayed in the message dialog.", + "isRequired": true, + "name": "title", + "type": "String" + } + ], + "returnType": "Void" + }, + { + "description": "Displays or refreshes the screen after creation or state changes.", + "name": "Show", + "params": [], + "returnDescription": "A flag indicating whether the screen was displayed.", + "returnType": "Boolean" + }, + { + "description": "Displays a spinning busy animation to indicate work in progress. This animation continues until the screen is closed.", + "name": "ShowBusyAnimation", + "params": [], + "returnType": "Void" + }, + { + "description": "Updates the title of the specified button.", + "name": "UpdateButton", + "params": [ + { + "default": null, + "description": "The ID of the button to be updated.", + "isRequired": true, + "name": "id", + "type": "Integer" + }, + { + "default": null, + "description": "The title of the button to be updated.", + "isRequired": true, + "name": "title", + "type": "String" + } + ], + "returnDescription": "A flag indicating whether the button was successfully updated.", + "returnType": "Boolean" + }, + { + "description": "Replaces the last paragraph with the specified text, or appends a paragraph if there is not a prior paragraph. If the last paragraph added was a static paragraph, this function appends a new paragraph.", + "name": "UpdateText", + "params": [ + { + "default": null, + "description": "The text to replace the last paragraph in the message dialog.", + "isRequired": true, + "name": "text", + "type": "String" + } + ], + "returnType": "Void" + } + ], + "name": "ifMessageDialog", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifmessagedialog.md" + }, + "ifmessageport": { + "implementers": [ + { + "description": "A Message Port is the place messages (events) are sent", + "name": "roMessagePort", + "url": "https://developer.roku.com/docs/references/brightscript/components/romessageport.md" + } + ], + "methods": [ + { + "description": "If an event object is available, it is returned. Otherwise invalid is returned. The method returns immediately in either case and does not wait.", + "name": "GetMessage", + "params": [], + "returnDescription": "An event object.", + "returnType": "Dynamic" + }, + { + "description": "This method is similar to the [GetMessage()](#getmessage-as-dynamic) method, but the returned object (if not invalid) remains in the message queue. A later call to [WaitMessage()](#waitmessagetimeout-as-integer-as-dynamic), [GetMessage()](#getmessage-as-dynamic) or PeekMessage() will return the same message.", + "name": "PeekMessage", + "params": [], + "returnDescription": "An event object.", + "returnType": "Dynamic" + }, + { + "description": "Waits until an event object is available or timeout milliseconds have passed.", + "name": "WaitMessage", + "params": [ + { + "default": null, + "description": "The number of milliseconds to wait for a message. If this parameter is set to 0, this method waits indefinitely for a message, with no timeout. The native [wait()](https://developer.roku.com/docs/references/brightscript/language/global-utility-functions.mdwaittimeout-as-integer-port-as-object-as-object) function can also be used to get the event object which WaitMessage() would return. This means that the following two statements have the same effect: ``` msg = port.WaitMessage(timeout) msg = wait(timeout, port) ```", + "isRequired": true, + "name": "timeout", + "type": "Integer" + } + ], + "returnDescription": "If an event is available, it is returned. If the timeout expires, invalid is returned.", + "returnType": "Dynamic" + } + ], + "name": "ifMessagePort", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifmessageport.md" + }, + "ifmicrophone": { + "implementers": [ + { + "description": "The roMicrophone API allows channel applications to receive audio data from the user’s microphone-supported remote control device or mobile phone", + "name": "roMicrophone", + "url": "https://developer.roku.com/docs/references/brightscript/components/romicrophone.md" + } + ], + "methods": [ + { + "description": "Indicates whether the platform and paired remote control can be requested to open the microphone.", + "name": "CanRecord", + "params": [], + "returnDescription": "A flag indicating whether the microphone can be opened.", + "returnType": "Boolean" + }, + { + "description": "Opens the microphone and records to create a WAV file at the specified output file path. Only tmp:/ paths are supported.", + "name": "RecordToFile", + "params": [ + { + "default": null, + "description": "The file path where the WAV file is to be stored.", + "isRequired": true, + "name": "wavFilePath", + "type": "String" + } + ], + "returnDescription": "A flag indicating whether the recording was performed and saved successfully.", + "returnType": "Boolean" + }, + { + "description": "Sets the text to be displayed in the system microphone UI.", + "name": "SetPrompt", + "params": [ + { + "default": null, + "description": "The text to be displayed in the system microphone UI.", + "isRequired": true, + "name": "prompt", + "type": "String" + } + ], + "returnType": "Void" + }, + { + "description": "Opens the microphone and begins streaming microphone events to the channel. The channel must have called the [SetMessagePort()](https://developer.roku.com/docs/references/brightscript/interfaces/ifsetmessageport.mdsetmessageportport-as-object--as-void) method previously.", + "name": "StartRecording", + "params": [], + "returnDescription": "A flag indicating whether the microphone was opened successfully.", + "returnType": "Boolean" + }, + { + "description": "Stops recording and closes the microphone. This method is useful if the microphone was previously opened via the [StartRecording()](#startrecording-as-boolean) method and the channel needs to cancel the current recording prematurely, (for example, the duration limit was reached or an application error).", + "name": "StopRecording", + "params": [], + "returnDescription": "A flag indicating whether the microphone was opened and closed successfully.", + "returnType": "Boolean" + } + ], + "name": "ifMicrophone", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifmicrophone.md" + }, + "ifonelinedialog": { + "description": "> This component is no longer updated and will be deprecated on January 1st, 2019.\n> \n> Beginning July 1st, 2017, any new channels using this component will be rejected during certification.\n> \n> Beginning January 1st, 2018, any updates to existing channels using this component will be rejected during certification.", + "implementers": [ + { + "description": "The One Line Dialog is a special type of dialog optimized for single line text", + "name": "roOneLineDialog", + "url": "https://developer.roku.com/docs/references/brightscript/components/roonelinedialog.md" + } + ], + "methods": [ + { + "description": "Closes the screen and deletes the associated object. Useful for avoiding screen flicker when the display order of your screens does not resemble a stack.", + "name": "Close", + "params": [], + "returnType": "Void" + }, + { + "description": "Sets the title to be displayed in the upper right-hand corner of the screen in the overhang area.", + "name": "SetTitle", + "params": [ + { + "default": null, + "description": "The text to be displayed on the screen.", + "isRequired": true, + "name": "title", + "type": "String" + } + ], + "returnType": "Void" + }, + { + "description": "Displays or refreshes the screen after creation or state changes.", + "name": "Show", + "params": [], + "returnDescription": "A flag indicating whether the screen was successfully displayed.", + "returnType": "Boolean" + }, + { + "description": "Displays a spinning busy animation to indicate work in progress is displayed. The animation will continue until the screen is closed.", + "name": "ShowBusyAnimation", + "params": [], + "returnType": "Void" + } + ], + "name": "ifOneLineDialog", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifonelinedialog.md" + }, + "ifparagraphscreen": { + "description": "> This component is no longer updated and will be deprecated on January 1st, 2019.\n> \n> Beginning July 1st, 2017, any new channels using this component will be rejected during certification.\n> \n> Beginning January 1st, 2018, any updates to existing channels using this component will be rejected during certification.", + "implementers": [ + { + "description": "The Paragraph Screen provides a way to display text and selection choices to the user", + "name": "roParagraphScreen", + "url": "https://developer.roku.com/docs/references/brightscript/components/roparagraphscreen.md" + } + ], + "methods": [ + { + "description": "Adds a button to the screen. The buttons are displayed in a standard location on the screen and appear in the order added. When the button is pressed, the script will receive an event from the application containing the ID of the button pressed and allowing the script to perform the desired action for that case", + "name": "AddButton", + "params": [ + { + "default": null, + "description": "The ID used to uniquely identify the button instance.", + "isRequired": true, + "name": "id", + "type": "Integer" + }, + { + "default": null, + "description": "The title of the button.", + "isRequired": true, + "name": "title", + "type": "String" + } + ], + "returnDescription": "A flag indicating whether the button was successfully added.", + "returnType": "Boolean" + }, + { + "description": "Adds a graphic image to the screen at the current cursor position and centers it. The current cursor position moves as headers, paragraphs, graphics and buttons are added to the screen. The graphic image is displayed unscaled.", + "name": "AddGraphic", + "params": [ + { + "default": null, + "isRequired": true, + "name": "url", + "type": "String" + }, + { + "default": null, + "isRequired": true, + "name": "displayMode", + "type": "String" + } + ], + "returnType": "Void" + }, + { + "description": "Adds a string of bold, high visibility text to the screen as a header to introduce the subsequent paragraph(s).", + "name": "AddHeaderText", + "params": [ + { + "default": null, + "description": "The text to be added to the header.", + "isRequired": true, + "name": "text", + "type": "String" + } + ], + "returnType": "Void" + }, + { + "description": "Adds a paragraph of text to the screen. Paragraphs are specified as a single string and they are ordered on the screen in the same order as they are added. Making multiple calls to AddParagraph() will continue to add additional paragraphs of text in order until the screen has been filled. The [roParagraphScreen](https://developer.roku.com/docs/references/brightscript/components/roparagraphscreen.md\"roParagraphScreen\") component handles all text formatting and justification. Spacing is automatically inserted between paragraphs for readability.", + "name": "AddParagraph", + "params": [ + { + "default": null, + "description": "The paragraph to be added to the screen.", + "isRequired": true, + "name": "text", + "type": "String" + } + ], + "returnType": "Void" + }, + { + "name": "AddParagraphAligned", + "params": [ + { + "default": null, + "isRequired": true, + "name": "text", + "type": "String" + }, + { + "default": null, + "isRequired": true, + "name": "alignment", + "type": "String" + } + ], + "returnType": "Void" + }, + { + "name": "Close", + "params": [], + "returnType": "Void" + }, + { + "description": "Specifies the text to be displayed for the title in breadcrumb format.", + "name": "SetBreadcrumbText", + "params": [ + { + "default": null, + "description": "The text to be used for the first location.", + "isRequired": true, + "name": "location1", + "type": "String" + }, + { + "default": null, + "description": "The text to be used for the second location.", + "isRequired": true, + "name": "location2", + "type": "String" + } + ], + "returnType": "Void" + }, + { + "description": "Sets the button to be highlighted when the screen is initially displayed.", + "name": "SetDefaultMenuItem", + "params": [ + { + "default": null, + "description": "The index of the button to be highlighted by default. This is the zero-based position of the button in the list of buttons on the screen (not the button id passed to the [AddButton()](#addbuttonid-as-integer-title-as-string--as-boolean) method). The default is the first button (index 0).", + "isRequired": true, + "name": "index", + "type": "Integer" + } + ], + "returnDescription": "A flag indicating whether the default menu item was successfully set.", + "returnType": "Boolean" + }, + { + "description": "Sets the title for the screen.", + "name": "SetTitle", + "params": [ + { + "default": null, + "description": "The title for the screen.", + "isRequired": true, + "name": "title", + "type": "String" + } + ], + "returnType": "Void" + }, + { + "description": "Displays or refreshes the screen after creation or state changes.", + "name": "Show", + "params": [], + "returnDescription": "A boolean indicating whether the screen was successfully displayed.", + "returnType": "Boolean" + } + ], + "name": "ifParagraphScreen", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifparagraphscreen.md" + }, + "ifpath": { + "description": "| Name | Description |\n| --- | --- |\n| [roPath](https://developer.roku.com/docs/references/brightscript/components/ropath.md\"roPath\") | The roPath component provides developers an easy way to create valid file system paths |", + "implementers": [ + { + "description": "The roPath component provides developers an easy way to create valid file system paths", + "name": "roPath", + "url": "https://developer.roku.com/docs/references/brightscript/components/ropath.md" + } + ], + "methods": [ + { + "description": "Modifies or changes the current path via the specified relative or absolute path.", + "name": "Change", + "params": [ + { + "default": null, + "description": "The new relative or absolute file system path to be used.", + "isRequired": true, + "name": "path", + "type": "String" + } + ], + "returnDescription": "A flag indicating whether the path was successfully changed.", + "returnType": "Boolean" + }, + { + "description": "Checks whether the current path is valid (the path is correctly formed). This does not check whether the file actually exists.", + "name": "IsValid", + "params": [], + "returnDescription": "A flag indicating whether the current path is valid.", + "returnType": "Boolean" + }, + { + "description": "Return Value", + "name": "Split", + "params": [], + "returnDescription": "An [roAssociativeArray](/docs/references/brightscript/components/roassociativearray.md \"roAssociativeArray\") that contains the following keys:", + "returnType": "Object" + } + ], + "name": "ifPath", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifpath.md" + }, + "ifpinentrydialog": { + "description": "> This component is no longer updated and will be deprecated on January 1st, 2019.\n> \n> Beginning July 1st, 2017, any new channels using this component will be rejected during certification.\n> \n> Beginning January 1st, 2018, any updates to existing channels using this component will be rejected during certification.", + "implementers": [ + { + "description": "The Pin Entry Dialog is designed to allow the user to enter a numeric PIN for purchasing content", + "name": "roPinEntryDialog", + "url": "https://developer.roku.com/docs/references/brightscript/components/ropinentrydialog.md" + } + ], + "methods": [ + { + "description": "Adds a button to the pin entry dialog, with the specified title displayed on the button. The buttons are aligned at the bottom of the screen and appear in the order added. When a button is pressed, the script will receive an [roPinEntryDialogEvent](https://developer.roku.com/docs/references/brightscript/events/ropinentrydialogevent.md\"roPinEntryDialogEvent\") from the application indicating the ID of the button pressed.", + "name": "AddButton", + "params": [ + { + "default": null, + "description": "The ID of the button to be added to the pin entry dialog.", + "isRequired": true, + "name": "id", + "type": "Integer" + }, + { + "default": null, + "description": "The text to be displayed on the button.", + "isRequired": true, + "name": "title", + "type": "String" + } + ], + "returnType": "Void" + }, + { + "name": "Close", + "params": [], + "returnType": "Void" + }, + { + "description": "Enables the channel to receive an [isScreenClosed()](https://developer.roku.com/docs/references/brightscript/events/ropinentrydialogevent.mdisscreenclosed-as-boolean) event when the back button is entered. By default the [PinEntryDialog](https://developer.roku.com/docs/references/brightscript/components/ropinentrydialog.md component will not send an [isScreenClosed()](https://developer.roku.com/docs/references/brightscript/events/ropinentrydialogevent.mdisscreenclosed-as-boolean) event so that scripts that did not expect this event will not break", + "name": "EnableBackButton", + "params": [ + { + "default": null, + "description": "Enables [isScreenClosed()](https://developer.roku.com/docs/references/brightscript/events/ropinentrydialogevent.mdisscreenclosed-as-boolean) events to be sent when the back button is entered.", + "isRequired": true, + "name": "enableBackButton", + "type": "Boolean" + } + ], + "returnType": "Void" + }, + { + "description": "Gets the user-entered PIN.", + "name": "Pin", + "params": [], + "returnDescription": "A string containing the PIN entered by the user.", + "returnType": "String" + }, + { + "description": "Sets the maximum number of digits to be entered and displayed for the PIN.", + "name": "SetNumPinEntryFields", + "params": [ + { + "default": null, + "description": "The maximum number of digits for the PIN.", + "isRequired": true, + "name": "numFields", + "type": "Integer" + } + ], + "returnType": "Void" + }, + { + "description": "Sets the title for the pin entry dialog to the specified string.", + "name": "SetTitle", + "params": [ + { + "default": null, + "description": "The text to be displayed on the pin entry dialog.", + "isRequired": true, + "name": "title", + "type": "String" + } + ], + "returnType": "Void" + }, + { + "description": "Displays or refreshes the screen after creation or state changes.", + "name": "Show", + "params": [], + "returnType": "Void" + } + ], + "name": "ifPinEntryDialog", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifpinentrydialog.md" + }, + "ifposterscreen": { + "description": "> This component is no longer updated and will be deprecated on January 1st, 2019.\n> \n> Beginning July 1st, 2017, any new channels using this component will be rejected during certification.\n> \n> Beginning January 1st, 2018, any updates to existing channels using this component will be rejected during certification.\n\n| Name | Description |\n| --- | --- |\n| [roPosterScreen](https://developer.roku.com/docs/references/brightscript/components/roposterscreen.md\"roPosterScreen\") | The Poster Screen provides a graphical display of poster art for content selection or can be used as a submenu to provide hierarchical structure to the application |", + "implementers": [ + { + "description": "The Poster Screen provides a graphical display of poster art for content selection or can be used as a submenu to provide hierarchical structure to the application", + "name": "roPosterScreen", + "url": "https://developer.roku.com/docs/references/brightscript/components/roposterscreen.md" + } + ], + "methods": [ + { + "description": "Clears the message from the previous [ShowMessage()](https://developer.roku.com/docs/references/brightscript/interfaces/ifposterscreen.mdshowmessagemessage-as-string-as-void) method call.", + "name": "ClearMessage", + "params": [], + "returnType": "Void" + }, + { + "name": "Close", + "params": [], + "returnType": "Void" + }, + { + "description": "Gets the content metadata of each title displayed on the screen. This is the content metadata passed via the [SetContentList()](#setcontentlistcontentlist-as-object-as-void) method.", + "name": "GetContentList", + "params": [], + "returnDescription": "An [roArray](/docs/references/brightscript/components/roarray.md \"roArray\") containing content metadata.", + "returnType": "Object" + }, + { + "description": "Sets the scale mode for displaying ad images on the poster screen. The ad display is only available on \"arced-landscape\" and \"flat-category\" list styles.", + "name": "SetAdDisplayMode", + "params": [ + { + "default": null, + "isRequired": true, + "name": "displayMode", + "type": "String" + } + ], + "returnType": "Void" + }, + { + "description": "Enables the banner ad to be selectable. When selected, the screen will receive an [roPosterScreenEvent](https://developer.roku.com/docs/references/brightscript/events/roposterscreenevent.md and the msg will return true for [isAdSelected()](https://developer.roku.com/docs/references/brightscript/events/roposterscreenevent.mdisadselected-as-boolean).", + "name": "SetAdSelectable", + "params": [ + { + "default": null, + "description": "A flag specifying if the user can navigate and move focus to the banner image (true) or if the banner ad is not selectable (false).", + "isRequired": true, + "name": "isSelectable", + "type": "Boolean" + } + ], + "returnType": "Void" + }, + { + "description": "Sets the URL of the banner ad image to be displayed on the poster screen. This is currently only valid for the \"arced-landscape\" and \"flat-category\" style of poster screens.", + "name": "SetAdURL", + "params": [ + { + "default": null, + "description": "The URL of the standard definition banner ad image (540x60) to be displayed.", + "isRequired": true, + "name": "sdAdURL", + "type": "String" + }, + { + "default": null, + "description": "The URL of the high definition banner ad image (728x90) to be displayed.", + "isRequired": true, + "name": "hdAdURL", + "type": "String" + } + ], + "returnType": "Void" + }, + { + "description": "Shows or hides the breadcrumb text in the title area.", + "name": "SetBreadcrumbEnabled", + "params": [ + { + "default": null, + "description": "A flag specifying whether the breadcrumb text is to be displayed on the poster screen.", + "isRequired": true, + "name": "enable", + "type": "Boolean" + } + ], + "returnType": "Void" + }, + { + "description": "Specifies the text to be displayed for the title in breadcrumb format.", + "name": "SetBreadcrumbText", + "params": [ + { + "default": null, + "description": "The text to be used for the first location.", + "isRequired": true, + "name": "location1", + "type": "String" + }, + { + "default": null, + "description": "The text to be used for the second location.", + "isRequired": true, + "name": "location2", + "type": "String" + } + ], + "returnType": "Void" + }, + { + "description": "Sets the list of content to be displayed by the screen. The screen is responsible for fetching the poster art from the URLs specified and all user navigation within the list.", + "name": "SetContentList", + "params": [ + { + "default": null, + "description": "An [roArray](https://developer.roku.com/docs/references/brightscript/components/roarray.md\"roArray\") of [roAssociativeArrays](https://developer.roku.com/docs/references/brightscript/components/roassociativearray.md\"roAssociativeArrays\") ([Content Meta-Data](/docs/developer-program/getting-started/architecture/content-metadata.md \" Content Meta-Data\") objects) representing the information for each title to be displayed on screen.", + "isRequired": true, + "name": "contentList", + "type": "Object" + } + ], + "returnType": "Void" + }, + { + "description": "The item the in filter banner to be given focus. The selected item is displayed in the center of the filter banner, and it is highlighted to denote that it has focus.", + "name": "SetFocusedList", + "params": [ + { + "default": null, + "description": "The zero-based index of the item to obtain focus.", + "isRequired": true, + "name": "itemIndex", + "type": "Integer" + } + ], + "returnType": "Void" + }, + { + "name": "SetFocusedListItem", + "params": [ + { + "default": null, + "description": "The zero-based index of the item to obtain focus.", + "isRequired": true, + "name": "itemIndex", + "type": "Integer" + } + ], + "returnType": "Void" + }, + { + "description": "Sets the focus to the filter banner.", + "name": "SetFocusToFilterBanner", + "params": [ + { + "default": null, + "description": "A flag specifying whether the filter banner is to obtain focus.", + "isRequired": true, + "name": "enable", + "type": "Boolean" + } + ], + "returnType": "Void" + }, + { + "description": "Sets the mode for displaying images in the poster screen. This allows images to be either scaled to completely fill the poster frame (scale-to-fill) or scaled to fit inside the poster frame (scale-to-fit) while maintaining aspect ratio", + "name": "SetListDisplayMode", + "params": [ + { + "default": null, + "description": "Specifies the mode used to display images on the poster screen, which may be one of the following values: * scale-to-fill – scale image to completely fill the rectangle of the bounding frame (Default) * scale-to-fit – scale image to fit horizontally or vertically as appropriate while still maintaining aspect ratio. Note that scale-to-fit may result in pillar-box or letter-box display of images. * zoom-to-fill – scales and crops image to maintain aspect ratio and completely fill the rectangle of the bounding frame. * photo-fit – Uses several methods to fit the image with a different aspect ratio to the screen. First, it will asymmetrically scale up to a maximum of 5%. Second, for landscape images, if vertical cropping is necessary, it will remove two lines off the bottom for every one line off the top up to a maximum of 30% of the image. For all images, if horizontal cropping is necessary it will crop an equal amount from both sides.", + "isRequired": true, + "name": "displayMode", + "type": "String" + } + ], + "returnType": "Void" + }, + { + "description": "Sets the list of categories to be displayed in the filter banner at the top of the poster screen.", + "name": "SetListNames", + "params": [ + { + "default": null, + "description": "An array of Strings, where each String represents a new category to be displayed at the top. The display order is the same as the order of the categories in the array passed by the caller", + "isRequired": true, + "name": "names", + "type": "Object" + } + ], + "returnType": "Void" + }, + { + "description": "Sets the display style for the poster screen. Styles allow the poster screen to look differently for different types of content or different usage.", + "name": "SetListStyle", + "params": [ + { + "default": null, + "isRequired": true, + "name": "style", + "type": "String" + } + ], + "returnType": "Void" + }, + { + "description": "Specifies the default images to be shown in the poster screen while the poster screen content is loading", + "name": "SetLoadingPoster", + "params": [ + { + "default": null, + "isRequired": true, + "name": "sdPosterUrl", + "type": "String" + }, + { + "default": null, + "isRequired": true, + "name": "hdPosterUrl", + "type": "String" + } + ], + "returnType": "Void" + }, + { + "description": "Sets the title for the poster screen.", + "name": "SetTitle", + "params": [ + { + "default": null, + "description": "The text to be used as the title for the poster screen.", + "isRequired": true, + "name": "title", + "type": "String" + } + ], + "returnType": "Void" + }, + { + "description": "Displays or refreshes the screen after initial creation or state changes.", + "name": "Show", + "params": [], + "returnDescription": "A boolean indicating whether the screen was successfully displayed.", + "returnType": "Boolean" + }, + { + "description": "Displays a semi-transparent popup message box to the user in the center of the screen over the poster screen. Generally, this is used for error messages.", + "name": "ShowMessage", + "params": [ + { + "default": null, + "description": "The text to be displayed in the popup message box.", + "isRequired": true, + "name": "message", + "type": "String" + } + ], + "returnType": "Void" + } + ], + "name": "ifPosterScreen", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifposterscreen.md" + }, + "ifprogramguide": { + "implementers": [ + { + "description": "Represents Electronic Program Guide (EPG) information from the tuner.", + "name": "roProgramGuide", + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/roprogramguide.md" + } + ], + "methods": [ + { + "description": "Returns the list of logical channel numbers on which the given program ID can be found.", + "name": "GetChannels", + "params": [ + { + "default": null, + "description": "The program ID containing the channels to be returned.", + "isRequired": true, + "name": "id", + "type": "Integer" + } + ], + "returnType": "Object" + }, + { + "description": "Returns details about the current and next program on a channel.", + "name": "GetNowNextPrograms", + "params": [ + { + "default": null, + "description": "The channel number for which programs are to be retrieved.", + "isRequired": true, + "name": "channel", + "type": "String" + } + ], + "returnDescription": "An roAssociativeArray containing two roArray components: one for the current program and another for the next program on the channel. Each roArray contains the following key/value pairs detailing the program:", + "returnType": "Dynamic" + }, + { + "description": "Returns an integer which is incremented each time the underlying data in the guide changes.", + "name": "GetVersion", + "params": [], + "returnDescription": "The version number of the program guide.", + "returnType": "Integer" + } + ], + "name": "ifProgramGuide", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifprogramguide.md" + }, + "ifregex": { + "description": "> See the PCRE documentation ([http://www.pcre.org/](http://www.pcre.org/)) for documentation on the PCRE library used for regular expression matching. See the [Perlre main page](http://perldoc.perl.org/perlre.html \"Perlre main page\") for complete documentation of the possible regular expressions this library can parse and match. In general, most Perl compatible regular expressions are supported.", + "implementers": [ + { + "description": "The roRegex component provides the powerful regular expression processing of the PCRE library to Brightscript strings", + "name": "roRegex", + "url": "https://developer.roku.com/docs/references/brightscript/components/roregex.md" + } + ], + "methods": [ + { + "description": "Checks if a string matches the matching pattern.", + "name": "IsMatch", + "params": [ + { + "default": null, + "description": "The string to be checked.", + "isRequired": true, + "name": "str", + "type": "String" + } + ], + "returnDescription": "A flag indicating whether the string matches the matching pattern.", + "returnType": "Boolean" + }, + { + "description": "If the matching pattern contains N parenthetical substrings, the relevant substrings are returned as an array of length N+1, where array\\[0\\] is again the entire match and each additional entry in the array is the match for the corresponding parenthetical expression.", + "name": "Match", + "params": [ + { + "default": null, + "description": "The string to be searched for matching substrings.", + "isRequired": true, + "name": "str", + "type": "String" + } + ], + "returnDescription": "An roArray of matched substrings from str. If no match was made, an empty array is returned. If a match was made, the entire match is returned in array\\[0\\]. If there are no parenthetical substrings this is the only entry in the array", + "returnType": "Object" + }, + { + "description": "Returns all matches of the specific regular expression pattern in the target string.", + "name": "MatchAll", + "params": [ + { + "default": null, + "description": "The string to be searched for matching substrings.", + "isRequired": true, + "name": "str", + "type": "String" + } + ], + "returnDescription": "An roArray where the first element is the full matched string and if there are any capture groups those are returned in subsequent array elements", + "returnType": "Object" + }, + { + "description": "Replaces the first occurrence of a matching pattern in str with replacement and returns the result. The replacement may contain numbered back-references to parenthetical substrings.", + "name": "Replace", + "params": [ + { + "default": null, + "description": "The string to be searched.", + "isRequired": true, + "name": "str", + "type": "String" + }, + { + "default": null, + "description": "The string to be used to replace matches in source string.", + "isRequired": true, + "name": "replacement", + "type": "String" + } + ], + "returnDescription": "A string with the result of the replace operation.", + "returnType": "String" + }, + { + "description": "Replaces all occurrences of a matching pattern in str with replacement and returns the result. The replacement may contain numbered back-references to parenthetical substrings.", + "name": "ReplaceAll", + "params": [ + { + "default": null, + "description": "The string to be searched.", + "isRequired": true, + "name": "str", + "type": "String" + }, + { + "default": null, + "description": "The string to be used to replace matches in source string.", + "isRequired": true, + "name": "replacement", + "type": "String" + } + ], + "returnDescription": "A string with the result of the replace all operation.", + "returnType": "String" + }, + { + "description": "Uses the matching pattern as a separator and splits the string on the separator boundaries.", + "name": "Split", + "params": [ + { + "default": null, + "description": "The string to be split.", + "isRequired": true, + "name": "str", + "type": "String" + } + ], + "returnDescription": "An roList of substrings of str that were separated by strings which match the pattern in the CreateObject call. The separator strings are not returned. If no matches were found, the returned list contains a single item with the string unchanged.", + "returnType": "Object" + } + ], + "name": "ifRegex", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifregex.md" + }, + "ifregion": { + "implementers": [ + { + "description": "The roRegion component is used to represent a subsection of a bitmap", + "name": "roRegion", + "url": "https://developer.roku.com/docs/references/brightscript/components/roregion.md" + } + ], + "methods": [ + { + "description": "Returns a newly created copy of the region as a new [roRegion](https://developer.roku.com/docs/references/brightscript/components/roregion.md\"roRegion\") object.", + "name": "Copy", + "params": [], + "returnDescription": "An roRegion Object.", + "returnType": "Object" + }, + { + "description": "Returns the roBitmap object of the bitmap to which this region refers. A region is always a section of a bitmap.", + "name": "GetBitmap", + "params": [], + "returnDescription": "An roBitmap object of the bitmap.", + "returnType": "Object" + }, + { + "description": "Returns the collision type.", + "name": "GetCollisionType", + "params": [], + "returnDescription": "The collision type, which may be one of the following values:", + "returnType": "Integer" + }, + { + "description": "Returns the height of the region.", + "name": "GetHeight", + "params": [], + "returnDescription": "The height of the region.", + "returnType": "Integer" + }, + { + "description": "Returns the pre-translation x value.", + "name": "GetPretranslationX", + "params": [], + "returnDescription": "The pre-translation x value.", + "returnType": "Integer" + }, + { + "description": "Returns the pre-translation y value.", + "name": "GetPretranslationY", + "params": [], + "returnDescription": "The pre-translation y value.", + "returnType": "Integer" + }, + { + "description": "Returns the scaling mode.", + "name": "GetScaleMode", + "params": [], + "returnDescription": "The scaling mode, which may be one of the following values:", + "returnType": "Integer" + }, + { + "name": "GetTime", + "params": [], + "returnType": "Integer" + }, + { + "description": "Returns the width of the region.", + "name": "GetWidth", + "params": [], + "returnDescription": "The width of the region.", + "returnType": "Integer" + }, + { + "description": "Returns if the region can be wrapped.", + "name": "GetWrap", + "params": [], + "returnType": "Boolean" + }, + { + "description": "Returns the x coordinate of the region in its bitmap.", + "name": "GetX", + "params": [], + "returnDescription": "The x coordinate value", + "returnType": "Integer" + }, + { + "description": "Returns the y coordinate of the region in its bitmap.", + "name": "GetY", + "params": [], + "returnDescription": "The y coordinate value", + "returnType": "Integer" + }, + { + "description": "Adds the passed parameters x,y, w, and h to the values of those roRegion fields. Respects the wrap setting when adjusting the fields by the offsets.", + "name": "Offset", + "params": [ + { + "default": null, + "description": "The x-coordinate of the region.", + "isRequired": true, + "name": "x", + "type": "Dynamic" + }, + { + "default": null, + "description": "The y-coordinate of the region.", + "isRequired": true, + "name": "y", + "type": "Dynamic" + }, + { + "default": null, + "description": "The width of the region.", + "isRequired": true, + "name": "w", + "type": "Dynamic" + }, + { + "default": null, + "description": "The height of the region.", + "isRequired": true, + "name": "h", + "type": "Dynamic" + } + ], + "returnType": "Void" + }, + { + "description": "Initializes the fields of this region to be the same as the values of the fields in the srcRegion.", + "name": "Set", + "params": [ + { + "default": null, + "description": "An roRegion object.", + "isRequired": true, + "name": "srcRegion", + "type": "Object" + } + ], + "returnType": "Void" + }, + { + "description": "Sets the collision circle used for type-2 collision tests. The center of the circle is the (x,y) position of the sprite plus the specified offsets. The radius specifies the size of the circle.", + "name": "SetCollisionCircle", + "params": [ + { + "default": null, + "description": "The offset for the x position of the sprite.", + "isRequired": true, + "name": "xOffset", + "type": "Integer" + }, + { + "default": null, + "description": "The offset for the y position of the sprite.", + "isRequired": true, + "name": "yOffset", + "type": "Integer" + }, + { + "default": null, + "description": "The size of the circle.", + "isRequired": true, + "name": "Radius", + "type": "Integer" + } + ], + "returnType": "Void" + }, + { + "description": "Sets the collision rectangle used for type-1 collision tests. The upper left corner of the rectangle is the (x,y) position of the sprite plus the specified offsets. The width and height specify the size of the rectangle.", + "name": "SetCollisionRectangle", + "params": [ + { + "default": null, + "description": "The offset for the x position of the sprite.", + "isRequired": true, + "name": "xOffset", + "type": "Integer" + }, + { + "default": null, + "description": "The offset for the y position of the sprite.", + "isRequired": true, + "name": "yOffset", + "type": "Integer" + }, + { + "default": null, + "description": "The width of the rectangle.", + "isRequired": true, + "name": "width", + "type": "Integer" + }, + { + "default": null, + "description": "The height of the rectangle.", + "isRequired": true, + "name": "height", + "type": "Integer" + } + ], + "returnType": "Void" + }, + { + "description": "Sets the type of region to be used for collision tests with this sprite.", + "name": "SetCollisionType", + "params": [ + { + "default": null, + "description": "The collision type, which may be one of the following values: * Type 0– Use the entire defined region of the sprite. Type 0 is the default * Type 1 – Use the defined rectangular region specified by the SetCollisionRectangle() method * Type 2 – Use a circular region specified by the SetCollisionCircle() method", + "isRequired": true, + "name": "collisiontype", + "type": "Integer" + } + ], + "returnType": "Void" + }, + { + "description": "Sets the pre-translation for DrawObject, DrawRotatedObject, and DrawScaledObject.", + "name": "SetPretranslation", + "params": [ + { + "default": null, + "description": "The pre-translation x-value.", + "isRequired": true, + "name": "x", + "type": "Integer" + }, + { + "default": null, + "description": "The pre-translation y-value.", + "isRequired": true, + "name": "y", + "type": "Integer" + } + ], + "returnType": "Void" + }, + { + "description": "Sets the scaling mode used for DrawScaledObject.", + "name": "SetScaleMode", + "params": [ + { + "default": null, + "description": "The scaling mode, which may be one of the following values: * 0 = fast scaling operation (may have jaggies) * 1 = smooth scaling operation (may be slow)", + "isRequired": true, + "name": "mode", + "type": "Integer" + } + ], + "returnType": "Void" + }, + { + "description": "Sets the duration of each frame of any animated sprite that uses this region.", + "name": "SetTime", + "params": [ + { + "default": null, + "description": "The \"frame hold time\" in milliseconds.", + "isRequired": true, + "name": "time", + "type": "Integer" + } + ], + "returnType": "Void" + }, + { + "description": "Wraps any part of a region that extends beyond the bounds of its bitmap to the other side of the bitmap and renders it there.", + "name": "SetWrap", + "params": [ + { + "default": null, + "description": "A flag specifying whether wrapping of the region is enabled. If this flag is set to false, the part of the region beyond the bounds of its bitmap is not rendered.", + "isRequired": true, + "name": "wrap", + "type": "Boolean" + } + ], + "returnType": "Void" + } + ], + "name": "ifRegion", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifregion.md" + }, + "ifregistry": { + "implementers": [ + { + "description": "The Registry is an area of non-volatile storage where a small number of persistent settings can be stored", + "name": "roRegistry", + "url": "https://developer.roku.com/docs/references/brightscript/components/roregistry.md" + } + ], + "methods": [ + { + "description": "Deletes the specified registry section.", + "name": "Delete", + "params": [ + { + "default": null, + "description": "The registry section to be deleted.", + "isRequired": true, + "name": "section", + "type": "String" + } + ], + "returnDescription": "A flag indicating whether the registry section was successfully deleted.", + "returnType": "Boolean" + }, + { + "description": "Flushes the contents of the registry out to persistent storage in order to permanently store a token or other setting on the device.", + "name": "Flush", + "params": [], + "returnDescription": "A flag indicating whether the registry was successfully flushed.", + "returnType": "Boolean" + }, + { + "description": "Returns the registry sections on the device.", + "name": "GetSectionList", + "params": [], + "returnDescription": "An roList with one entry for each registry section. Each registry section is an roString containing the name of the section. The section itself can be accessed by creating an [roRegistrySection](/docs/references/brightscript/components/roregistrysection.md \"roRegistrySection\") object using that name.", + "returnType": "Object" + }, + { + "description": "Returns the number of bytes available in the channel application's device registry (16K minus current file size). This function can be used, for example, to check the remaining space and remove older entries before writing newer ones. The following code demonstrates how to do this:", + "name": "GetSpaceAvailable", + "params": [], + "returnDescription": "An integer representing the the number of bytes available in the device registry.", + "returnType": "Integer" + } + ], + "name": "ifRegistry", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifregistry.md" + }, + "ifregistrysection": { + "implementers": [ + { + "description": "A Registry Section enables the organization of settings within the registry", + "name": "roRegistrySection", + "url": "https://developer.roku.com/docs/references/brightscript/components/roregistrysection.md" + } + ], + "methods": [ + { + "name": "Delete", + "params": [ + { + "default": null, + "description": "The key to be deleted.", + "isRequired": true, + "name": "key", + "type": "String" + } + ], + "returnDescription": "A flag indicating whether the key was successfully deleted.", + "returnType": "Boolean" + }, + { + "description": "Checks if the specified key resides in the registry.", + "name": "Exists", + "params": [ + { + "default": null, + "description": "The key to be checked.", + "isRequired": true, + "name": "key", + "type": "String" + } + ], + "returnDescription": "A flag indicating whether the key is in the registry.", + "returnType": "Boolean" + }, + { + "description": "Flushes the contents of the registry out to persistent storage in order to permanently store a token or other setting on the device. Developers should explicitly this method after performing a write or series of writes. This method is transactional and all writes between calls to it are atomic.", + "name": "Flush", + "params": [], + "returnDescription": "A flag indicating whether the registry was successfully flushed.", + "returnType": "Boolean" + }, + { + "description": "Gets a list of the keys in the registry.", + "name": "GetKeyList", + "params": [], + "returnDescription": "An roList containing one entry per registry key in this section.", + "returnType": "Object" + }, + { + "description": "Reads and returns the value of the specified key.", + "name": "Read", + "params": [ + { + "default": null, + "description": "The key name to be read.", + "isRequired": true, + "name": "key", + "type": "String" + } + ], + "returnDescription": "The value of the key.", + "returnType": "String" + }, + { + "description": "Reads multiple values from the registry.", + "name": "ReadMulti", + "params": [ + { + "default": null, + "description": "An array of strings containing the key names to be read.", + "isRequired": true, + "name": "keysArray", + "type": "Object" + } + ], + "returnDescription": "An associative array containing the keys and corresponding values read from the registry.", + "returnType": "Object" + }, + { + "description": "Replaces the value of the specified key. Does not guarantee a commit to non-volatile storage until an explicit [Flush()](#flush-as-boolean) is done.", + "name": "Write", + "params": [ + { + "default": null, + "description": "The name of the key to be updated.", + "isRequired": true, + "name": "key", + "type": "String" + }, + { + "default": null, + "description": "The updated value to be written to the specified key.", + "isRequired": true, + "name": "value", + "type": "String" + } + ], + "returnDescription": "A flag indicating whether the value of the key was successfully updated.", + "returnType": "Boolean" + }, + { + "description": "Writes multiple values to the registry.", + "name": "WriteMulti", + "params": [ + { + "default": null, + "description": "An associative array with key-value pairs to be updated.", + "isRequired": true, + "name": "roAssociativeArray", + "type": "Object" + } + ], + "returnDescription": "A flag indicating whether the values were successfully updated.", + "returnType": "Boolean" + } + ], + "name": "ifRegistrySection", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifregistrysection.md" + }, + "ifrsa": { + "implementers": [ + { + "description": "The RSA component provides an interface to the OpenSSL RSA library of signing algorithms", + "name": "roRSA", + "url": "https://developer.roku.com/docs/references/brightscript/components/rorsa.md" + } + ], + "methods": [ + { + "name": "SetDigestAlgorithm", + "params": [ + { + "default": null, + "description": "An openssl string with the digest to be used. Common digest algorithms are \"sha1\", \"ripemd160\", and \"md5\".", + "isRequired": true, + "name": "digestAlgorithm", + "type": "String" + } + ], + "returnDescription": "A flag indicating whether the algorithm was successfully set (true) or the string was not recognized (false).", + "returnType": "Boolean" + }, + { + "description": "Specifies the private key to use for signing.", + "name": "SetPrivateKey", + "params": [ + { + "default": null, + "description": "Specifies the private key to be used for signing. The file name should specify a path, either in the package or a temp path.", + "isRequired": true, + "name": "keyFileName", + "type": "String" + } + ], + "returnType": "Integer" + }, + { + "name": "SetPublicKey", + "params": [ + { + "default": null, + "description": "Specifies the public key to be used for signing. The file name should specify a path, either in the package or a temp path.", + "isRequired": true, + "name": "keyFileName", + "type": "String" + } + ], + "returnType": "Integer" + }, + { + "description": "Generates a signature based on the specified digest.", + "name": "Sign", + "params": [ + { + "default": null, + "description": "The roByteArray to be signed. Errors will be printed in the BrightScript console. If the digest algorithm is not set (using SetDigestAlgorithm) before calling Sign(), the digest is not encapsulated. This would be equivalent to simply calling the openssl function RSA\\_private\\_encrypt()", + "isRequired": true, + "name": "digest", + "type": "roByteArray Object" + } + ], + "returnDescription": "An roByteArray containing the signature, or invalid if an error occurred. Typical values include the following:", + "returnType": "Object" + }, + { + "description": "Verifies the given digest and signature. Both digest and signature should be roByteArrays. If the digest algorithm is not set (using the [SetDigestAlgorithm](#setdigestalgorithmdigestalgorithm-as-string-as-boolean) method) before calling Verify(), the digest associated with the signature is not expected to be encapsulated. This would be equivalent to simply calling the openssl function RSA\\_public\\_decrypt(signature) and then comparing the result with the digest", + "name": "Verify", + "params": [ + { + "default": null, + "description": "The digest to be verified.", + "isRequired": true, + "name": "digest", + "type": "roByteArray Object" + }, + { + "default": null, + "description": "The signature to be verified.", + "isRequired": true, + "name": "signature", + "type": "roByteArray Object" + } + ], + "returnDescription": "Indicates the result of the validation. This may be one of the following values:", + "returnType": "Integer" + } + ], + "name": "ifRSA", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifrsa.md" + }, + "ifscreen": { + "description": "| Name | Description |\n| --- | --- |\n| [roScreen](https://developer.roku.com/docs/references/brightscript/components/roscreen.md\"roScreen\") | The roScreen component provides a full screen drawing surface that can be stacked and that you can receive input events from |", + "implementers": [ + { + "description": "The roScreen component provides a full screen drawing surface that can be stacked and that you can receive input events from", + "name": "roScreen", + "url": "https://developer.roku.com/docs/references/brightscript/components/roscreen.md" + } + ], + "methods": [ + { + "description": "This function first operates the same as a call to [ifDraw2D](https://developer.roku.com/docs/references/brightscript/interfaces/ifdraw2d.md\"ifDraw2D\"), completing all queued drawing operations on the back buffer (draw surface).", + "name": "SwapBuffers", + "params": [], + "returnType": "Void" + } + ], + "name": "ifScreen", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifscreen.md" + }, + "ifsearchhistory": { + "description": "> _This interface is known as ifRoSearchHistory in some Roku OS versions._", + "implementers": [ + { + "description": "The Search History object implements the system-wide storage of search terms for use in implementing the roSearchScreen", + "name": "roSearchHistory", + "url": "https://developer.roku.com/docs/references/brightscript/components/rosearchhistory.md" + } + ], + "methods": [ + { + "description": "Clears all elements from the search history.", + "name": "Clear", + "params": [], + "returnType": "Void" + }, + { + "description": "Returns the current search history stack.", + "name": "GetAsArray", + "params": [], + "returnDescription": "An [roArray](/docs/references/brightscript/components/roarray.md \"roArray\") of Strings with all available search history elements.", + "returnType": "Object" + }, + { + "description": "Pushes a new search term onto the search history stack.", + "name": "Push", + "params": [ + { + "default": null, + "description": "The search term to be pushed onto the search history stack.", + "isRequired": true, + "name": "searchTerm", + "type": "String" + } + ], + "returnType": "Void" + } + ], + "name": "ifSearchhistory", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifsearchhistory.md" + }, + "ifsearchscreen": { + "implementers": [ + { + "description": "The Search Screen provides a standard way to allow users to enter text for searching", + "name": "roSearchScreen", + "url": "https://developer.roku.com/docs/references/brightscript/components/rosearchscreen.md" + } + ], + "methods": [ + { + "description": "Adds an individual value to the search term list.", + "name": "AddSearchTerm", + "params": [ + { + "default": null, + "description": "The search term to be added.", + "isRequired": true, + "name": "searchTerm", + "type": "String" + } + ], + "returnType": "Void" + }, + { + "description": "Clears all values from the search terms list.", + "name": "ClearSearchTerms", + "params": [], + "returnType": "Void" + }, + { + "description": "Closes the screen and deletes the associated object. This is useful for avoiding screen flicker when the display order of your screens does not resemble a stack", + "name": "Close", + "params": [], + "returnType": "Void" + }, + { + "description": "Shows or hides the breadcrumb text in the title area", + "name": "SetBreadcrumbEnabled", + "params": [ + { + "default": null, + "description": "A flag specifying whether to show (true) or hide (false) the breadcrumb text.", + "isRequired": true, + "name": "enable", + "type": "Boolean" + } + ], + "returnType": "Void" + }, + { + "description": "Sets a two-part navigational title that shows the current and the previous locations in the application hierarchy (for example, TV – Friends).", + "name": "SetBreadcrumbText", + "params": [ + { + "default": null, + "description": "The location 1 name.", + "isRequired": true, + "name": "location1", + "type": "String" + }, + { + "default": null, + "description": "The location 2 name.", + "isRequired": true, + "name": "location2", + "type": "String" + } + ], + "returnType": "Void" + }, + { + "description": "Shows or hides the clear button on the keypad.", + "name": "SetClearButtonEnabled", + "params": [ + { + "default": null, + "description": "A flag specifying whether to show (true) or hide (false) the clear button.", + "isRequired": true, + "name": "enable", + "type": "Boolean" + } + ], + "returnType": "Void" + }, + { + "description": "Set the text label for the button at the bottom of the list area. Example text might be \"clear history\", \"clear results\" or similar", + "name": "SetClearButtonText", + "params": [ + { + "default": null, + "description": "The text label to be displayed on the button at the bottom of the list area", + "isRequired": true, + "name": "text", + "type": "String" + } + ], + "returnType": "Void" + }, + { + "description": "Displays the default text in the search terms box when no search terms have been entered.", + "name": "SetEmptySearchTermsText", + "params": [ + { + "default": null, + "description": "The text to be displayed in the search terms box by default.", + "isRequired": true, + "name": "text", + "type": "String" + } + ], + "returnType": "Void" + }, + { + "description": "Sets the text label to be displayed on the search button. For example \"search\", \"find\", etc.", + "name": "SetSearchButtonText", + "params": [ + { + "default": null, + "description": "The text label to be displayed on the search button.", + "isRequired": true, + "name": "text", + "type": "String" + } + ], + "returnType": "Void" + }, + { + "description": "Sets the text to be displayed for the header in the list area. This area could contain a list of search terms previously used as a search history or partial results in the case of a progressive disclosure search", + "name": "SetSearchTermHeaderText", + "params": [ + { + "default": null, + "description": "The text to be displayed for the header in the list are.", + "isRequired": true, + "name": "text", + "type": "String" + } + ], + "returnType": "Void" + }, + { + "description": "Sets the search terms list to the values contained in the array provided.", + "name": "SetSearchTerms", + "params": [ + { + "default": null, + "description": "An array of string values to be displayed.", + "isRequired": true, + "name": "searchTerms", + "type": "Object" + } + ], + "returnType": "Void" + }, + { + "description": "Sets the keyboard search string box to the specified text.", + "name": "SetSearchText", + "params": [ + { + "default": null, + "description": "The text to be displayed in the keyboard search string box.", + "isRequired": true, + "name": "text", + "type": "String" + } + ], + "returnType": "Void" + }, + { + "description": "Displays or refreshes the screen after creation or state changes.", + "name": "Show", + "params": [], + "returnDescription": "A flag indicating whether the search screen successfully was displayed.", + "returnType": "Boolean" + } + ], + "name": "ifSearchScreen", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifsearchscreen.md" + }, + "ifsetmessageport": { + "implementers": [ + { + "description": "The HDMI status component provides an interface to the current HDMI operational status", + "name": "roHdmiStatus", + "url": "https://developer.roku.com/docs/references/brightscript/components/rohdmistatus.md" + }, + { + "description": "The roScreen component provides a full screen drawing surface that can be stacked and that you can receive input events from", + "name": "roScreen", + "url": "https://developer.roku.com/docs/references/brightscript/components/roscreen.md" + }, + { + "description": "The roTextToSpeech component provides text to speech capabilities to applications", + "name": "roTextToSpeech", + "url": "https://developer.roku.com/docs/references/brightscript/components/rotexttospeech.md" + }, + { + "description": "A roUrlTransfer object transfers data to or from remote servers specified by URLs. It can perform mutual authentication with a web server", + "name": "roUrlTransfer", + "url": "https://developer.roku.com/docs/references/brightscript/components/rourltransfer.md" + } + ], + "methods": [ + { + "description": "Sets the [roMessagePort](https://developer.roku.com/docs/references/brightscript/components/romessageport.md\"roMessagePort\") to be used for all events from the screen.", + "name": "SetMessagePort", + "params": [ + { + "default": null, + "description": "The roMessagePort to be used for screen events.", + "isRequired": true, + "name": "port", + "type": "Object" + } + ], + "returnType": "Void" + } + ], + "name": "ifSetMessagePort", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifsetmessageport.md" + }, + "ifsgnodeboundingrect": { + "description": "The ifSGNodeBoundingRect interface can be used to query the bounding rectangle of subject node. The ifSGNodeBoundingRect interface methods return a node bounding rectangle as an associative array with four elements:\n\n| Name | Value |\n| --- | --- |\n| x | x-coordinate of the origin of the bounding rectangle |\n| y | y-coordinate of the origin of the bounding rectangle |\n| width | width of the bounding rectangle |\n| height | height of the bounding rectangle |\n\n> These methods return the bounding rectangle dimensions and location of component objects at the time they are called. If they are called before an object is fully constructed, such as before all graphical images have been loaded, they will return the dimensions and location at the time of the call, which may not be the correct values for placing the component object properly. To ensure that your screen has the component objects located as you intended, make sure you call these methods after the component object is fully constructed. For example, if the component object relies on loading graphical images to construct its appearance, it is best to use these methods as part of an observer callback function triggered by the image loading field events, such as the loadStatus field of the Poster node.", + "implementers": [ + { + "description": "The roSGNode object is the BrightScript equivalent of SceneGraph XML file node creation", + "name": "roSGNode", + "url": "https://developer.roku.com/docs/references/brightscript/components/rosgnode.md" + } + ], + "methods": [ + { + "description": "Returns the node bounding rectangle. The bounding rectangle of a node is the axis-aligned rectangle computed by transforming the local bounding rectangle of the node by the node transformation matrix. The resulting rectangle corresponds to the node local bounding rectangle transformed into its parent node local coordinate system.", + "name": "boundingRect", + "params": [], + "returnDescription": "An associative array with the node bounding rectangle.", + "returnType": "Dynamic" + }, + { + "description": "Returns the node local bounding rectangle. The local bounding rectangle of a node is the axis-aligned rectangle, that includes the union of the bounding rectangle of the geometry of the node, and the bounding rectangles of all of the node children, transformed into the local coordinate system of the node.", + "name": "localBoundingRect", + "params": [], + "returnDescription": "An associative array with the node local bounding rectangle.", + "returnType": "Dynamic" + }, + { + "description": "Returns the local bounding rectangle of this node's identified sub part in the node's local coordinate system. If the subpart does not exist, the node's local bounding rectangle is returned.", + "name": "localSubBoundingRect", + "params": [ + { + "default": null, + "description": "The index of the grid item for the local bounding rectangle to be returned in the following format: _rowindex_\\__itemindex_.", + "isRequired": true, + "name": "itemnumber", + "type": "String" + } + ], + "returnDescription": "An associative array with the local bounding rectangle of the node's identified sub part.", + "returnType": "Dynamic" + }, + { + "description": "Returns the bounding rectangle for scene components (component nodes extended from a [Scene](https://developer.roku.com/docs/references/scenegraph/scene.md\"Scene\") or [OverhangPanelSetScene](https://developer.roku.com/docs/references/scenegraph/sliding-panels-nodes/overhangpanelsetscene.md\"OverhangPanelSetScene\") node class).", + "name": "sceneBoundingRect", + "params": [], + "returnDescription": "An associative array with the bounding rectangle.", + "returnType": "Dynamic" + }, + { + "description": "Returns the bounding rectangle of this node's subpart in its Scene's coordinate system If the subpart does not exist or if the node is not an ancestor of a Scene node, this will return the node's bounding rectangle.", + "name": "sceneSubBoundingRect", + "params": [ + { + "default": null, + "description": "The index of the grid item for the bounding rectangle to be returned in the following format: _rowindex_\\__itemindex_.", + "isRequired": true, + "name": "itemnumber", + "type": "String" + } + ], + "returnDescription": "An associative array with the bounding rectangle.", + "returnType": "Dynamic" + }, + { + "description": "Returns the bounding rectangle of this node's identified sub part, as transformed by this node's transformation matrix, in its parent node's coordinate system. If the subpart does not exist, the node's bounding rectangle is returned.", + "name": "subBoundingRect", + "params": [ + { + "default": null, + "description": "The index of the grid item for the local bounding rectangle to be returned in the following format: _rowindex_\\__itemindex_.", + "isRequired": true, + "name": "itemnumber", + "type": "String" + } + ], + "returnDescription": "An associative array with the bounding rectangle.", + "returnType": "Dynamic" + } + ], + "name": "ifSGNodeBoundingRect", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifsgnodeboundingrect.md" + }, + "ifsgnodechildren": { + "description": "The ifSGNodeChildren interface allows querying and manipulation of nodes in a SceneGraph node tree, such as creating new nodes, placing them at certain positions in the tree, and removing them.", + "implementers": [ + { + "description": "The roSGNode object is the BrightScript equivalent of SceneGraph XML file node creation", + "name": "roSGNode", + "url": "https://developer.roku.com/docs/references/brightscript/components/rosgnode.md" + } + ], + "methods": [ + { + "description": "Appends an array of children nodes to the subject node.", + "name": "appendChildren", + "params": [ + { + "default": null, + "isRequired": true, + "name": "child" + } + ], + "returnDescription": "A flag indicating whether the children nodes were successfully appended." + }, + { + "description": "Creates a child node of type nodeType, and adds the new node to the end of the subject node list of children.", + "name": "createChild", + "params": [ + { + "default": null, + "description": "The node class to be created.", + "isRequired": true, + "name": "nodeType", + "type": "String" + } + ], + "returnDescription": "The child node that was created.", + "returnType": "Object" + }, + { + "description": "Creates a specific number of new child nodes of a specific type or extended type.", + "name": "createChildren", + "params": [ + { + "default": null, + "isRequired": true, + "name": "num" + } + ], + "returnDescription": "An roArray containing the new child nodes created." + }, + { + "description": "Returns an array with every existing node created by the currently running channel.", + "name": "getAll", + "params": [], + "returnDescription": "An roArray with the all the existing nodes created by the channel.", + "returnType": "Object" + }, + { + "description": "Returns an array with every existing node created by the currently running channel (similar to the [getAll()](#getall-as-object) method) organized as an XML forest of trees according to the usual parent-child node relationship. Cycles are handled with a reference entry in the tree rather than indefinite recursion.", + "name": "getAllMeta", + "params": [], + "returnDescription": "An roArray of strings with the all the existing nodes created by the channel.", + "returnType": "Object" + }, + { + "description": "Returns the child node specified by the index.", + "name": "getChild", + "params": [ + { + "default": null, + "description": "The index of the child node to be retrieved.", + "isRequired": true, + "name": "index", + "type": "Integer" + } + ], + "returnDescription": "The child node at the index position; otherwise, \"invalid\".", + "returnType": "Dynamic" + }, + { + "description": "Returns the current number of children in the subject node list of children. This is always a non-negative number.", + "name": "getChildCount", + "params": [], + "returnDescription": "The number of child nodes in the tree.", + "returnType": "Integer" + }, + { + "description": "Retrieves a specific number of child nodes from the subject node, starting at a specific position.", + "name": "getChildren", + "params": [ + { + "default": null, + "isRequired": true, + "name": "num" + } + ], + "returnDescription": "An roArray containing the child nodes retrieved. If num\\_children is -1, all the child nodes are returned." + }, + { + "description": "Returns the parent node of a node has been added to a list of children.", + "name": "getParent", + "params": [], + "returnDescription": "The parent node; otherwise, \"invalid\".", + "returnType": "roSGNode" + }, + { + "description": "Returns an array with every existing node without a parent created by the currently running channel.", + "name": "getRoots", + "params": [], + "returnType": "Object" + }, + { + "description": "Returns an array with every existing node without a parent created by the currently running channel.", + "name": "getRootsMeta", + "params": [], + "returnDescription": "An roArray with every existing node without a parent created by the currently running channel.", + "returnType": "Object" + }, + { + "description": "Returns the node's root Scene. This returns a valid Scene even if the node is not parented.", + "name": "getScene", + "params": [], + "returnDescription": "The node's root Scene.", + "returnType": "roSGNode" + }, + { + "description": "Inserts an array of child nodes to the subject node, starting at a specific position.", + "name": "insertChildren", + "params": [ + { + "default": null, + "isRequired": true, + "name": "child" + } + ], + "returnDescription": "A flag indicating whether the children nodes were successfully inserted." + }, + { + "description": "If the subject node has a child node in the index position, removes that child node from the subject node list of children.", + "name": "removeChildIndex", + "params": [ + { + "default": null, + "description": "The position in the tree of the child node to be removed.", + "isRequired": true, + "name": "index", + "type": "Integer" + } + ], + "returnDescription": "A flag indicating whether the child node that was successfully removed.", + "returnType": "Boolean" + }, + { + "description": "Removes an array of child nodes from the subject node.", + "name": "removeChildren", + "params": [ + { + "default": null, + "isRequired": true, + "name": "child" + } + ], + "returnDescription": "A flag indicating whether the children nodes were successfully removed." + }, + { + "description": "Removes a specific number of child nodes from the subject node starting at a specific position.", + "name": "removeChildrenIndex", + "params": [ + { + "default": null, + "isRequired": true, + "name": "num" + } + ], + "returnDescription": "A flag indicating whether the children nodes were successfully removed." + }, + { + "description": "Replaces the child nodes in the subject node, starting at the position specified by index, with new child nodes specified by child\\_nodes", + "name": "replaceChildren", + "params": [ + { + "default": null, + "isRequired": true, + "name": "child" + } + ], + "returnDescription": "A flag indicating whether the children nodes were successfully replaced." + } + ], + "name": "ifSGNodeChildren", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifsgnodechildren.md" + }, + "ifsgnodedict": { + "description": "The ifSGNodeDict interface allows you access information about the nodes in a SceneGraph node tree, and find and return a node with a specific ID.", + "implementers": [ + { + "description": "The roSGNode object is the BrightScript equivalent of SceneGraph XML file node creation", + "name": "roSGNode", + "url": "https://developer.roku.com/docs/references/brightscript/components/rosgnode.md" + } + ], + "methods": [ + { + "name": "clone", + "params": [ + { + "default": null, + "isRequired": true, + "name": "isDeepCopy", + "type": "Boolean" + } + ], + "returnDescription": "A node tree.", + "returnType": "Object" + }, + { + "description": "Returns the node that is a descendant of the nearest component ancestor of the subject node (possibly the subject node itself) and whose id field is set to name. The search for the descendant node is a breadth-first search that includes child nodes in nodes that are declared as custom components defined in other XML component files. These together allow finding siblings and cousins of a node within the context of a component. If a node with the specified name is not found, an invalid object is returned", + "name": "findNode", + "params": [ + { + "default": null, + "description": "The name of the node to be retrieved.", + "isRequired": true, + "name": "name", + "type": "String" + } + ], + "returnDescription": "The node that is a descendant of the nearest component ancestor of the subject node.", + "returnType": "Object" + }, + { + "description": "Checks whether a specific roSGNode refers to the same SceneGraph node object as the subject node.", + "name": "isSameNode", + "params": [ + { + "default": null, + "isRequired": true, + "name": "RoSGNode", + "type": "Object" + } + ], + "returnDescription": "A flag indicating whether the nodes refer to the same SceneGraph node object.", + "returnType": "Boolean" + }, + { + "description": "Checks whether the subtype of the subject node is a descendant of the subtype nodeType in the SceneGraph node class hierarchy.", + "name": "isSubtype", + "params": [ + { + "default": null, + "description": "The node type of the subject node.", + "isRequired": true, + "name": "nodeType", + "type": "String" + } + ], + "returnDescription": "A flag indicating whether the subtype of the subject node is a descendant of the subtype nodeType.", + "returnType": "Boolean" + }, + { + "description": "Returns the subtype of the parent of the nodeType in the SceneGraph node class hierarchy.", + "name": "parentSubtype", + "params": [ + { + "default": null, + "description": "The node type of the parent node.", + "isRequired": true, + "name": "nodeType", + "type": "String" + } + ], + "returnDescription": "The subtype of the parent node.", + "returnType": "String" + }, + { + "description": "Returns the subtype of the subject node as specified when it was created.", + "name": "subtype", + "params": [], + "returnDescription": "The subtype of the subject node.", + "returnType": "String" + } + ], + "name": "ifSGNodeDict", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifsgnodedict.md" + }, + "ifsgnodefield": { + "description": "The ifSGNodeField interface allows querying, getting, setting, and performing other similar manipulation operations on Scene Graph node fields. This interface also allows you to set and unset event observers on a subject node field.", + "implementers": [ + { + "description": "The roSGNode object is the BrightScript equivalent of SceneGraph XML file node creation", + "name": "roSGNode", + "url": "https://developer.roku.com/docs/references/brightscript/components/rosgnode.md" + } + ], + "methods": [ + { + "description": "Adds a field with the specified name and type to the subject node. The added field is initialized to the default value for the type.", + "name": "addField", + "params": [ + { + "default": null, + "description": "The name of the field to be added.", + "isRequired": true, + "name": "fieldName", + "type": "String" + }, + { + "default": null, + "description": "The type of the field to be added. Type declarations must be lowercase or the field will not be added to the node. For example, declaring \"Boolean\" as the type will prevent the field from being added.", + "isRequired": true, + "name": "type", + "type": "String" + }, + { + "default": null, + "description": "Specifies whether observers of the field are triggered when the field value is updated to the same or new value (true), or only when the field changes to a new value (false).", + "isRequired": true, + "name": "alwayNotify", + "type": "Boolean" + } + ], + "returnDescription": "A flag indicating whether the field have been successfully added.", + "returnType": "Boolean" + }, + { + "description": "Adds the field(s) and corresponding field value(s) defined as key-value pair(s) in the associative array fields to the subject node. The types of the added fields are determined by the values which correspond to the allowable types for an `` field.", + "name": "addFields", + "params": [ + { + "default": null, + "description": "An roAssociativeArray containing key-value pairs for the fields to be added.", + "isRequired": true, + "name": "fields", + "type": "Object" + } + ], + "returnDescription": "A flag indicating whether the fields have been successfully added.", + "returnType": "Boolean" + }, + { + "description": "Returns the appropriately-typed value from the specified field of the subject node.", + "name": "getField", + "params": [ + { + "default": null, + "description": "The name of the field to be retrieved.", + "isRequired": true, + "name": "fieldName", + "type": "String" + } + ], + "returnDescription": "A typed value.", + "returnType": "Object" + }, + { + "description": "Returns the names and values of all the fields in the node.", + "name": "getFields", + "params": [], + "returnDescription": "An roAssociativeArray containing key-value pairs with the element names and values.", + "returnType": "Object" + }, + { + "description": "Returns the type of a specific field of the subject node.", + "name": "getFieldType", + "params": [ + { + "default": null, + "description": "The name of the field to have its type retrieved.", + "isRequired": true, + "name": "fieldName", + "type": "String" + } + ], + "returnDescription": "The field type.", + "returnType": "String" + }, + { + "description": "Returns the names and types of all the fields in the node.", + "name": "getFieldTypes", + "params": [], + "returnDescription": "An roAssociativeArray containing key-value pairs with the element names and types.", + "returnType": "Object" + }, + { + "description": "Checks whether a field exists in the node.", + "name": "hasField", + "params": [ + { + "default": null, + "description": "The name of the field to be checked for whether it exists in the node.", + "isRequired": true, + "name": "fieldName", + "type": "String" + } + ], + "returnDescription": "A flag indicating whether the subject node has a field whose name exactly matches fieldName, or whose fully lowercase analog is identical to that of fieldName.", + "returnType": "Boolean" + }, + { + "description": "Calls a function when a field of the subject node changes. The function called must be in the scope of the current component.", + "name": "observeField", + "params": [ + { + "default": null, + "description": "The name of the field to be monitored.", + "isRequired": true, + "name": "fieldName", + "type": "String" + }, + { + "default": null, + "description": "The name of the method to be executed when the value of the field changes.", + "isRequired": true, + "name": "functionName", + "type": "String" + } + ], + "returnDescription": "A flag indicating whether the value of the field being monitored changes." + }, + { + "description": "This overloaded form sends an [roSGNodeEvent](https://developer.roku.com/docs/references/brightscript/components/rosgnode.md\"roSGNodeEvent\") message to the [roMessagePort](https://developer.roku.com/docs/references/brightscript/components/romessageport.md\"roMessagePort\") identified by port when the subject node field identified by fieldName changes value.", + "name": "observeField", + "params": [ + { + "default": null, + "description": "The name of the field to be monitored.", + "isRequired": true, + "name": "fieldName", + "type": "String" + }, + { + "default": null, + "description": "The [roMessagePort](https://developer.roku.com/docs/references/brightscript/components/romessageport.md\"roMessagePort\") to receive a [roSGNodeEvent](https://developer.roku.com/docs/references/brightscript/components/rosgnode.md\"roSGNodeEvent\") message when the value of the field changes.", + "isRequired": true, + "name": "port", + "type": "Object" + } + ], + "returnDescription": "A flag indicating whether the value of the field being monitored changes." + }, + { + "description": "Sets up a connection between the observed node's field and the current component from which this call is made. This method is similar to the [observeField()](https://developer.roku.com/docs/references/brightscript/interfaces/ifsgnodefield.mdobservefieldfieldname-as-string-functionname-as-string-as-boolean \"observeField(fieldName as String, functionName as String)\") method.", + "name": "observeFieldScoped", + "params": [ + { + "default": null, + "description": "The name of the field to be monitored.", + "isRequired": true, + "name": "fieldName", + "type": "String" + }, + { + "default": null, + "description": "The name of the method to be executed when the value of the field changes.", + "isRequired": true, + "name": "functionName", + "type": "String" + } + ], + "returnDescription": "A flag indicating whether the value of the field has changed." + }, + { + "description": "Sets up a connection between the observed node's field and the current component from which this call is made. This method is similar to the [observeField()](https://developer.roku.com/docs/references/brightscript/interfaces/ifsgnodefield.mdobservefieldfieldname-as-string-functionname-as-string-as-boolean \"observeField(fieldName as String, functionName as String)\") method.", + "name": "observeFieldScoped", + "params": [ + { + "default": null, + "description": "The name of the field to be monitored.", + "isRequired": true, + "name": "fieldName", + "type": "String" + }, + { + "default": null, + "description": "The [roMessagePort](https://developer.roku.com/docs/references/brightscript/components/romessageport.md\"roMessagePort\") to receive a [roSGNodeEvent](https://developer.roku.com/docs/references/brightscript/components/rosgnode.md\"roSGNodeEvent\") message when the value of the field changes.", + "isRequired": true, + "name": "port", + "type": "Object" + } + ], + "returnDescription": "A flag indicating whether the value of the field has changed." + }, + { + "description": "Makes subsequent operations on the node fields to queue on the node itself rather than on the [Scene](https://developer.roku.com/docs/references/scenegraph/scene.md\"Scene\") node render thread. This prevents the operations from being executed immediately.", + "name": "queueFields", + "params": [ + { + "default": null, + "description": "A flag enabling queuing on the node.", + "isRequired": true, + "name": "queueNode", + "type": "Boolean" + } + ], + "returnDescription": "A flag indicating the current state of **queueNode**.", + "returnType": "Boolean" + }, + { + "description": "Removes a field from the subject node. Fields defined in [content metadata](/docs/developer-program/getting-started/architecture/content-metadata.md \" Content Meta-Data\") and the related SceneGraph node class metadata bindings can be removed, but will be dynamically re-added at any time they are explicitly accessed.", + "name": "removeField", + "params": [ + { + "default": null, + "description": "The name of the field to be removed.", + "isRequired": true, + "name": "fieldName", + "type": "String" + } + ], + "returnDescription": "A flag indicating whether the field has been successfully removed.", + "returnType": "Boolean" + }, + { + "description": "Removes one or more fields from the subject node.", + "name": "removeFields", + "params": [ + { + "default": null, + "description": "An roArray containing the names of the fields to be removed.", + "isRequired": true, + "name": "fieldNames", + "type": "Object" + } + ], + "returnDescription": "A flag indicating whether the fields have been successfully removed.", + "returnType": "Boolean" + }, + { + "description": "Sets the value of a subject node field. This will fail and stop script execution if the value is not of the appropriate type.", + "name": "setField", + "params": [ + { + "default": null, + "description": "The name of the field to be updated.", + "isRequired": true, + "name": "fieldName", + "type": "String" + }, + { + "default": null, + "description": "The updated value for the field.", + "isRequired": true, + "name": "value", + "type": "Object" + } + ], + "returnDescription": "A flag indicating whether the field was successfully updated.", + "returnType": "Boolean" + }, + { + "description": "Sets the values for one or more fields.", + "name": "setFields", + "params": [ + { + "default": null, + "description": "An roAssociativeArray containing key-value pairs for the fields to be updated.", + "isRequired": true, + "name": "fields", + "type": "Object" + } + ], + "returnDescription": "A flag indicating whether the fields have been successfully updated.", + "returnType": "Boolean" + }, + { + "description": "Signals start and/or stop points for measuring channel launch and Electronic Program Grid (EPG) launch times.", + "name": "signalBeacon", + "params": [ + { + "default": null, + "isRequired": true, + "name": "beacon", + "type": "String" + } + ], + "returnDescription": "When you fire a launch event, the system will return an integer indicating the result of its signaling:", + "returnType": "Integer" + }, + { + "description": "A runtime debugging method for helping minimize Rendezvous spread. This method can be called on any node from any thread.", + "name": "threadinfo", + "params": [], + "returnDescription": "An roAssociatveArray with the following information:", + "returnType": "Object" + }, + { + "description": "Removes the previously established connections between the subject node field identified by fieldName and any callback functions or message ports.", + "name": "unobserveField", + "params": [ + { + "default": null, + "description": "The name of the field to no longer be monitored.", + "isRequired": true, + "name": "fieldName", + "type": "String" + } + ], + "returnDescription": "A flag indicating whether this operation was successful.", + "returnType": "Boolean" + }, + { + "description": "Removes the connection between the observing component and the observed node's field.", + "name": "unobserveFieldScoped", + "params": [ + { + "default": null, + "description": "The name of the field to no longer be monitored.", + "isRequired": true, + "name": "fieldName", + "type": "String" + } + ], + "returnDescription": "A flag indicating whether this operation was successful.", + "returnType": "Boolean" + } + ], + "name": "ifSGNodeField", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifsgnodefield.md" + }, + "ifsgnodefocus": { + "description": "The ifSGNodeFocus interface is used to query and manipulate the remote control focus of the nodes in a SceneGraph node tree.", + "implementers": [ + { + "description": "The roSGNode object is the BrightScript equivalent of SceneGraph XML file node creation", + "name": "roSGNode", + "url": "https://developer.roku.com/docs/references/brightscript/components/rosgnode.md" + } + ], + "methods": [ + { + "description": "Checks whether the subject node has the remote control focus.", + "name": "hasFocus", + "params": [], + "returnDescription": "A flag indicating whether the subject node has the remote control focus.", + "returnType": "Boolean" + }, + { + "description": "Checks whether the subject node or any of its descendants in the SceneGraph node tree have remote control focus.", + "name": "isInFocusChain", + "params": [], + "returnDescription": "A flag indicating whether the subject node or any of its descendants in the SceneGraph node tree have the remote control focus.", + "returnType": "Boolean" + }, + { + "description": "Sets the current remote control focus to the subject node.", + "name": "setFocus", + "params": [ + { + "default": null, + "description": "True = Sets the current remote control focus to the subject node. This also automatically removes focus from the node on which it was previously set. False = Removes focus from the subject node if it had it. Setting the remote control focus to false is rarely necessary, and can lead to unexpected behavior.", + "isRequired": true, + "name": "on", + "type": "Boolean" + } + ], + "returnDescription": "A flag indicating whether focus on the subject node has successfully been updated.", + "returnType": "Boolean" + } + ], + "name": "ifSGNodeFocus", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifsgnodefocus.md" + }, + "ifsgnodehttpagentaccess": { + "description": "The ifSGNodeHttpAgentAccess interface allows you to get an [roHttpAgent](https://developer.roku.com/docs/references/brightscript/components/rohttpagent.md\"roHttpAgent\") object from a SceneGraph node, and set an roHttpAgent object for a nod", + "implementers": [ + { + "description": "The roSGNode object is the BrightScript equivalent of SceneGraph XML file node creation", + "name": "roSGNode", + "url": "https://developer.roku.com/docs/references/brightscript/components/rosgnode.md" + } + ], + "methods": [ + { + "description": "Returns the roHttpAgent object for the node.", + "name": "getHttpAgent", + "params": [], + "returnDescription": "The roHttpAgent object for the node, which may be one of the following:", + "returnType": "Object" + }, + { + "name": "setHttpAgent", + "params": [ + { + "default": null, + "isRequired": true, + "name": "HTTP" + } + ], + "returnDescription": "A flag indicating whether the roHttpAgent object was successfully set." + } + ], + "name": "ifSGNodeHttpAgentAccess", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifsgnodehttpagentaccess.md" + }, + "ifsgscreen": { + "implementers": [ + { + "description": "The roSGScreen object is a SceneGraph canvas that displays the contents of a SceneGraph Scene node tree", + "name": "roSGScreen", + "url": "https://developer.roku.com/docs/references/brightscript/components/rosgnode.md" + } + ], + "methods": [ + { + "description": "Removes the SceneGraph scene from the display screen.", + "name": "Close", + "params": [], + "returnType": "Void" + }, + { + "description": "Creates the SceneGraph scene object based on the specified sceneType object.", + "name": "CreateScene", + "params": [ + { + "default": null, + "description": "The sceneType object to be used to create the scene object.", + "isRequired": true, + "name": "sceneType", + "type": "String" + } + ], + "returnDescription": "The roSGScene object associated with the screen.", + "returnType": "Object" + }, + { + "description": "Returns a global reference object for the SceneGraph application.", + "name": "getGlobalNode", + "params": [], + "returnDescription": "A global reference object.", + "returnType": "roSGNode" + }, + { + "description": "Returns the roMessagePort object for the SceneGraph scene.", + "name": "GetMessagePort", + "params": [], + "returnDescription": "The roMessagePort object.", + "returnType": "roMessagePort" + }, + { + "description": "The roSGScene object associated with the screen.", + "name": "GetScene", + "params": [], + "returnDescription": "Typically, the scene created in main.brs by a roSGScreen.CreateScene() call.", + "returnType": "roSGNode" + }, + { + "description": "Renders the SceneGraph scene defined by the roSGScreen object on the display screen.", + "name": "Show", + "params": [], + "returnDescription": "A flag indicating whether the screen is displayed.", + "returnType": "Boolean" + } + ], + "name": "ifSGScreen", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifsgscreen.md" + }, + "ifslideshow": { + "deprecatedDescription": "This interface is deprecated.\n\nBeginning July 1st, 2017, any new channels using this component will be rejected during certification.\n\nBeginning January 1st, 2018, any updates to existing channels using this component will be rejected during certification.\n", + "description": "> This interface is deprecated.\n> \n> Beginning July 1st, 2017, any new channels using this component will be rejected during certification.\n> \n> Beginning January 1st, 2018, any updates to existing channels using this component will be rejected during certification.", + "implementers": [ + { + "description": "The Slide Show screen provides the ability to setup a photo slide show to playback a series of images", + "name": "roSlideShow", + "url": "https://developer.roku.com/docs/references/brightscript/components/roslideshow.md" + } + ], + "isDeprecated": true, + "methods": [ + { + "description": "Adds a button to the screen. The buttons are displayed in a standard location on the screen and appear in the order added. When the button is pressed, the script will receive an event from the application containing the ID of the button pressed", + "name": "AddButton", + "params": [ + { + "default": null, + "description": "The ID used to uniquely identify the button instance.", + "isRequired": true, + "name": "id", + "type": "Integer" + }, + { + "default": null, + "description": "The title used for the button.", + "isRequired": true, + "name": "title", + "type": "String" + } + ], + "returnDescription": "A flag indicating whether the button was successfully added.", + "returnType": "Boolean" + }, + { + "description": "Add a new [content metadata](/docs/developer-program/getting-started/architecture/content-metadata.md \"Content Meta-Data\") item to the end of the content list for the slide show.", + "name": "AddContent", + "params": [ + { + "default": null, + "description": "The content metadata item to be added to the slideshow list.", + "isRequired": true, + "name": "contentItem", + "type": "Object" + } + ], + "returnType": "Void" + }, + { + "name": "AddRatingButton", + "params": [ + { + "default": null, + "description": "The ID used to uniquely identify the rating button instance.", + "isRequired": true, + "name": "id", + "type": "Integer" + }, + { + "default": null, + "description": "A value between 1-100 that represents the number of stars (1 to 5) to be displayed. Essentially this a percentage value: <20% = 1 star.", + "isRequired": true, + "name": "rating", + "type": "Integer" + } + ], + "returnDescription": "A flag indicating whether the rating button was successfully added.", + "returnType": "Boolean" + }, + { + "name": "ClearButtons", + "params": [], + "returnType": "Void" + }, + { + "description": "Clears all content from the content list.", + "name": "ClearContent", + "params": [], + "returnType": "Void" + }, + { + "description": "Closes the screens and delete the associated object. This is useful for avoiding screen flicker when the display order of your screens does not resemble a stack", + "name": "Close", + "params": [], + "returnType": "Void" + }, + { + "description": "Returns the count of all the buttons added to the slide show screen.", + "name": "CountButtons", + "params": [], + "returnDescription": "The button count value.", + "returnType": "Integer" + }, + { + "description": "Retrieves the maximum scale factor.", + "name": "GetMaxUpscale", + "params": [], + "returnDescription": "The scale factor.", + "returnType": "Float" + }, + { + "description": "Puts the slide show into pause mode. Setting the player to pause mode if it is not in play mode generates in error.", + "name": "Pause", + "params": [], + "returnDescription": "A flag that indicates whether the slide show was successfully set to pause mode.", + "returnType": "Boolean" + }, + { + "description": "Puts the slide show into play mode starting from the pause point. Setting the player to play mode when it is not in pause mode generates in error.", + "name": "Resume", + "params": [], + "returnDescription": "A flag that indicates whether the slide show was successfully set to pause mode.", + "returnType": "Boolean" + }, + { + "description": "Sets the border color used as the background around the slide.", + "name": "SetBorderColor", + "params": [ + { + "default": null, + "description": "The HTML hex color value to be used as the border.", + "isRequired": true, + "name": "color", + "type": "String" + } + ], + "returnType": "Void" + }, + { + "description": "Set the content to be played by the slide show.", + "name": "SetContentList", + "params": [ + { + "default": null, + "description": "An [roArray](https://developer.roku.com/docs/references/brightscript/components/roarray.md\"roArray\") of [roAssociativeArrays](https://developer.roku.com/docs/references/brightscript/components/roassociativearray.md\"roAssociativeArrays\") ([Content Meta-Data](/docs/developer-program/getting-started/architecture/content-metadata.md \"Content Meta-Data\") objects) representing the information for each title to be displayed on screen", + "isRequired": true, + "name": "contentList", + "type": "Object" + } + ], + "returnType": "Void" + }, + { + "description": "Sets the mode for displaying slideshow images. This allows images to be either scaled to completely fill the screen (scale-to-fill) or scaled to fit inside the screen (scale-to-fit) while maintaining aspect ratio.", + "name": "SetDisplayMode", + "params": [ + { + "default": null, + "description": "The display mode, which may be one of the following values: * scale-to-fill – scale image to completely fill the rectangle of the bounding frame (Default) * scale-to-fit – scale image to fit horizontally or vertically as appropriate while still maintaining aspect ratio. Note that scale-to-fit may result in pillar-box or letter-box display of images. * zoom-to-fill – scales and crops image to maintain aspect ratio and completely fill the rectangle of the bounding frame. * photo-fit – Uses several methods to fit the image with a different aspect ratio to the screen. First, it will asymmetrically scale up to a maximum of 5%. Second, for landscape images, if vertical cropping is necessary, it will remove two lines off the bottom for every one line off the top up to a maximum of 30% of the image. For all images, if horizontal cropping is necessary it will crop an equal amount from both sides.", + "isRequired": true, + "name": "displayMode", + "type": "String" + } + ], + "returnType": "Void" + }, + { + "description": "Makes the slideshow loop through all the slides.", + "name": "SetLoop", + "params": [ + { + "default": null, + "description": "A flag specifying whether to loop through all the slides.", + "isRequired": true, + "name": "loop", + "type": "Boolean" + } + ], + "returnType": "Void" + }, + { + "description": "Set the maximum scale factor for scale-to-fill, zoom-to-fill, and photo-fit modes.", + "name": "SetMaxUpscale", + "params": [ + { + "default": null, + "description": "The maximum scale factor to be used.", + "isRequired": true, + "name": "maxUpscale", + "type": "Float" + } + ], + "returnType": "Void" + }, + { + "description": "Makes the SlideShow object queue a specific slide up as the next slide.", + "name": "SetNext", + "params": [ + { + "default": null, + "description": "The zero-based index of the item in the content list.", + "isRequired": true, + "name": "item", + "type": "Integer" + }, + { + "default": null, + "description": "Forces an immediate update to the slideshow.", + "isRequired": true, + "name": "isImmediate", + "type": "Boolean" + } + ], + "returnType": "Void" + }, + { + "description": "Specifies the number of seconds that each slide is displayed.", + "name": "SetPeriod", + "params": [ + { + "default": null, + "description": "The number of seconds that each slide is displayed.", + "isRequired": true, + "name": "seconds", + "type": "Integer" + } + ], + "returnType": "Void" + }, + { + "description": "Defines the number of milliseconds to display the text overlay for each slide.", + "name": "SetTextOverlayHoldTime", + "params": [ + { + "default": null, + "description": "The number of milliseconds to display the text overlay. If this is set to 0, the overlay is off.", + "isRequired": true, + "name": "milliseconds", + "type": "Integer" + } + ], + "returnType": "Void" + }, + { + "description": "Displays the overlay. This method is OR'd with the overlay hold time; therefore, even if **IsVisible** is false, the overlay is displayed during the slide's overlay hold time.", + "name": "SetTextOverlayIsVisible", + "params": [ + { + "default": null, + "description": "A flag specifying whether the overlay is displayed.", + "isRequired": true, + "name": "IsVisible", + "type": "Boolean" + } + ], + "returnType": "Void" + }, + { + "description": "Set the percentage to reduce the image size by to compensate for monitor overscan (for example, 2.5 for 2.5%).", + "name": "SetUnderscan", + "params": [ + { + "default": null, + "description": "The percentage to be used to reduce the image size.", + "isRequired": true, + "name": "percentage", + "type": "Float" + } + ], + "returnType": "Void" + }, + { + "description": "Displays or refreshes the screen after creation or state changes.", + "name": "Show", + "params": [], + "returnDescription": "A flag indicating whether the screen was successfully displayed.", + "returnType": "Boolean" + } + ], + "name": "ifSlideshow", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifslideshow.md" + }, + "ifsocket": { + "implementers": [ + { + "description": "The roDataGramSocket component enables Brightscript apps to send and receive UDP packets", + "name": "roDataGramSocket", + "url": "https://developer.roku.com/docs/references/brightscript/components/rodatagramsocket.md" + }, + { + "description": "The roStreamSocket component enables BrightScript apps to accept and connect to TCP streams as well as send and receive data with them", + "name": "roStreamSocket", + "url": "https://developer.roku.com/docs/references/brightscript/components/rostreamsocket.md" + } + ], + "methods": [ + { + "name": "Close", + "params": [], + "returnType": "Void" + }, + { + "description": "Returns the roSocketAddress object bound to this socket.", + "name": "GetAddress", + "params": [], + "returnDescription": "roSocketAddress Object.", + "returnType": "Object" + }, + { + "description": "Returns the number of bytes in the receive buffer.", + "name": "GetCountRcvBuf", + "params": [], + "returnDescription": "Number of bytes.", + "returnType": "Integer" + }, + { + "description": "Returns the number of bytes in the send buffer.", + "name": "GetCountSendBuf", + "params": [], + "returnDescription": "Number of bytes.", + "returnType": "Integer" + }, + { + "description": "Returns the roSocketAddress for the remote address of the last message received via the [receive()](#receivedata-as-object-startindex-as-integer-length-as-integer-as-integer) method. This method can also be used to return the remote address on newly accepted sockets.", + "name": "GetReceivedFromAddress", + "params": [], + "returnDescription": "The roSocketAddress for the remote address of the last message received.", + "returnType": "Object" + }, + { + "description": "Returns the roSocketAddress for the remote address of the next message to be sent. This method can also be used to return the remote address on newly accepted sockets.", + "name": "GetSendToAddress", + "params": [], + "returnDescription": "The roSocketAddress for the remote address of the next message to be sent.", + "returnType": "Object" + }, + { + "description": "Reads data from the socket.", + "name": "Receive", + "params": [ + { + "default": null, + "description": "A [roByteArray](https://developer.roku.com/docs/references/brightscript/components/robytearray.md\"roByteArray\") containing the data to be stored.", + "isRequired": true, + "name": "data", + "type": "Object" + }, + { + "default": null, + "description": "The index of the byte array from which to start reading data.", + "isRequired": true, + "name": "startIndex", + "type": "Integer" + }, + { + "default": null, + "description": "The amount of data to be read from the socket.", + "isRequired": true, + "name": "length", + "type": "Integer" + } + ], + "returnDescription": "The number of bytes read.", + "returnType": "Integer" + }, + { + "name": "ReceiveStr", + "params": [ + { + "default": null, + "description": "The amount of data to be read from the socket.", + "isRequired": true, + "name": "length", + "type": "Integer" + } + ], + "returnDescription": "The received byte length string. If no bytes are received, the string is empty.", + "returnType": "String" + }, + { + "description": "Sends up to length bytes of data to the socket.", + "name": "Send", + "params": [ + { + "default": null, + "description": "A [roByteArray](https://developer.roku.com/docs/references/brightscript/components/robytearray.md\"roByteArray\") containing the data to be sent.", + "isRequired": true, + "name": "data", + "type": "Object" + }, + { + "default": null, + "description": "The index of the byte array from which to start sending data.", + "isRequired": true, + "name": "startIndex", + "type": "Integer" + }, + { + "default": null, + "description": "The amount of data to be sent to the socket.", + "isRequired": true, + "name": "length", + "type": "Integer" + } + ], + "returnDescription": "The number of bytes sent.", + "returnType": "Integer" + }, + { + "description": "Sends the whole string to the socket, if possible.", + "name": "SendStr", + "params": [ + { + "default": null, + "description": "A string containing the data to be sent.", + "isRequired": true, + "name": "data", + "type": "String" + } + ], + "returnDescription": "The number of bytes sent.", + "returnType": "Integer" + }, + { + "description": "Sets the address using a BSD bind() call", + "name": "SetAddress", + "params": [ + { + "default": null, + "description": "An roSocketAddress.", + "isRequired": true, + "name": "sockAddr", + "type": "Object" + } + ], + "returnDescription": "A flag indicating whether the address was successfully set.", + "returnType": "Boolean" + }, + { + "description": "Sets the remote address for next message to be sent.", + "name": "SetSendToAddress", + "params": [ + { + "default": null, + "description": "An roSocketAddress.", + "isRequired": true, + "name": "sockAddr", + "type": "Object" + } + ], + "returnDescription": "A flag indicating whether the address was successfully stored as the first half of underlying BSD sendto() call.", + "returnType": "Boolean" + }, + { + "description": "Indicates whether the last operation was successful.", + "name": "Status", + "params": [], + "returnDescription": "This method returns 0 if the last operation was successful or an error number if it failed.", + "returnType": "Integer" + } + ], + "name": "ifSocket", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifsocket.md" + }, + "ifsocketaddress": { + "implementers": [ + { + "description": "The roSocketAddress is used by the roStreamSocket and roDataGramSocket components for TCP and UDP traffic respectively", + "name": "roSocketAddress", + "url": "https://developer.roku.com/docs/references/brightscript/components/rosocketaddress.md" + } + ], + "methods": [ + { + "name": "GetAddress", + "params": [], + "returnDescription": "The IPV4 address.", + "returnType": "String" + }, + { + "description": "Returns the hostname.", + "name": "GetHostName", + "params": [], + "returnDescription": "The hostname.", + "returnType": "String" + }, + { + "description": "Returns the port number.", + "name": "GetPort", + "params": [], + "returnDescription": "The port number.", + "returnType": "Integer" + }, + { + "description": "Checks whether the component contains a valid IP address.", + "name": "IsAddressValid", + "params": [], + "returnDescription": "A flag indicating whether the component contains a valid IP address.", + "returnType": "Boolean" + }, + { + "description": "Sets the IPV4 address.", + "name": "SetAddress", + "params": [ + { + "default": null, + "description": "The string consists of a hostname, optionally followed by a colon and a decimal port number. The hostname may be either dotted quad (such as \"192.168.1.120\") or a DNS name (such as \"roku.com\"). If a name is given, a DNS lookup is performed to convert it to dotted quad. Use IsAddressValid() to determine the result of the DNS lookup. Example: \"192.168.1.120:8888\" or \"roku.com\".", + "isRequired": true, + "name": "address", + "type": "String" + } + ], + "returnDescription": "A flag indicating whether the IPV4 address was successfully set.", + "returnType": "Boolean" + }, + { + "description": "Sets the hostname. The port number is unchanged.", + "name": "SetHostName", + "params": [ + { + "default": null, + "description": "The hostname to be used.", + "isRequired": true, + "name": "hostname", + "type": "String" + } + ], + "returnDescription": "A flag indicating whether the hostname was successfully set.", + "returnType": "Boolean" + }, + { + "description": "Sets the port number. The hostname is unchanged.", + "name": "SetPort", + "params": [ + { + "default": null, + "description": "The port number to be used.", + "isRequired": true, + "name": "port", + "type": "Integer" + } + ], + "returnDescription": "A flag indicating whether the port number was successfully set.", + "returnType": "Boolean" + } + ], + "name": "ifSocketAddress", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifsocketaddress.md" + }, + "ifsocketasync": { + "description": "The ifSocketAsync interface provides asynchronous socket features that utilize a full-featured select loop in the Roku OS that communicates to the application using a BrightScript [roMessagePort](https://developer.roku.com/docs/references/brightscript/components/romessageport.md\"roMessagePort\"). This interface is valid on roStreamSocket and roDataGramSocket objects that were assigned a BrightScript port via SetMessagePort().", + "implementers": [ + { + "description": "The roDataGramSocket component enables Brightscript apps to send and receive UDP packets", + "name": "roDataGramSocket", + "url": "https://developer.roku.com/docs/references/brightscript/components/rodatagramsocket.md" + }, + { + "description": "The roStreamSocket component enables BrightScript apps to accept and connect to TCP streams as well as send and receive data with them", + "name": "roStreamSocket", + "url": "https://developer.roku.com/docs/references/brightscript/components/rostreamsocket.md" + } + ], + "methods": [ + { + "description": "Returns a unique identifier that can be compared to the value returned by the [roSocketEvent.getSocketID()](https://developer.roku.com/docs/references/brightscript/events/rosocketevent.mdgetsocketid-as-integer) method to match the underlying socket to receive the event.", + "name": "GetID", + "params": [], + "returnType": "Integer" + }, + { + "description": "Checks whether underlying select determines non-blocking read of OOB data is possible.", + "name": "IsException", + "params": [], + "returnDescription": "A flag indicating whether underlying select determines non-blocking read of OOB data is possible.", + "returnType": "Boolean" + }, + { + "description": "Checks whether underlying select determines non-blocking read is possible.", + "name": "IsReadable", + "params": [], + "returnDescription": "A flag indicating whether underlying select determines non-blocking read is possible.", + "returnType": "Boolean" + }, + { + "description": "Checks whether underlying select determines non-blocking write is possible.", + "name": "IsWritable", + "params": [], + "returnDescription": "A flag indicating whether underlying select determines non-blocking write is possible.", + "returnType": "Boolean" + }, + { + "description": "Enables roSocketEvent events to be sent via the message port when the underlying socket gets an exception or OOB data.", + "name": "NotifyException", + "params": [ + { + "default": null, + "description": "A flag specifying whether roSocketEvent events are to be sent when the underlying socket gets an exception or OOB data.", + "isRequired": true, + "name": "enable", + "type": "Boolean" + } + ], + "returnType": "Void" + }, + { + "description": "Enables roSocketEvent events to be sent via the message port when the underlying socket becomes readable.", + "name": "NotifyReadable", + "params": [ + { + "default": null, + "description": "A flag specifying whether roSocketEvent events are to be sent when the underlying socket becomes readable.", + "isRequired": true, + "name": "enable", + "type": "Boolean" + } + ], + "returnType": "Void" + }, + { + "description": "Enables roSocketEvent events to be sent via the message port when the underlying socket becomes writable.", + "name": "NotifyWritable", + "params": [ + { + "default": null, + "description": "A flag specifying whether roSocketEvent events are to be sent when the underlying socket becomes writable.", + "isRequired": true, + "name": "enable", + "type": "Boolean" + } + ], + "returnType": "Void" + } + ], + "name": "ifSocketAsync", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifsocketasync.md" + }, + "ifsocketcastoption": { + "implementers": [ + { + "description": "The roDataGramSocket component enables Brightscript apps to send and receive UDP packets", + "name": "roDataGramSocket", + "url": "https://developer.roku.com/docs/references/brightscript/components/rodatagramsocket.md" + } + ], + "methods": [ + { + "description": "Drops out of a specific multicast group.", + "name": "DropGroup", + "params": [ + { + "default": null, + "description": "An [roSocketAddress](https://developer.roku.com/docs/references/brightscript/components/rostreamsocket.md\"roSocketAddress\") representing the group to leave. IPV4 multicast addresses are in the range of 224.0.0.0 through 239.255.255.255.", + "isRequired": true, + "name": "ipAddress", + "type": "Object" + } + ], + "returnDescription": "A flag indicating whether this operation was successful.", + "returnType": "Boolean" + }, + { + "description": "Checks whether broadcast messages may be sent or received.", + "name": "GetBroadcast", + "params": [], + "returnDescription": "A flag indicating whether broadcast messages may be sent or received.", + "returnType": "Boolean" + }, + { + "description": "Checks whether multicast messages are enabled for local loopback.", + "name": "GetMulticastLoop", + "params": [], + "returnDescription": "A flag indicating whether multicast messages are enabled for local loopback. If this flag is true, multicast message sent locally are to be received locally.", + "returnType": "Boolean" + }, + { + "description": "Returns the TTL integer value for multicast messages. This is the number of hops a packet is allowed before a router drops the packet.", + "name": "GetMulticastTTL", + "params": [], + "returnDescription": "The multicast messages value.", + "returnType": "Integer" + }, + { + "description": "Joins a specific multicast group.", + "name": "JoinGroup", + "params": [ + { + "default": null, + "description": "An [roSocketAddress](https://developer.roku.com/docs/references/brightscript/components/rostreamsocket.md\"roSocketAddress\") representing the group to be joined. IPV4 multicast addresses are in the range of 224.0.0.0 through 239.255.255.255.", + "isRequired": true, + "name": "ipAddress", + "type": "Object" + } + ], + "returnDescription": "A flag indicating whether this operation was successful.", + "returnType": "Boolean" + }, + { + "description": "Enables broadcast messages to be sent or received.", + "name": "SetBroadcast", + "params": [ + { + "default": null, + "description": "A flag specifying whether broadcast messages may be sent or received.", + "isRequired": true, + "name": "enable", + "type": "Boolean" + } + ], + "returnDescription": "A flag indicating whether this operation succeeded.", + "returnType": "Boolean" + }, + { + "description": "Enables local loopback of multicast messages.", + "name": "SetMulticastLoop", + "params": [ + { + "default": null, + "description": "A flag specifying whether local loopback of multicast messages; otherwise do not send or receive broadcast messages.", + "isRequired": true, + "name": "enable", + "type": "Boolean" + } + ], + "returnDescription": "A flag indicating whether this operation was successful.", + "returnType": "Boolean" + }, + { + "description": "Sets the TTL integer value for multicast messages.", + "name": "SetMulticastTTL", + "params": [ + { + "default": null, + "description": "The number of hops a packet is allowed before a router drops the packet", + "isRequired": true, + "name": "ttl", + "type": "Integer" + } + ], + "returnDescription": "A flag indicating whether the TTL value was successfully set.", + "returnType": "Boolean" + } + ], + "name": "ifSocketCastOption", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifsocketcastoption.md" + }, + "ifsocketconnection": { + "implementers": [ + { + "description": "The roStreamSocket component enables BrightScript apps to accept and connect to TCP streams as well as send and receive data with them", + "name": "roStreamSocket", + "url": "https://developer.roku.com/docs/references/brightscript/components/rostreamsocket.md" + } + ], + "methods": [ + { + "description": "Accepts incoming requests.", + "name": "Accept", + "params": [], + "returnDescription": "An roStreamSocket if the connection is pending; invalid otherwise. Use status to distinguish among success (eSuccess() or isConnected()), not ready (eOK()), and error.", + "returnType": "Object" + }, + { + "description": "Establishes a connection.", + "name": "Connect", + "params": [], + "returnDescription": "A flag indicating whether a socket connection has successfully been created. The connection might still not be complete if the socket is non-blocking", + "returnType": "Boolean" + }, + { + "description": "Checks whether a [connect](#connect-as-boolean) or [accept](#accept-as-object) function has been completed on this socket.", + "name": "IsConnected", + "params": [], + "returnDescription": "A flag indicating whether a connection has been established or accepted on this socket.", + "returnType": "Boolean" + }, + { + "name": "IsListening", + "params": [], + "returnDescription": "A flag indicating whether the [listen()](#listenbacklog-as-integer-as-boolean) method has been successfully called on this socket.", + "returnType": "Boolean" + }, + { + "description": "Puts the socket into the listen state.", + "name": "Listen", + "params": [ + { + "default": null, + "description": "The limit for the queue of incoming connections", + "isRequired": true, + "name": "backlog", + "type": "Integer" + } + ], + "returnDescription": "A flag indicating whether listening can be done (generally, if bound address is valid).", + "returnType": "Boolean" + } + ], + "name": "ifSocketConnection", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifsocketconnection.md" + }, + "ifsocketconnectionoption": { + "implementers": [ + { + "description": "The roStreamSocket component enables BrightScript apps to accept and connect to TCP streams as well as send and receive data with them", + "name": "roStreamSocket", + "url": "https://developer.roku.com/docs/references/brightscript/components/rostreamsocket.md" + } + ], + "methods": [ + { + "description": "Checks whether keep alive is set. If keep alive is set, occasional no-data packets are sent to keep the connection alive.", + "name": "GetKeepAlive", + "params": [], + "returnDescription": "A flag indicating whether keep alive is set.", + "returnType": "Boolean" + }, + { + "description": "Returns the max time in seconds that the socket close() blocks to allow send data to be flushed in synchronous mode.", + "name": "GetLinger", + "params": [], + "returnDescription": "The max time in seconds.", + "returnType": "Integer" + }, + { + "description": "Returns the max TCP segment size.", + "name": "GetMaxSeg", + "params": [], + "returnDescription": "The segment size.", + "returnType": "Integer" + }, + { + "description": "Checks whether the no delay property is enabled on the socket. This means that data is sent as soon as it is available rather than once there is enough data to fill a segment.", + "name": "GetNoDelay", + "params": [], + "returnDescription": "A flag indicating whether the no delay property is enabled.", + "returnType": "Boolean" + }, + { + "description": "Sends no-data packets to keep the connection alive.", + "name": "SetKeepAlive", + "params": [ + { + "default": null, + "description": "A flag specifying whether keep alive is enabled.", + "isRequired": true, + "name": "enable", + "type": "Boolean" + } + ], + "returnDescription": "A flag indicating whether keep alive was successfully set.", + "returnType": "Boolean" + }, + { + "description": "Sets the max time in seconds that the socket close() blocks to allow send data to be flushed in synchronous mode.", + "name": "SetLinger", + "params": [ + { + "default": null, + "description": "The max time.", + "isRequired": true, + "name": "time", + "type": "Integer" + } + ], + "returnDescription": "A flag indicating whether the linger was successfully set.", + "returnType": "Boolean" + }, + { + "description": "Sets the max TCP segment size.", + "name": "SetMaxSeg", + "params": [ + { + "default": null, + "description": "The max TCP segment size.", + "isRequired": true, + "name": "time", + "type": "Integer" + } + ], + "returnDescription": "A flag indicating whether the max TCP segment size was successfully set.", + "returnType": "Boolean" + }, + { + "description": "Enables the no delay property on the socket. This means that data is sent as soon as it is available rather than once there is enough data to fill a segment.", + "name": "SetNoDelay", + "params": [ + { + "default": null, + "description": "A flag specifying whether the no delay property is enabled.", + "isRequired": true, + "name": "enable", + "type": "Boolean" + } + ], + "returnDescription": "A flag indicating whether the no delay property was successfully set.", + "returnType": "Boolean" + } + ], + "name": "ifSocketConnectionoption", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifsocketconnectionoption.md" + }, + "ifsocketconnectionstatus": { + "implementers": [ + { + "description": "The roStreamSocket component enables BrightScript apps to accept and connect to TCP streams as well as send and receive data with them", + "name": "roStreamSocket", + "url": "https://developer.roku.com/docs/references/brightscript/components/rostreamsocket.md" + } + ], + "methods": [ + { + "description": "Checks whether a connection aborted error (ECONNABORTED) has occurred.", + "name": "eConnAborted", + "params": [], + "returnDescription": "A flag indicating whether an ECONNABORTED error has occurred.", + "returnType": "Boolean" + }, + { + "description": "Checks whether a connection refused (ECONNREFUSED) has occurred.", + "name": "eConnRefused", + "params": [], + "returnDescription": "A flag indicating whether an ECONNREFUSED error has occurred.", + "returnType": "Boolean" + }, + { + "description": "Checks whether a connection reset error (ECONNRESET) has occurred.", + "name": "eConnReset", + "params": [], + "returnDescription": "A flag indicating whether an ECONNRESET error has occurred.", + "returnType": "Boolean" + }, + { + "description": "Checks whether an is connected error (EISCONN) has occurred.", + "name": "eIsConn", + "params": [], + "returnDescription": "A flag indicating whether an EISCONN error has occurred.", + "returnType": "Boolean" + }, + { + "description": "Checks whether a not connected error (ENOTCONN) has occurred.", + "name": "eNotConn", + "params": [], + "returnDescription": "A flag indicating whether an ENOTCONN error has occurred.", + "returnType": "Boolean" + } + ], + "name": "ifSocketConnectionstatus", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifsocketconnectionstatus.md" + }, + "ifsocketoption": { + "implementers": [ + { + "description": "The roDataGramSocket component enables Brightscript apps to send and receive UDP packets", + "name": "roDataGramSocket", + "url": "https://developer.roku.com/docs/references/brightscript/components/rodatagramsocket.md" + }, + { + "description": "The roStreamSocket component enables BrightScript apps to accept and connect to TCP streams as well as send and receive data with them", + "name": "roStreamSocket", + "url": "https://developer.roku.com/docs/references/brightscript/components/rostreamsocket.md" + } + ], + "methods": [ + { + "description": "Checks whether Out Of Bounds (OOB) data is read inline with regular data.", + "name": "GetOOBInline", + "params": [], + "returnDescription": "A flag indicating whether OOB data is read inline with regular data.", + "returnType": "Boolean" + }, + { + "description": "Returns the current receive buffer size.", + "name": "GetRcvBuf", + "params": [], + "returnDescription": "The buffer size.", + "returnType": "Integer" + }, + { + "description": "Returns the current receive timeout.", + "name": "GetReceiveTimeout", + "params": [], + "returnDescription": "The number of seconds for the receive timeout.", + "returnType": "Integer" + }, + { + "description": "Checks whether an address that has been previously assigned can be immediately reassigned.", + "name": "GetReuseAddr", + "params": [], + "returnDescription": "A flag indicating whether the previously assigned address can be reassigned.", + "returnType": "Boolean" + }, + { + "description": "Returns the current send buffer size.", + "name": "GetSendBuf", + "params": [], + "returnDescription": "The buffer size.", + "returnType": "Integer" + }, + { + "description": "Returns the current send timeout.", + "name": "GetSendTimeout", + "params": [], + "returnDescription": "The number of seconds for the send timeout.", + "returnType": "Integer" + }, + { + "description": "Returns the TTL (Time To Live) value for all IP packets on the socket.", + "name": "GetTTL", + "params": [], + "returnDescription": "The TTL value.", + "returnType": "Integer" + }, + { + "description": "Enables Out Of Bounds (OOB) data to be read inline with regular data.", + "name": "SetOOBInline", + "params": [ + { + "default": null, + "description": "A flag specifying whether OOB data is read inline.", + "isRequired": true, + "name": "inline", + "type": "Boolean" + } + ], + "returnDescription": "A flag indicating whether the OOB inline data feature was successfully set.", + "returnType": "Boolean" + }, + { + "description": "Sets the current receive buffer size.", + "name": "SetRcvBuf", + "params": [ + { + "default": null, + "description": "The receive buffer size to be used.", + "isRequired": true, + "name": "size", + "type": "Integer" + } + ], + "returnType": "Boolean" + }, + { + "description": "Sets the current receive timeout (in seconds).", + "name": "SetReceiveTimeout", + "params": [ + { + "default": null, + "description": "The number of seconds for the receive timeout.", + "isRequired": true, + "name": "timeout", + "type": "Integer" + } + ], + "returnDescription": "A flag indicating whether the receive timeout was successfully set.", + "returnType": "Boolean" + }, + { + "description": "Enables a previously assigned address to be immediately reassigned.", + "name": "SetReuseAddr", + "params": [ + { + "default": null, + "description": "A flag specifying whether the address can be reused.", + "isRequired": true, + "name": "reuse", + "type": "Boolean" + } + ], + "returnDescription": "A flag indicating whether the reuse address feature was successfully set.", + "returnType": "Dynamic" + }, + { + "description": "Sets the current send buffer size.", + "name": "SetSendBuf", + "params": [ + { + "default": null, + "description": "The send buffer size to be used.", + "isRequired": true, + "name": "size", + "type": "Integer" + } + ], + "returnType": "Boolean" + }, + { + "description": "Sets the current send timeout (in seconds).", + "name": "SetSendTimeout", + "params": [ + { + "default": null, + "description": "The number of seconds for the send timeout.", + "isRequired": true, + "name": "timeout", + "type": "Integer" + } + ], + "returnDescription": "A flag indicating whether the send timeout was successfully set.", + "returnType": "Boolean" + }, + { + "description": "Sets the TTL value for all IP packets on the socket.", + "name": "SetTTL", + "params": [ + { + "default": null, + "description": "The TTL value to be used for IP packets on the socket.", + "isRequired": true, + "name": "ttl", + "type": "Integer" + } + ], + "returnDescription": "A flag indicating whether the TTL was successfully set.", + "returnType": "Boolean" + } + ], + "name": "ifSocketOption", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifsocketoption.md" + }, + "ifsocketstatus": { + "implementers": [ + { + "description": "The roDataGramSocket component enables Brightscript apps to send and receive UDP packets", + "name": "roDataGramSocket", + "url": "https://developer.roku.com/docs/references/brightscript/components/rodatagramsocket.md" + }, + { + "description": "The roStreamSocket component enables BrightScript apps to accept and connect to TCP streams as well as send and receive data with them", + "name": "roStreamSocket", + "url": "https://developer.roku.com/docs/references/brightscript/components/rostreamsocket.md" + } + ], + "methods": [ + { + "description": "Checks whether an EAGAIN error has occurred.", + "name": "eAgain", + "params": [], + "returnDescription": "A flag indicating whether an EAGAIN error has occurred.", + "returnType": "Boolean" + }, + { + "description": "Checks whether an EALREADY error has occurred.", + "name": "eAlready", + "params": [], + "returnDescription": "A flag indicating whether an EALREADY error has occurred.", + "returnType": "Boolean" + }, + { + "description": "Checks whether an EBADADDR error has occurred.", + "name": "eBadAddr", + "params": [], + "returnDescription": "A flag indicating whether an EBADADDR error has occurred.", + "returnType": "Boolean" + }, + { + "description": "Checks whether an EDESTADDRREQ error has occurred.", + "name": "eDestAddrReq", + "params": [], + "returnDescription": "A flag indicating whether an EDESTADDRREQ error has occurred.", + "returnType": "Boolean" + }, + { + "description": "Checks whether an EHOSTUNREACH error has occurred.", + "name": "eHostUnreach", + "params": [], + "returnDescription": "A flag indicating whether an EHOSTUNREACH error has occurred.", + "returnType": "Boolean" + }, + { + "description": "Checks whether an EINPROGRESS error has occurred.", + "name": "eInProgress", + "params": [], + "returnDescription": "A flag indicating whether an EINPROGRESS error has occurred.", + "returnType": "Boolean" + }, + { + "description": "Checks whether an EINVALID error has occurred.", + "name": "eInvalid", + "params": [], + "returnDescription": "A flag indicating whether an EINVALID error has occurred.", + "returnType": "Boolean" + }, + { + "description": "Checks whether there is no hard error, but possibly one of the following async conditions: EAGAIN, EALREADY, EINPROGRESS, EWOULDBLOCK.", + "name": "eOK", + "params": [], + "returnDescription": "A flag indicating whether an EOK error has occurred.", + "returnType": "Boolean" + }, + { + "name": "eSuccess", + "params": [], + "returnType": "Boolean" + }, + { + "description": "Checks whether an EWOULDBLOCK error has occurred.", + "name": "eWouldBlock", + "params": [], + "returnDescription": "A flag indicating whether an EWOULDBLOCK error has occurred.", + "returnType": "Boolean" + } + ], + "name": "ifSocketStatus", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifsocketstatus.md" + }, + "ifsourceidentity": { + "implementers": [ + { + "description": "The roChannelStore sends an roChannelStoreEvent in response to a call to any of several Get\\* methods in ifChannelStore", + "name": "roChannelStoreEvent", + "url": "https://developer.roku.com/docs/references/brightscript/events/rochannelstoreevent.md" + }, + { + "description": "The roUrlTransfer component sends the roUrlEvent", + "name": "roUrlEvent", + "url": "https://developer.roku.com/docs/references/brightscript/events/rourlevent.md" + } + ], + "methods": [ + { + "description": "Returns the ID currently associated with this source (event generating) or event object", + "name": "GetSourceIdentity", + "params": [], + "returnDescription": "The ID value of the source or event object.", + "returnType": "Integer" + } + ], + "name": "ifSourceIdentity", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifsourceidentity.md" + }, + "ifspringboardscreen": { + "deprecatedDescription": "This interface is deprecated.\n\nBeginning July 1st, 2017, any new channels using this component will be rejected during certification.\n\nBeginning January 1st, 2018, any updates to existing channels using this component will be rejected during certification.\n", + "description": "> This interface is deprecated.\n> \n> Beginning July 1st, 2017, any new channels using this component will be rejected during certification.\n> \n> Beginning January 1st, 2018, any updates to existing channels using this component will be rejected during certification.", + "implementers": [ + { + "description": "The Springboard Screen shows detailed information about an individual piece of content and provides options for actions that may be taken on that content", + "name": "roSpringboardScreen", + "url": "https://developer.roku.com/docs/references/brightscript/components/rospringboardscreen.md" + } + ], + "isDeprecated": true, + "methods": [ + { + "description": "Adds a button to the screen. The buttons are displayed in a standard location on the screen and appear in the order added. When the button is pressed, the script will receive an event from the application containing the ID of the button pressed and allowing the script to perform the desired action for that case.", + "name": "AddButton", + "params": [ + { + "default": null, + "description": "The ID used to uniquely identify the button instance.", + "isRequired": true, + "name": "buttonID", + "type": "Integer" + }, + { + "default": null, + "description": "The title of the button.", + "isRequired": true, + "name": "title", + "type": "String" + } + ], + "returnDescription": "A flag indicating whether the button was successfully added.", + "returnType": "Boolean" + }, + { + "name": "AddRatingButton", + "params": [ + { + "default": null, + "description": "The ID used to uniquely identify the button instance.", + "isRequired": true, + "name": "buttonID", + "type": "Integer" + }, + { + "default": null, + "description": "A value between 1-100 that represents the number of stars that the user rated the content. A value of 1-20 corresponds to 1 star, 21-40 corresponds to 2 stars, etc. The userRating takes precedence and determines the color of the buttons if set.", + "isRequired": true, + "name": "userRating", + "type": "Integer" + }, + { + "default": null, + "description": "The total average rating from all users. Half-stars maybe displayed for this rating.", + "isRequired": true, + "name": "aggregateRating", + "type": "Integer" + } + ], + "returnType": "Boolean" + }, + { + "description": "Adds a thumbs up/down button to the screen. This is a special type of button that is displayed in the standard location on the screen and appears in the order added sequenced with other buttons. When the button is pressed, the script will receive an event from the application indicating containing the ID of the button pressed and allowing the script to perform the desired action for that case.", + "name": "AddThumbsUpDownButton", + "params": [ + { + "default": null, + "description": "The ID used to uniquely identify the button instance.", + "isRequired": true, + "name": "buttonID", + "type": "Integer" + }, + { + "default": null, + "description": "The rating, which determines how the button appears on the screen. This may be one of the following values: * \\-1 = thumbs down * 0 = no rating * 1 = thumbs up", + "isRequired": true, + "name": "thumbRating", + "type": "Integer" + } + ], + "returnDescription": "A flag indicating whether the button was successfully added.", + "returnType": "Boolean" + }, + { + "description": "Adds a thumbs up/down button with tip text to the screen. This is a special type of button that is displayed in the standard location on the screen and appears in the order added sequenced with other buttons. When the button is pressed, the script will receive an event from the application indicating containing the ID of the button pressed and allowing the script to perform the desired action for that case.", + "name": "AddThumbsUpDownButtonWithTips", + "params": [ + { + "default": null, + "description": "The ID used to uniquely identify the button instance.", + "isRequired": true, + "name": "buttonID", + "type": "Integer" + }, + { + "default": null, + "description": "The rating, which determines how the button appears on the screen. This may be one of the following values: * \\-1 = thumbs down * 0 = no rating * 1 = thumbs up", + "isRequired": true, + "name": "thumbRating", + "type": "Integer" + }, + { + "default": null, + "description": "An array of strings (size 2) which lets the script override the default tip text \\[\"didn't like it\", \"liked it\"\\]", + "isRequired": true, + "name": "tipText", + "type": "Object" + } + ], + "returnDescription": "A flag indicating whether the button was successfully added.", + "returnType": "Boolean" + }, + { + "description": "Enables the fast forward remote event to be sent to the script (it is enabled by default).", + "name": "AllowNavFastForward", + "params": [ + { + "default": null, + "description": "True = Pressing FAST FORWARD sends an roSpringboardScreenEvent /isRemoteKeyPressed() event to the screen's message port. False = Pressing FAST FORWARD plays a deadend sound.", + "isRequired": true, + "name": "allow", + "type": "Boolean" + } + ], + "returnType": "Void" + }, + { + "description": "Enables navigating LEFT on the springboard screen (it is enabled by default).", + "name": "AllowNavLeft", + "params": [ + { + "default": null, + "description": "True = Pressing LEFT sends an roSpringboardScreenEvent /isRemoteKeyPressed() event to the screen's message port. False = Pressing LEFT plays a deadend sound.", + "isRequired": true, + "name": "allow", + "type": "Boolean" + } + ], + "returnType": "Void" + }, + { + "description": "Enables the rewind remote event to be sent to the script (it is enabled by default).", + "name": "AllowNavRewind", + "params": [ + { + "default": null, + "description": "True = Pressing REWIND sends an roSpringboardScreenEvent /isRemoteKeyPressed() event to the screen's message port. False = Pressing REWIND plays a deadend sound.", + "isRequired": true, + "name": "allow", + "type": "Boolean" + } + ], + "returnType": "Void" + }, + { + "description": "Enables navigating RIGHT on the springboard screen (it is enabled by default).", + "name": "AllowNavRight", + "params": [ + { + "default": null, + "description": "True = Pressing RIGHT sends an roSpringboardScreenEvent /isRemoteKeyPressed() event to the screen's message port. False = Pressing RIGHT plays a deadend sound.", + "isRequired": true, + "name": "allow", + "type": "Boolean" + } + ], + "returnType": "Void" + }, + { + "description": "Refreshes the display. When adding multiple buttons to the springboard dynamically, you may want to defer screen updates temporarily to avoid flashing. For example, call AllowUpdates(false), add several buttons, and then call AllowUpdates(true) to refresh the display.", + "name": "AllowUpdates", + "params": [ + { + "default": null, + "description": "A flag specifying whether to refresh the display.", + "isRequired": true, + "name": "allow", + "type": "Boolean" + } + ], + "returnType": "Void" + }, + { + "description": "Clears all of the buttons from the screen and resets the array of buttons back to default with no buttons set.", + "name": "ClearButtons", + "params": [], + "returnType": "Void" + }, + { + "description": "Closes the screen and deletes the associated object. This is useful for avoiding screen flicker when the display order of your screens does not resemble a stack.", + "name": "Close", + "params": [], + "returnType": "Void" + }, + { + "name": "CountButtons", + "params": [], + "returnType": "Integer" + }, + { + "description": "Allows the screen to pre-fetch the poster images before the screen is displayed as a display optimization technique. This is useful when doing left-right navigation between springboard screens. The pre-fetch is done, loading the image cache and then the screen is displayed.", + "name": "PrefetchPoster", + "params": [ + { + "default": null, + "description": "The URL of the standard definition poster image.", + "isRequired": true, + "name": "sdPosterURL", + "type": "String" + }, + { + "default": null, + "description": "The URL of the high definition poster image.", + "isRequired": true, + "name": "hdPosterURL", + "type": "String" + } + ], + "returnType": "Voidmet" + }, + { + "name": "SetAdDisplayMode", + "params": [ + { + "default": null, + "description": "The scale mode to be used, which may be one of the following values: * scale-to-fill: Scales image to completely fill the rectangle of the bounding frame (default)
Valid logTypesDescription\"http.connect\"Sent whenever a successful HTTP connection is made. This means that the server responded to the HTTP request with a success (2xx) status code. However, this does not necessarily mean that all of the body of the request has been received successfully\"http.error\"Sent whenever an error occurs while executing an HTTP request. This may be sent during the time of the initial connection for two possible reasons:
  • because the server responded with an error code, or
  • data is being read from the body after the initial connection takes place
\"bandwidth.minute\"Sent every minute to report the current measured bandwidth“http.complete”
Property/KeyTypeDescription
LogTypeStringWhen enabled, the “http.complete” events will be sent to Roku after an http transfer is completed for adaptive streams. This event consolidates information related to:
  • a cURL transfer such as DNS look up time,
  • connection latency,
  • transfer speed,
  • and number of bytes.
DateTimeroDateTimeThe GMT time of the event, with a resolution of one millisecond
UrlStringThe URL that was requested
OrigUrlStringThe original URL. If the original URL was redirected, then Url represents the new redirected URL and OrigURL the original. OrigURL is included so that it's easy to correlate between events and URLs passed to components
MethodStringThe HTTP method. \"GET\", \"POST\", or \"HEAD\"
StatusStringFor LogType “http.complete”, this will be “ok”
TargetIpStringThe IP address of the target server
HttpCodeIntegerThe HTTP response code if available
ContentTypeStringContent type or MIME type
DNSLookupTimeDoubleDNS name resolution time in seconds with double precision
ConnectTimeDoubleTime taken to connect to the server (seconds)
FirstByteTimeDoubleTime taken to receive the first byte from the server (seconds)
TransferTimeDoubleTotal data transfer time (seconds)
DownloadSpeedDoubleTransfer download speed in bytes per second
BytesDownloadedIntegerNumber of bytes downloaded from the server
UploadSpeedDoubleTransfer upload speed in bytes per second
BytesUploadedIntegerNumber of bytes uploaded to the server
", + "isRequired": true, + "name": "logType", + "type": "String" + } + ], + "returnType": "Void" + } + ], + "name": "ifSystemLog", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifsystemlog.md" + }, + "iftextscreen": { + "description": "> This component is no longer updated and will be deprecated on January 1st, 2019.Beginning July 1st, 2017, any new channels using this component will be rejected during certification.Beginning January 1st, 2018, any updates to existing channels using this component will be rejected during certification.", + "implementers": [ + { + "description": "roTextScreen provides a way of displaying large amounts of scrollable text", + "name": "roTextScreen", + "url": "https://developer.roku.com/docs/references/brightscript/components/rotextscreen.md" + } + ], + "methods": [ + { + "description": "Adds a button to the screen, which is displayed in a standard location on the screen and appears in the order added. When the button is pressed, the script will receive an event from the application containing the ID of the button pressed and allowing the script to perform the desired action for that case.", + "name": "AddButton", + "params": [ + { + "default": null, + "description": "The unique ID to be assigned to the button instance", + "isRequired": true, + "name": "id", + "type": "Integer" + }, + { + "default": null, + "description": "The text to be used to identify the button instance", + "isRequired": true, + "name": "title", + "type": "String" + } + ], + "returnDescription": "A flag indicating whether the button was successfully added.", + "returnType": "Boolean" + }, + { + "description": "Adds text to the main text of the screen. The text is appended to the end of any existing text", + "name": "AddText", + "params": [ + { + "default": null, + "description": "The text to be appended to the main text on the screen", + "isRequired": true, + "name": "text", + "type": "String" + } + ], + "returnType": "Void" + }, + { + "description": "Closes the screen and deletes the associated object. This is useful for avoiding screen flicker when the display order of your screens does not resemble a stack.", + "name": "Close", + "params": [], + "returnType": "Void" + }, + { + "description": "Breadcrumbs allow the application to display a two-part navigational title that shows the previous and current locations in the application hierarchy (e.g. TV – Friends).", + "name": "SetBreadcrumbText", + "params": [ + { + "default": null, + "description": "The previous location in the application hierarchy.", + "isRequired": true, + "name": "location1", + "type": "String" + }, + { + "default": null, + "description": "The current location in the application hierarchy.", + "isRequired": true, + "name": "location2", + "type": "String" + } + ], + "returnType": "Void" + }, + { + "description": "Adds a string of bold, high visibility text to the screen as a header to appear above the main body of text. Multiple calls to this method are ignored", + "name": "SetHeaderText", + "params": [ + { + "default": null, + "description": "The text for the header that will be displayed above the main text body", + "isRequired": true, + "name": "text", + "type": "String" + } + ], + "returnType": "Void" + }, + { + "description": "Sets the main text of the screen. The roTextScreen handles all text formatting and justification. Multiple calls to this method are ignored", + "name": "SetText", + "params": [ + { + "default": null, + "description": "The text for the main screen.", + "isRequired": true, + "name": "text", + "type": "String" + } + ], + "returnType": "Void" + }, + { + "description": "Sets the title for the screen, which appears in the overhang", + "name": "SetTitle", + "params": [ + { + "default": null, + "description": "The text to be displayed in the overhang.", + "isRequired": true, + "name": "title", + "type": "String" + } + ], + "returnType": "Void" + }, + { + "description": "Displays or refreshes the screen after initial creation or state changes.", + "name": "Show", + "params": [], + "returnDescription": "A flag indicating whether the screen was successfully refreshed.", + "returnType": "Boolean" + } + ], + "name": "ifTextScreen", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/iftextscreen.md" + }, + "iftexttospeech": { + "description": "> Please note this component is only available on the following devices: Roku Streaming Stick (3600X), Roku Express (3700X) and Express+ (3710X), Roku Premiere (4620X) and Premiere+ (4630X), Roku Ultra (4640X), and any Roku TV running Roku OS version 7.2 and later.", + "implementers": [ + { + "description": "The roTextToSpeech component provides text to speech capabilities to applications", + "name": "roTextToSpeech", + "url": "https://developer.roku.com/docs/references/brightscript/components/rotexttospeech.md" + } + ], + "methods": [ + { + "description": "Interrupts and stops any current text to speech spoken string, to be used when the channel does not want to the text to speech to continue.", + "name": "Flush", + "params": [], + "returnType": "Void" + }, + { + "description": "Returns an array containing the current list of languages available for text-to-speech.", + "name": "GetAvailableLanguages", + "params": [], + "returnDescription": "A list of languages.", + "returnType": "Object" + }, + { + "description": "Returns an array containing the current list of voices available for text-to-speech.", + "name": "GetAvailableVoices", + "params": [], + "returnDescription": "A list of voices.", + "returnType": "Object" + }, + { + "description": "Returns the name of the currently-selected text-to-speech language.", + "name": "GetLanguage", + "params": [], + "returnDescription": "The language name.", + "returnType": "String" + }, + { + "description": "Returns the pitch at which text is spoken. The possible values range from -60 to +60.", + "name": "GetPitch", + "params": [], + "returnDescription": "The pitch.", + "returnType": "Integer" + }, + { + "description": "Returns the rate at which text is spoken. The value ranges from -40 to 200 with a default value of 0.", + "name": "GetRate", + "params": [], + "returnDescription": "The rate.", + "returnType": "Integer" + }, + { + "description": "Returns the currently-selected voice.", + "name": "GetVoice", + "params": [], + "returnDescription": "The selected voice.", + "returnType": "String" + }, + { + "description": "Returns the volume at which text is spoken. The value ranges from 0 for muted to 1000 for the highest volume. The default value is 1000.", + "name": "GetVolume", + "params": [], + "returnDescription": "The volume.", + "returnType": "Integer" + }, + { + "description": "Checks whether text-to-speech is enabled. Text-to-speech may be enabled or disabled for various technical reasons (for example, on some platforms, text-to-speech may only be enabled once in connected mode). This is not affected by the state of any of its clients. In particular, it does not depend on whether a CVAA compliant accessibility feature is enabled or not.", + "name": "IsEnabled", + "params": [], + "returnDescription": "A flag indicating whether text-to-speech is enabled.", + "returnType": "Boolean" + }, + { + "description": "Returns an ID for the spoken string to notify observer callbacks about a specific spoken string.", + "name": "Say", + "params": [ + { + "default": null, + "description": "The UTF8 text to be spoken.", + "isRequired": true, + "name": "text", + "type": "String" + } + ], + "returnDescription": "The ID for the spoken string.", + "returnType": "Integer" + }, + { + "description": "Sets the language specified by `name` for text to speech, from one of the available languages returned by the [GetAvailableLanguages()](#getavailablelanguages-as-object) method.", + "name": "SetLanguage", + "params": [ + { + "default": null, + "description": "The text-to-speech language to be used.", + "isRequired": true, + "name": "name", + "type": "String" + } + ], + "returnType": "Void" + }, + { + "description": "Sets the pitch at which text is spoken.", + "name": "SetPitch", + "params": [ + { + "default": null, + "description": "The pitch at which text is to be spoken. The possible values range from -60 to +60.", + "isRequired": true, + "name": "pitch", + "type": "Integer" + } + ], + "returnType": "Void" + }, + { + "description": "Sets the rate at which text is spoken.", + "name": "SetRate", + "params": [ + { + "default": null, + "description": "The rate at which text is to be spoken. The possible values range from -40 to 200.", + "isRequired": true, + "name": "rate", + "type": "Integer" + } + ], + "returnType": "Void" + }, + { + "description": "Sets the voice specified by name for text to speech, from one of the available voices returned by the [GetAvailableVoices()](#getavailablevoices-as-object) method.", + "name": "SetVoice", + "params": [ + { + "default": null, + "description": "The available text-to-speech voice to be used", + "isRequired": true, + "name": "name", + "type": "String" + } + ], + "returnType": "Void" + }, + { + "description": "Sets the volume at which text is spoken.", + "name": "SetVolume", + "params": [ + { + "default": null, + "description": "The volume at which text is spoken. The value ranges from 0 for muted to 1000 for the highest volume. The default value is 1000.", + "isRequired": true, + "name": "volume", + "type": "Integer" + } + ], + "returnType": "Void" + }, + { + "description": "Causes text to speech to continue to suppress any application background sound for the amount of time specified by `duration`.", + "name": "Silence", + "params": [ + { + "default": null, + "description": "The amount of time to suppress application background sound", + "isRequired": true, + "name": "duration", + "type": "Integer" + } + ], + "returnDescription": "The duration for the speech suppression.", + "returnType": "Integer" + } + ], + "name": "ifTextToSpeech", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/iftexttospeech.md" + }, + "iftexturemanager": { + "implementers": [ + { + "description": "The Texture Manager provides a set of API's for managing an roBitmap cache", + "name": "roTextureManager", + "url": "https://developer.roku.com/docs/references/brightscript/components/rotexturemanager.md" + } + ], + "methods": [ + { + "description": "Cancels the request specified by req, which should be an roTextureRequest previously passed to the [RequestTexture()](#requesttexturereq-as-object-as-void) method.", + "name": "CancelRequest", + "params": [ + { + "default": null, + "description": "The previoulsy passed roTextureRequest to be cancelled.", + "isRequired": true, + "name": "req", + "type": "Object" + } + ], + "returnType": "Void" + }, + { + "description": "Removes all bitmaps from the roTextureManager.", + "name": "Cleanup", + "params": [], + "returnType": "Void" + }, + { + "description": "Makes a request for an roBitmap with the attributes specified by the roTextureRequest. The roTextureManager will pass an roTextureRequestEvent to the message port when completed.", + "name": "RequestTexture", + "params": [ + { + "default": null, + "description": "The roTextureRequest", + "isRequired": true, + "name": "req", + "type": "Object" + } + ], + "returnType": "Void" + }, + { + "description": "Removes a bitmap from the roTextureManager with the specified URL.", + "name": "UnloadBitmap", + "params": [ + { + "default": null, + "description": "The URL of the bitmap to be removed from the roTextureManager", + "isRequired": true, + "name": "url", + "type": "String" + } + ], + "returnType": "Void" + } + ], + "name": "ifTextureManager", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/iftexturemanager.md" + }, + "iftexturerequest": { + "implementers": [ + { + "description": "An roTextureRequest is used to make requests to the roTextureManager", + "name": "roTextureRequest", + "url": "https://developer.roku.com/docs/references/brightscript/components/rotexturerequest.md" + } + ], + "methods": [ + { + "description": "Returns a unique id for the request.", + "name": "GetId", + "params": [], + "returnType": "Integer" + }, + { + "description": "Returns the state of the request.", + "name": "GetState", + "params": [], + "returnDescription": "The state value, which may be one of the following:", + "returnType": "Integer" + }, + { + "description": "Sets the request to be either asynchronous (true) or synchronous (false). The default is asynchronous", + "name": "SetAsync", + "params": [ + { + "default": null, + "description": "The method used to send the request: asynchronous (true) or synchronous (false).", + "isRequired": true, + "name": "async", + "type": "Boolean" + } + ], + "returnType": "Void" + }, + { + "description": "Sets the scaling mode to be used.", + "name": "SetScaleMode", + "params": [ + { + "default": null, + "description": "The scaling mode to be used, which may be one of the following values:
ValueScaling mode
0Nearest neighbor (fast). This is the default.
1Bilinear (smooth)
", + "isRequired": true, + "name": "mode", + "type": "Integer" + } + ], + "returnType": "Void" + }, + { + "description": "Sets the desired size of the roBitmap. The default is to return a bitmap in its native size.", + "name": "SetSize", + "params": [ + { + "default": null, + "description": "The width of the roBitmap.", + "isRequired": true, + "name": "width", + "type": "Integer" + }, + { + "default": null, + "description": "The height of the roBitmap.", + "isRequired": true, + "name": "height", + "type": "Integer" + } + ], + "returnType": "Void" + } + ], + "name": "ifTextureRequest", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/iftexturerequest.md" + }, + "iftimespan": { + "implementers": [ + { + "description": "The Timespan object provides an interface to a simple timer for tracking the duration of activities", + "name": "roTimespan", + "url": "https://developer.roku.com/docs/references/brightscript/components/rotimespan.md" + } + ], + "methods": [ + { + "description": "Parses the ISO8601 date (e.g. 2008-11-29T14:54:02.171) and returns the number of seconds from now (not the \"Mark\" point) until the specified date/time.", + "name": "GetSecondsToISO8601Date", + "params": [ + { + "default": null, + "isRequired": true, + "name": "date", + "type": "String" + } + ], + "returnDescription": "The number of seconds.", + "returnType": "Integer" + }, + { + "description": "Sets the \"Mark\" point to the current time. The Mark point is also automatically set to the current time when an roTimespan object is created.", + "name": "Mark", + "params": [], + "returnType": "Void" + }, + { + "description": "Returns the total number of milliseconds from the \"Mark\" point to the current time.", + "name": "TotalMilliseconds", + "params": [], + "returnDescription": "The number of milliseconds.", + "returnType": "Integer" + }, + { + "description": "Returns the total number of seconds from the \"Mark\" point to the current time.", + "name": "TotalSeconds", + "params": [], + "returnDescription": "The number of seconds.", + "returnType": "Integer" + } + ], + "name": "ifTimeSpan", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/iftimespan.md" + }, + "iftostr": { + "implementers": [ + { + "description": "Object equivalent for intrinsic type Boolean", + "name": "roBoolean", + "url": "https://developer.roku.com/docs/references/brightscript/components/roboolean.md" + }, + { + "description": "Object equivalent for intrinsic type 'Double'", + "name": "roDouble", + "url": "https://developer.roku.com/docs/references/brightscript/components/rodouble.md" + }, + { + "description": "Object equivalent for intrinsic type 'Float'", + "name": "roFloat", + "url": "https://developer.roku.com/docs/references/brightscript/components/rofloat.md" + }, + { + "description": "Object equivalent for intrinsic type Function", + "name": "roFunction", + "url": "https://developer.roku.com/docs/references/brightscript/components/rofunction.md" + }, + { + "description": "Object equivalent for intrinsic type Integer", + "name": "roInt", + "url": "https://developer.roku.com/docs/references/brightscript/components/roint.md" + }, + { + "description": "Object equivalent for intrinsic type 'Invalid'", + "name": "roInvalid", + "url": "https://developer.roku.com/docs/references/brightscript/components/roinvalid.md" + }, + { + "description": "Object equivalent for intrinsic type LongInteger", + "name": "roLongInteger", + "url": "https://developer.roku.com/docs/references/brightscript/components/rolonginteger.md" + }, + { + "description": "Object equivalent for intrinsic type 'String'", + "name": "roString", + "url": "https://developer.roku.com/docs/references/brightscript/components/rostring.md" + } + ], + "methods": [ + { + "description": "Returns the value as a string.", + "name": "ToStr", + "params": [], + "returnDescription": "The string.", + "returnType": "String" + } + ], + "name": "ifToStr", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/iftostr.md" + }, + "ifurltransfer": { + "implementers": [ + { + "description": "A roUrlTransfer object transfers data to or from remote servers specified by URLs. It can perform mutual authentication with a web server", + "name": "roUrlTransfer", + "url": "https://developer.roku.com/docs/references/brightscript/components/rourltransfer.md" + } + ], + "methods": [ + { + "name": "AsyncCancel", + "params": [], + "returnType": "Boolean" + }, + { + "description": "Starts a transfer without waiting for it to complete, similar to the [AsyncGetToString()](#asyncgettostring-as-boolean) method. However, the response body will be written to a file on the device's filesystem instead of being returned in a String object.", + "name": "AsyncGetToFile", + "params": [ + { + "default": null, + "description": "The file on the Roku device's filesystem to which the response body is to be written", + "isRequired": true, + "name": "filename", + "type": "String" + } + ], + "returnDescription": "A flag indicating whether the request was issued.", + "returnType": "Boolean" + }, + { + "description": "Starts a GET request to a server, but does not wait for the transfer to complete.", + "name": "AsyncGetToString", + "params": [], + "returnDescription": "A flag indicating whether the request was issued.", + "returnType": "Boolean" + }, + { + "description": "Begins an HTTP HEAD request without waiting for it to complete. When the HEAD completes, an [roUrlEvent](https://developer.roku.com/docs/references/brightscript/events/rourlevent.md\"roUrlEvent\") will be sent to the message port associated with the object. If false is returned then the request could not be issued and no events will be delivered.", + "name": "AsyncHead", + "params": [], + "returnDescription": "A flag indicating whether the request was issued.", + "returnType": "Boolean" + }, + { + "description": "Uses the HTTP POST method to send the contents of the specified file to the current URL. When the POST request completes, an [roUrlTransfer](https://developer.roku.com/docs/references/brightscript/interfaces/ifurltransfer.md\"roUrlTransfer\") will be sent to the message port associated with the object. If false is returned then the request could not be issued and no events will be delivered.", + "name": "AsyncPostFromFile", + "params": [ + { + "default": null, + "description": "The file containing the POST request to be sent asynchronously", + "isRequired": true, + "name": "filename", + "type": "String" + } + ], + "returnDescription": "A flag indicating whether the request was issued.", + "returnType": "Boolean" + }, + { + "description": "Uses the HTTP POST method to send the contents of the specified file (fromFile) to the current URL. When the POST request completes successfully, an [roUrlTransfer](https://developer.roku.com/docs/references/brightscript/interfaces/ifurltransfer.md\"roUrlTransfer\") will be sent to the message port associated with the object. If false is returned then the request could not be issued and no events will be delivered. This function is the same as AsyncPostFromFile, except that the HTTP response is written to the file specified by the toFile parameter.", + "name": "AsyncPostFromFileToFile", + "params": [ + { + "default": null, + "description": "The file containing the POST request to be sent asynchronously", + "isRequired": true, + "name": "fromFile", + "type": "String" + }, + { + "default": null, + "description": "The file on the Roku device's filesystem to which the response body is to be written", + "isRequired": true, + "name": "toFile", + "type": "String" + } + ], + "returnDescription": "A flag indicating whether the request was issued.", + "returnType": "Boolean" + }, + { + "description": "Uses the HTTP POST method to send the supplied string to the current URL. When the POST request completes, an [roUrlTransfer](https://developer.roku.com/docs/references/brightscript/interfaces/ifurltransfer.md\"roUrlTransfer\") will be sent to the message port associated with the object. If false is returned then the request could not be issued and no events will be delivered.", + "name": "AsyncPostFromString", + "params": [ + { + "default": null, + "description": "The POST request to be sent asynchronously", + "isRequired": true, + "name": "request", + "type": "String" + } + ], + "returnDescription": "A flag indicating whether the request was issued.", + "returnType": "Boolean" + }, + { + "description": "Enables gzip encoding of transfers", + "name": "EnableEncodings", + "params": [ + { + "default": null, + "isRequired": true, + "name": "enable", + "type": "Boolean" + } + ], + "returnDescription": "A flag indicating whether this operation was successful.", + "returnType": "Boolean" + }, + { + "description": "Enables a fresh connection using CURLOPT\\_FRESH\\_CONNECT.", + "name": "EnableFreshConnection", + "params": [ + { + "default": null, + "description": "A flag specifying whether to enable fresh connections.", + "isRequired": true, + "name": "enable", + "type": "Boolean" + } + ], + "returnDescription": "A flag indicating whether the operation was successful.", + "returnType": "Boolean" + }, + { + "description": "Verifies that the certificate belongs to the host using CURLOPT\\_SSL\\_VERIFYHOST.", + "name": "EnableHostVerification", + "params": [ + { + "default": null, + "description": "A flag specifying whether to verify a certificate belonging to the host.", + "isRequired": true, + "name": "enable", + "type": "Boolean" + } + ], + "returnDescription": "A flag indicating whether the operation was successful.", + "returnType": "Boolean" + }, + { + "description": "Verifies that the certificate has a chain of trust up to a valid root certificate using CURLOPT\\_SSL\\_VERIFYPEER.", + "name": "EnablePeerVerification", + "params": [ + { + "default": null, + "description": "A flag specifying whether to verify a certificate has a chain-of-trust up to a valid root certificate", + "isRequired": true, + "name": "enable", + "type": "Boolean" + } + ], + "returnDescription": "A flag indicating whether the operation was successful.", + "returnType": "Boolean" + }, + { + "description": "Enables automatic resumption of `AsyncGetToFile` and `GetToFile` requests", + "name": "EnableResume", + "params": [ + { + "default": null, + "description": "A flag specifying whether to automatically resume `AsyncGetToFile` and `GetToFile` requests", + "isRequired": true, + "name": "enable", + "type": "Boolean" + } + ], + "returnDescription": "A flag indicating whether the operation was successful.", + "returnType": "Boolean" + }, + { + "description": "URL encodes the specified string per [RFC 3986](https://www.ietf.org/rfc/rfc3986.txt \"RFC 3986\") and return the encoded string", + "name": "Escape", + "params": [ + { + "default": null, + "description": "The string to be URL-encoded", + "isRequired": true, + "name": "text", + "type": "String" + } + ], + "returnDescription": "The URL-encoded string.", + "returnType": "String" + }, + { + "description": "If any of the `roUrlEvent` functions indicate failure then this function may provide more information regarding the failure.", + "name": "GetFailureReason", + "params": [], + "returnDescription": "Failure reason.", + "returnType": "String" + }, + { + "description": "Returns a unique number for this object that can be used to identify whether events originated from this object. The value can be any arbitrary value as assigned by the Roku OS, and should only be used for comparison purposes. For example, the value should not be used as an array index. For use as a look-up key, one option would be to use `GetIdentity().ToStr()` as an associative array key.", + "name": "GetIdentity", + "params": [], + "returnDescription": "A unique number for the object.", + "returnType": "Integer" + }, + { + "description": "Returns the current request method.", + "name": "GetRequest", + "params": [], + "returnDescription": "The request method.", + "returnType": "String" + }, + { + "description": "Connect to the remote service as specified in the URL and write the response body to a file on the Roku device's filesystem. This function does not return until the exchange is complete and may block for a long time. The HTTP response code from the server is returned. It is not possible to access any of the response headers. If this information is required use the [AsyncGetToFile()](#asyncgettofilefilename-as-string-as-boolean) method instead.", + "name": "GetToFile", + "params": [ + { + "default": null, + "description": "The file on the Roku device's filesystem to which the response body is to be written", + "isRequired": true, + "name": "filename", + "type": "String" + } + ], + "returnDescription": "The HTTP response code.", + "returnType": "Integer" + }, + { + "description": "Connects to the remote service as specified in the URL and returns the response body as a string. This function waits for the transfer to complete and it may block for a long time. This calls discards the headers and response codes. If that information is required, use the [AsyncGetToString()](#asyncgettostring-as-boolean) method.", + "name": "GetToString", + "params": [], + "returnDescription": "The response body.", + "returnType": "String" + }, + { + "description": "Returns the current URL.", + "name": "GetUrl", + "params": [], + "returnDescription": "The URL.", + "returnType": "String" + }, + { + "description": "Synchronously performs an HTTP HEAD request and returns an [roUrlTransfer](https://developer.roku.com/docs/references/brightscript/interfaces/ifurltransfer.md\"roUrlTransfer\") object.", + "name": "Head", + "params": [], + "returnDescription": "An [roUrlTransfer](/docs/references/brightscript/interfaces/ifurltransfer.md \"roUrlTransfer\") object. If a catastrophic failure occurs (for example, an asynchronous operation is already active), invalid is returned", + "returnType": "Dynamic" + }, + { + "description": "Uses the HTTP POST method to send the contents of the specified file to the current URL. The HTTP response code is returned. Any response body is discarded", + "name": "PostFromFile", + "params": [ + { + "default": null, + "description": "The file containing the POST request to be sent", + "isRequired": true, + "name": "filename", + "type": "String" + } + ], + "returnDescription": "The HTTP response code.", + "returnType": "Integer" + }, + { + "description": "Uses the HTTP POST method to send the supplied string to the current URL. The HTTP response code is returned. Any response body is discarded", + "name": "PostFromString", + "params": [ + { + "default": null, + "description": "The POST request to be sent", + "isRequired": true, + "name": "request", + "type": "String" + } + ], + "returnDescription": "The HTTP response code.", + "returnType": "Integer" + }, + { + "description": "Returns the body of the response even if the HTTP status code indicates that an error occurred.", + "name": "RetainBodyOnError", + "params": [ + { + "default": null, + "description": "A flag specifying whether to return the response body when there is an HTTP error response code.", + "isRequired": true, + "name": "retain", + "type": "Boolean" + } + ], + "returnDescription": "A flag indicating whether the operation was successful.", + "returnType": "Boolean" + }, + { + "description": "An optional function that enables HTTP/2 support. If version is set to `\"http2\"`, HTTP/2 will be used for all underlying transfers.", + "name": "SetHttpVersion", + "params": [ + { + "default": null, + "description": "The http version to be used (for example, \"http2\" for HTTP/2). `\"AUTO\"` is the default value, which causes the roUrlTransfer connection to auto-negotiate HTTP/1.x or HTTP/2, depending on the agreement reached by client and server.", + "isRequired": true, + "name": "version", + "type": "String" + } + ], + "returnType": "Void" + }, + { + "description": "Terminates the transfer automatically if the transfer rate drops below the specified rate (bytes\\_per\\_second) over a specific interval (period\\_in\\_seconds).", + "name": "SetMinimumTransferRate", + "params": [ + { + "default": null, + "isRequired": true, + "name": "bytes" + } + ], + "returnDescription": "A flag indicating whether the operation was successful." + }, + { + "description": "Changes the request method from the normal GET, HEAD or POST to the value passed as a string.", + "name": "SetRequest", + "params": [ + { + "default": null, + "description": "The request method to be used", + "isRequired": true, + "name": "req", + "type": "String" + } + ] + }, + { + "description": "Sets the URL to use for the transfer request.", + "name": "SetUrl", + "params": [ + { + "default": null, + "description": "The URL to be used for the transfer request", + "isRequired": true, + "name": "url", + "type": "String" + } + ], + "returnType": "Void" + }, + { + "description": "Enables HTTP authentication using the specified user name and password.", + "name": "SetUserAndPassword", + "params": [ + { + "default": null, + "description": "The user name to be authenticated", + "isRequired": true, + "name": "user", + "type": "String" + }, + { + "default": null, + "description": "The password to be authenticated", + "isRequired": true, + "name": "password", + "type": "String" + } + ], + "returnDescription": "A flag indicating whether the operation was successful.", + "returnType": "Boolean" + }, + { + "description": "Decodes the specified string per [RFC 3986](https://www.ietf.org/rfc/rfc3986.txt \"RFC 3986\") and returns the unencoded string.", + "name": "Unescape", + "params": [ + { + "default": null, + "description": "The string to be URL-decoded", + "isRequired": true, + "name": "text", + "type": "String" + } + ], + "returnDescription": "The decoded string.", + "returnType": "String" + }, + { + "deprecatedDescription": "This method is deprecated. Use the [Escape()](/docs/references/brightscript/interfaces/ifurltransfer.md#escapetext-as-string-as-string) method.\n", + "description": "URL encodes the specified string per RFC 3986 and return the encoded string", + "isDeprecated": true, + "name": "UrlEncode", + "params": [ + { + "default": null, + "isRequired": true, + "name": "url", + "type": "String" + } + ], + "returnDescription": "The encoded string.", + "returnType": "String" + } + ], + "name": "ifUrlTransfer", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifurltransfer.md" + }, + "ifvideoplayer": { + "implementers": [ + { + "description": "The roVideoPlayer component implements a video player with more programmatic control, but less user control than the roVideoScreen component", + "name": "roVideoPlayer", + "url": "https://developer.roku.com/docs/references/brightscript/components/rovideoplayer.md" + } + ], + "methods": [ + { + "description": "Adds a new [Content Meta-Data](/docs/developer-program/getting-started/architecture/content-metadata.md \" Content Meta-Data\") item to the end of the content list for the roVideoPlayer. roVideoPlayer playback buffers on each Content item transition.", + "name": "AddContent", + "params": [ + { + "default": null, + "description": "The [content metadata](/docs/developer-program/getting-started/architecture/content-metadata.md \" Content Meta-Data\") item to be added to the content list.", + "isRequired": true, + "name": "contentItem", + "type": "Object" + } + ], + "returnType": "Void" + }, + { + "description": "Changes the currently playing audio track. For content with multiple audio tracks, the current track can be selected programmatically using this function.", + "name": "ChangeAudioTrack", + "params": [ + { + "default": null, + "description": "The audio track identifier returned by GetAudioTracks().", + "isRequired": true, + "name": "trackID", + "type": "String" + } + ], + "returnType": "Void" + }, + { + "description": "Clears all content from the roVideoPlayer. If the player is currently playing, it stops. Next, the current player position is reset so the next time the [Play()](#play-as-boolean) method is called, playback starts at the first item of the content list (unless the [Seek()](#seekoffsetms-as-integer-as-boolean) method is called prior to Play()).", + "name": "ClearContent", + "params": [], + "returnType": "Void" + }, + { + "description": "Returns the audio tracks contained in the current stream.", + "name": "GetAudioTracks", + "params": [], + "returnDescription": "An roArray, where each element in the array represents a single audio track that contains the following attributes: ${getaudiotracksvalues}", + "returnType": "Object" + }, + { + "description": "This method returns the [roCaptionRenderer](https://developer.roku.com/docs/references/brightscript/components/rocaptionrenderer.md\"roCaptionRenderer\") instance associated with this roVideoPlayer.", + "name": "GetCaptionRenderer", + "params": [], + "returnDescription": "The [roCaptionRenderer](/docs/references/brightscript/components/rocaptionrenderer.md \"roCaptionRenderer\") instance associated with this roVideoPlayer.", + "returnType": "Object" + }, + { + "description": "Returns the duration of the video, in seconds. This information may not be available until after the video starts playing.", + "name": "GetPlaybackDuration", + "params": [], + "returnDescription": "The duration of the video. A value of 0 is returned if the duration is unknown.", + "returnType": "Integer" + }, + { + "description": "Puts the roVideoPlayer object into pause mode. If the player is already in pause mode, this will generate an error.", + "name": "Pause", + "params": [], + "returnDescription": "A flag indicating whether the operation was successful.", + "returnType": "Boolean" + }, + { + "description": "Puts the roVideoPlayer object into play mode starting at the beginning of the content list. This will stop any currently playing Content List.", + "name": "Play", + "params": [], + "returnDescription": "A flag indicating whether the operation was successful.", + "returnType": "Boolean" + }, + { + "description": "Begins downloading and buffering of a video that may be selected by a user. This method can be used to reduce buffering delays after a user has selected a video for playback. It is typically called when the user is in the roSpringboardScreen (or equivalent), anticipating that the user will select a video on the springboard screen for download.", + "name": "PreBuffer", + "params": [], + "returnDescription": "A flag indicating whether the operation was successful.", + "returnType": "Boolean" + }, + { + "description": "Puts the roVideoPlayer object into play mode starting from the pause point. This method must be called when the roVideoPlayer object is in pause mode; otherwise, it will generate an error.", + "name": "Resume", + "params": [], + "returnDescription": "A flag indicating whether the operation was successful.", + "returnType": "Boolean" + }, + { + "description": "Sets the start point of playback for the current video to a specific offset.", + "name": "Seek", + "params": [ + { + "default": null, + "description": "The number of milliseconds to offset the playback of the current content item.", + "isRequired": true, + "name": "offsetMs", + "type": "Integer" + } + ], + "returnType": "Boolean" + }, + { + "description": "Sets CGMS (Copy Guard Management System) on analog outputs to the desired level.", + "name": "SetCGMS", + "params": [ + { + "default": null, + "description": "The level to which CGMS is set. This may be one of the following values: * 0 - No Copy Restriction * 1 - Copy No More * 2 - Copy Once Allowed * 3 – No Copying Permitted", + "isRequired": true, + "name": "level", + "type": "Integer" + } + ], + "returnType": "Void" + }, + { + "description": "Sets the content to be played by the roVideoPlayer.", + "name": "SetContentList", + "params": [ + { + "default": null, + "description": "An [roArray](https://developer.roku.com/docs/references/brightscript/components/roarray.md\"roArray\") of [roAssociativeArray](https://developer.roku.com/docs/references/brightscript/components/roassociativearray.md\"roAssociativeArray\") ([Content Meta-Data](/docs/developer-program/getting-started/architecture/content-metadata.md \" Content Meta-Data\") objects) representing the information for each stream to be played. If the player is currently playing the player will be stopped. Next, the current player position is reset so the next time Play() is called, playback will start at the first item of the content list (unless Seek() is called prior to Play()). roVideoPlayer prefetches the next item in the content list while the current item is playing. Given sufficient network throughput, there is no rebuffering when the player switches to the next item in the list. To signal the content transition, the player sends an isRequestSucceeded notification with the old content index and isListItemSelected notification with the new content index.", + "isRequired": true, + "name": "contentList", + "type": "Object" + } + ], + "returnType": "Void" + }, + { + "description": "Sets the target display window for the video.", + "name": "SetDestinationRect", + "params": [ + { + "default": null, + "description": "The parameters of the target display window, which include the x and y coordinates, width, and height {x:Integer, y:Integer, w:Integer, h:Integer} The default value is: {x:0, y:0, w:0, h:0}, which is full screen.", + "isRequired": true, + "name": "rect", + "type": "Object" + } + ], + "returnType": "Void" + }, + { + "description": "Sets the target display window for the video. This is similar to the [SetDestinationRect()](#setdestinationrectrect-as-object-as-void) function except that the values are specified as separate parameters.", + "name": "SetDestinationRect", + "params": [ + { + "default": null, + "description": "The x coordinate of the target display window.", + "isRequired": true, + "name": "x", + "type": "Integer" + }, + { + "default": null, + "description": "The y coordinate of the target display window.", + "isRequired": true, + "name": "y", + "type": "Integer" + }, + { + "default": null, + "description": "The width of the target display window.", + "isRequired": true, + "name": "w", + "type": "Integer" + }, + { + "default": null, + "description": "The height coordinate of the target display window.", + "isRequired": true, + "name": "h", + "type": "Integer" + } + ], + "returnType": "Void" + }, + { + "description": "Automatically replays the content list. This method buffers on every loop to the beginning of the content list.", + "name": "SetLoop", + "params": [ + { + "default": null, + "description": "Enables the automatic replaying of the content list.", + "isRequired": true, + "name": "loop", + "type": "Boolean" + } + ], + "returnType": "Void" + }, + { + "deprecatedDescription": "This function is deprecated. Roku no longer supports Macrovision and this function exists as a no-op so that legacy scripts do not break.", + "isDeprecated": true, + "name": "SetMacrovisionLevel", + "params": [ + { + "default": null, + "isRequired": true, + "name": "level", + "type": "Integer" + } + ], + "returnType": "Void" + }, + { + "description": "Sets the max resolution required by your video.", + "name": "SetMaxVideoDecodeResolution", + "params": [ + { + "default": null, + "description": "The maximum height required by your video.", + "isRequired": true, + "name": "width", + "type": "Integer" + }, + { + "default": null, + "description": "The maximum width required by your video.", + "isRequired": true, + "name": "height", + "type": "Integer" + } + ], + "returnType": "Void" + }, + { + "description": "Sets the next item in the Content List to be played.", + "name": "SetNext", + "params": [ + { + "default": null, + "description": "The unique ID of the content item to be played next.", + "isRequired": true, + "name": "item", + "type": "Integer" + } + ], + "returnType": "Void" + }, + { + "description": "Sets the interval to receive playback position events from the roVideoPlayer.", + "name": "SetPositionNotificationPeriod", + "params": [ + { + "default": null, + "description": "The notification period for receiving playback position events in seconds. Notification events sent to the script specify the position in seconds relative to the beginning of the stream. If the value is 0, position notifications are never sent. The default value is 0.", + "isRequired": true, + "name": "period", + "type": "Integer" + } + ], + "returnType": "Void" + }, + { + "description": "Specifies the timedMetaData keys that the BrightScript channel is interested in receiving from the timedMetaData event.", + "name": "SetTimedMetaDataForKeys", + "params": [ + { + "default": null, + "isRequired": true, + "name": "keys" + } + ] + }, + { + "description": "Stops playback and resets the seek position; keeps the player’s current position unchanged.", + "name": "Stop", + "params": [], + "returnDescription": "A flag indicating whether the operation was successful.", + "returnType": "Boolean" + } + ], + "name": "ifVideoPlayer", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifvideoplayer.md" + }, + "ifvideoscreen": { + "deprecatedDescription": "This interface is deprecated.Beginning July 1st, 2017, any new channels using this component will be rejected during certification.Beginning January 1st, 2018, any updates to existing channels using this component will be rejected during certification.\n", + "description": "> This interface is deprecated.Beginning July 1st, 2017, any new channels using this component will be rejected during certification.Beginning January 1st, 2018, any updates to existing channels using this component will be rejected during certification.", + "implementers": [ + { + "description": "The Video Screen object implements the video playback portion of the user interface", + "name": "roVideoScreen", + "url": "https://developer.roku.com/docs/references/brightscript/components/rovideoscreen.md" + } + ], + "isDeprecated": true, + "methods": [ + { + "name": "Close", + "params": [], + "returnType": "Void" + }, + { + "description": "Enables [trickplay mode](/docs/developer-program/media-playback/trick-mode.md) during playback. Trickplay mode provides visual feedback during playback operations such as forward and rewind by displaying the timestamp of the content being seeked.", + "name": "EnableTrickPlay", + "params": [ + { + "default": null, + "description": "Specifies the player to use trick play mode during playback.", + "isRequired": true, + "name": "enable", + "type": "Boolean" + } + ], + "returnType": "Void" + }, + { + "description": "Pauses the video.", + "name": "Pause", + "params": [], + "returnType": "Void" + }, + { + "description": "Begins downloading and buffering of a video that may be selected by a user. This can be used to reduce buffering delays after a user has selected a video for playback. A typical use would be to call PreBuffer() when the user is in the roSpringboardScreen (or equivalent), anticipating that the user will select a video on the springboard screen for download.", + "name": "PreBuffer", + "params": [], + "returnDescription": "A flag indicating whether the operation was successful.", + "returnType": "Boolean" + }, + { + "description": "Resumes the video.", + "name": "Resume", + "params": [], + "returnType": "Void" + }, + { + "description": "Acknowledges the previously generated resume request event with a trickplay ID. When roVideoScreen receives this message, it will resume playback unless a more recent trickplay session has started. In the latter case, the ResumeAck message is ignored and playback is not resumed.", + "name": "ResumeAck", + "params": [ + { + "default": null, + "isRequired": true, + "name": "Integer" + } + ] + }, + { + "description": "Sets the start point of playback for the current video to a specific offset.", + "name": "Seek", + "params": [ + { + "default": null, + "description": "The number of milliseconds to offset the playback of the current content item.", + "isRequired": true, + "name": "milliSeconds", + "type": "Integer" + } + ], + "returnDescription": "A flag indicating whether the seek operation was successful.", + "returnType": "Boolean" + }, + { + "description": "Sets CGMS (Copy Guard Management System) on analog outputs to the desired level.", + "name": "SetCGMS", + "params": [ + { + "default": null, + "description": "The level to which CGMS is set. This may be one of the following values: * 0 - No Copy Restriction * 1 - Copy No More * 2 - Copy Once Allowed * 3 – No Copying Permitted", + "isRequired": true, + "name": "level", + "type": "Integer" + } + ], + "returnType": "Void" + }, + { + "description": "Sets the content to be played in the [roVideoScreen](https://developer.roku.com/docs/references/brightscript/components/rovideoscreen.md\"roVideoScreen\"). You can call this method while playing video, and it will use the new data (release date, length, and title) when showing the program info in the Heads Up Display (HUD).", + "name": "SetContent", + "params": [ + { + "default": null, + "description": "An [roAssociativeArray](https://developer.roku.com/docs/references/brightscript/components/roassociativearray.md\"roAssociativeArray\") describing the attributes ([Content Meta-Data](/docs/developer-program/getting-started/architecture/content-metadata.md \" Content Meta-Data\")) for the title.", + "isRequired": true, + "name": "content", + "type": "Object" + } + ], + "returnType": "Void" + }, + { + "description": "Sets the target display window for the video.", + "name": "SetDestinationRect", + "params": [ + { + "default": null, + "description": "The parameters of the target display window, which include the x and y coordinates, width, and height {x:Integer, y:Integer, w:Integer, h:Integer} The default value is: {x:0, y:0, w:0, h:0}, which is full screen.", + "isRequired": true, + "name": "rect", + "type": "Object" + } + ], + "returnType": "Void" + }, + { + "description": "Sets the target display window for the video. This is an alternate way to call the **SetDestinationRectangle()** method with each parameter passed separately instead of in an Associative Array.", + "name": "SetDestinationRect", + "params": [ + { + "default": null, + "description": "The x-coordinate of the rectangle.", + "isRequired": true, + "name": "x", + "type": "Integer" + }, + { + "default": null, + "description": "The y-coordinate of the rectangle.", + "isRequired": true, + "name": "y", + "type": "Integer" + }, + { + "default": null, + "description": "The width of the rectangle.", + "isRequired": true, + "name": "w", + "type": "Integer" + }, + { + "default": null, + "description": "The height of the rectangle.", + "isRequired": true, + "name": "h", + "type": "Integer" + } + ] + }, + { + "description": "Enables guided trickplay mode (the channel takes control of resuming playback after trickplay). This means that the roVideoScreen object no longer resumes playback automatically, but instead waits for an acknowledgment from the channel.", + "name": "SetGuidedTrickPlay", + "params": [ + { + "default": null, + "description": "Specifies the player to use guided trickplay mode during playback. By default guided trickplay mode is disabled.", + "isRequired": true, + "name": "enable", + "type": "Boolean" + } + ], + "returnType": "Void" + }, + { + "description": "Enables the player to start again from the beginning immediately after finishing a content item.", + "name": "SetLoop", + "params": [ + { + "default": null, + "description": "Specifies the player to start playing a content item from the beginning as soon as the item has been completed. The default is false.", + "isRequired": true, + "name": "enable", + "type": "Boolean" + } + ], + "returnType": "Void" + }, + { + "deprecatedDescription": "This function is deprecated. Roku no longer supports Macrovision and this function exists as a no-op so that legacy scripts do not break.\n", + "isDeprecated": true, + "name": "SetMacrovisionLevel", + "params": [ + { + "default": null, + "isRequired": true, + "name": "level", + "type": "Integer" + } + ], + "returnType": "Void" + }, + { + "description": "Sets the max resolution required by your video.", + "name": "SetMaxVideoDecodeResolution", + "params": [ + { + "default": null, + "description": "The maximum height required by your video.", + "isRequired": true, + "name": "width", + "type": "Integer" + }, + { + "default": null, + "description": "The maximum width required by your video.", + "isRequired": true, + "name": "height", + "type": "Integer" + } + ], + "returnType": "Void" + }, + { + "description": "Sets the interval for receiving playback position events from the roVideoScreen object.", + "name": "SetPositionNotificationPeriod", + "params": [ + { + "default": null, + "description": "The notification period for receiving playback position events in seconds. Notification events sent to the script specify the position in seconds relative to the beginning of the stream. If the value is 0, position notifications are never sent. The default value is 0.", + "isRequired": true, + "name": "period", + "type": "Integer" + } + ], + "returnType": "Void" + }, + { + "description": "Sets preview mode on/off. In preview mode, trick play operations (fast forward and rewind) are disabled.", + "name": "SetPreviewMode", + "params": [ + { + "default": null, + "description": "A flag specifying to turn preview mode on (true) or off (false).", + "isRequired": true, + "name": "enable", + "type": "Boolean" + } + ], + "returnType": "Void" + }, + { + "description": "Specifies the timedMetaData keys that the BrightScript channel is interested in receiving from the timedMetaData event.", + "name": "SetTimedMetaDataForKeys", + "params": [ + { + "default": null, + "isRequired": true, + "name": "keys" + } + ] + }, + { + "description": "Displays/refreshes the screen after creation or state changes.", + "name": "Show", + "params": [], + "returnDescription": "A flag indicating whether the screen was successfully refreshed.", + "returnType": "Boolean" + } + ], + "name": "ifVideoScreen", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifvideoscreen.md" + }, + "ifxmlelement": { + "implementers": [ + { + "description": "roXMLElement is used to contain an XML tree", + "name": "roXMLElement", + "url": "https://developer.roku.com/docs/references/brightscript/components/roxmlelement.md" + } + ], + "methods": [ + { + "description": "Adds an attribute value to the element. If an attribute of the same name already exists it is replaced. XML attribute order is not preserved.", + "name": "AddAttribute", + "params": [ + { + "default": null, + "description": "The name of the attribute to be added to the element.", + "isRequired": true, + "name": "attr", + "type": "String" + }, + { + "default": null, + "description": "The value of the attribute being added to the element.", + "isRequired": true, + "name": "value", + "type": "Object" + } + ], + "returnType": "Void" + }, + { + "description": "Adds a new unnamed/empty child element and returns it. This should generally be followed by a call to the [SetName()](#setnamename-as-string-as-void) method of the child element. Alternatively, the [AddElement()](#addelementname-as-string-as-object) or [AddElementWidthBody()](#addelementwithbodyname-as-string-body-as-object-as-object) method can be used to combine this step with additional construction into one call.", + "name": "AddBodyElement", + "params": [], + "returnDescription": "Object value.", + "returnType": "Object" + }, + { + "description": "Adds a new child element with the specified name and returns the new element.", + "name": "AddElement", + "params": [ + { + "default": null, + "description": "The name of the child element to be added.", + "isRequired": true, + "name": "name", + "type": "String" + } + ], + "returnDescription": "The new element added.", + "returnType": "Object" + }, + { + "description": "Adds a new child element with the specified name and text from the specified body string, and returns the new element.", + "name": "AddElementWithBody", + "params": [ + { + "default": null, + "description": "The name of the child element to be added.", + "isRequired": true, + "name": "name", + "type": "String" + }, + { + "default": null, + "description": "The text of the child element to be added (via the body string).", + "isRequired": true, + "name": "body", + "type": "Object" + } + ], + "returnDescription": "The new element added.", + "returnType": "Object" + }, + { + "description": "Adds text to the element.", + "name": "AddText", + "params": [ + { + "default": null, + "description": "The text to be added to the element.", + "isRequired": true, + "name": "text", + "type": "String" + } + ], + "returnType": "Void" + }, + { + "description": "Removes all attributes and children from the element, as well as setting the name to empty.", + "name": "Clear", + "params": [], + "returnType": "Void" + }, + { + "description": "Serializes the element to XML document text.", + "name": "GenXML", + "params": [ + { + "default": null, + "isRequired": true, + "name": "gen" + } + ], + "returnDescription": "A serialized string." + }, + { + "description": "Serializes the element to XML document text. The specified header is used to begin the output (for example, as a custom XML declaration).", + "name": "GenXMLHdr", + "params": [ + { + "default": null, + "description": "Specify the header with which the output begins.", + "isRequired": true, + "name": "hdr", + "type": "String" + } + ], + "returnDescription": "A serialized string.", + "returnType": "String" + }, + { + "description": "Returns the XML attributes of the element.", + "name": "GetAttributes", + "params": [], + "returnDescription": "An associative array representing the XML attributes of the element.", + "returnType": "Object" + }, + { + "description": "Returns the body of the element. If the element contains child elements, `GetBody()` returns an [roXMLList](https://developer.roku.com/docs/references/brightscript/components/roxmllist.md\"roXMLList\") representing those elements, like GetChildElements(). If there are no children but the element contains text, `GetBody()` returns an [roString](https://developer.roku.com/docs/references/brightscript/components/rostring.md\"roString\") like `GetText()`. If the element is empty, `GetBody()` returns invalid.", + "name": "GetBody", + "params": [], + "returnDescription": "Object body.", + "returnType": "Object" + }, + { + "description": "If this element contains any child elements, this method returns an [roXMLList](https://developer.roku.com/docs/references/brightscript/components/roxmllist.md\"roXMLList\") representing those elements. If there are no child elements, returns invalid.", + "name": "GetChildElements", + "params": [], + "returnDescription": "An element list.", + "returnType": "Object" + }, + { + "description": "If this element contains any child elements, this method returns an [roList](https://developer.roku.com/docs/references/brightscript/components/rolist.md\"roList\") representing those elements. If there are no child elements, returns invalid. The difference between this function and `GetChildElements()` is that `GetChildNodes()` handles the case of mixed XML content, i.e., content with both child elements and text such as: Child TextMore Text. In this case `GetChildNodes()` called with the top level as an argument would return an roList with two elements. The first element would be an `roXMLElement` containing the information about. The second would be an `roString` containing \"More Text\".", + "name": "GetChildNodes", + "params": [], + "returnDescription": "An element list.", + "returnType": "Object" + }, + { + "description": "Returns the name of the element.", + "name": "GetName", + "params": [], + "returnDescription": "Element name.", + "returnType": "String" + }, + { + "description": "Returns an [roXMLList](https://developer.roku.com/docs/references/brightscript/components/roxmllist.md\"roXMLList\") representing all child elements of this element whose case-sensitive name is specified. If only one element matches the name, an roXMLList containing one element is returned. If no elements match, an empty roXMLList is returned.", + "name": "GetNamedElements", + "params": [ + { + "default": null, + "description": "The parent element containing the child elements to be listed. Matching of the parent element name is case-sensitive.", + "isRequired": true, + "name": "name", + "type": "String" + } + ], + "returnDescription": "An element list.", + "returnType": "Object" + }, + { + "description": "Returns an [roXMLList](https://developer.roku.com/docs/references/brightscript/components/roxmllist.md\"roXMLList\") representing all child elements of this element whose case-insensitive name is specified. If only one element matches the name, an roXMLList containing one element is returned. If no elements match, an empty roXMLList is returned.", + "name": "GetNamedElementsCi", + "params": [ + { + "default": null, + "description": "The parent element containing the child elements to be listed. Matching of the parent element name is case-sensitive.", + "isRequired": true, + "name": "name", + "type": "String" + } + ], + "returnDescription": "An element list.", + "returnType": "Object" + }, + { + "description": "Returns any text contained in the element. This returns immediate body text only (for example, it does not include text from child elements).", + "name": "GetText", + "params": [], + "returnDescription": "The text in the element.", + "returnType": "String" + }, + { + "name": "HasAttribute", + "params": [ + { + "default": null, + "description": "The element attribute to be verified.", + "isRequired": true, + "name": "attr", + "type": "String" + } + ], + "returnDescription": "A flag indicating whether the element has the specified attribute.", + "returnType": "Boolean" + }, + { + "description": "Checks whether the element has the specified name.", + "name": "IsName", + "params": [ + { + "default": null, + "description": "The element name to be verified.", + "isRequired": true, + "name": "name", + "type": "String" + } + ], + "returnDescription": "A flag indicating whether the element has the specified name.", + "returnType": "Boolean" + }, + { + "description": "Parses a string of XML.", + "name": "Parse", + "params": [ + { + "default": null, + "description": "The XML string to be parsed", + "isRequired": true, + "name": "xml", + "type": "String" + } + ], + "returnDescription": "A flag indicating whether the operation was successful. In that case, other methods below can then be used to extract information about the parsed element.", + "returnType": "Boolean" + }, + { + "description": "Sets the element text from the specified string", + "name": "SetBody", + "params": [ + { + "default": null, + "description": "The string to be used to set the element text.", + "isRequired": true, + "name": "body", + "type": "Object" + } + ], + "returnType": "Void" + }, + { + "description": "Sets the name of the element.", + "name": "SetName", + "params": [ + { + "default": null, + "description": "The name of the element.", + "isRequired": true, + "name": "name", + "type": "String" + } + ], + "returnType": "Void" + } + ], + "name": "ifXMLElement", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifxmlelement.md" + }, + "ifxmllist": { + "implementers": [ + { + "description": "Contains a list of roXML objects", + "name": "roXMLList", + "url": "https://developer.roku.com/docs/references/brightscript/components/roxmllist.md" + } + ], + "methods": [ + { + "description": "If the list contains exactly one item, this function returns the attributes of that item. Otherwise it returns invalid.", + "name": "GetAttributes", + "params": [], + "returnDescription": "The object item.", + "returnType": "Object" + }, + { + "description": "If the list contains exactly one item, this function returns the child elements of that item. Otherwise it returns invalid.", + "name": "GetChildElements", + "params": [], + "returnDescription": "The object item.", + "returnType": "Object" + }, + { + "description": "Returns a new XMLList that contains all roXMLElements that matched the passed in name (case-sensitive matching is used). This is the same as using the dot operator on an roXMLList.", + "name": "GetNamedElements", + "params": [ + { + "default": null, + "description": "The XML element to be used to find matches.", + "isRequired": true, + "name": "name", + "type": "String" + } + ], + "returnDescription": "An XMLList that contains the matches.", + "returnType": "Object" + }, + { + "description": "Returns a new XMLList that contains all roXMLElements that matched the passed in name (case-insensitive matching is used). This is the same as using the dot operator on an roXMLList.", + "name": "GetNamedElementsCi", + "params": [ + { + "default": null, + "description": "The XML element to be used to find matches.", + "isRequired": true, + "name": "name", + "type": "String" + } + ], + "returnDescription": "An XMLList that contains the matches.", + "returnType": "Object" + }, + { + "description": "If the list contains exactly one item, this function returns the text of that item. Otherwise, it returns an empty string.", + "name": "GetText", + "params": [], + "returnDescription": "The object string.", + "returnType": "String" + }, + { + "description": "If the list contains exactly one item, this function returns that item. Otherwise, it returns itself.", + "name": "Simplify", + "params": [], + "returnDescription": "The object item.", + "returnType": "Object" + } + ], + "name": "ifXMLList", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/interfaces/ifxmllist.md" + } + }, + "events": { + "roaudioplayerevent": { + "description": "The roAudioPlayer sends the roAudioPlayerEvent with the following predicates that indicate its valid event types:", + "implementers": [ + { + "name": "roAudioPlayer", + "url": "https://developer.roku.com/docs/references/brightscript/components/roaudioplayer.md" + } + ], + "methods": [ + { + "name": "isFullResult", + "params": [], + "returnType": "Boolean" + }, + { + "name": "isListItemSelected", + "params": [], + "returnType": "Boolean" + }, + { + "name": "isPartialResult", + "params": [], + "returnType": "Boolean" + }, + { + "name": "isPaused", + "params": [], + "returnType": "Boolean" + }, + { + "name": "isRequestFailed", + "params": [], + "returnType": "Boolean" + }, + { + "name": "isRequestSucceeded", + "params": [], + "returnType": "Boolean" + }, + { + "name": "isResumed", + "params": [], + "returnType": "Boolean" + }, + { + "name": "isStatusMessage", + "params": [], + "returnType": "Boolean" + }, + { + "name": "isTimedMetaData", + "params": [], + "returnType": "Boolean" + } + ], + "name": "roAudioPlayerEvent", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/events/roaudioplayerevent.md" + }, + "rocaptionrendererevent": { + "deprecatedDescription": "This component is deprecated and will be removed from Roku OS on January 1st, 2019.\n\nBeginning July 1st, 2017, any new channels using this component will be rejected during certification.\n\nBeginning January 1st, 2018, any updates to existing channels using this component will be rejected during certification.\n", + "description": "> This component is deprecated and will be removed from Roku OS on January 1st, 2019.\n> \n> Beginning July 1st, 2017, any new channels using this component will be rejected during certification.\n> \n> Beginning January 1st, 2018, any updates to existing channels using this component will be rejected during certification.\n\nroCaptionRenderer events are sent by the roCaptionRenderer to notify a BrightScript channel when caption data needs to be rendered. Specifically, one of two events, isCaptionText and isUpdateCaptionRequest, will be fired depending on the mode that the caption renderer is in. The mode is set by calling the [ifCaptionRenderer.SetMode()](https://developer.roku.com/docs/references/brightscript/interfaces/ifcaptionrenderer.mdsetmodemode-as-integer-as-void \"ifCaptionRenderer.SetMode()\") function.\n\n| Mode | Event |\n| --- | --- |\n| 1 | isCaptionUpdateRequest |\n| 2 | isCaptionText |", + "implementers": [ + { + "name": "roCaptionRenderer", + "url": "https://developer.roku.com/docs/references/brightscript/components/rocaptionrenderer.md" + } + ], + "isDeprecated": true, + "methods": [ + { + "name": "isCaptionText", + "params": [], + "returnType": "Boolean" + }, + { + "name": "isCaptionUpdateRequest", + "params": [], + "returnType": "Boolean" + } + ], + "name": "roCaptionRendererEvent", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/events/rocaptionrendererevent.md" + }, + "rocecstatusevent": { + "availableSince": "8", + "description": "_Available since Roku OS 8_\n\nThis event determines the active source status for set boxes. Channels subscribing to the `roCECStatusEvent` will be notified when the active-source status of the device changes per the CEC message traffic.\n\nTo use the roCECStatusEvent, follow the steps below:\n\n1. Connect a Roku STB to a TV which transmits and receives CEC messages\n2. Select the HDMI input to which the STB is connected\n3. Switch away and then back to the STB's HDMI input", + "implementers": [], + "methods": [ + { + "name": "isActiveSource", + "params": [], + "returnType": "Boolean" + } + ], + "name": "roCECStatusEvent", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/events/rocecstatusevent.md" + }, + "rochannelstoreevent": { + "description": "The roChannelStore sends an roChannelStoreEvent in response to a call to any of several Get\\* methods in [ifChannelStore](https://developer.roku.com/docs/references/brightscript/interfaces/ifchannelstore.md\"ifChannelStore\"). The following predicates indicate its valid event types:", + "implementers": [ + { + "name": "roChannelStore", + "url": "https://developer.roku.com/docs/references/brightscript/components/rochannelstore.md" + } + ], + "methods": [ + { + "name": "isRequestFailed", + "params": [], + "returnType": "Boolean" + }, + { + "name": "isRequestInterrupted", + "params": [], + "returnType": "Boolean" + }, + { + "name": "isRequestSucceeded", + "params": [], + "returnType": "Boolean" + } + ], + "name": "roChannelStoreEvent", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/events/rochannelstoreevent.md" + }, + "rocoderegistrationscreenevent": { + "deprecatedDescription": "This component is deprecated and will be removed from Roku OS on January 1st, 2019.\n\nBeginning July 1st, 2017, any new channels using this component will be rejected during certification.\n\nBeginning January 1st, 2018, any updates to existing channels using this component will be rejected during certification.\n", + "description": "> This component is deprecated and will be removed from Roku OS on January 1st, 2019.\n> \n> Beginning July 1st, 2017, any new channels using this component will be rejected during certification.\n> \n> Beginning January 1st, 2018, any updates to existing channels using this component will be rejected during certification.\n\nThe roCodeRegistrationScreen sends the roCodeRegistrationScreenEvent with the following predicates that indicate its valid event types:", + "implementers": [ + { + "name": "roCodeRegistrationScreen", + "url": "https://developer.roku.com/docs/references/brightscript/components/rocoderegistrationscreen.md" + } + ], + "isDeprecated": true, + "methods": [ + { + "name": "isButtonPressed", + "params": [], + "returnType": "Boolean" + }, + { + "name": "isScreenClosed", + "params": [], + "returnType": "Boolean" + } + ], + "name": "roCodeRegistrationScreenEvent", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/events/rocoderegistrationscreenevent.md" + }, + "rodeviceinfoevent": { + "availableSince": "8", + "description": "_Available since Roku OS 8_\n\nThe roDeviceInfo component sends the roDeviceInfoEvent with the following predicates that indicate its valid event types:", + "implementers": [ + { + "name": "roDeviceInfo", + "url": "https://developer.roku.com/docs/references/brightscript/components/rodeviceinfo.md" + } + ], + "methods": [ + { + "name": "isCaptionModeChanged", + "params": [], + "returnType": "Boolean" + }, + { + "name": "isStatusMessage", + "params": [], + "returnType": "Boolean" + } + ], + "name": "roDeviceInfoEvent", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/events/rodeviceinfoevent.md" + }, + "rofilesystemevent": { + "description": "The roFileSystem component sends the roFileSystemEvent with the following predicates that indicate its valid event types:", + "implementers": [ + { + "name": "roFileSystem", + "url": "https://developer.roku.com/docs/references/brightscript/components/rofilesystem.md" + } + ], + "methods": [ + { + "name": "isStorageDeviceAdded", + "params": [], + "returnType": "Boolean" + }, + { + "name": "isStorageDeviceRemoved", + "params": [], + "returnType": "Boolean" + } + ], + "name": "roFileSystemEvent", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/events/rofilesystemevent.md" + }, + "rogridscreenevent": { + "deprecatedDescription": "This component is deprecated and will be removed from Roku OS on January 1st, 2019.Beginning July 1st, 2017, any new channels using this component will be rejected during certification.Beginning January 1st, 2018, any updates to existing channels using this component will be rejected during certification.\n", + "description": "> This component is deprecated and will be removed from Roku OS on January 1st, 2019.Beginning July 1st, 2017, any new channels using this component will be rejected during certification.Beginning January 1st, 2018, any updates to existing channels using this component will be rejected during certification.\n\nThe roGridScreen sends the roGridScreenEvent with the following predicates that indicate its valid event types:", + "implementers": [ + { + "name": "roGridScreen", + "url": "https://developer.roku.com/docs/references/brightscript/components/rogridscreen.md" + } + ], + "isDeprecated": true, + "methods": [ + { + "name": "isListItemFocused", + "params": [], + "returnType": "Boolean" + }, + { + "name": "isListItemSelected", + "params": [], + "returnType": "Boolean" + }, + { + "name": "isRemoteKeyPressed", + "params": [], + "returnType": "Boolean" + }, + { + "name": "isScreenClosed", + "params": [], + "returnType": "Boolean" + } + ], + "name": "roGridScreenEvent", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/events/rogridscreenevent.md" + }, + "rohdmihotplugevent": { + "description": "The roHdmiStatus sends the roHdmiHotPlugEvent with the following predicates that indicate its valid event types:", + "implementers": [], + "methods": [ + { + "name": "isHdmiHotPlug", + "params": [], + "returnType": "Boolean" + } + ], + "name": "roHdmiHotPlugEvent", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/events/rohdmihotplugevent.md" + }, + "rohdmistatusevent": { + "description": "The roHdmiStatus sends the roHdmiStatusEvent with the following predicates that indicate its valid event types:", + "implementers": [], + "methods": [ + { + "name": "isHdmiStatus", + "params": [], + "returnType": "Boolean" + } + ], + "name": "roHdmiStatusEvent", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/events/rohdmistatusevent.md" + }, + "roimagecanvasevent": { + "deprecatedDescription": "This component is deprecated and will be removed from Roku OS on January 1st, 2019.\n\nBeginning July 1st, 2017, any new channels using this component will be rejected during certification.\n\nBeginning January 1st, 2018, any updates to existing channels using this component will be rejected during certification.\n", + "description": "> This component is deprecated and will be removed from Roku OS on January 1st, 2019.\n> \n> Beginning July 1st, 2017, any new channels using this component will be rejected during certification.\n> \n> Beginning January 1st, 2018, any updates to existing channels using this component will be rejected during certification.\n\nThe roImageCanvas sends the roImageCanvasEvent with the following predicates that indicate its valid event types:", + "implementers": [ + { + "name": "roImageCanvas", + "url": "https://developer.roku.com/docs/references/brightscript/components/roimagecanvas.md" + } + ], + "isDeprecated": true, + "methods": [ + { + "name": "isButtonPressed", + "params": [], + "returnType": "Boolean" + }, + { + "name": "isRemoteKeyPressed", + "params": [], + "returnType": "Boolean" + }, + { + "name": "isScreenClosed", + "params": [], + "returnType": "Boolean" + } + ], + "name": "roImageCanvasEvent", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/events/roimagecanvasevent.md" + }, + "roinputevent": { + "description": "The roInput component sends the roInputEvent with the following predicates that indicate its valid event types:", + "implementers": [ + { + "name": "roInput", + "url": "https://developer.roku.com/docs/references/brightscript/components/roinput.md" + } + ], + "methods": [ + { + "name": "GetInfo", + "params": [], + "returnType": "Object" + }, + { + "name": "isInput", + "params": [], + "returnType": "Boolean" + } + ], + "name": "roInputEvent", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/events/roinputevent.md" + }, + "rokeyboardscreenevent": { + "deprecatedDescription": "This component is deprecated and will be removed from Roku OS on January 1st, 2019.\n\nBeginning July 1st, 2017, any new channels using this component will be rejected during certification.\n\nBeginning January 1st, 2018, any updates to existing channels using this component will be rejected during certification.\n", + "description": "> This component is deprecated and will be removed from Roku OS on January 1st, 2019.\n> \n> Beginning July 1st, 2017, any new channels using this component will be rejected during certification.\n> \n> Beginning January 1st, 2018, any updates to existing channels using this component will be rejected during certification.\n\nThe roKeyboardScreen sends the roKeyboardScreenEvent with the following predicates that indicate its valid event types:", + "implementers": [ + { + "name": "roKeyboardScreen", + "url": "https://developer.roku.com/docs/references/brightscript/components/rokeyboardscreen.md" + } + ], + "isDeprecated": true, + "methods": [ + { + "name": "isButtonPressed", + "params": [], + "returnType": "Boolean" + }, + { + "name": "isScreenClosed", + "params": [], + "returnType": "Boolean" + } + ], + "name": "roKeyboardScreenEvent", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/events/rokeyboardscreenevent.md" + }, + "rolistscreenevent": { + "deprecatedDescription": "This component is deprecated and will be removed from Roku OS on January 1st, 2019.\n\nBeginning July 1st, 2017, any new channels using this component will be rejected during certification.\n\nBeginning January 1st, 2018, any updates to existing channels using this component will be rejected during certification.\n", + "description": "> This component is deprecated and will be removed from Roku OS on January 1st, 2019.\n> \n> Beginning July 1st, 2017, any new channels using this component will be rejected during certification.\n> \n> Beginning January 1st, 2018, any updates to existing channels using this component will be rejected during certification.\n\nThe roListScreen sends the roListScreenEvent with the following predicates that indicate its valid event types:", + "implementers": [ + { + "name": "roListScreen", + "url": "https://developer.roku.com/docs/references/brightscript/components/rolistscreen.md" + } + ], + "isDeprecated": true, + "methods": [ + { + "name": "isListItemFocused", + "params": [], + "returnType": "Boolean" + }, + { + "name": "isListItemSelected", + "params": [], + "returnType": "Boolean" + }, + { + "name": "isRemoteKeyPressed", + "params": [], + "returnType": "Boolean" + }, + { + "name": "isScreenClosed", + "params": [], + "returnType": "Boolean" + } + ], + "name": "roListScreenEvent", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/events/rolistscreenevent.md" + }, + "romessagedialogevent": { + "deprecatedDescription": "This component is deprecated and will be removed from Roku OS on January 1st, 2019.\n\nBeginning July 1st, 2017, any new channels using this component will be rejected during certification.\n\nBeginning January 1st, 2018, any updates to existing channels using this component will be rejected during certification.\n", + "description": "> This component is deprecated and will be removed from Roku OS on January 1st, 2019.\n> \n> Beginning July 1st, 2017, any new channels using this component will be rejected during certification.\n> \n> Beginning January 1st, 2018, any updates to existing channels using this component will be rejected during certification.\n\nThe roMessageDialog sends the roMessageDialogEvent with the following predicates that indicate its valid event types:", + "implementers": [ + { + "name": "roMessageDialog", + "url": "https://developer.roku.com/docs/references/brightscript/components/romessagedialog.md" + } + ], + "isDeprecated": true, + "methods": [ + { + "name": "isButtonInfo", + "params": [], + "returnType": "Boolean" + }, + { + "name": "isButtonPressed", + "params": [], + "returnType": "Boolean" + }, + { + "name": "isScreenClosed", + "params": [], + "returnType": "Boolean" + } + ], + "name": "roMessageDialogEvent", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/events/romessagedialogevent.md" + }, + "romicrophoneevent": { + "description": "The [roMicrophone](https://developer.roku.com/docs/references/brightscript/components/romicrophone.md\"roMicrophone\") component sends the `roMicrophoneEvent` with the following predicates that indicate its valid event types:", + "implementers": [ + { + "name": "roMicrophone", + "url": "https://developer.roku.com/docs/references/brightscript/components/romicrophone.md" + } + ], + "methods": [ + { + "name": "IsRecordingDone", + "params": [], + "returnType": "Boolean" + }, + { + "name": "IsRecordingInfo", + "params": [], + "returnType": "Boolean" + } + ], + "name": "roMicrophoneEvent", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/events/romicrophoneevent.md" + }, + "roonelinedialogevent": { + "deprecatedDescription": "This component is deprecated and will be removed from Roku OS on January 1st, 2019.\n\nBeginning July 1st, 2017, any new channels using this component will be rejected during certification.\n\nBeginning January 1st, 2018, any updates to existing channels using this component will be rejected during certification.\n", + "description": "> This component is deprecated and will be removed from Roku OS on January 1st, 2019.\n> \n> Beginning July 1st, 2017, any new channels using this component will be rejected during certification.\n> \n> Beginning January 1st, 2018, any updates to existing channels using this component will be rejected during certification.\n\nSends the roOneLineDialogEvent with the following predicates that indicate its valid event types:", + "implementers": [ + { + "name": "roOneLineDialog", + "url": "https://developer.roku.com/docs/references/brightscript/components/roonelinedialog.md" + } + ], + "isDeprecated": true, + "methods": [ + { + "name": "isScreenClosed", + "params": [], + "returnType": "Boolean" + } + ], + "name": "roOneLineDialogEvent", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/events/roonelinedialogevent.md" + }, + "roparagraphscreenevent": { + "deprecatedDescription": "This component is deprecated and will be removed from Roku OS on January 1st, 2019.\n\nBeginning July 1st, 2017, any new channels using this component will be rejected during certification.\n\nBeginning January 1st, 2018, any updates to existing channels using this component will be rejected during certification.\n", + "description": "> This component is deprecated and will be removed from Roku OS on January 1st, 2019.\n> \n> Beginning July 1st, 2017, any new channels using this component will be rejected during certification.\n> \n> Beginning January 1st, 2018, any updates to existing channels using this component will be rejected during certification.\n\nThe roParagraphScreen sends the roParagraphScreenEvent with the following predicates that indicate its valid event types:", + "implementers": [ + { + "name": "roParagraphScreen", + "url": "https://developer.roku.com/docs/references/brightscript/components/roparagraphscreen.md" + } + ], + "isDeprecated": true, + "methods": [ + { + "name": "isButtonPressed", + "params": [], + "returnType": "Boolean" + }, + { + "name": "isScreenClosed", + "params": [], + "returnType": "Boolean" + } + ], + "name": "roParagraphScreenEvent", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/events/roparagraphscreenevent.md" + }, + "ropinentrydialogevent": { + "deprecatedDescription": "This component is deprecated and will be removed from Roku OS on January 1st, 2019.\n\nBeginning July 1st, 2017, any new channels using this component will be rejected during certification.\n\nBeginning January 1st, 2018, any updates to existing channels using this component will be rejected during certification.\n", + "description": "> This component is deprecated and will be removed from Roku OS on January 1st, 2019.\n> \n> Beginning July 1st, 2017, any new channels using this component will be rejected during certification.\n> \n> Beginning January 1st, 2018, any updates to existing channels using this component will be rejected during certification.\n\nThe roPinEntryDialog sends the roPinEntryDialogEvent with the following predicates that indicate its valid event types:", + "implementers": [ + { + "name": "roPinEntryDialog", + "url": "https://developer.roku.com/docs/references/brightscript/components/ropinentrydialog.md" + } + ], + "isDeprecated": true, + "methods": [ + { + "name": "isButtonPressed", + "params": [], + "returnType": "Boolean" + }, + { + "name": "isScreenClosed", + "params": [], + "returnType": "Boolean" + } + ], + "name": "roPinEntryDialogEvent", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/events/ropinentrydialogevent.md" + }, + "roposterscreenevent": { + "deprecatedDescription": "This component is deprecated and will be removed from Roku OS on January 1st, 2019.Beginning July 1st, 2017, any new channels using this component will be rejected during certification.Beginning January 1st, 2018, any updates to existing channels using this component will be rejected during certification.\n", + "description": "> This component is deprecated and will be removed from Roku OS on January 1st, 2019.Beginning July 1st, 2017, any new channels using this component will be rejected during certification.Beginning January 1st, 2018, any updates to existing channels using this component will be rejected during certification.\n\nThe roPosterScreen sends the roPosterScreenEvent with the following predicates that indicate its valid event types:", + "implementers": [ + { + "name": "roPosterScreen", + "url": "https://developer.roku.com/docs/references/brightscript/components/roposterscreen.md" + } + ], + "isDeprecated": true, + "methods": [ + { + "name": "isAdSelected", + "params": [], + "returnType": "Boolean" + }, + { + "name": "isListFocused", + "params": [], + "returnType": "Boolean" + }, + { + "name": "isListItemFocused", + "params": [], + "returnType": "Boolean" + }, + { + "name": "isListItemInfo", + "params": [], + "returnType": "Boolean" + }, + { + "name": "isListItemSelected", + "params": [], + "returnType": "Boolean" + }, + { + "name": "isListSelected", + "params": [], + "returnType": "Boolean" + }, + { + "name": "isRemoteKeyPressed", + "params": [], + "returnType": "Boolean" + }, + { + "name": "isScreenClosed", + "params": [], + "returnType": "Boolean" + } + ], + "name": "roPosterScreenEvent", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/events/roposterscreenevent.md" + }, + "rosearchscreenevent": { + "deprecatedDescription": "This component is deprecated and will be removed from Roku OS on January 1st, 2019.\n\nBeginning July 1st, 2017, any new channels using this component will be rejected during certification.\n\nBeginning January 1st, 2018, any updates to existing channels using this component will be rejected during certification.\n", + "description": "> This component is deprecated and will be removed from Roku OS on January 1st, 2019.\n> \n> Beginning July 1st, 2017, any new channels using this component will be rejected during certification.\n> \n> Beginning January 1st, 2018, any updates to existing channels using this component will be rejected during certification.\n\nThe roSearchScreen sends the roSearchScreenEvent with the following predicates that indicate its valid event types:", + "implementers": [ + { + "name": "roSearchScreen", + "url": "https://developer.roku.com/docs/references/brightscript/components/rosearchscreen.md" + } + ], + "isDeprecated": true, + "methods": [ + { + "name": "IsButtonInfo", + "params": [], + "returnType": "Boolean" + }, + { + "name": "IsCleared", + "params": [], + "returnType": "Boolean" + }, + { + "name": "IsFullResult", + "params": [], + "returnType": "Dynamic" + }, + { + "name": "IsPartialResult", + "params": [], + "returnType": "Boolean" + }, + { + "name": "IsScreenClosed", + "params": [], + "returnType": "Boolean" + } + ], + "name": "roSearchScreenEvent", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/events/rosearchscreenevent.md" + }, + "rosgnodeevent": { + "description": "An roSGNode object sends roSGNodeEvent messages to a specified port when changes occur in nodes. An roSGNodeEvent is also sent as the argument of field observer callback functions. Both of these cases allow a SceneGraph application to respond to events. roSGNodeEvent supports the following methods.", + "implementers": [ + { + "name": "roSGNode", + "url": "https://developer.roku.com/docs/references/brightscript/components/rosgnode.md" + } + ], + "methods": [ + { + "name": "getData", + "params": [], + "returnType": "Dynamic" + }, + { + "name": "getField", + "params": [], + "returnType": "Dynamic" + }, + { + "name": "getInfo", + "params": [], + "returnType": "Object" + }, + { + "name": "getNode", + "params": [], + "returnType": "Dynamic" + }, + { + "name": "getRoSGNode", + "params": [], + "returnType": "Dynamic" + } + ], + "name": "roSGNodeEvent", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/events/rosgnodeevent.md" + }, + "rosgscreenevent": { + "description": "**roSGScreenEvents** are events sent to a scene graph **roSGScreen** by the framework. Other than when notifying the channel's main BrightScript thread that the screen is being closed, and thus that the channel should be terminated, channels do not generally handle these events.", + "implementers": [ + { + "name": "roSGScreen", + "url": "https://developer.roku.com/docs/references/brightscript/components/rosgscreen.md" + } + ], + "methods": [ + { + "name": "isScreenClosed", + "params": [], + "returnType": "Boolean" + } + ], + "name": "roSGScreenEvent", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/events/rosgscreenevent.md" + }, + "roslideshowevent": { + "deprecatedDescription": "This component is deprecated and will be removed from Roku OS on January 1st, 2019.\n\nBeginning July 1st, 2017, any new channels using this component will be rejected during certification.\n\nBeginning January 1st, 2018, any updates to existing channels using this component will be rejected during certification.\n", + "description": "> This component is deprecated and will be removed from Roku OS on January 1st, 2019.\n> \n> Beginning July 1st, 2017, any new channels using this component will be rejected during certification.\n> \n> Beginning January 1st, 2018, any updates to existing channels using this component will be rejected during certification.\n\nThe roSlideShow sends the roSlideShowEvent with the following predicates that indicate its valid event types:", + "implementers": [ + { + "name": "roSlideShow", + "url": "https://developer.roku.com/docs/references/brightscript/components/roslideshow.md" + } + ], + "isDeprecated": true, + "methods": [ + { + "name": "isButtonPressed", + "params": [], + "returnType": "Boolean" + }, + { + "name": "isPaused", + "params": [], + "returnType": "Boolean" + }, + { + "name": "isPlaybackPosition", + "params": [], + "returnType": "Boolean" + }, + { + "name": "isRemoteKeyPressed", + "params": [], + "returnType": "Boolean" + }, + { + "name": "isRequestFailed", + "params": [], + "returnType": "Boolean" + }, + { + "name": "isRequestInterrupted", + "params": [], + "returnType": "Boolean" + }, + { + "name": "isRequestSucceeded", + "params": [], + "returnType": "Boolean" + }, + { + "name": "isResumed", + "params": [], + "returnType": "Boolean" + }, + { + "name": "isScreenClosed", + "params": [], + "returnType": "Boolean" + } + ], + "name": "roSlideShowEvent", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/events/roslideshowevent.md" + }, + "rosocketevent": { + "description": "An roStreamSocket or roDataGramSocket object sends the roSocketEvent to indicate a change in the status of the socket. The socket must enable specific event notifications via the notify methods of ifSocketAsync.", + "implementers": [ + { + "name": "roDataGramSocket", + "url": "https://developer.roku.com/docs/references/brightscript/components/rodatagramsocket.md" + }, + { + "name": "roStreamSocket", + "url": "https://developer.roku.com/docs/references/brightscript/components/rostreamsocket.md" + } + ], + "methods": [ + { + "name": "GetSocketID", + "params": [], + "returnType": "Integer" + } + ], + "name": "roSocketEvent", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/events/rosocketevent.md" + }, + "rospringboardscreenevent": { + "deprecatedDescription": "This component is deprecated and will be removed from Roku OS on January 1st, 2019.\n\nBeginning July 1st, 2017, any new channels using this component will be rejected during certification.\n\nBeginning January 1st, 2018, any updates to existing channels using this component will be rejected during certification.\n", + "description": "> This component is deprecated and will be removed from Roku OS on January 1st, 2019.\n> \n> Beginning July 1st, 2017, any new channels using this component will be rejected during certification.\n> \n> Beginning January 1st, 2018, any updates to existing channels using this component will be rejected during certification.\n\nThe roSpringboardScreen sends the roSpringboardScreenEvent with the following predicates that indicate its valid event types:", + "implementers": [ + { + "name": "roSpringboardScreen", + "url": "https://developer.roku.com/docs/references/brightscript/components/rospringboardscreen.md" + } + ], + "isDeprecated": true, + "methods": [ + { + "name": "isButtonInfo", + "params": [], + "returnType": "Boolean" + }, + { + "name": "isButtonPressed", + "params": [], + "returnType": "Boolean" + }, + { + "name": "isRemoteKeyPressed", + "params": [], + "returnType": "Boolean" + }, + { + "name": "isScreenClosed", + "params": [], + "returnType": "Boolean" + } + ], + "name": "roSpringboardScreenEvent", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/events/rospringboardscreenevent.md" + }, + "rosystemlogevent": { + "description": "roSystemLogEvents are sent when enabled via [roSystemLog](https://developer.roku.com/docs/references/brightscript/components/rosystemlog.md\"roSystemLog\"). roSystemLogEvent has the following method:", + "implementers": [], + "methods": [ + { + "name": "GetInfo", + "params": [], + "returnType": "Object" + } + ], + "name": "roSystemLogEvent", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/events/rosystemlogevent.md" + }, + "rotextscreenevent": { + "deprecatedDescription": "This component is deprecated and will be removed from Roku OS on January 1st, 2019.\n\nBeginning July 1st, 2017, any new channels using this component will be rejected during certification.\n\nBeginning January 1st, 2018, any updates to existing channels using this component will be rejected during certification.\n", + "description": "> This component is deprecated and will be removed from Roku OS on January 1st, 2019.\n> \n> Beginning July 1st, 2017, any new channels using this component will be rejected during certification.\n> \n> Beginning January 1st, 2018, any updates to existing channels using this component will be rejected during certification.\n\nThe roTextScreen sends the roTextScreenEvent with the following predicates that indicate its valid event types:", + "implementers": [ + { + "name": "roTextScreen", + "url": "https://developer.roku.com/docs/references/brightscript/components/rotextscreen.md" + } + ], + "isDeprecated": true, + "methods": [ + { + "name": "isButtonPressed", + "params": [], + "returnType": "Boolean" + }, + { + "name": "isScreenClosed", + "params": [], + "returnType": "Boolean" + } + ], + "name": "roTextScreenEvent", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/events/rotextscreenevent.md" + }, + "rotexttospeechevent": { + "description": "> Please note this component is only available on the following devices: Roku Streaming Stick (3600X), Roku Express (3700X) and Express+ (3710X), Roku Premiere (4620X) and Premiere+ (4630X), Roku Ultra (4640X), and any Roku TV running Roku OS version 7.2 and later.\n\nThe [roTextToSpeech](https://developer.roku.com/docs/references/brightscript/components/rotexttospeech.md\"roTextToSpeech\") component sends the roTextToSpeechEvent with the following predicates that indicate its valid event types.", + "implementers": [ + { + "name": "roTextToSpeech", + "url": "https://developer.roku.com/docs/references/brightscript/components/rotexttospeech.md" + } + ], + "methods": [ + { + "name": "GetData", + "params": [], + "returnType": "Integer" + }, + { + "name": "GetIndex", + "params": [], + "returnType": "Integer" + }, + { + "name": "GetInfo", + "params": [], + "returnType": "Object" + } + ], + "name": "roTextToSpeechEvent", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/events/rotexttospeechevent.md" + }, + "rotexturerequestevent": { + "description": "The [roTextureManager](https://developer.roku.com/docs/references/brightscript/components/rotexturemanager.md\"roTextureManager\") sends the roTextureRequestEvent after completing a request.", + "implementers": [ + { + "name": "roTextureManager", + "url": "https://developer.roku.com/docs/references/brightscript/components/rotexturemanager.md" + } + ], + "methods": [ + { + "name": "GetBitmap", + "params": [], + "returnType": "Object" + }, + { + "name": "GetId", + "params": [], + "returnType": "Integer" + }, + { + "name": "GetState", + "params": [], + "returnType": "Integer" + }, + { + "name": "GetURI", + "params": [], + "returnType": "String" + } + ], + "name": "roTextureRequestEvent", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/events/rotexturerequestevent.md" + }, + "rouniversalcontrolevent": { + "description": "The roScreen object sends the roUniversalControlEvent with the following related methods. If an app constrains the events processed to just the roUniversalControlEvent, the app will work with any controller. The GetID(), GetChar(), GetKey(), and IsPress() methods can be used instead of parsing the GetInt() return value to more effectively distinguish between remote control and keyboard key presses, and the key press and release events.", + "implementers": [ + { + "name": "roScreen", + "url": "https://developer.roku.com/docs/references/brightscript/components/roscreen.md" + } + ], + "methods": [ + { + "name": "GetChar", + "params": [], + "returnType": "Integer" + }, + { + "name": "GetID", + "params": [], + "returnType": "Integer" + }, + { + "name": "GetInt", + "params": [], + "returnType": "Integer" + }, + { + "name": "GetKey", + "params": [], + "returnType": "Integer" + }, + { + "name": "GetRemoteID", + "params": [], + "returnType": "String" + }, + { + "name": "IsPress", + "params": [], + "returnType": "Boolean" + } + ], + "name": "roUniversalControlEvent", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/events/rouniversalcontrolevent.md" + }, + "rourlevent": { + "description": "The roUrlTransfer component sends the roUrlEvent with the following methods:", + "implementers": [ + { + "name": "roUrlTransfer", + "url": "https://developer.roku.com/docs/references/brightscript/components/rourltransfer.md" + } + ], + "methods": [ + { + "name": "GetFailureReason", + "params": [], + "returnType": "String" + }, + { + "name": "GetInt", + "params": [], + "returnType": "Integer" + }, + { + "name": "GetResponseCode", + "params": [], + "returnType": "Integer" + }, + { + "name": "GetResponseHeaders", + "params": [], + "returnType": "Object" + }, + { + "name": "GetResponseHeadersArray", + "params": [], + "returnType": "Object" + }, + { + "name": "GetSourceIdentity", + "params": [], + "returnType": "Integer" + }, + { + "name": "GetString", + "params": [], + "returnType": "String" + }, + { + "name": "GetTargetIpAddress", + "params": [], + "returnType": "String" + } + ], + "name": "roUrlEvent", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/events/rourlevent.md" + }, + "rovideoplayerevent": { + "description": "The roVideoPlayer sends the roVideoPlayerEvent with the following predicates that indicate its valid event types:", + "implementers": [ + { + "name": "roVideoPlayer", + "url": "https://developer.roku.com/docs/references/brightscript/components/rovideoplayer.md" + } + ], + "methods": [ + { + "name": "GetIndex", + "params": [], + "returnType": "Integer" + }, + { + "name": "GetInfo", + "params": [], + "returnType": "Object" + }, + { + "name": "isCaptionModeChanged", + "params": [], + "returnType": "Boolean" + }, + { + "name": "isDownloadSegmentInfo", + "params": [], + "returnType": "Boolean" + }, + { + "name": "isFormatDetected", + "params": [], + "returnType": "Boolean" + }, + { + "name": "isFullResult", + "params": [], + "returnType": "Boolean" + }, + { + "name": "isListItemSelected", + "params": [], + "returnType": "Boolean" + }, + { + "name": "isPaused", + "params": [], + "returnType": "Boolean" + }, + { + "name": "isPlaybackPosition", + "params": [], + "returnType": "Boolean" + }, + { + "name": "isRequestFailed", + "params": [], + "returnType": "Boolean" + }, + { + "name": "isRequestSucceeded", + "params": [], + "returnType": "Boolean" + }, + { + "name": "isResumed", + "params": [], + "returnType": "Boolean" + }, + { + "name": "isSegmentDownloadStarted", + "params": [], + "returnType": "Boolean" + }, + { + "name": "isStatusMessage", + "params": [], + "returnType": "Boolean" + }, + { + "name": "isStreamSegmentInfo", + "params": [], + "returnType": "Boolean" + }, + { + "name": "isStreamStarted", + "params": [], + "returnType": "Boolean" + }, + { + "name": "isTimedMetaData", + "params": [], + "returnType": "Boolean" + } + ], + "name": "roVideoPlayerEvent", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/events/rovideoplayerevent.md" + }, + "rovideoscreenevent": { + "deprecatedDescription": "This component is deprecated.Beginning July 1st, 2017, any new channels using this component will be rejected during certification.Beginning January 1st, 2018, any updates to existing channels using this component will be rejected during certification.\n", + "description": "> This component is deprecated.Beginning July 1st, 2017, any new channels using this component will be rejected during certification.Beginning January 1st, 2018, any updates to existing channels using this component will be rejected during certification.\n\nThe roVideoScreen sends the roVideoScreenEvent with the same predicates as in [roVideoPlayerEvent](https://developer.roku.com/docs/references/brightscript/events/rovideoplayerevent.md\"roVideoPlayerEvent\"). In addition to the events listed in roVideoPlayerEvent, the following events are also supported:", + "implementers": [ + { + "name": "roVideoScreen", + "url": "https://developer.roku.com/docs/references/brightscript/components/rovideoscreen.md" + } + ], + "isDeprecated": true, + "methods": [ + { + "name": "GetData", + "params": [], + "returnType": "Integer" + }, + { + "name": "GetIndex", + "params": [], + "returnType": "Integer" + }, + { + "name": "isPartialResult", + "params": [], + "returnType": "Boolean" + }, + { + "name": "isResumeRequest", + "params": [], + "returnType": "Boolean" + }, + { + "name": "isScreenClosed", + "params": [], + "returnType": "Boolean" + } + ], + "name": "roVideoScreenEvent", + "properties": [], + "url": "https://developer.roku.com/docs/references/brightscript/events/rovideoscreenevent.md" + } + } +} \ No newline at end of file diff --git a/src/roku-types/index.ts b/src/roku-types/index.ts new file mode 100644 index 000000000..271afcf77 --- /dev/null +++ b/src/roku-types/index.ts @@ -0,0 +1,79 @@ +// eslint-disable-next-line @typescript-eslint/no-require-imports +import data = require('./data.json'); + +//apply any transforms/overrides before exporting + +export const nodes = data.nodes; +export const components = data.components; +export const interfaces = data.interfaces; +export const events = data.events; + +interface BrightScriptDocLookup { + name: string; + url?: string; + description?: string; +} + +interface PossiblyDeprecated { + isDeprecated?: boolean; + deprecatedDescription?: string; +} + +export interface BRSBaseMethodData extends PossiblyDeprecated { + params: { + name: string; + isRequired: boolean; + type: string; + }[]; + returnType: string; +} +export interface BRSEventMethodData extends BRSBaseMethodData { + name: string; +} + +export interface BRSInterfaceMethodData extends BRSEventMethodData { + description: string; + returnDescription: string; +} + +export interface BRSPropertyData { + name: string; + description: string; + default: string; + type: string; +} + +export interface BRSFieldData { + name: string; + type: string; + default: string; + accessPermission: string; + description: string; +} + + +export interface SGNodeData extends BrightScriptDocLookup { + description: string; + fields: BRSFieldData[]; + events: BrightScriptDocLookup[]; + interfaces: BrightScriptDocLookup[]; +} + +export interface BRSComponentData extends BrightScriptDocLookup, PossiblyDeprecated { + interfaces: BrightScriptDocLookup[]; + events: BrightScriptDocLookup[]; + constructors: BRSBaseMethodData[]; + description: string; +} + +export interface BRSInterfaceData extends BrightScriptDocLookup, PossiblyDeprecated { + properties: BRSPropertyData[]; + implementers: BrightScriptDocLookup[]; + methods: BRSInterfaceMethodData[]; +} + +export interface BRSEventData extends BrightScriptDocLookup, PossiblyDeprecated { + properties: BRSPropertyData[]; + implementers: BrightScriptDocLookup[]; + methods: BRSEventMethodData[]; +} diff --git a/tsconfig.json b/tsconfig.json index fce17e636..92b871a8c 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -2,7 +2,7 @@ "compilerOptions": { "noImplicitAny": false, "target": "ES2017", - "module": "commonjs", + "module": "CommonJS", "sourceMap": true, "rootDir": "src", "outDir": "dist", @@ -15,9 +15,11 @@ "downlevelIteration": true, "noUnusedLocals": true, "allowSyntheticDefaultImports": true, + "resolveJsonModule": true, "lib": [ "es2017", - "es2019.array" + "es2019.array", + "dom" ] }, "include": [