Bug 1839316: part 5) Guard the "fetchpriority" attribute behind a pref. r=kershaw...
[gecko.git] / docshell / base / nsIScrollObserver.h
blob9ff89002f0029a24b56fa4ac7a461aac03b77a05
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/. */
7 #ifndef nsIScrollObserver_h___
8 #define nsIScrollObserver_h___
10 #include "nsISupports.h"
11 #include "Units.h"
13 // Must be kept in sync with xpcom/rust/xpcom/src/interfaces/nonidl.rs
14 #define NS_ISCROLLOBSERVER_IID \
15 { \
16 0xaa5026eb, 0x2f88, 0x4026, { \
17 0xa4, 0x6b, 0xf4, 0x59, 0x6b, 0x4e, 0xdf, 0x00 \
18 } \
21 class nsIScrollObserver : public nsISupports {
22 public:
23 NS_DECLARE_STATIC_IID_ACCESSOR(NS_ISCROLLOBSERVER_IID)
25 /**
26 * Called when the scroll position of some element has changed.
28 virtual void ScrollPositionChanged() = 0;
30 /**
31 * Called when an async panning/zooming transform has started being applied
32 * and passed the scroll offset
34 MOZ_CAN_RUN_SCRIPT virtual void AsyncPanZoomStarted(){};
36 /**
37 * Called when an async panning/zooming transform is no longer applied
38 * and passed the scroll offset
40 MOZ_CAN_RUN_SCRIPT virtual void AsyncPanZoomStopped(){};
43 NS_DEFINE_STATIC_IID_ACCESSOR(nsIScrollObserver, NS_ISCROLLOBSERVER_IID)
45 #endif /* nsIScrollObserver_h___ */