michael@0: /* -*- Mode: C++; 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: interface nsIDOMNode; michael@0: michael@0: /** michael@0: * An interface implemented by a tooltip text provider service. This michael@0: * service is called to discover what tooltip text is associated michael@0: * with the node that the pointer is positioned over. michael@0: * michael@0: * Embedders may implement and register their own tooltip text provider michael@0: * service if they wish to provide different tooltip text. michael@0: * michael@0: * The default service returns the text stored in the TITLE michael@0: * attribute of the node or a containing parent. michael@0: * michael@0: * @note michael@0: * The tooltip text provider service is registered with the contract michael@0: * defined in NS_TOOLTIPTEXTPROVIDER_CONTRACTID. michael@0: * michael@0: * @see nsITooltipListener michael@0: * @see nsIComponentManager michael@0: * @see nsIDOMNode michael@0: */ michael@0: [scriptable, uuid(b128a1e6-44f3-4331-8fbe-5af360ff21ee)] michael@0: interface nsITooltipTextProvider : nsISupports michael@0: { michael@0: /** michael@0: * Called to obtain the tooltip text for a node. michael@0: * michael@0: * @arg aNode The node to obtain the text from. michael@0: * @arg aText The tooltip text. michael@0: * michael@0: * @return PR_TRUE if tooltip text is associated michael@0: * with the node and was returned in the aText argument; michael@0: * PR_FALSE otherwise. michael@0: */ michael@0: boolean getNodeText(in nsIDOMNode aNode, out wstring aText); michael@0: };