layout/xul/nsIScrollBoxObject.idl

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/layout/xul/nsIScrollBoxObject.idl	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,52 @@
     1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.8 +
     1.9 +#include "nsISupports.idl"
    1.10 +
    1.11 +interface nsIDOMElement;
    1.12 +
    1.13 +
    1.14 +[scriptable, uuid(56E2ADA8-4631-11d4-BA11-001083023C1E)]
    1.15 +interface nsIScrollBoxObject : nsISupports
    1.16 +{
    1.17 +  /**
    1.18 +   * Scroll to the given coordinates, in css pixels.
    1.19 +   * (0,0) will put the top left corner of the scrolled element's padding-box
    1.20 +   * at the top left corner of the scrollport (which is its inner-border-box).
    1.21 +   * Values will be clamped to legal values.
    1.22 +   */
    1.23 +  void scrollTo(in long x, in long y);
    1.24 +
    1.25 +  /**
    1.26 +   * Scroll the given amount of device pixels to the right and down.
    1.27 +   * Values will be clamped to make the resuling position legal.
    1.28 +   */
    1.29 +  void scrollBy(in long dx, in long dy);
    1.30 +
    1.31 +  void scrollByLine(in long dlines);
    1.32 +  void scrollByIndex(in long dindexes);
    1.33 +  void scrollToLine(in long line);
    1.34 +  void scrollToElement(in nsIDOMElement child);
    1.35 +  void scrollToIndex(in long index);
    1.36 +
    1.37 +  /**
    1.38 +   * Get the current scroll position in css pixels.
    1.39 +   * @see scrollTo for the definition of x and y.
    1.40 +   */
    1.41 +  void getPosition(out long x, out long y);
    1.42 +
    1.43 +  void getScrolledSize(out long width, out long height);
    1.44 +  void ensureElementIsVisible(in nsIDOMElement child);
    1.45 +  void ensureIndexIsVisible(in long index);
    1.46 +  void ensureLineIsVisible(in long line);
    1.47 +};
    1.48 +
    1.49 +%{C++
    1.50 +class nsIBoxObject;
    1.51 +
    1.52 +nsresult
    1.53 +NS_NewScrollBoxObject(nsIBoxObject** aResult);
    1.54 +
    1.55 +%}

mercurial