APIs

From WebOS101

Jump to: navigation, search

Introduction

The Mojo SDK defines a number of APIs that can be used by applications. These APIs provide additional or enhanced functionality not available via Javascript or the DOM.

Widget Description[1]
Mojo.Animation Holds the infrastructure for coordinating timers for multiple animations, and animating DOM element styles and numeric values over time.
Mojo.Asserts & Requires Contains some methods to debug your applications and other utility functions (e.g., assert, require, loadScriptWithCallback, etc.).
Mojo.Char Holds character code values and some useful key code checking methods.
Mojo.Controller Controller functions designed to assist in managing stages and scenes.
Mojo.Cookie Creates a cookie object with a particular name.
Mojo.Depot Stores JavaScript objects in a database. Currently implemented as a framework wrapper around HTML5 active record access.
Mojo.Drag Creates container destinations and draggers for drag and drop items.
Mojo.Event Holds functionality related to the UI Toolkit Events.
Mojo.Format Functions related to formatting dates, times, and numbers.
Mojo.Function Used to "debounce" multiple calls to a function.
Mojo.Function.Synchronize Used to ensure that a set of callback functions are all called at the same time.
Mojo.Log Provides an efficient way to output interesting information from a running application, but not have it slow down the application.
Mojo.Model Contains helper functions for dealing with data in a JSON object.
Mojo.PatternMatching Contains helper functions for matching some common device API's when filtering or when getting data back. Does highlighting of matched filter text for contacts per the HI spec; also does matching of address types to their display string.
Mojo.Service An on-device "server" for any resource, data, or configuration that can be exposed for developers to use with their applications.
Mojo.Timing Controls for timing.
Mojo.Transition Contains public constants for the graphical transitions usually used for pushing and popping scenes.
Mojo.View All UI layout files are located in the views folder of your application. Much of the user interface in the SDK is assembled out of text files containing fragments of HTML and special tags indicating locations to insert dynamic data.
Mojo.Widget The actual widget implementations are "widget assistants" in the various widget_*.js files, and common widget behavior is mostly encapsulated in widget_controller.js.

Notes

  1. Copied from http://developer.palm.com/index.php?option=com_content&view=article&id=1560 Copyright Palm, Inc.
Personal tools