diff -r ac7e4d1d9209 -r ebd48d2de13c textinput/peninputarc/src/peninputlayoutcontrol/peninputuilayout.cpp --- a/textinput/peninputarc/src/peninputlayoutcontrol/peninputuilayout.cpp Thu Aug 19 10:15:25 2010 +0300 +++ b/textinput/peninputarc/src/peninputlayoutcontrol/peninputuilayout.cpp Tue Aug 31 15:31:50 2010 +0300 @@ -28,8 +28,6 @@ #include #include #include -#include -#include #ifdef RD_TACTILE_FEEDBACK #include @@ -52,6 +50,9 @@ GetDefaultScreenSizeAndRotation(ptSize); //set the screen size in case any one need use it. iScreenSize = ptSize.iPixelSize; +#ifdef RD_TACTILE_FEEDBACK + iTactileSupported = EFalse; +#endif // RD_TACTILE_FEEDBACK } // --------------------------------------------------------------------------- @@ -65,8 +66,7 @@ //remove all registered area SignalOwner(ESignalDeRegisterAllFeedbackArea); #endif // RD_TACTILE_FEEDBACK - delete iRootCtrl; - delete iExtension; + delete iRootCtrl; } // --------------------------------------------------------------------------- @@ -77,14 +77,7 @@ EXPORT_C void CFepUiLayout::BaseConstructL() { iRootCtrl = CFepUiLayoutRootCtrl::NewL(this); - __ASSERT_DEBUG(iLayoutOwner,User::Leave(EUiLayoutNotReady)); - iExtension = new(ELeave) CFepUiLayoutExt; -#ifdef RD_TACTILE_FEEDBACK - iExtension->iTactileSupported = EFalse; -#endif // RD_TACTILE_FEEDBACK - iExtension->iSkinInstance = AknsUtils::SkinInstance(); - iExtension->iTouchFeedbackInstance = MTouchFeedback::Instance(); - iExtension->iDisableDrawing = EFalse; + __ASSERT_DEBUG(iLayoutOwner,User::Leave(EUiLayoutNotReady)); } // --------------------------------------------------------------------------- @@ -176,24 +169,6 @@ TRAP_IGNORE(SendEditorTextAndCursorPosL(aData)); } break; - case ECmdPeninputEnableOwnBitmap: - { - SetSelfBmpDeviceFlag(*(reinterpret_cast(aData))); - OnResourceChange(KPenInputOwnDeviceChange); - } - break; - case ECmdPeninputDisableLayoutDrawing: - { - DisableLayoutDrawing(*(reinterpret_cast(aData))); - } - break; - case ECmdPeninputEnalbeLayoutReDrawWhenActive: - { - TBool enableLayoutRedraw = ETrue; - TPtrC data(reinterpret_cast(&enableLayoutRedraw),sizeof(TBool)/2); - SignalOwner(ESignalEnableLayoutRedrawWhenActive,data); - } - break; default: { ret = -1; @@ -473,7 +448,7 @@ iLayoutReady = ETrue; iRootCtrl->OnActivate(); #ifdef RD_TACTILE_FEEDBACK - iExtension->iTactileSupported = FeatureManager::FeatureSupported( KFeatureIdTactileFeedback ); + iTactileSupported = FeatureManager::FeatureSupported( KFeatureIdTactileFeedback ); #endif // RD_TACTILE_FEEDBACK } @@ -487,9 +462,6 @@ { iLayoutReady = EFalse; iRootCtrl->OnDeActivate(); - TBool enableLayoutRedraw = ETrue; - TPtrC data(reinterpret_cast(&enableLayoutRedraw),sizeof(TBool)/2); - SignalOwner(ESignalEnableLayoutRedrawWhenActive,data); } // --------------------------------------------------------------------------- // CFepUiLayout::SetLayoutPos @@ -594,8 +566,6 @@ const TRect& aRect,TBool aUpdateFlag,TBool aImmedFlag) { //do nothing if it's locked and aCtrl is not the owner. - if(!iLayoutReady || iExtension->iDisableDrawing) - return; TBool bUpdate = ETrue; if(!iLockedArea.IsEmpty() ) { @@ -821,7 +791,7 @@ { TBool tactileSupported; #ifdef RD_TACTILE_FEEDBACK - tactileSupported = iExtension->iTactileSupported; + tactileSupported = iTactileSupported; #endif // RD_TACTILE_FEEDBACK return tactileSupported; } @@ -834,7 +804,7 @@ EXPORT_C void CFepUiLayout::DoTactileFeedback(TInt aType) { #ifdef RD_TACTILE_FEEDBACK - iExtension->iTouchFeedbackInstance->InstantFeedback((TTouchLogicalFeedback)aType); + MTouchFeedback::Instance()->InstantFeedback((TTouchLogicalFeedback)aType); #endif // RD_TACTILE_FEEDBACK } @@ -848,16 +818,16 @@ #ifdef RD_TACTILE_FEEDBACK if (aAudioEnable && aVibraEnable) { - iExtension->iTouchFeedbackInstance->InstantFeedback((TTouchLogicalFeedback)aType); + MTouchFeedback::Instance()->InstantFeedback((TTouchLogicalFeedback)aType); } else { - TBool vibraEnabled = iExtension->iTouchFeedbackInstance->FeedbackEnabledForThisApp( ETouchFeedbackVibra ); - TBool audioEnabled = iExtension->iTouchFeedbackInstance->FeedbackEnabledForThisApp( ETouchFeedbackAudio ); + TBool vibraEnabled = MTouchFeedback::Instance()->FeedbackEnabledForThisApp( ETouchFeedbackVibra ); + TBool audioEnabled = MTouchFeedback::Instance()->FeedbackEnabledForThisApp( ETouchFeedbackAudio ); - iExtension->iTouchFeedbackInstance->SetFeedbackEnabledForThisApp(aVibraEnable, aAudioEnable); - iExtension->iTouchFeedbackInstance->InstantFeedback((TTouchLogicalFeedback)aType); - iExtension->iTouchFeedbackInstance->SetFeedbackEnabledForThisApp(vibraEnabled, audioEnabled); + MTouchFeedback::Instance()->SetFeedbackEnabledForThisApp(aVibraEnable, aAudioEnable); + MTouchFeedback::Instance()->InstantFeedback((TTouchLogicalFeedback)aType); + MTouchFeedback::Instance()->SetFeedbackEnabledForThisApp(vibraEnabled, audioEnabled); } #endif // RD_TACTILE_FEEDBACK } @@ -900,27 +870,4 @@ { return iRootCtrl->CreateCursor(); } - -EXPORT_C TBool CFepUiLayout::NotDrawToLayoutDevice() - { - return iExtension->iSelfBmpDeviceFlag; - } - -void CFepUiLayout::SetSelfBmpDeviceFlag(TBool aFlag) - { - iExtension->iSelfBmpDeviceFlag = aFlag; - } - - -EXPORT_C void CFepUiLayout::DisableLayoutDrawing(TBool aFlag) - { - if(iExtension->iDisableDrawing == aFlag) - return; - iExtension->iDisableDrawing = aFlag; - TPtrC ptr; - ptr.Set(reinterpret_cast(&aFlag),sizeof(aFlag)/sizeof(TUint16)); - - SignalOwner(ESignalDisableUpdating,ptr); - } - //end of file