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; michael@0: michael@0: import android.app.Activity; michael@0: michael@0: public interface Driver { michael@0: /** michael@0: * Find the first Element using the given method. michael@0: * michael@0: * @param activity The activity the element belongs to michael@0: * @param id The resource id of the element michael@0: * @return The first matching element on the current context, or null if not found. michael@0: */ michael@0: Element findElement(Activity activity, int id); michael@0: michael@0: /** michael@0: * Sets up scroll handling so that data is received from the extension. michael@0: */ michael@0: void setupScrollHandling(); michael@0: michael@0: int getPageHeight(); michael@0: int getScrollHeight(); michael@0: int getHeight(); michael@0: int getGeckoTop(); michael@0: int getGeckoLeft(); michael@0: int getGeckoWidth(); michael@0: int getGeckoHeight(); michael@0: michael@0: void startFrameRecording(); michael@0: int stopFrameRecording(); michael@0: michael@0: void startCheckerboardRecording(); michael@0: float stopCheckerboardRecording(); michael@0: michael@0: /** michael@0: * Get a copy of the painted content region. michael@0: * @return A 2-D array of pixels (indexed by y, then x). The pixels michael@0: * are in ARGB-8888 format. michael@0: */ michael@0: PaintedSurface getPaintedSurface(); michael@0: }