michael@0: /* -*- Mode: Java; c-basic-offset: 4; tab-width: 20; indent-tabs-mode: nil; -*- michael@0: * This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: package org.mozilla.gecko.gfx; michael@0: michael@0: import org.mozilla.gecko.mozglue.generatorannotations.WrapEntireClassForJNI; michael@0: michael@0: /** michael@0: * This is the data structure that's returned by the progressive tile update michael@0: * callback function. It encompasses the current viewport and a boolean value michael@0: * representing whether the front-end is interested in the current progressive michael@0: * update continuing. michael@0: */ michael@0: @WrapEntireClassForJNI michael@0: public class ProgressiveUpdateData { michael@0: public float x; michael@0: public float y; michael@0: public float width; michael@0: public float height; michael@0: public float scale; michael@0: public boolean abort; michael@0: michael@0: public void setViewport(ImmutableViewportMetrics viewport) { michael@0: this.x = viewport.viewportRectLeft; michael@0: this.y = viewport.viewportRectTop; michael@0: this.width = viewport.viewportRectRight - this.x; michael@0: this.height = viewport.viewportRectBottom - this.y; michael@0: this.scale = viewport.zoomFactor; michael@0: } michael@0: } michael@0: