Class Index | File Index

## Classes

- _global_
- OWF
- OWF.Chrome
- OWF.DragAndDrop
- OWF.Eventing
- OWF.Intents
- OWF.Lang
- OWF.Launcher
- OWF.Log
- OWF.Metrics
- OWF.Preferences
- OWF.RPC
- OWF.Util
- Ozone.chrome.WidgetChrome
- Ozone.dragAndDrop.WidgetDragAndDrop
- Ozone.eventing.Widget
- Ozone.eventing.WidgetProxy
- Ozone.lang
- Ozone.launcher.WidgetLauncher
- Ozone.launcher.WidgetLauncherUtils
- Ozone.log
- Ozone.metrics
- Ozone.pref.PrefServer
- Ozone.state.WidgetState
- Ozone.state.WidgetStateHandler
- Ozone.util
- Ozone.util.pageLoad

# Namespace OWF.Launcher

Defined in: Widget.js.

Namespace Summary
Constructor Attributes | Constructor Name and Description
--- | ---
| OWF.Launcher This object is used launch other widgets.

Method Summary
Method Attributes | Method Name and Description
--- | ---
<static> | OWF.Launcher.getLaunchData() Retrieves initial launch data for this widget if it is opened by another widget.
<static> | OWF.Launcher.launch(config, callback) Launches a Widget based on the config.

Namespace Detail
OWF.Launcher
This object is used launch other widgets.
Method Detail
<static> {Object} OWF.Launcher.getLaunchData()
Retrieves initial launch data for this widget if it is opened by another widget. If launched via an intent, it will return the JSON string { intents: true }.

    var launchData = OWF.Launcher.getLaunchData();
    if (launchData != null) {
    	var data = Ozone.util.parseJson(launchData);  //in this example the data object has two fields: channel and message
    	if (data != null) {
    		//do something with the data
    		OWF.Eventing.subscribe(data.channel, function() {});
    	}
    }

Returns:
  {Object} data object which contains initial launch data for the widget

<static> OWF.Launcher.launch(config, callback)
Launches a Widget based on the config.

    OWF.Launcher.launch({
        universalName: 'universal name of widget to launch',  //universalName or guid maybe identify the widget to be launched
        guid: 'guid_of_widget_to_launch',
        title: 'title to replace the widget title' the title will only be changed if the widget is opened.
        titleRegex: optional regex used to replace the previous title with the new value of title
        launchOnlyIfClosed: true,   //if true will only launch the widget if it is not already opened.
                                    //if it is opened then the widget will be brought to focus
        data: dataString            //initial launch data to be passed to a widget only if the widget is opened. This must be a string.
    }, callback);

Parameters:
{Object} config
  object see example for structure
{Function} callback
  a function to be called once after the launchWidget is executed

Documentation generated by JsDoc Toolkit 2.3.2 on Fri Dec 21 2012 17:25:00 GMT-0500 (EST)