Interface nsINativeAppSupportType

nsINativeAppSupport

This "pseudo" (in the XPCOM sense) interface provides for platform-specific general application support

Due to the nature of the beast, this interface is not a full-blown XPCOM component. The primary reason is that objects that implement this interface generally must be operational before XPCOM (or any of the rest of Mozilla) are initialized. As a result, this interface is instantiated by somewhat unconventional means.

To create the implementor of this interface, you call the function NS_CreateNativeAppSupport. This is done in the startup code in nsAppRunner.cpp

The interface provides these functions: start - You call this to inform the native app support that the application is starting. In addition, it serves as a query as to whether the application should continue to run.

If the returned boolean result is PR_FALSE, then the application should exit without further processing. In such cases, the returned nsresult indicates whether the reason to exit is due to an error or not.

Win32 Note: In the case of starting a second instance of this executable, this function will return PR_FALSE and nsresult==NS_OK. This means that the command line arguments have been successfully passed to the instance of the application acting as a remote server. quit - Informs the native app support that the application is stopping. The app support should disable any functionality enabled by start.

onLastWindowClosing - Called when the last window is closed. Used as a "soft" shutdown, passwords are flushed.

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

  • 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

  • Returns void

  • Returns void

  • Returns boolean

Generated using TypeDoc