stifui/avkon/uitestserverstarter/inc/EventUtil.h
branchRCL_3
changeset 14 404ad6c9bc20
equal deleted inserted replaced
13:87e9ebfbe96a 14:404ad6c9bc20
       
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 * 
       
    14 * Description: This file contains TEventUtil class declaration.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef EVENTUTIL_H_
       
    19 #define EVENTUTIL_H_
       
    20 
       
    21 //  INCLUDES
       
    22 #include <e32base.h>
       
    23 
       
    24 // CONSTANTS
       
    25 // None
       
    26 
       
    27 // MACROS
       
    28 // None
       
    29 
       
    30 // DATA TYPES
       
    31 // None
       
    32 
       
    33 // FUNCTION PROTOTYPES
       
    34 // None
       
    35 
       
    36 // FORWARD DECLARATIONS
       
    37 // None
       
    38 
       
    39 // CLASS DECLARATION
       
    40 
       
    41 // DESCRIPTION
       
    42 // Utility class for key codes parsing.
       
    43 class TEventUtil
       
    44     {
       
    45     private: // Enumerations
       
    46     	// none
       
    47 
       
    48     public: // Enumerations
       
    49 		enum TCustomPointerEventType { EButton1 = 1000, EButton2, EButton3 };
       
    50     
       
    51     public: // Constructors and destructor
       
    52 
       
    53     public: // Constructors and destructor
       
    54 
       
    55     public: // New functions
       
    56     	/**
       
    57     	 * Returns descriptive key code name.
       
    58     	 */
       
    59         static TPtrC GetKeyCodeName( TUint aKeyCode );
       
    60         
       
    61         /**
       
    62          * Parses key code.
       
    63          */ 
       
    64         static TInt ParseKeyCode( const TDesC& aKeyCodeName, TUint& aKeyCode );
       
    65 
       
    66 		/**
       
    67 		 * Returns descriptive key scan code name.
       
    68 		 */
       
    69         static TPtrC GetKeyScanCodeName( TInt aKeyScanCode );
       
    70         
       
    71         /**
       
    72          * Parses key scan code.
       
    73          */
       
    74         static TInt ParseKeyScanCode( const TDesC& aKeyScanCodeName, TInt& aKeyScanCode );
       
    75 
       
    76         /**
       
    77          * Returns descriptive key modifier name.
       
    78          */
       
    79         static TPtrC GetModifierName( TUint aModifier );
       
    80         
       
    81         /**
       
    82          * Parses key modifier.
       
    83          */
       
    84         static TInt ParseModifier( const TDesC& aModifierName, TUint& aModifier );
       
    85         
       
    86         /**
       
    87          * Parses pointer event type.
       
    88          */
       
    89         static TInt ParsePointerEventType( const TDesC& aPointerEventTypeName, TUint& aPointerEventType );
       
    90 
       
    91     public: // Functions from base classes
       
    92 
       
    93     protected:  // New functions
       
    94 
       
    95     protected:  // Functions from base classes
       
    96 
       
    97     private:    // New functions
       
    98 
       
    99     public:     // Data
       
   100 
       
   101     protected:  // Data
       
   102 
       
   103     private:    // Data
       
   104 
       
   105     public:     // Friend classes
       
   106 
       
   107     protected:  // Friend classes
       
   108 
       
   109     private:    // Friend classes
       
   110 
       
   111     };
       
   112 
       
   113 #endif /*EVENTUTIL_H_*/
       
   114 
       
   115 // End of File