windowing/windowserver/nga/SERVER/KEYCLICK.H
changeset 0 5d03bc08d59c
equal deleted inserted replaced
-1:000000000000 0:5d03bc08d59c
       
     1 // Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // Definition of the class that manages the keyclick plugin
       
    15 // 
       
    16 //
       
    17 
       
    18 #ifndef __KEYCLICK_H__
       
    19 #define __KEYCLICK_H__
       
    20 
       
    21 #ifndef __E32STD_H__
       
    22 #include <e32std.h>
       
    23 #endif
       
    24 #ifndef __E32BASE_H__
       
    25 #include <e32base.h>
       
    26 #endif
       
    27 #ifndef __OBJECT_H__
       
    28 #include "OBJECT.H"
       
    29 #endif
       
    30 
       
    31 class CClickMaker;
       
    32 
       
    33 
       
    34 #define THIRD_UID_INDEX 2
       
    35 
       
    36 class CClick : public CWsObject
       
    37 	{
       
    38 public:		//Static Part
       
    39 	static void InitStaticsL();
       
    40 	static void DeleteStatics();
       
    41 	static void KeyEvent(TEventCode aType,const TKeyEvent& aEvent);
       
    42 	static void PointerEvent(const TPoint& aScreenPos,const TAdvancedPointerEvent& aEvent);
       
    43 	static void OtherEvent(TInt aType,TAny* aParam=NULL);
       
    44 	inline static TBool IsHandler() {return iHandler!=NULL;}
       
    45 	inline static void SetKeyClickOveride(TBool aOn) {iKeyClickOveride=aOn;}
       
    46 	static void LoadNewLibraryL(const TDesC &aDllName);
       
    47 public:		//Object Part
       
    48 	inline CClick(CWsClient* aOwner) : CWsObject(aOwner,WS_HANDLE_CLICK) {}
       
    49 	//~CClick();
       
    50 	void ConstructL(const TUid& aUid);
       
    51 	//Pure Virtual function from CWsObject
       
    52 	void CommandL(TInt aOpcode, const TAny *aCmdData);
       
    53 private:
       
    54 	static inline void Unload() {DeleteStatics();}
       
    55 	static inline TUid ThirdUid() {return iPlugIn.Type()[THIRD_UID_INDEX];}
       
    56 private:
       
    57 	TUid iThirdUid;
       
    58 private:
       
    59 	static CClickMaker* iHandler;
       
    60 	static TBool iIsChangeable;
       
    61 	static TBool iKeyClickOveride;
       
    62 	static TBool iKeyClickEnabled;
       
    63 	static TBool iPenClickEnabled;
       
    64 	static RLibrary iPlugIn;
       
    65 	static TBool iIsLoaded;
       
    66 	};
       
    67 
       
    68 #endif