PageRenderTime 29ms CodeModel.GetById 16ms RepoModel.GetById 0ms app.codeStats 0ms

/gecko_api/include/nsITooltipListener.h

http://firefox-mac-pdf.googlecode.com/
C Header | 133 lines | 56 code | 28 blank | 49 comment | 0 complexity | 1d286b6581c85994adf94b3611a3cad6 MD5 | raw file
  1. /*
  2. * DO NOT EDIT. THIS FILE IS GENERATED FROM /builds/tinderbox/XR-Trunk/Darwin_8.8.4_Depend/mozilla/embedding/browser/webBrowser/nsITooltipListener.idl
  3. */
  4. #ifndef __gen_nsITooltipListener_h__
  5. #define __gen_nsITooltipListener_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. /* starting interface: nsITooltipListener */
  14. #define NS_ITOOLTIPLISTENER_IID_STR "44b78386-1dd2-11b2-9ad2-e4eee2ca1916"
  15. #define NS_ITOOLTIPLISTENER_IID \
  16. {0x44b78386, 0x1dd2, 0x11b2, \
  17. { 0x9a, 0xd2, 0xe4, 0xee, 0xe2, 0xca, 0x19, 0x16 }}
  18. /**
  19. * An optional interface for embedding clients wishing to receive
  20. * notifications for when a tooltip should be displayed or removed.
  21. * The embedder implements this interface on the web browser chrome
  22. * object associated with the window that notifications are required
  23. * for.
  24. *
  25. * @see nsITooltipTextProvider
  26. *
  27. * @status FROZEN
  28. */
  29. class NS_NO_VTABLE NS_SCRIPTABLE nsITooltipListener : public nsISupports {
  30. public:
  31. NS_DECLARE_STATIC_IID_ACCESSOR(NS_ITOOLTIPLISTENER_IID)
  32. /**
  33. * Called when a tooltip should be displayed.
  34. *
  35. * @param aXCoords The tooltip left edge X coordinate.
  36. * @param aYCoords The tooltip top edge Y coordinate.
  37. * @param aTipText The text to display in the tooltip, typically obtained
  38. * from the TITLE attribute of the node (or containing parent)
  39. * over which the pointer has been positioned.
  40. *
  41. * @note
  42. * Coordinates are specified in pixels, relative to the top-left
  43. * corner of the browser area.
  44. *
  45. * @return <code>NS_OK</code> if the tooltip was displayed.
  46. */
  47. /* void onShowTooltip (in long aXCoords, in long aYCoords, in wstring aTipText); */
  48. NS_SCRIPTABLE NS_IMETHOD OnShowTooltip(PRInt32 aXCoords, PRInt32 aYCoords, const PRUnichar *aTipText) = 0;
  49. /**
  50. * Called when the tooltip should be hidden, either because the pointer
  51. * has moved or the tooltip has timed out.
  52. */
  53. /* void onHideTooltip (); */
  54. NS_SCRIPTABLE NS_IMETHOD OnHideTooltip(void) = 0;
  55. };
  56. NS_DEFINE_STATIC_IID_ACCESSOR(nsITooltipListener, NS_ITOOLTIPLISTENER_IID)
  57. /* Use this macro when declaring classes that implement this interface. */
  58. #define NS_DECL_NSITOOLTIPLISTENER \
  59. NS_SCRIPTABLE NS_IMETHOD OnShowTooltip(PRInt32 aXCoords, PRInt32 aYCoords, const PRUnichar *aTipText); \
  60. NS_SCRIPTABLE NS_IMETHOD OnHideTooltip(void);
  61. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  62. #define NS_FORWARD_NSITOOLTIPLISTENER(_to) \
  63. NS_SCRIPTABLE NS_IMETHOD OnShowTooltip(PRInt32 aXCoords, PRInt32 aYCoords, const PRUnichar *aTipText) { return _to OnShowTooltip(aXCoords, aYCoords, aTipText); } \
  64. NS_SCRIPTABLE NS_IMETHOD OnHideTooltip(void) { return _to OnHideTooltip(); }
  65. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  66. #define NS_FORWARD_SAFE_NSITOOLTIPLISTENER(_to) \
  67. NS_SCRIPTABLE NS_IMETHOD OnShowTooltip(PRInt32 aXCoords, PRInt32 aYCoords, const PRUnichar *aTipText) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnShowTooltip(aXCoords, aYCoords, aTipText); } \
  68. NS_SCRIPTABLE NS_IMETHOD OnHideTooltip(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnHideTooltip(); }
  69. #if 0
  70. /* Use the code below as a template for the implementation class for this interface. */
  71. /* Header file */
  72. class nsTooltipListener : public nsITooltipListener
  73. {
  74. public:
  75. NS_DECL_ISUPPORTS
  76. NS_DECL_NSITOOLTIPLISTENER
  77. nsTooltipListener();
  78. private:
  79. ~nsTooltipListener();
  80. protected:
  81. /* additional members */
  82. };
  83. /* Implementation file */
  84. NS_IMPL_ISUPPORTS1(nsTooltipListener, nsITooltipListener)
  85. nsTooltipListener::nsTooltipListener()
  86. {
  87. /* member initializers and constructor code */
  88. }
  89. nsTooltipListener::~nsTooltipListener()
  90. {
  91. /* destructor code */
  92. }
  93. /* void onShowTooltip (in long aXCoords, in long aYCoords, in wstring aTipText); */
  94. NS_IMETHODIMP nsTooltipListener::OnShowTooltip(PRInt32 aXCoords, PRInt32 aYCoords, const PRUnichar *aTipText)
  95. {
  96. return NS_ERROR_NOT_IMPLEMENTED;
  97. }
  98. /* void onHideTooltip (); */
  99. NS_IMETHODIMP nsTooltipListener::OnHideTooltip()
  100. {
  101. return NS_ERROR_NOT_IMPLEMENTED;
  102. }
  103. /* End of implementation class template. */
  104. #endif
  105. #endif /* __gen_nsITooltipListener_h__ */