diff -r 000000000000 -r 2f259fa3e83a uifw/ganes/inc/HgKeyUtils.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/uifw/ganes/inc/HgKeyUtils.h Tue Feb 02 01:00:49 2010 +0200 @@ -0,0 +1,90 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + + +#ifndef HGKEYUTILS_H_ +#define HGKEYUTILS_H_ + +#include +#include +#include +#include +#include +#include +#include // KAknFepHashKeySelection +#include // KAknQwertyInputModeActive +#include +#include + +// Forward declarations +class CPeriodic; +struct TKeyEvent; +class CHgScroller; +class CEikButtonGroupContainer; +class CCoeControl; +class CEikCba; + +NONSHARABLE_CLASS( CHgKeyUtils ) : + public CBase, + public MCenRepNotifyHandlerCallback, + public MEikCommandObserver + { +public: + static CHgKeyUtils* NewL( CHgScroller& aScroller ); + + virtual ~CHgKeyUtils(); + + void HandleLosingFocus(); + void HandleGainingFocus(); + + TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType ); + +public: // from MCenRepNotifyHandlerCallback + + void HandleNotifyInt(TUint32 aId, TInt aNewValue); + +private: + CHgKeyUtils( CHgScroller& aScroller ); + + void ConstructL(); + + void UpdateMSKVars(); + + TBool SelectionMode( const TKeyEvent& aKeyEvent ); + + void ProcessCommandL(TInt aCommandId); + + void CreateMSKObserver(); + + void RemoveMSKObserver(); + +private: + + CHgScroller& iScroller; // Not Own. + CRepository* iCenRep; // Own. + CCenRepNotifyHandler* iCenRepNotifyHandler; // Own. + CEikCba* iCba; // Not own + + TBool iSelectionModeEnabled; + TBool iAknFepHashKeySelection; + TBool iShiftKeyPressed; + TBool iMskEnabledInPlatform; + TBool iMSKButtonGroupAlive; // status of buttongroup, which is used for MSK observer + + }; + +#endif // HGKEYUTILS_H_