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