layout/xul/nsIScrollBoxObject.idl

Wed, 31 Dec 2014 07:16:47 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 07:16:47 +0100
branch
TOR_BUG_9701
changeset 3
141e0f1194b1
permissions
-rw-r--r--

Revert simplistic fix pending revisit of Mozilla integration attempt.

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

mercurial