Line data Source code
1 : /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 : /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 : /* This Source Code Form is subject to the terms of the Mozilla Public
4 : * License, v. 2.0. If a copy of the MPL was not distributed with this
5 : * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 :
7 : #ifndef nsIScrollObserver_h___
8 : #define nsIScrollObserver_h___
9 :
10 : #include "nsISupports.h"
11 : #include "Units.h"
12 :
13 : #define NS_ISCROLLOBSERVER_IID \
14 : { 0xaa5026eb, 0x2f88, 0x4026, \
15 : { 0xa4, 0x6b, 0xf4, 0x59, 0x6b, 0x4e, 0xdf, 0x00 } }
16 :
17 0 : class nsIScrollObserver : public nsISupports
18 : {
19 : public:
20 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_ISCROLLOBSERVER_IID)
21 :
22 : /**
23 : * Called when the scroll position of some element has changed.
24 : */
25 : virtual void ScrollPositionChanged() = 0;
26 :
27 : /**
28 : * Called when an async panning/zooming transform has started being applied
29 : * and passed the scroll offset
30 : */
31 0 : virtual void AsyncPanZoomStarted() {};
32 :
33 : /**
34 : * Called when an async panning/zooming transform is no longer applied
35 : * and passed the scroll offset
36 : */
37 0 : virtual void AsyncPanZoomStopped() {};
38 : };
39 :
40 : NS_DEFINE_STATIC_IID_ACCESSOR(nsIScrollObserver, NS_ISCROLLOBSERVER_IID)
41 :
42 : #endif /* nsIScrollObserver_h___ */
|