diff -r 57d5b8e231c4 -r e45c3f40ea5f browserplugins/browseraudiovideoplugin/src/BavpView.cpp --- a/browserplugins/browseraudiovideoplugin/src/BavpView.cpp Fri May 08 08:18:43 2009 +0300 +++ b/browserplugins/browseraudiovideoplugin/src/BavpView.cpp Fri Jul 03 15:46:41 2009 +0100 @@ -32,6 +32,7 @@ #include "BavpView.h" #include "BrCtlDefs.h" #include "BavpController.h" +#include "BavpPlugin.h" // ============================ MEMBER FUNCTIONS =============================== @@ -225,7 +226,7 @@ if ( iBavpController ) { iRect = Rect(); - iBavpController->RefreshRectCoordinates(); + iBavpController->RefreshRectCoordinatesL(); } } @@ -742,4 +743,30 @@ } + +void CBavpView::HandlePointerEventL(const TPointerEvent &aPointerEvent) + { + /* + * Plugin is sending all pointer events to the browser. + * Browser will process them to gesture and return back using + * event() function. (see PluginWin::HandleGesture(), BavpEvent() and + * CBavpPlugin::HandleGesture(). + * Browser expects event position to be in absolute co-ordinates, + * so we convert position of the pointer event here. + */ + TPoint point(aPointerEvent.iPosition + PositionRelativeToScreen()); + TPointerEvent tmpEvent(aPointerEvent); + tmpEvent.iPosition = point; + + NPNetscapeFuncs* funcs = iBavPlugin->getNPNFuncs(); + + + if(funcs && funcs->setvalue) + { + (funcs->setvalue)(iBavPlugin->getNPP(), + (NPPVariable) NPPVPluginPointerEvent, + (void*) &(tmpEvent)); + } + } + // End of File