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

# Class Ozone.eventing.WidgetProxy

Defined in: WidgetProxy.js.

Class Summary
Constructor Attributes | Constructor Name and Description
--- | ---
| Ozone.eventing.WidgetProxy(wid, functions, srcId, proxy) Creates or updates a proxy - This is a private constructor - Do not call this directly.

Field Summary
Field Attributes | Field Name and Description
--- | ---
| id Id of the Widget that this proxy represents
| isReady Flag which represents if the Widget this proxy represents

Method Summary
Method Attributes | Method Name and Description
--- | ---
| onReady(readyListener, readyListenerScope) Registers a listener function to be executed when the Widget has called notifyReady
| sendMessage(dataToSend) Sends a direct message to the Widget this proxy represents

Class Detail
Ozone.eventing.WidgetProxy(wid, functions, srcId, proxy)
Creates or updates a proxy - This is a private constructor - Do not call this directly. The other Widget APIs such as Widget Intents may return a proxy. A proxy may contain dynamic functions that were registered by the origin widget.

Parameters:
{String} wid
  Id of the Widget this proxy represents
{Object[]} functions
  Array of objects representing proxy functions
{String} srcId
  Id of the source Widget who is using the proxy
{Ozone.eventing.WidgetProxy} proxy Optional
  A existing proxy object to be used, instead of creating a new instance

Field Detail
id
Id of the Widget that this proxy represents

isReady
Flag which represents if the Widget this proxy represents
Method Detail
onReady(readyListener, readyListenerScope)
Registers a listener function to be executed when the Widget has called notifyReady

    var widgetProxy = OWF.RPC.getWidgetProxy(id);
    widgetProxy.onReady(function() { console.log("Other widget is ready!"); });

Parameters:
{function} readyListener
  function to execute
{Object} readyListenerScope
  scope for the function to execute with

sendMessage(dataToSend)
Sends a direct message to the Widget this proxy represents

    var widgetProxy = OWF.RPC.getWidgetProxy(id);
    widgetProxy.sendMessage({data:'foo'});

Parameters:
{Object} dataToSend

Documentation generated by JsDoc Toolkit 2.3.2 on Fri Oct 05 2012 16:51:05 GMT-0400 (EDT)