browserplugins/browseraudiovideoplugin/src/BavpView.cpp
changeset 37 481242ead638
parent 32 92a061761a7b
equal deleted inserted replaced
33:97c9f46387be 37:481242ead638
    17 *
    17 *
    18 */
    18 */
    19 
    19 
    20 
    20 
    21 // INCLUDE FILES
    21 // INCLUDE FILES
       
    22 #include <browser_platform_variant.hrh>
    22 #include <AknUtils.h>
    23 #include <AknUtils.h>
    23 #include <aknclearer.h>
    24 #include <aknclearer.h>
    24 #include <AknBitmapAnimation.h>
    25 #include <AknBitmapAnimation.h>
    25 #include <data_caging_path_literals.hrh>
    26 #include <data_caging_path_literals.hrh>
    26 #include <barsread.h>                       // For TResourceReader
    27 #include <barsread.h>                       // For TResourceReader
    56     {
    57     {
    57     Log( EFalse, _L("CBavpView::ConstructL") );
    58     Log( EFalse, _L("CBavpView::ConstructL") );
    58     iBavPlugin = aBavPlugin;
    59     iBavPlugin = aBavPlugin;
    59     
    60     
    60 	CreateWindowL(aParent);
    61 	CreateWindowL(aParent);
       
    62 #ifdef BRDO_MULTITOUCH_ENABLED_FF
       
    63     if (AknLayoutUtils::PenEnabled()) {
       
    64         DrawableWindow()->SetPointerGrab(ETrue);
       
    65         EnableDragEvents();
       
    66     }
       
    67 	//To enable advance pointer info for multi-touch
       
    68    	Window().EnableAdvancedPointers();
       
    69 #endif 
    61 	ActivateL(); // Draws icon
    70 	ActivateL(); // Draws icon
    62 	iRect = aRect;
    71 	iRect = aRect;
    63 	CCoeControl::SetRect( aRect ); // Calls SizeChanged
    72 	CCoeControl::SetRect( aRect ); // Calls SizeChanged
    64 
    73 
    65     User::LeaveIfError( iWsSession.Connect() );
    74     User::LeaveIfError( iWsSession.Connect() );
   755      * CBavpPlugin::HandleGesture().
   764      * CBavpPlugin::HandleGesture().
   756      * Browser expects event position to be in absolute co-ordinates,
   765      * Browser expects event position to be in absolute co-ordinates,
   757      * so we convert position of the pointer event here.
   766      * so we convert position of the pointer event here.
   758      */
   767      */
   759     TPoint point(aPointerEvent.iPosition  + PositionRelativeToScreen());
   768     TPoint point(aPointerEvent.iPosition  + PositionRelativeToScreen());
   760     TPointerEvent tmpEvent(aPointerEvent);
       
   761     tmpEvent.iPosition = point;
       
   762     
       
   763     NPNetscapeFuncs* funcs = iBavPlugin->getNPNFuncs();
   769     NPNetscapeFuncs* funcs = iBavPlugin->getNPNFuncs();
   764     
   770 #ifdef BRDO_MULTITOUCH_ENABLED_FF
   765     
   771     if (aPointerEvent.IsAdvancedPointerEvent()) {
   766     if(funcs && funcs->setvalue)
   772         TAdvancedPointerEvent tadvp = *(static_cast<const TAdvancedPointerEvent *>(&aPointerEvent));
   767         {
   773         tadvp.iPosition = point;
   768         (funcs->setvalue)(iBavPlugin->getNPP(), 
   774         if(funcs && funcs->setvalue) {
   769                             (NPPVariable) NPPVPluginPointerEvent,
   775             (funcs->setvalue)(iBavPlugin->getNPP(), 
   770                             (void*) &(tmpEvent));
   776                                 (NPPVariable) NPPVPluginPointerEvent,
   771         }
   777                                 (void*) &(tadvp));
       
   778         }
       
   779 
       
   780     }
       
   781     else {
       
   782 #endif 	
       
   783         TPointerEvent event(aPointerEvent);
       
   784         event.iPosition = point;
       
   785         if(funcs && funcs->setvalue) {
       
   786             (funcs->setvalue)(iBavPlugin->getNPP(), 
       
   787                                 (NPPVariable) NPPVPluginPointerEvent,
       
   788                                 (void*) &(event));
       
   789       }
       
   790 #ifdef BRDO_MULTITOUCH_ENABLED_FF	  
       
   791     }
       
   792 #endif 	
       
   793  
   772     }
   794     }
   773 
   795 
   774 //  End of File
   796 //  End of File