nsIScrollObserver.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /* -*- Mode: C++; tab-width: 8; 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. #ifndef nsIScrollObserver_h___
  6. #define nsIScrollObserver_h___
  7. #include "nsISupports.h"
  8. #include "Units.h"
  9. #define NS_ISCROLLOBSERVER_IID \
  10. { 0xaa5026eb, 0x2f88, 0x4026, \
  11. { 0xa4, 0x6b, 0xf4, 0x59, 0x6b, 0x4e, 0xdf, 0x00 } }
  12. class nsIScrollObserver : public nsISupports
  13. {
  14. public:
  15. NS_DECLARE_STATIC_IID_ACCESSOR(NS_ISCROLLOBSERVER_IID)
  16. /**
  17. * Called when the scroll position of some element has changed.
  18. */
  19. virtual void ScrollPositionChanged() = 0;
  20. /**
  21. * Called when an async panning/zooming transform has started being applied
  22. * and passed the scroll offset
  23. */
  24. virtual void AsyncPanZoomStarted() {};
  25. /**
  26. * Called when an async panning/zooming transform is no longer applied
  27. * and passed the scroll offset
  28. */
  29. virtual void AsyncPanZoomStopped() {};
  30. };
  31. NS_DEFINE_STATIC_IID_ACCESSOR(nsIScrollObserver, NS_ISCROLLOBSERVER_IID)
  32. #endif /* nsIScrollObserver_h___ */