Wed, 31 Dec 2014 07:16:47 +0100
Revert simplistic fix pending revisit of Mozilla integration attempt.
michael@0 | 1 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 4 | |
michael@0 | 5 | package org.mozilla.gecko; |
michael@0 | 6 | |
michael@0 | 7 | import android.app.Activity; |
michael@0 | 8 | |
michael@0 | 9 | public interface Driver { |
michael@0 | 10 | /** |
michael@0 | 11 | * Find the first Element using the given method. |
michael@0 | 12 | * |
michael@0 | 13 | * @param activity The activity the element belongs to |
michael@0 | 14 | * @param id The resource id of the element |
michael@0 | 15 | * @return The first matching element on the current context, or null if not found. |
michael@0 | 16 | */ |
michael@0 | 17 | Element findElement(Activity activity, int id); |
michael@0 | 18 | |
michael@0 | 19 | /** |
michael@0 | 20 | * Sets up scroll handling so that data is received from the extension. |
michael@0 | 21 | */ |
michael@0 | 22 | void setupScrollHandling(); |
michael@0 | 23 | |
michael@0 | 24 | int getPageHeight(); |
michael@0 | 25 | int getScrollHeight(); |
michael@0 | 26 | int getHeight(); |
michael@0 | 27 | int getGeckoTop(); |
michael@0 | 28 | int getGeckoLeft(); |
michael@0 | 29 | int getGeckoWidth(); |
michael@0 | 30 | int getGeckoHeight(); |
michael@0 | 31 | |
michael@0 | 32 | void startFrameRecording(); |
michael@0 | 33 | int stopFrameRecording(); |
michael@0 | 34 | |
michael@0 | 35 | void startCheckerboardRecording(); |
michael@0 | 36 | float stopCheckerboardRecording(); |
michael@0 | 37 | |
michael@0 | 38 | /** |
michael@0 | 39 | * Get a copy of the painted content region. |
michael@0 | 40 | * @return A 2-D array of pixels (indexed by y, then x). The pixels |
michael@0 | 41 | * are in ARGB-8888 format. |
michael@0 | 42 | */ |
michael@0 | 43 | PaintedSurface getPaintedSurface(); |
michael@0 | 44 | } |