michael@0: /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- michael@0: * vim: set ts=2 sw=2 et tw=78: michael@0: * michael@0: * This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "nsISupports.idl" michael@0: michael@0: /** michael@0: * The nsIScrollable is an interface that can be implemented by a control that michael@0: * supports scrolling. This is a generic interface without concern for the michael@0: * type of content that may be inside. michael@0: */ michael@0: [scriptable, uuid(3507fc93-313e-4a4c-8ca8-4d0ea0f97315)] michael@0: interface nsIScrollable : nsISupports michael@0: { michael@0: /** michael@0: * Constants declaring the two scroll orientations a scrollbar can be in. michael@0: * ScrollOrientation_X - Horizontal scrolling. When passing this michael@0: * in to a method you are requesting or setting data for the michael@0: * horizontal scrollbar. michael@0: * ScrollOrientation_Y - Vertical scrolling. When passing this michael@0: * in to a method you are requesting or setting data for the michael@0: * vertical scrollbar. michael@0: */ michael@0: const long ScrollOrientation_X = 1; michael@0: const long ScrollOrientation_Y = 2; michael@0: michael@0: /** michael@0: * Constants declaring the states of the scrollbars. michael@0: * ScrollPref_Auto - bars visible only when needed. michael@0: * ScrollPref_Never - bars never visible, even when scrolling still possible. michael@0: * ScrollPref_Always - bars always visible, even when scrolling is not possible michael@0: */ michael@0: const long Scrollbar_Auto = 1; michael@0: const long Scrollbar_Never = 2; michael@0: const long Scrollbar_Always = 3; michael@0: michael@0: /** michael@0: * Get or set the default scrollbar state for all documents in michael@0: * this shell. michael@0: */ michael@0: long getDefaultScrollbarPreferences(in long scrollOrientation); michael@0: void setDefaultScrollbarPreferences(in long scrollOrientation, michael@0: in long scrollbarPref); michael@0: michael@0: /** michael@0: * Get information about whether the vertical and horizontal scrollbars are michael@0: * currently visible. If you are only interested in one of the visibility michael@0: * settings pass nullptr in for the one you aren't interested in. michael@0: */ michael@0: void getScrollbarVisibility(out boolean verticalVisible, michael@0: out boolean horizontalVisible); michael@0: };