browserplugins/browseraudiovideoplugin/src/BavpView.cpp
changeset 37 481242ead638
parent 32 92a061761a7b
--- a/browserplugins/browseraudiovideoplugin/src/BavpView.cpp	Mon Jan 18 20:22:00 2010 +0200
+++ b/browserplugins/browseraudiovideoplugin/src/BavpView.cpp	Tue Feb 02 00:12:41 2010 +0200
@@ -19,6 +19,7 @@
 
 
 // INCLUDE FILES
+#include <browser_platform_variant.hrh>
 #include <AknUtils.h>
 #include <aknclearer.h>
 #include <AknBitmapAnimation.h>
@@ -58,6 +59,14 @@
     iBavPlugin = aBavPlugin;
     
 	CreateWindowL(aParent);
+#ifdef BRDO_MULTITOUCH_ENABLED_FF
+    if (AknLayoutUtils::PenEnabled()) {
+        DrawableWindow()->SetPointerGrab(ETrue);
+        EnableDragEvents();
+    }
+	//To enable advance pointer info for multi-touch
+   	Window().EnableAdvancedPointers();
+#endif 
 	ActivateL(); // Draws icon
 	iRect = aRect;
 	CCoeControl::SetRect( aRect ); // Calls SizeChanged
@@ -757,18 +766,31 @@
      * 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));
+#ifdef BRDO_MULTITOUCH_ENABLED_FF
+    if (aPointerEvent.IsAdvancedPointerEvent()) {
+        TAdvancedPointerEvent tadvp = *(static_cast<const TAdvancedPointerEvent *>(&aPointerEvent));
+        tadvp.iPosition = point;
+        if(funcs && funcs->setvalue) {
+            (funcs->setvalue)(iBavPlugin->getNPP(), 
+                                (NPPVariable) NPPVPluginPointerEvent,
+                                (void*) &(tadvp));
         }
+
+    }
+    else {
+#endif 	
+        TPointerEvent event(aPointerEvent);
+        event.iPosition = point;
+        if(funcs && funcs->setvalue) {
+            (funcs->setvalue)(iBavPlugin->getNPP(), 
+                                (NPPVariable) NPPVPluginPointerEvent,
+                                (void*) &(event));
+      }
+#ifdef BRDO_MULTITOUCH_ENABLED_FF	  
+    }
+#endif 	
+ 
     }
 
 //  End of File