Bumping gaia.json for 2 gaia revision(s) a=gaia-bump
[gecko.git] / docshell / base / nsIScrollable.idl
blob931469528d6962c52ae3d7c3858f2376e1911939
1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2 * vim: set ts=2 sw=2 et tw=78:
4 * This Source Code Form is subject to the terms of the Mozilla Public
5 * License, v. 2.0. If a copy of the MPL was not distributed with this
6 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
8 #include "nsISupports.idl"
10 /**
11 * The nsIScrollable is an interface that can be implemented by a control that
12 * supports scrolling. This is a generic interface without concern for the
13 * type of content that may be inside.
15 [scriptable, uuid(3507fc93-313e-4a4c-8ca8-4d0ea0f97315)]
16 interface nsIScrollable : nsISupports
18 /**
19 * Constants declaring the two scroll orientations a scrollbar can be in.
20 * ScrollOrientation_X - Horizontal scrolling. When passing this
21 * in to a method you are requesting or setting data for the
22 * horizontal scrollbar.
23 * ScrollOrientation_Y - Vertical scrolling. When passing this
24 * in to a method you are requesting or setting data for the
25 * vertical scrollbar.
27 const long ScrollOrientation_X = 1;
28 const long ScrollOrientation_Y = 2;
30 /**
31 * Constants declaring the states of the scrollbars.
32 * ScrollPref_Auto - bars visible only when needed.
33 * ScrollPref_Never - bars never visible, even when scrolling still possible.
34 * ScrollPref_Always - bars always visible, even when scrolling is not possible
36 const long Scrollbar_Auto = 1;
37 const long Scrollbar_Never = 2;
38 const long Scrollbar_Always = 3;
40 /**
41 * Get or set the default scrollbar state for all documents in
42 * this shell.
44 long getDefaultScrollbarPreferences(in long scrollOrientation);
45 void setDefaultScrollbarPreferences(in long scrollOrientation,
46 in long scrollbarPref);
48 /**
49 * Get information about whether the vertical and horizontal scrollbars are
50 * currently visible. If you are only interested in one of the visibility
51 * settings pass nullptr in for the one you aren't interested in.
53 void getScrollbarVisibility(out boolean verticalVisible,
54 out boolean horizontalVisible);