1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/embedding/browser/webBrowser/nsITooltipTextProvider.idl Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,43 @@ 1.4 +/* -*- Mode: C++; 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 +interface nsIDOMNode; 1.12 + 1.13 +/** 1.14 + * An interface implemented by a tooltip text provider service. This 1.15 + * service is called to discover what tooltip text is associated 1.16 + * with the node that the pointer is positioned over. 1.17 + * 1.18 + * Embedders may implement and register their own tooltip text provider 1.19 + * service if they wish to provide different tooltip text. 1.20 + * 1.21 + * The default service returns the text stored in the TITLE 1.22 + * attribute of the node or a containing parent. 1.23 + * 1.24 + * @note 1.25 + * The tooltip text provider service is registered with the contract 1.26 + * defined in NS_TOOLTIPTEXTPROVIDER_CONTRACTID. 1.27 + * 1.28 + * @see nsITooltipListener 1.29 + * @see nsIComponentManager 1.30 + * @see nsIDOMNode 1.31 + */ 1.32 +[scriptable, uuid(b128a1e6-44f3-4331-8fbe-5af360ff21ee)] 1.33 +interface nsITooltipTextProvider : nsISupports 1.34 +{ 1.35 + /** 1.36 + * Called to obtain the tooltip text for a node. 1.37 + * 1.38 + * @arg aNode The node to obtain the text from. 1.39 + * @arg aText The tooltip text. 1.40 + * 1.41 + * @return <CODE>PR_TRUE</CODE> if tooltip text is associated 1.42 + * with the node and was returned in the aText argument; 1.43 + * <CODE>PR_FALSE</CODE> otherwise. 1.44 + */ 1.45 + boolean getNodeText(in nsIDOMNode aNode, out wstring aText); 1.46 +};