36 #include <featmgr.h> |
36 #include <featmgr.h> |
37 #endif //RD_TACTILE_FEEDBACK |
37 #endif //RD_TACTILE_FEEDBACK |
38 |
38 |
39 #include <AknFepGlobalEnums.h> |
39 #include <AknFepGlobalEnums.h> |
40 #include <layoutmetadata.cdl.h> |
40 #include <layoutmetadata.cdl.h> |
41 #include "peninputtapsettingmanager.h" |
|
42 |
41 |
43 // ======== MEMBER FUNCTIONS ======== |
42 // ======== MEMBER FUNCTIONS ======== |
44 |
43 |
45 // --------------------------------------------------------------------------- |
44 // --------------------------------------------------------------------------- |
46 // CFepUiLayout::CFepUiLayout |
45 // CFepUiLayout::CFepUiLayout |
88 iExtension->iTactileSupported = EFalse; |
87 iExtension->iTactileSupported = EFalse; |
89 #endif // RD_TACTILE_FEEDBACK |
88 #endif // RD_TACTILE_FEEDBACK |
90 iExtension->iSkinInstance = AknsUtils::SkinInstance(); |
89 iExtension->iSkinInstance = AknsUtils::SkinInstance(); |
91 iExtension->iTouchFeedbackInstance = MTouchFeedback::Instance(); |
90 iExtension->iTouchFeedbackInstance = MTouchFeedback::Instance(); |
92 iExtension->iDisableDrawing = EFalse; |
91 iExtension->iDisableDrawing = EFalse; |
93 |
92 |
94 TInt inputMode = PenInputType(); |
93 TInt inputMode = PenInputType(); |
95 TBool isPortraitFSQEnabled = FeatureManager::FeatureSupported( |
94 TBool isPortraitFSQEnabled = FeatureManager::FeatureSupported( |
96 KFeatureIdFfVirtualFullscrPortraitQwertyInput ); |
95 KFeatureIdFfVirtualFullscrPortraitQwertyInput ); |
97 |
96 |
98 //detect real type of two qwerty layout |
97 //detect real type of two qwerty layout |
99 if ( inputMode == EPluginInputModeFSQ && isPortraitFSQEnabled |
98 if ( inputMode == EPluginInputModeFSQ && |
100 && !Layout_Meta_Data::IsLandscapeOrientation() ) |
99 isPortraitFSQEnabled && !Layout_Meta_Data::IsLandscapeOrientation() ) |
101 { |
100 { |
102 inputMode = EPluginInputModePortraitFSQ; |
101 inputMode = EPluginInputModePortraitFSQ; |
103 } |
102 } |
104 |
103 |
105 //load settings of tap accuracy enhancement |
104 //load settings of tap accuracy enhancement |
106 LoadTapAccuracySettingsL( inputMode ); |
105 LoadTapAccuracySettings( inputMode ); |
107 } |
106 } |
108 |
107 |
109 // --------------------------------------------------------------------------- |
108 // --------------------------------------------------------------------------- |
110 // CFepUiLayout::HandleEventL |
109 // CFepUiLayout::HandleEventL |
111 // handle event from window server |
110 // handle event from window server |
491 { |
490 { |
492 iLayoutReady = ETrue; |
491 iLayoutReady = ETrue; |
493 iRootCtrl->OnActivate(); |
492 iRootCtrl->OnActivate(); |
494 #ifdef RD_TACTILE_FEEDBACK |
493 #ifdef RD_TACTILE_FEEDBACK |
495 iExtension->iTactileSupported = FeatureManager::FeatureSupported( KFeatureIdTactileFeedback ); |
494 iExtension->iTactileSupported = FeatureManager::FeatureSupported( KFeatureIdTactileFeedback ); |
496 #endif // RD_TACTILE_FEEDBACK |
495 #endif // RD_TACTILE_FEEDBACK |
497 |
|
498 //update pointer event suppressor |
|
499 if ( FeatureManager::FeatureSupported( KFeatureIdFfCapacitiveDisplay ) ) |
|
500 { |
|
501 TPointerEventSuppressorParameters parameters; |
|
502 parameters.iMoveEventMaxMovement = iExtension->iPointerMoveSuppressMaxMovement; |
|
503 parameters.iMoveEventTimeout = iExtension->iPointerMoveSuppressTimeout; |
|
504 parameters.iUpEventMaxMovement = iExtension->iPointerUpSuppressMaxMovement; |
|
505 parameters.iUpEventTimeout = iExtension->iPointerUpSuppressTimeout; |
|
506 |
|
507 TPtrC data( reinterpret_cast<TUint16*>(¶meters), |
|
508 sizeof(TPointerEventSuppressorParameters) / 2 ); |
|
509 |
|
510 SignalOwner( ESignalUpdatePointerSuppressor, data ); |
|
511 } |
|
512 } |
496 } |
513 |
497 |
514 // --------------------------------------------------------------------------- |
498 // --------------------------------------------------------------------------- |
515 // CFepUiLayout::OnDeActivate |
499 // CFepUiLayout::OnDeActivate |
516 // Response to layout de-activation |
500 // Response to layout de-activation |
977 |
961 |
978 // --------------------------------------------------------------------------- |
962 // --------------------------------------------------------------------------- |
979 // Load tap accuracy enhancement settings according to the specified input mode. |
963 // Load tap accuracy enhancement settings according to the specified input mode. |
980 // --------------------------------------------------------------------------- |
964 // --------------------------------------------------------------------------- |
981 // |
965 // |
982 void CFepUiLayout::LoadTapAccuracySettingsL( TInt alayoutType ) |
966 void CFepUiLayout::LoadTapAccuracySettings( TInt aInputMode ) |
983 { |
967 { |
984 CPeninputTapSettingManager* manager = CPeninputTapSettingManager::NewL(); |
968 //config tap accuracy enhancement with the parameters provided by UE. |
985 |
969 //hard code is used here to minimize code changes |
986 manager->Load( alayoutType ); |
970 if ( aInputMode == EPluginInputModeFSQ ) |
987 manager->GetPointerMoveSuppressor( iExtension->iPointerMoveSuppressMaxMovement, |
971 { |
988 iExtension->iPointerMoveSuppressTimeout ); |
972 iExtension->iKeyExtResponseMargins.iTop = 20; |
989 |
973 iExtension->iKeyExtResponseMargins.iLeft = 20; |
990 manager->GetPointerUpSuppressor( iExtension->iPointerUpSuppressMaxMovement, |
974 iExtension->iKeyExtResponseMargins.iBottom = 20; |
991 iExtension->iPointerUpSuppressTimeout ); |
975 iExtension->iKeyExtResponseMargins.iRight = 20; |
992 |
976 |
993 manager->GetKeyExtResponseArea( iExtension->iKeyExtResponseMargins ); |
977 iExtension->iButtonExtResponseMargins.iTop = 20; |
994 manager->GetButtonExtResponseArea( iExtension->iButtonExtResponseMargins ); |
978 iExtension->iButtonExtResponseMargins.iLeft = 20; |
995 |
979 iExtension->iButtonExtResponseMargins.iBottom = 20; |
996 delete manager; |
980 iExtension->iButtonExtResponseMargins.iRight = 20; |
|
981 } |
|
982 else if ( aInputMode == EPluginInputModePortraitFSQ ) |
|
983 { |
|
984 iExtension->iKeyExtResponseMargins.iTop = 11; |
|
985 iExtension->iKeyExtResponseMargins.iLeft = 11; |
|
986 iExtension->iKeyExtResponseMargins.iBottom = 11; |
|
987 iExtension->iKeyExtResponseMargins.iRight = 11; |
|
988 |
|
989 iExtension->iButtonExtResponseMargins.iTop = 11; |
|
990 iExtension->iButtonExtResponseMargins.iLeft = 11; |
|
991 iExtension->iButtonExtResponseMargins.iBottom = 11; |
|
992 iExtension->iButtonExtResponseMargins.iRight = 11; |
|
993 } |
|
994 else |
|
995 { |
|
996 iExtension->iKeyExtResponseMargins.iTop = 10; |
|
997 iExtension->iKeyExtResponseMargins.iLeft = 10; |
|
998 iExtension->iKeyExtResponseMargins.iBottom = 10; |
|
999 iExtension->iKeyExtResponseMargins.iRight = 10; |
|
1000 |
|
1001 iExtension->iButtonExtResponseMargins.iTop = 10; |
|
1002 iExtension->iButtonExtResponseMargins.iLeft = 10; |
|
1003 iExtension->iButtonExtResponseMargins.iBottom = 10; |
|
1004 iExtension->iButtonExtResponseMargins.iRight = 10; |
|
1005 } |
997 } |
1006 } |
998 |
1007 |
999 //end of file |
1008 //end of file |