sbIDeviceEventTarget Interface Reference

import"sbIDeviceEventTarget.idl";

Inheritance diagram for sbIDeviceEventTarget:
[legend]
Collaboration diagram for sbIDeviceEventTarget:
[legend]

Public Member Functions

boolean dispatchEvent (in sbIDeviceEvent aEvent, [optional] in PRBool aAsync)
 
void addEventListener (in sbIDeviceEventListener aListener)
 
void removeEventListener (in sbIDeviceEventListener aListener)
 

Detailed Description

Note
Implementations of this interface must be threadsafe.

Definition at line 37 of file sbIDeviceEventTarget.idl.

Member Function Documentation

void sbIDeviceEventTarget::addEventListener ( in sbIDeviceEventListener  aListener)

Add a event listener

If the event listener is added while an event is being dispatched, the new listener will not be triggered until the next event is dispatched. (This is true even if the new event is dispatched before the current listener finishes; the new listener will see any nested events.)

boolean sbIDeviceEventTarget::dispatchEvent ( in sbIDeviceEvent  aEvent,
[optional] in PRBool  aAsync 
)

Dispatch a given event. The event will always be synchronously dispatched on the main (UI) thread.

An event may only be dispatched once; it may not be re-used.

Parameters
aEventthe event to dispatch
aSyncdispatch the event asynchronously (default false)
Returns
Undefined if the event was dispatched asynchronously True if the event has been dispatched (false if no listeners)
void sbIDeviceEventTarget::removeEventListener ( in sbIDeviceEventListener  aListener)

Remove a event listener

If an event is currently being dispatched, the listener will not be triggered for the event if it has not already done so.


The documentation for this interface was generated from the following file: