layout/xul/nsIScrollBoxObject.idl

Thu, 15 Jan 2015 21:03:48 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 21:03:48 +0100
branch
TOR_BUG_9701
changeset 11
deefc01c0e14
permissions
-rw-r--r--

Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)

michael@0 1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
michael@0 2 /* This Source Code Form is subject to the terms of the Mozilla Public
michael@0 3 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 5
michael@0 6 #include "nsISupports.idl"
michael@0 7
michael@0 8 interface nsIDOMElement;
michael@0 9
michael@0 10
michael@0 11 [scriptable, uuid(56E2ADA8-4631-11d4-BA11-001083023C1E)]
michael@0 12 interface nsIScrollBoxObject : nsISupports
michael@0 13 {
michael@0 14 /**
michael@0 15 * Scroll to the given coordinates, in css pixels.
michael@0 16 * (0,0) will put the top left corner of the scrolled element's padding-box
michael@0 17 * at the top left corner of the scrollport (which is its inner-border-box).
michael@0 18 * Values will be clamped to legal values.
michael@0 19 */
michael@0 20 void scrollTo(in long x, in long y);
michael@0 21
michael@0 22 /**
michael@0 23 * Scroll the given amount of device pixels to the right and down.
michael@0 24 * Values will be clamped to make the resuling position legal.
michael@0 25 */
michael@0 26 void scrollBy(in long dx, in long dy);
michael@0 27
michael@0 28 void scrollByLine(in long dlines);
michael@0 29 void scrollByIndex(in long dindexes);
michael@0 30 void scrollToLine(in long line);
michael@0 31 void scrollToElement(in nsIDOMElement child);
michael@0 32 void scrollToIndex(in long index);
michael@0 33
michael@0 34 /**
michael@0 35 * Get the current scroll position in css pixels.
michael@0 36 * @see scrollTo for the definition of x and y.
michael@0 37 */
michael@0 38 void getPosition(out long x, out long y);
michael@0 39
michael@0 40 void getScrolledSize(out long width, out long height);
michael@0 41 void ensureElementIsVisible(in nsIDOMElement child);
michael@0 42 void ensureIndexIsVisible(in long index);
michael@0 43 void ensureLineIsVisible(in long line);
michael@0 44 };
michael@0 45
michael@0 46 %{C++
michael@0 47 class nsIBoxObject;
michael@0 48
michael@0 49 nsresult
michael@0 50 NS_NewScrollBoxObject(nsIBoxObject** aResult);
michael@0 51
michael@0 52 %}

mercurial