Class GeckoSession.ScrollPositionUpdate

Object
org.mozilla.geckoview.GeckoSession.ScrollPositionUpdate
Enclosing class:
GeckoSession

public class GeckoSession.ScrollPositionUpdate extends Object
Information about an update to the content's scroll position.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static @interface 
    Valid source types for scroll position updates.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final float
    The new horizontal scroll position in CSS pixels.
    final float
    The new vertical scroll position in CSS pixels.
    final int
    The source of the scroll position change.
    static final int
    The scroll position changed progammatically.
    static final int
    The scroll position changed as a direct result of user interaction.
    final float
    The new zoom level.
  • Constructor Summary

    Constructors
    Constructor
    Description
    ScrollPositionUpdate(float scrollX, float scrollY, float zoom, int source)
    Construct a new, immutable ScrollPositionUpdate.
  • Method Summary

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • SOURCE_USER_INTERACTION

      public static final int SOURCE_USER_INTERACTION
      The scroll position changed as a direct result of user interaction.
      See Also:
    • SOURCE_OTHER

      public static final int SOURCE_OTHER
      The scroll position changed progammatically. This can include changes caused by script on the page, and changes caused by the browser engine such as scrolling an element into view.
      See Also:
    • scrollX

      public final float scrollX
      The new horizontal scroll position in CSS pixels.
    • scrollY

      public final float scrollY
      The new vertical scroll position in CSS pixels.
    • zoom

      public final float zoom
      The new zoom level. This is used to relate scrollX and scrollY, which are in CSS pixels, to quantities in screen pixels. Multiply scrollX/scrollY by zoom to get screen pixels.
    • source

      public final int source
      The source of the scroll position change. One of SOURCE_USER_INTERACTION or SOURCE_OTHER.
  • Constructor Details

    • ScrollPositionUpdate

      public ScrollPositionUpdate(float scrollX, float scrollY, float zoom, int source)
      Construct a new, immutable ScrollPositionUpdate.
      Parameters:
      scrollX - The new horizontal scroll position in CSS pixels.
      scrollY - The new vertical scroll position in CSS pixels.
      zoom - The new zoom level.
      source - The source of the scroll position change, one of SOURCE_USER_INTERACTION or SOURCE_OTHER.