nsITooltipTextProvider.h 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. /*
  2. * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/embedding/browser/webBrowser/nsITooltipTextProvider.idl
  3. */
  4. #ifndef __gen_nsITooltipTextProvider_h__
  5. #define __gen_nsITooltipTextProvider_h__
  6. #ifndef __gen_nsISupports_h__
  7. #include "nsISupports.h"
  8. #endif
  9. /* For IDL files that don't want to include root IDL files. */
  10. #ifndef NS_NO_VTABLE
  11. #define NS_NO_VTABLE
  12. #endif
  13. class nsIDOMNode; /* forward declaration */
  14. /* starting interface: nsITooltipTextProvider */
  15. #define NS_ITOOLTIPTEXTPROVIDER_IID_STR "b128a1e6-44f3-4331-8fbe-5af360ff21ee"
  16. #define NS_ITOOLTIPTEXTPROVIDER_IID \
  17. {0xb128a1e6, 0x44f3, 0x4331, \
  18. { 0x8f, 0xbe, 0x5a, 0xf3, 0x60, 0xff, 0x21, 0xee }}
  19. /**
  20. * An interface implemented by a tooltip text provider service. This
  21. * service is called to discover what tooltip text is associated
  22. * with the node that the pointer is positioned over.
  23. *
  24. * Embedders may implement and register their own tooltip text provider
  25. * service if they wish to provide different tooltip text.
  26. *
  27. * The default service returns the text stored in the TITLE
  28. * attribute of the node or a containing parent.
  29. *
  30. * @note
  31. * The tooltip text provider service is registered with the contract
  32. * defined in NS_TOOLTIPTEXTPROVIDER_CONTRACTID.
  33. *
  34. * @see nsITooltipListener
  35. * @see nsIComponentManager
  36. * @see nsIDOMNode
  37. *
  38. * @status FROZEN
  39. */
  40. class NS_NO_VTABLE nsITooltipTextProvider : public nsISupports {
  41. public:
  42. NS_DEFINE_STATIC_IID_ACCESSOR(NS_ITOOLTIPTEXTPROVIDER_IID)
  43. /**
  44. * Called to obtain the tooltip text for a node.
  45. *
  46. * @arg aNode The node to obtain the text from.
  47. * @arg aText The tooltip text.
  48. *
  49. * @return <CODE>PR_TRUE</CODE> if tooltip text is associated
  50. * with the node and was returned in the aText argument;
  51. * <CODE>PR_FALSE</CODE> otherwise.
  52. */
  53. /* boolean getNodeText (in nsIDOMNode aNode, out wstring aText); */
  54. NS_IMETHOD GetNodeText(nsIDOMNode *aNode, PRUnichar **aText, PRBool *_retval) = 0;
  55. };
  56. /* Use this macro when declaring classes that implement this interface. */
  57. #define NS_DECL_NSITOOLTIPTEXTPROVIDER \
  58. NS_IMETHOD GetNodeText(nsIDOMNode *aNode, PRUnichar **aText, PRBool *_retval);
  59. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  60. #define NS_FORWARD_NSITOOLTIPTEXTPROVIDER(_to) \
  61. NS_IMETHOD GetNodeText(nsIDOMNode *aNode, PRUnichar **aText, PRBool *_retval) { return _to GetNodeText(aNode, aText, _retval); }
  62. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  63. #define NS_FORWARD_SAFE_NSITOOLTIPTEXTPROVIDER(_to) \
  64. NS_IMETHOD GetNodeText(nsIDOMNode *aNode, PRUnichar **aText, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetNodeText(aNode, aText, _retval); }
  65. #if 0
  66. /* Use the code below as a template for the implementation class for this interface. */
  67. /* Header file */
  68. class nsTooltipTextProvider : public nsITooltipTextProvider
  69. {
  70. public:
  71. NS_DECL_ISUPPORTS
  72. NS_DECL_NSITOOLTIPTEXTPROVIDER
  73. nsTooltipTextProvider();
  74. private:
  75. ~nsTooltipTextProvider();
  76. protected:
  77. /* additional members */
  78. };
  79. /* Implementation file */
  80. NS_IMPL_ISUPPORTS1(nsTooltipTextProvider, nsITooltipTextProvider)
  81. nsTooltipTextProvider::nsTooltipTextProvider()
  82. {
  83. /* member initializers and constructor code */
  84. }
  85. nsTooltipTextProvider::~nsTooltipTextProvider()
  86. {
  87. /* destructor code */
  88. }
  89. /* boolean getNodeText (in nsIDOMNode aNode, out wstring aText); */
  90. NS_IMETHODIMP nsTooltipTextProvider::GetNodeText(nsIDOMNode *aNode, PRUnichar **aText, PRBool *_retval)
  91. {
  92. return NS_ERROR_NOT_IMPLEMENTED;
  93. }
  94. /* End of implementation class template. */
  95. #endif
  96. #endif /* __gen_nsITooltipTextProvider_h__ */