WARNING: Most of this content (with the exception of the Mozilla 1.9 XPCOM reference) is very old, and can be expected to be out of date and possibly obsolete. For better XUL documentation, please visit the XUL hub at the Mozilla Developer Center.

nsIObserver

IID:DB242E01-E4D9-11d2-9DDE-000064657374
Inherits From:nsISupports
Status:FROZEN

This interface is implemented by an object that wants to observe an event corresponding to a topic.

This interface is implemented by the following components:


Methods

void observe ( nsISupports subject , char* topic , PRUnichar* data )

void observe ( nsISupports subject , char* topic , PRUnichar* data )

Observe will be called when there is a notification for the topic topic. This assumes that the object implementing this interface has been registered with an observer service such as the nsIObserverService.

If you expect multiple topics/subjects, the impl is responsible for filtering.

You should not modify, add, remove, or enumerate notifications in the implemention of observe.

Arguments:
subject: : Notification specific interface pointer.
topic: : The notification topic or subject.
data: : Notification specific wide string. subject event.

References

This interface is passed as an argument to the following methods:

nsIAlertsService.showAlertNotification, nsICommandManager.addCommandObserver, nsICommandManager.removeCommandObserver, nsIDOMXULDocument.loadOverlay, nsIExtensionManager.addDownloads, nsIIdleService.addIdleObserver, nsIIdleService.removeIdleObserver, nsIKeygenThread.startKeyGeneration, nsIMsgPrintEngine.setStartupPPObserver, nsIObserverService.addObserver, nsIObserverService.removeObserver, nsIPref.addObserver, nsIPref.removeObserver, nsIPrefBranch2.addObserver, nsIPrefBranch2.removeObserver, nsIPrintProgress.openProgressDialog, nsIPrintingPrompt.showPageSetup, nsIPrintingPrompt.showProgress, nsIPrintingPromptService.showPageSetup, nsIPrintingPromptService.showProgress, nsIProtectedAuthThread.login, nsITimer.init, nsIWindowWatcher.registerNotification, nsIWindowWatcher.unregisterNotification, nsIXPIDialogService.openProgressDialog

Reference documentation is generated from Mozilla's source.

Copyright © 1999-2006 XULPlanet.com