Interface nsIMacDockSupportType

Allow applications to interface with the Mac OS X Dock.

Applications may indicate progress on their Dock icon. Only one such progress indicator is available to the entire application.

Hierarchy

Properties

badgeText: string

Text used to badge the dock tile.

dockMenu: nsIStandaloneNativeMenu

Menu to use for application-specific dock menu items.

isAppInDock: bool

True if this app is in the list of apps that are persisted to the macOS Dock (as if the user selected "Keep in Dock").

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

  • Activate the application. This should be used by an application to activate itself when a dock menu is selected as selection of a dock menu item does not automatically activate the application.

    Parameters

    • aIgnoreOtherApplications: boolean

      If false, the application is activated only if no other application is currently active. If true, the application activates regardless.

    Returns void

  • Ensure that there is a tile for this app in the list of apps that are persisted to the macOS Dock (equivalent to the user selected "Keep in Dock").

    The position for the [new] app tile is:

    • its current position if it already exists, else
    • the position of aAppToReplacePath if it exists, else
    • directly after the last app with the same .app name, else
    • directly after the last known browser app (see browserAppNames in nsMacDockSupport.mm), else
    • at the end of the persisted app list.

    Returns

    true if the app was already in the list of persisted apps or if it was successfully added, else returns false.

    Parameters

    • aAppPath: string

      [optional] The path of the .app to persist to the Dock (defaults to the path of the current app).

    • aAppToReplacePath: string

      [optional] The path of a .app that should be replaced if it is in the list of persisted apps. This is useful when we prompt the user to install the app when the app is being run directly from a .dmg and the user may have dragged that .app file to the dock.

    Returns bool

Generated using TypeDoc