Package org.mozilla.geckoview
Class GeckoSession.ScrollPositionUpdate
Object
org.mozilla.geckoview.GeckoSession.ScrollPositionUpdate
- Enclosing class:
- GeckoSession
Information about an update to the content's scroll position.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic @interfaceValid source types for scroll position updates. -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal floatThe new horizontal scroll position in CSS pixels.final floatThe new vertical scroll position in CSS pixels.final intThe source of the scroll position change.static final intThe scroll position changed progammatically.static final intThe scroll position changed as a direct result of user interaction.final floatThe new zoom level. -
Constructor Summary
ConstructorsConstructorDescriptionScrollPositionUpdate(float scrollX, float scrollY, float zoom, int source) Construct a new, immutable ScrollPositionUpdate. -
Method Summary
-
Field Details
-
SOURCE_USER_INTERACTION
public static final int SOURCE_USER_INTERACTIONThe scroll position changed as a direct result of user interaction.- See Also:
-
SOURCE_OTHER
public static final int SOURCE_OTHERThe 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 scrollXThe new horizontal scroll position in CSS pixels. -
scrollY
public final float scrollYThe new vertical scroll position in CSS pixels. -
zoom
public final float zoomThe 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 sourceThe source of the scroll position change. One ofSOURCE_USER_INTERACTIONorSOURCE_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 ofSOURCE_USER_INTERACTIONorSOURCE_OTHER.
-