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

The singleton instance of the TiApp class.

  • get/setTitle
  • get/setIcon
  • hide
  • show
  • activate
  • minimize
  • beep
  • playSound
  • playNamedSound
  • quit

ti.Dock

The singleton instance of the TiDock class.

  • setIcon
  • setBadge

ti.Filesystem
The filesystem API
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

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

ti.Desktop

The singleton interface for Desktop functions.

TiNative.createSystemMenu

returns an instance of the TiSystemMenu class

TiNative.createUserMenu

returns an instance of the TiUserMenu class

ti.Window

  • ti.Window.createWindow
    • Returns an instance of the TiUserWindow class
  • ti.Window.createWindowOptions
    • Returns an instance of the TiWindowOptions class

TiUserWindow

  • get/setTitle
  • get/setIcon
  • get/setBounds
  • get/setHeight
  • get/setWidth
  • get/setPosition
  • hide
  • show
  • close
    h3. TiUserMenu
  • addItem
  • get/setDisplay
  • get/setIcon
  • get/setAction
    h3. TiSystemMenu
  • addItem
  • addSeparator
  • hide
  • show

sets the value on the badge (if supported by platform). if null is passed, no badge will be shown.

notify(severity)

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