aboutsummaryrefslogtreecommitdiff
path: root/Src/nprt_plugin/gecko/1.8/win/include/nsITooltipTextProvider.h
blob: b6f1ef038cfe5118a239a1d64dd68e1ceb51920c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
/*
 * DO NOT EDIT.  THIS FILE IS GENERATED FROM c:/mozilla/embedding/browser/webBrowser/nsITooltipTextProvider.idl
 */

#ifndef __gen_nsITooltipTextProvider_h__
#define __gen_nsITooltipTextProvider_h__


#ifndef __gen_nsISupports_h__
#include "nsISupports.h"
#endif

/* For IDL files that don't want to include root IDL files. */
#ifndef NS_NO_VTABLE
#define NS_NO_VTABLE
#endif
class nsIDOMNode; /* forward declaration */


/* starting interface:    nsITooltipTextProvider */
#define NS_ITOOLTIPTEXTPROVIDER_IID_STR "b128a1e6-44f3-4331-8fbe-5af360ff21ee"

#define NS_ITOOLTIPTEXTPROVIDER_IID \
  {0xb128a1e6, 0x44f3, 0x4331, \
    { 0x8f, 0xbe, 0x5a, 0xf3, 0x60, 0xff, 0x21, 0xee }}

/**
 * An interface implemented by a tooltip text provider service. This
 * service is called to discover what tooltip text is associated
 * with the node that the pointer is positioned over.
 *
 * Embedders may implement and register their own tooltip text provider
 * service if they wish to provide different tooltip text. 
 *
 * The default service returns the text stored in the TITLE
 * attribute of the node or a containing parent.
 *
 * @note
 * The tooltip text provider service is registered with the contract
 * defined in NS_TOOLTIPTEXTPROVIDER_CONTRACTID.
 *
 * @see nsITooltipListener
 * @see nsIComponentManager
 * @see nsIDOMNode
 *
 * @status FROZEN
 */
class NS_NO_VTABLE nsITooltipTextProvider : public nsISupports {
 public: 

  NS_DEFINE_STATIC_IID_ACCESSOR(NS_ITOOLTIPTEXTPROVIDER_IID)

  /**
     * Called to obtain the tooltip text for a node.
     *
     * @arg aNode The node to obtain the text from.
     * @arg aText The tooltip text.
     *
     * @return <CODE>PR_TRUE</CODE> if tooltip text is associated
     *         with the node and was returned in the aText argument;
     *         <CODE>PR_FALSE</CODE> otherwise.
     */
  /* boolean getNodeText (in nsIDOMNode aNode, out wstring aText); */
  NS_IMETHOD GetNodeText(nsIDOMNode *aNode, PRUnichar **aText, PRBool *_retval) = 0;

};

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSITOOLTIPTEXTPROVIDER \
  NS_IMETHOD GetNodeText(nsIDOMNode *aNode, PRUnichar **aText, PRBool *_retval); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSITOOLTIPTEXTPROVIDER(_to) \
  NS_IMETHOD GetNodeText(nsIDOMNode *aNode, PRUnichar **aText, PRBool *_retval) { return _to GetNodeText(aNode, aText, _retval); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSITOOLTIPTEXTPROVIDER(_to) \
  NS_IMETHOD GetNodeText(nsIDOMNode *aNode, PRUnichar **aText, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetNodeText(aNode, aText, _retval); } 

#if 0
/* Use the code below as a template for the implementation class for this interface. */

/* Header file */
class nsTooltipTextProvider : public nsITooltipTextProvider
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSITOOLTIPTEXTPROVIDER

  nsTooltipTextProvider();

private:
  ~nsTooltipTextProvider();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS1(nsTooltipTextProvider, nsITooltipTextProvider)

nsTooltipTextProvider::nsTooltipTextProvider()
{
  /* member initializers and constructor code */
}

nsTooltipTextProvider::~nsTooltipTextProvider()
{
  /* destructor code */
}

/* boolean getNodeText (in nsIDOMNode aNode, out wstring aText); */
NS_IMETHODIMP nsTooltipTextProvider::GetNodeText(nsIDOMNode *aNode, PRUnichar **aText, PRBool *_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* End of implementation class template. */
#endif


#endif /* __gen_nsITooltipTextProvider_h__ */