|
1 /* -*- Mode: C++; 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/. */ |
|
5 |
|
6 #include "nsISupports.idl" |
|
7 |
|
8 interface nsIDOMNode; |
|
9 |
|
10 /** |
|
11 * An interface implemented by a tooltip text provider service. This |
|
12 * service is called to discover what tooltip text is associated |
|
13 * with the node that the pointer is positioned over. |
|
14 * |
|
15 * Embedders may implement and register their own tooltip text provider |
|
16 * service if they wish to provide different tooltip text. |
|
17 * |
|
18 * The default service returns the text stored in the TITLE |
|
19 * attribute of the node or a containing parent. |
|
20 * |
|
21 * @note |
|
22 * The tooltip text provider service is registered with the contract |
|
23 * defined in NS_TOOLTIPTEXTPROVIDER_CONTRACTID. |
|
24 * |
|
25 * @see nsITooltipListener |
|
26 * @see nsIComponentManager |
|
27 * @see nsIDOMNode |
|
28 */ |
|
29 [scriptable, uuid(b128a1e6-44f3-4331-8fbe-5af360ff21ee)] |
|
30 interface nsITooltipTextProvider : nsISupports |
|
31 { |
|
32 /** |
|
33 * Called to obtain the tooltip text for a node. |
|
34 * |
|
35 * @arg aNode The node to obtain the text from. |
|
36 * @arg aText The tooltip text. |
|
37 * |
|
38 * @return <CODE>PR_TRUE</CODE> if tooltip text is associated |
|
39 * with the node and was returned in the aText argument; |
|
40 * <CODE>PR_FALSE</CODE> otherwise. |
|
41 */ |
|
42 boolean getNodeText(in nsIDOMNode aNode, out wstring aText); |
|
43 }; |