embedding/browser/webBrowser/nsITooltipListener.idl

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/embedding/browser/webBrowser/nsITooltipListener.idl	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,42 @@
     1.4 +/* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.8 + 
     1.9 +#include "nsISupports.idl"
    1.10 +
    1.11 +/**
    1.12 + * An optional interface for embedding clients wishing to receive
    1.13 + * notifications for when a tooltip should be displayed or removed.
    1.14 + * The embedder implements this interface on the web browser chrome
    1.15 + * object associated with the window that notifications are required
    1.16 + * for.
    1.17 + *
    1.18 + * @see nsITooltipTextProvider
    1.19 + */
    1.20 +[scriptable, uuid(44b78386-1dd2-11b2-9ad2-e4eee2ca1916)]
    1.21 +interface nsITooltipListener : nsISupports
    1.22 +{
    1.23 +    /**
    1.24 +     * Called when a tooltip should be displayed.
    1.25 +     *
    1.26 +     * @param aXCoords The tooltip left edge X coordinate.
    1.27 +     * @param aYCoords The tooltip top edge Y coordinate.
    1.28 +     * @param aTipText The text to display in the tooltip, typically obtained
    1.29 +     *        from the TITLE attribute of the node (or containing parent)
    1.30 +     *        over which the pointer has been positioned.
    1.31 +     *
    1.32 +     * @note
    1.33 +     * Coordinates are specified in pixels, relative to the top-left
    1.34 +     * corner of the browser area.
    1.35 +     *
    1.36 +     * @return <code>NS_OK</code> if the tooltip was displayed.
    1.37 +     */
    1.38 +    void onShowTooltip(in long aXCoords, in long aYCoords, in wstring aTipText);
    1.39 +  
    1.40 +    /**
    1.41 +     * Called when the tooltip should be hidden, either because the pointer
    1.42 +     * has moved or the tooltip has timed out.
    1.43 +     */
    1.44 +    void onHideTooltip();
    1.45 +};

mercurial