am 670c7974: Merge "Add basic test for retrieving the plugin\'s visible rect." into honeycomb
* commit '670c7974a6b76272a01d30a9fbe1e6336b62d472': Add basic test for retrieving the plugin's visible rect.
This commit is contained in:
@@ -34,7 +34,7 @@ extern ANPCanvasInterfaceV0 gCanvasI;
|
|||||||
extern ANPPaintInterfaceV0 gPaintI;
|
extern ANPPaintInterfaceV0 gPaintI;
|
||||||
extern ANPPathInterfaceV0 gPathI;
|
extern ANPPathInterfaceV0 gPathI;
|
||||||
extern ANPSystemInterfaceV0 gSystemI;
|
extern ANPSystemInterfaceV0 gSystemI;
|
||||||
extern ANPWindowInterfaceV0 gWindowI;
|
extern ANPWindowInterfaceV1 gWindowI;
|
||||||
|
|
||||||
static uint16_t rnd16(float x, int inset) {
|
static uint16_t rnd16(float x, int inset) {
|
||||||
int ix = (int)roundf(x) + inset;
|
int ix = (int)roundf(x) + inset;
|
||||||
@@ -119,6 +119,11 @@ void BallAnimation::showEntirePluginOnScreen() {
|
|||||||
PluginObject *obj = (PluginObject*) instance->pdata;
|
PluginObject *obj = (PluginObject*) instance->pdata;
|
||||||
NPWindow *window = obj->window;
|
NPWindow *window = obj->window;
|
||||||
|
|
||||||
|
// log the current visible rect
|
||||||
|
ANPRectI visibleRect = gWindowI.visibleRect(instance);
|
||||||
|
gLogI.log(kDebug_ANPLogType, "Current VisibleRect: (%d,%d,%d,%d)",
|
||||||
|
visibleRect.left, visibleRect.top, visibleRect.right, visibleRect.bottom);
|
||||||
|
|
||||||
ANPRectI visibleRects[1];
|
ANPRectI visibleRects[1];
|
||||||
|
|
||||||
visibleRects[0].left = 0;
|
visibleRects[0].left = 0;
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ ANPPathInterfaceV0 gPathI;
|
|||||||
ANPSurfaceInterfaceV0 gSurfaceI;
|
ANPSurfaceInterfaceV0 gSurfaceI;
|
||||||
ANPSystemInterfaceV0 gSystemI;
|
ANPSystemInterfaceV0 gSystemI;
|
||||||
ANPTypefaceInterfaceV0 gTypefaceI;
|
ANPTypefaceInterfaceV0 gTypefaceI;
|
||||||
ANPWindowInterfaceV0 gWindowI;
|
ANPWindowInterfaceV1 gWindowI;
|
||||||
ANPOpenGLInterfaceV0 gOpenGLI;
|
ANPOpenGLInterfaceV0 gOpenGLI;
|
||||||
|
|
||||||
#define ARRAY_COUNT(array) (sizeof(array) / sizeof(array[0]))
|
#define ARRAY_COUNT(array) (sizeof(array) / sizeof(array[0]))
|
||||||
@@ -125,7 +125,7 @@ NPError NP_Initialize(NPNetscapeFuncs* browserFuncs, NPPluginFuncs* pluginFuncs,
|
|||||||
{ kSurfaceInterfaceV0_ANPGetValue, sizeof(gSurfaceI), &gSurfaceI },
|
{ kSurfaceInterfaceV0_ANPGetValue, sizeof(gSurfaceI), &gSurfaceI },
|
||||||
{ kSystemInterfaceV0_ANPGetValue, sizeof(gSystemI), &gSystemI },
|
{ kSystemInterfaceV0_ANPGetValue, sizeof(gSystemI), &gSystemI },
|
||||||
{ kTypefaceInterfaceV0_ANPGetValue, sizeof(gTypefaceI), &gTypefaceI },
|
{ kTypefaceInterfaceV0_ANPGetValue, sizeof(gTypefaceI), &gTypefaceI },
|
||||||
{ kWindowInterfaceV0_ANPGetValue, sizeof(gWindowI), &gWindowI },
|
{ kWindowInterfaceV1_ANPGetValue, sizeof(gWindowI), &gWindowI },
|
||||||
{ kOpenGLInterfaceV0_ANPGetValue, sizeof(gOpenGLI), &gOpenGLI },
|
{ kOpenGLInterfaceV0_ANPGetValue, sizeof(gOpenGLI), &gOpenGLI },
|
||||||
};
|
};
|
||||||
for (size_t i = 0; i < ARRAY_COUNT(gPairs); i++) {
|
for (size_t i = 0; i < ARRAY_COUNT(gPairs); i++) {
|
||||||
|
|||||||
Reference in New Issue
Block a user