1 /* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #include
"nsISupports.idl"
9 * An optional interface for embedding clients wishing to receive
10 * notifications for when a tooltip should be displayed or removed.
11 * The embedder implements this interface on the web browser chrome
12 * object associated with the window that notifications are required
15 * @see nsITooltipTextProvider
17 [scriptable
, uuid(44b78386
-1dd2
-11b2
-9ad2
-e4eee2ca1916
)]
18 interface nsITooltipListener
: nsISupports
21 * Called when a tooltip should be displayed.
23 * @param aXCoords The tooltip left edge X coordinate.
24 * @param aYCoords The tooltip top edge Y coordinate.
25 * @param aTipText The text to display in the tooltip, typically obtained
26 * from the TITLE attribute of the node (or containing parent)
27 * over which the pointer has been positioned.
30 * Coordinates are specified in pixels, relative to the top-left
31 * corner of the browser area.
33 * @return <code>NS_OK</code> if the tooltip was displayed.
35 void onShowTooltip
(in long aXCoords
, in long aYCoords
, in wstring aTipText
);
38 * Called when the tooltip should be hidden, either because the pointer
39 * has moved or the tooltip has timed out.