Interface nsIWindowMediatorType

Hierarchy

Methods

  • Increases the reference count for this interface. The associated instance will not be deleted unless the reference count is returned to zero.

    Returns

    The resulting reference count.

    Returns number

  • Parameters

    • aIID: object
    • Optional aInstancePtr: object

    Returns any

  • A run time mechanism for interface discovery.

    Returns

    NS_OK if the interface is supported by the associated instance, NS_NOINTERFACE if it is not.

    aInstancePtr must not be null.

    Parameters

    • aIID: object

      [in] A requested interface IID

    • aInstancePtr: object

      [out] A pointer to an interface pointer to receive the result.

    Returns void

  • Decreases the reference count for this interface. Generally, if the reference count returns to zero, the associated instance is deleted.

    Returns

    The resulting reference count.

    Returns number

  • Register a listener for window status changes. keeps strong ref? (to be decided)

    Parameters

    • aListener: nsIWindowMediatorListener

      the listener to register

    Returns void

  • 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 nsIAppWindow to nsIWidgets. A pure interface would use all nsIAppWindows. 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.

    Returns

    PR_TRUE if the position returned is different from the position given.

    Parameters

    • inWindow: nsIAppWindow

      the window in question

    • inPosition: number

      requested position values: zLevelTop: topmost window. zLevelBottom: bottom. zLevelBelow: below ioBelow. (the value of ioBelow will be ignored for zLevelTop and Bottom.)

    • inBelow: nsIWidget

      if inPosition==zLevelBelow, the window below which inWindow wants to be placed. Otherwise this variable is ignored.

    • outPosition: number

      constrained position, values like inPosition.

    • outBelow: nsIWidget

      if outPosition==zLevelBelow, the window below which inWindow should be placed. Otherwise this this value will be null.

    Returns boolean

  • Identical to getEnumerator except:

    Returns

    an enumerator of nsIAppWindows

    Parameters

    • aWindowType: wstring

    Returns nsISimpleEnumerator

  • Return the inner window with the given current window ID, if any. Can return null if no inner window with the ID exists or if it's not a current inner anymore.

    Parameters

    • aInnerWindowID: number

    Returns mozIDOMWindow

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

    Returns

    an enumerator of nsIDOMWindows. Note that windows close asynchronously in many cases, so windows returned from this enumerator can have .closed set to true. Caveat enumerator!

    Parameters

    • aWindowType: wstring

      the returned enumerator will enumerate only windows of this type. ("type" is the |windowtype| attribute of the XML element.) If null, all windows will be enumerated.

    Returns nsISimpleEnumerator

  • This is a shortcut for getMostRecentWindow('navigator:browser'), but if that fails it also tries 'navigator:geckoview' and 'mail:3pane'.

    Returns

    the topmost browser window

    Returns mozIDOMWindowProxy

  • Same as getMostRecentWindow, but ignores private browsing windows.

    Parameters

    • aWindowType: wstring

    Returns mozIDOMWindowProxy

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

    Returns

    the topmost window

    Parameters

    • aWindowType: wstring

      return the topmost window of this type. ("type" is the |windowtype| attribute of the XML element.) If null, return the topmost window of any type.

    Returns mozIDOMWindowProxy

  • Return the outer window with the given ID, if any. Can return null.

    Parameters

    • aOuterWindowID: number

    Returns mozIDOMWindowProxy

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

    Returns

    aWindow's z level

    Parameters

    • aWindow: nsIAppWindow

      the window in question

    Returns uint32_t

  • 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.

    Returns

    an enumerator of nsIAppWindows

    Parameters

    • aWindowType: wstring

      the returned enumerator will enumerate only windows of this type. ("type" is the |windowtype| attribute of the XML element.) If null, all windows will be enumerated.

    • aFrontToBack: boolean

      if true, the enumerator enumerates windows in order from front to back. back to front if false.

    Returns nsISimpleEnumerator

  • Add the window to the list of known windows. Listeners (see addListener) will be notified through their onOpenWindow method.

    Parameters

    • aWindow: nsIAppWindow

      the window to add

    Returns void

  • Unregister a listener of window status changes.

    Parameters

    • aListener: nsIWindowMediatorListener

      the listener to unregister

    Returns void

  • Set the window's Z level (as defined in nsIAppWindow). 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 nsIAppWindow::normalZ until it has been informed of a different level.

    Parameters

    • aWindow: nsIAppWindow

      the window in question

    • aZLevel: uint32_t

      the window's new Z level

    Returns void

  • A window has been positioned behind another. Inform WindowMediator

    Parameters

    • inWindow: nsIAppWindow

      the window in question

    • inPosition: number

      new position. values: zLevelTop: topmost window. zLevelBottom: bottom. zLevelBelow: below inBelow. (inBelow is ignored for other values of inPosition.)

    • inBelow: nsIAppWindow

      the window inWindow is behind, if zLevelBelow

    Returns void

  • Remove the window from the list of known windows. Listeners (see addListener) will be be notified through their onCloseWindow method.

    Parameters

    • aWindow: nsIAppWindow

      the window to remove

    Returns void

  • 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

    • aWindow: nsIAppWindow

      the window which has gained focus

    Returns void

Generated using TypeDoc