Repository navigation
Javascript API
The following APIs are in progress and likely to change.
The “ti” object is the main interface that the application will interact with the gain access to Titanium services.
getTitle, setTitle(title)
getIcon, setIcon(icon)
hide
show
activate
acitvate = restore in win32
minimize
maximize
beep
playSound(sound)
playNamedSound(soundName)
quit
setIcon(icon)
setBadge(badge)
sets the value on the badge (if supported by platform). if null is passed, no badge will be shown.
notify(severity)
open(path, mode)
path: The absolute path of the file to open.
mode: “r” for read, “rw” for read-write, “w” for write.
Returns a TiFile object
read()
Returns the contents of the file as a string
write(contents)
Writes the string contents to the file
createSystemMenu
returns an instance of the TiSystemMenu class
createUserMenu
returns an instance of the TiUserMenu class
createWindow
Returns an instance of the TiUserWindow class
createWindowOptions
Returns an instance of the TiWindowOptions class
get/setTitle
get/setIcon
get/setBounds
get/setHeight
get/setWidth
get/setPosition
hide
show
close
addItem
get/setDisplay
get/setIcon
get/setAction
addItem
addSeparator
hide
show
Used for setting and retrieving window properties
get/setX
get/setY
get/setWidth
get/setHeight
get/setTitle
get/setURL
is/setResizable
is/setMaximizable
is/setMinimizable
is/setCloseable
is/setFullscreen
is/setVisible
is/setChrome
is/setScrollbars
get/setTransparency