1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/docshell/base/nsIScrollable.idl Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,55 @@ 1.4 +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- 1.5 + * vim: set ts=2 sw=2 et tw=78: 1.6 + * 1.7 + * This Source Code Form is subject to the terms of the Mozilla Public 1.8 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.9 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.10 + 1.11 +#include "nsISupports.idl" 1.12 + 1.13 +/** 1.14 + * The nsIScrollable is an interface that can be implemented by a control that 1.15 + * supports scrolling. This is a generic interface without concern for the 1.16 + * type of content that may be inside. 1.17 + */ 1.18 +[scriptable, uuid(3507fc93-313e-4a4c-8ca8-4d0ea0f97315)] 1.19 +interface nsIScrollable : nsISupports 1.20 +{ 1.21 + /** 1.22 + * Constants declaring the two scroll orientations a scrollbar can be in. 1.23 + * ScrollOrientation_X - Horizontal scrolling. When passing this 1.24 + * in to a method you are requesting or setting data for the 1.25 + * horizontal scrollbar. 1.26 + * ScrollOrientation_Y - Vertical scrolling. When passing this 1.27 + * in to a method you are requesting or setting data for the 1.28 + * vertical scrollbar. 1.29 + */ 1.30 + const long ScrollOrientation_X = 1; 1.31 + const long ScrollOrientation_Y = 2; 1.32 + 1.33 + /** 1.34 + * Constants declaring the states of the scrollbars. 1.35 + * ScrollPref_Auto - bars visible only when needed. 1.36 + * ScrollPref_Never - bars never visible, even when scrolling still possible. 1.37 + * ScrollPref_Always - bars always visible, even when scrolling is not possible 1.38 + */ 1.39 + const long Scrollbar_Auto = 1; 1.40 + const long Scrollbar_Never = 2; 1.41 + const long Scrollbar_Always = 3; 1.42 + 1.43 + /** 1.44 + * Get or set the default scrollbar state for all documents in 1.45 + * this shell. 1.46 + */ 1.47 + long getDefaultScrollbarPreferences(in long scrollOrientation); 1.48 + void setDefaultScrollbarPreferences(in long scrollOrientation, 1.49 + in long scrollbarPref); 1.50 + 1.51 + /** 1.52 + * Get information about whether the vertical and horizontal scrollbars are 1.53 + * currently visible. If you are only interested in one of the visibility 1.54 + * settings pass nullptr in for the one you aren't interested in. 1.55 + */ 1.56 + void getScrollbarVisibility(out boolean verticalVisible, 1.57 + out boolean horizontalVisible); 1.58 +};