Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Public Attributes
nsIWindowMediator Interface Reference

import "nsIWindowMediator.idl";

Inheritance diagram for nsIWindowMediator:
Inheritance graph
[legend]
Collaboration diagram for nsIWindowMediator:
Collaboration graph
[legend]

List of all members.

Public Member Functions

nsISimpleEnumerator getEnumerator (in wstring aWindowType)
 Return an enumerator which iterates over all windows of type aWindowType from the oldest window to the youngest.
nsISimpleEnumerator getXULWindowEnumerator (in wstring aWindowType)
 Identical to getEnumerator except:
nsISimpleEnumerator getZOrderDOMWindowEnumerator (in wstring aWindowType, in boolean aFrontToBack)
 Return an enumerator which iterates over all windows of type aWindowType in their z (front-to-back) order.
nsISimpleEnumerator getZOrderXULWindowEnumerator (in wstring aWindowType, in boolean aFrontToBack)
 Identical to getZOrderDOMWindowEnumerator except:
nsIDOMWindowInternal getMostRecentWindow (in wstring aWindowType)
 This is a shortcut for simply fetching the first window in front to back order.
void registerWindow (in nsIXULWindow aWindow)
 Add the window to the list of known windows.
void unregisterWindow (in nsIXULWindow aWindow)
 Remove the window from the list of known windows.
void updateWindowTimeStamp (in nsIXULWindow aWindow)
 Call this method when a window gains focus.
void updateWindowTitle (in nsIXULWindow aWindow, in wstring inTitle)
 Call this method when a window's title changes.
boolean calculateZPosition (in nsIXULWindow inWindow, in unsigned long inPosition, in nsIWidget inBelow, out unsigned long outPosition, out nsIWidget outBelow)
 A window wants to be moved in z-order.
void setZPosition (in nsIXULWindow inWindow, in unsigned long inPosition, in nsIXULWindow inBelow)
 A window has been positioned behind another.
PRUint32 getZLevel (in nsIXULWindow aWindow)
 Return the window's Z level (as defined in nsIXULWindow).
void setZLevel (in nsIXULWindow aWindow, in PRUint32 aZLevel)
 Set the window's Z level (as defined in nsIXULWindow).
void addListener (in nsIWindowMediatorListener aListener)
 Register a listener for window status changes.
void removeListener (in nsIWindowMediatorListener aListener)
 Unregister a listener of window status changes.

Public Attributes

const unsigned long zLevelTop = 1
const unsigned long zLevelBottom = 2
const unsigned long zLevelBelow = 3

Detailed Description

Definition at line 55 of file nsIWindowMediator.idl.


Member Function Documentation

Register a listener for window status changes.

keeps strong ref? (to be decided)

Parameters:
aListenerthe listener to register
boolean nsIWindowMediator::calculateZPosition ( in nsIXULWindow  inWindow,
in unsigned long  inPosition,
in nsIWidget  inBelow,
out unsigned long  outPosition,
out nsIWidget  outBelow 
)

A window wants to be moved in z-order.

Calculate whether and how it should be constrained. Note this method is advisory only: it changes nothing either in WindowMediator's internal state or with the window. Note it compares the nsIXULWindow to nsIWidgets. A pure interface would use all nsIXULWindows. But we expect this to be called from callbacks originating in native window code. They are expected to hand us comparison values which are pulled from general storage in the native widget, and may not correspond to an nsIWidget at all. For that reason this interface requires only objects one step removed from the native window (nsIWidgets), and its implementation must be very understanding of what may be completely invalid pointers in those parameters.

Parameters:
inWindowthe window in question
inPositionrequested position values: zLevelTop: topmost window. zLevelBottom: bottom. zLevelBelow: below ioBelow. (the value of ioBelow will be ignored for zLevelTop and Bottom.)
inBelowif inPosition==zLevelBelow, the window below which inWindow wants to be placed. Otherwise this variable is ignored.
outPositionconstrained position, values like inPosition.
outBelowif outPosition==zLevelBelow, the window below which inWindow should be placed. Otherwise this this value will be null.
Returns:
PR_TRUE if the position returned is different from the position given.

Return an enumerator which iterates over all windows of type aWindowType from the oldest window to the youngest.

Parameters:
aWindowTypethe returned enumerator will enumerate only windows of this type. ("type" is the |windowtype| attribute of the XML <window> element.) If null, all windows will be enumerated.
Returns:
an enumerator of nsIDOMWindows

This is a shortcut for simply fetching the first window in front to back order.

Parameters:
aWindowTypereturn the topmost window of this type. ("type" is the |windowtype| attribute of the XML <window> element.) If null, return the topmost window of any type.
Returns:
the topmost window

Identical to getEnumerator except:

Returns:
an enumerator of nsIXULWindows

Return the window's Z level (as defined in nsIXULWindow).

Parameters:
aWindowthe window in question
Returns:
aWindow's z level

Return an enumerator which iterates over all windows of type aWindowType in their z (front-to-back) order.

Note this interface makes no requirement that a window couldn't be revisited if windows are re-ordered while z-order enumerators are active.

Parameters:
aWindowTypethe returned enumerator will enumerate only windows of this type. ("type" is the |windowtype| attribute of the XML <window> element.) If null, all windows will be enumerated.
aFrontToBackif true, the enumerator enumerates windows in order from front to back. back to front if false.
Returns:
an enumerator of nsIDOMWindows

Identical to getZOrderDOMWindowEnumerator except:

Returns:
an enumerator of nsIXULWindows

Add the window to the list of known windows.

Listeners (see addListener) will be notified through their onOpenWindow method.

Parameters:
aWindowthe window to add

Unregister a listener of window status changes.

Parameters:
aListenerthe listener to unregister

Set the window's Z level (as defined in nsIXULWindow).

The implementation will reposition the window as necessary to match its new Z level. The implementation will assume a window's Z level to be nsIXULWindow::normalZ until it has been informed of a different level.

Parameters:
aWindowthe window in question
aZLevelthe window's new Z level
void nsIWindowMediator::setZPosition ( in nsIXULWindow  inWindow,
in unsigned long  inPosition,
in nsIXULWindow  inBelow 
)

A window has been positioned behind another.

Inform WindowMediator

Parameters:
inWindowthe window in question
inPositionnew position. values: zLevelTop: topmost window. zLevelBottom: bottom. zLevelBelow: below inBelow. (inBelow is ignored for other values of inPosition.)
inBelowthe window inWindow is behind, if zLevelBelow

Remove the window from the list of known windows.

Listeners (see addListener) will be be notified through their onCloseWindow method.

Parameters:
aWindowthe window to remove

Call this method when a window gains focus.

It's a primitive means of determining the most recent window. It's no longer necessary and it really should be removed.

Parameters:
aWindowthe window which has gained focus
void nsIWindowMediator::updateWindowTitle ( in nsIXULWindow  aWindow,
in wstring  inTitle 
)

Call this method when a window's title changes.

Listeners (see addListener) will be notified through their onWindowTitleChange method.

Parameters:
aWindowthe window whose title has changed
inTitlethe window's new title

Member Data Documentation

Definition at line 134 of file nsIWindowMediator.idl.

Definition at line 133 of file nsIWindowMediator.idl.

Definition at line 132 of file nsIWindowMediator.idl.


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