diff options
author | Derek Sollenberger <djsollen@google.com> | 2009-06-19 15:57:24 -0400 |
---|---|---|
committer | Derek Sollenberger <djsollen@google.com> | 2009-06-22 11:50:21 -0400 |
commit | 3d709e1f628a1547fba1e4cab0c91a55f7ed7e7a (patch) | |
tree | 96c3b83b80044b32efe3a8f92dbdb413f89ebb6f /WebKit/android/plugins/android_npapi.h | |
parent | 263a3894c3719057dcbd85b9094eba072da13511 (diff) | |
download | external_webkit-3d709e1f628a1547fba1e4cab0c91a55f7ed7e7a.zip external_webkit-3d709e1f628a1547fba1e4cab0c91a55f7ed7e7a.tar.gz external_webkit-3d709e1f628a1547fba1e4cab0c91a55f7ed7e7a.tar.bz2 |
Providing plugins with scrolling ability as well as an event informing the plugin of the document's visibleRect.
Diffstat (limited to 'WebKit/android/plugins/android_npapi.h')
-rw-r--r-- | WebKit/android/plugins/android_npapi.h | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/WebKit/android/plugins/android_npapi.h b/WebKit/android/plugins/android_npapi.h index 32fa1c0..7b703c0 100644 --- a/WebKit/android/plugins/android_npapi.h +++ b/WebKit/android/plugins/android_npapi.h @@ -160,8 +160,9 @@ typedef int32_t ANPDrawingModel; and touch events will be provided to the plugin. */ enum ANPEventFlag { - kKey_ANPEventFlag = 0x01, - kTouch_ANPEventFlag = 0x02, + kKey_ANPEventFlag = 0x01, + kTouch_ANPEventFlag = 0x02, + kVisibleRect_ANPEventFlag = 0x04, }; typedef uint32_t ANPEventFlags; @@ -608,6 +609,11 @@ struct ANPWindowInterfaceV0 : ANPInterface { results. If lock returned false, unlock should not be called. */ void (*unlock)(void* window); + /** Given (x,y) coordinates in the document space the currently visible + window will be shifted so that window's upper left corner will be as + closely aligned to the coordinates as possible. + */ + void (*scrollTo)(NPP instance, int32_t x, int32_t y); }; /////////////////////////////////////////////////////////////////////////////// @@ -692,11 +698,12 @@ struct ANPAudioTrackInterfaceV0 : ANPInterface { // HandleEvent enum ANPEventTypes { - kNull_ANPEventType = 0, - kKey_ANPEventType = 1, - kTouch_ANPEventType = 2, - kDraw_ANPEventType = 3, - kLifecycle_ANPEventType = 4 + kNull_ANPEventType = 0, + kKey_ANPEventType = 1, + kTouch_ANPEventType = 2, + kDraw_ANPEventType = 3, + kLifecycle_ANPEventType = 4, + kVisibleRect_ANPEventType = 5, }; typedef int32_t ANPEventType; @@ -765,6 +772,12 @@ struct ANPEvent { ANPBitmap bitmap; } data; } draw; + struct { + int32_t x; // relative to the document + int32_t y; // relative to the document + int32_t width; + int32_t height; + } visibleRect; int32_t other[8]; } data; }; |