Skip to content
marshall edited this page Sep 13, 2010 · 106 revisions

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.

ti.App

getTitle, setTitle(title)
getIcon, setIcon(icon)
hide
show
activate
minimize
beep
playSound(sound)
playNamedSound(soundName)
quit

ti.Dock

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)

ti.Filesystem

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

TiFile class

read()
Returns the contents of the file as a string
write(contents)
Writes the string contents to the file

ti.Desktop

ti.Menu

createSystemMenu
returns an instance of the TiSystemMenu class
createUserMenu
returns an instance of the TiUserMenu class

ti.Window

createWindow
Returns an instance of the TiUserWindow class
createWindowOptions
Returns an instance of the TiWindowOptions class

TiUserWindow

get/setTitle
get/setIcon
get/setBounds
get/setHeight
get/setWidth
get/setPosition
hide
show
close

TiUserMenu

addItem
get/setDisplay
get/setIcon
get/setAction

TiSystemMenu

addItem
addSeparator
hide
show

TiWindowOptions

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

Clone this wiki locally