nsITooltipTextProvider.idl 1.6 KB

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