Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
These are the built-in objects, methods and properties Tiewrap adds in the global object. Modules and properties in italics are planned, but not implemented yet. The version numbers in parentheses indicates the version in which the method first appeared in, or the requirements needed so this function would be defined.
Alias to window.alert.
Holds drawing-related properties, aims to be more or less compatible with its HTML5 equivalent.
Standard console object for writing to stdout.
Alias to console.log.
Alias to console.error.
Holds some process-related methods and properties, akin to its Node.js equivalent.
Immediately quits the program with exit code given in process.exitCode. Can take an optional exit code as its argument that overrides process.exitCode.
Delays the script for a number of milliseconds.
Array holding command-line arguments.
Sets the exit code value for when the program terminates.
The operating system Tiewrap is running on.
String holding the Tiewrap version, usually taken from
Array with the version numbers of each of the components Tiewrap has been compiled with, currently duktape, sdl and tiewrap.
Used to call another script as a module, Node.js-style.
Holds methods and properties related to the SDL window.
Alias to window.on.
Shows a modal message box with one button (OK) and blocks until the user acknowledged it. Parameters are optional. Also available as a global.
Removes an event.
Adds an event.
Alias to window.off.
Enables or disables the window decorations.
Gets or sets the screen brightness between 0.0 and 1.0.
Enables or disables the screensaver.
Gets or sets the window's height.
Gets or sets the window's width.
Gets or sets the window's opacity, between 0.0 and 1.0.
Gets or sets the distance between the window and the screen's left edge.
Gets or sets the distance between the window and the screen's top edge.
Gets the name of the system it's running on.
Gets or sets the window's title.
Fires when the application is about to close (e.g. the user clicked the close button or sent a SIGINT). The callback can return false to prevent the application from quitting.