Interface nsITaskbarPreviewControllerType

nsITaskbarPreviewController

nsITaskbarPreviewController provides the behavior for the taskbar previews. Its methods and properties are used by nsITaskbarPreview. Clients are intended to provide their own implementation of this interface. Depending on the interface the controller is attached to, only certain methods/attributes are required to be implemented.

Hierarchy

Properties

height: number

The height of the preview image. This value is allowed to change at any time. See requestPreview for more information.

thumbnailAspectRatio: number

The aspect ratio of the thumbnail - this does not need to match the ratio of the preview. This value is allowed to change at any time. See requestThumbnail for more information.

width: number

The width of the preview image. This value is allowed to change at any time. See requestPreview for more information.

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

  • Invoked when the user clicks on the tab preview.

    Returns

    true if the top level window corresponding to the preview should be activated, false if activation is not accepted.

    Returns boolean

  • Invoked when one of the buttons on the window preview's toolbar is pressed.

    Parameters

    • button: nsITaskbarPreviewButton

      The button that was pressed. This can be compared with the buttons returned by nsITaskbarWindowPreview.getButton.

    Returns void

  • Invoked when the user presses the close button on the tab preview.

    Returns void

  • Invoked by nsITaskbarPreview when it needs to render the preview.

    Parameters

    • aCallback: nsITaskbarPreviewCallback

      Async callback the controller should invoke once the thumbnail is rendered. aCallback receives as its only parameter a canvas containing the preview image.

    Returns void

  • Note: it is guaranteed that width/height == thumbnailAspectRatio (modulo rounding errors)

    Also note that the context is not attached to a canvas element.

    Parameters

    • aCallback: nsITaskbarPreviewCallback

      Async callback the controller should invoke once the thumbnail is rendered. aCallback receives as its only parameter a canvas containing the thumbnail image. Canvas dimensions should match the requested width or height otherwise setting the thumbnail will fail.

    • width: number

      The width of the requested thumbnail

    • height: number

      The height of the requested thumbnail

    Returns void

Generated using TypeDoc