kernel/eka/ewsrv/ky_tran.cpp
changeset 247 d8d70de2bd36
parent 90 947f0dc9f7a8
equal deleted inserted replaced
201:43365a9b78a3 247:d8d70de2bd36
     1 // Copyright (c) 1996-2009 Nokia Corporation and/or its subsidiary(-ies).
     1 // Copyright (c) 1996-2010 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     3 // This component and the accompanying materials are made available
     4 // under the terms of the License "Eclipse Public License v1.0"
     4 // under the terms of the License "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
    21 #include <e32svr.h>
    21 #include <e32svr.h>
    22 #include <k32keys.h>
    22 #include <k32keys.h>
    23 #include <e32keys.h>
    23 #include <e32keys.h>
    24 #include <e32uid.h>
    24 #include <e32uid.h>
    25 
    25 
    26 enum	{EDummy,EKeyDataConv,EKeyDataFunc,EKeyDataSettings};
    26 /**
    27   
    27 Ordinals of the functions which keymap dlls export.
       
    28 
       
    29 @note These values depend on the ordering of the exports.
       
    30 If the existing def files were ever re-frozen, it would
       
    31 lead to a runtime error.
       
    32 */
       
    33 enum
       
    34 	{
       
    35 	EDummy,
       
    36 	EKeyDataConv, ///< Access conversion tables, signature TLibFnDataConv
       
    37 	EKeyDataFunc, ///< Access function tables, signature TLibFnDataFunc
       
    38 	EKeyDataSettings ///< Access data needed for control code entry @see TCtrlDigits, signature TLibFnDataSetting
       
    39 	};
       
    40 
    28 EXPORT_C CKeyTranslator* CKeyTranslator::New()
    41 EXPORT_C CKeyTranslator* CKeyTranslator::New()
    29 //
    42 //
    30 // Return the actual key translator
    43 // Return the actual key translator
    31 //
    44 //
    32     {
    45     {
   480 //
   493 //
   481 // Two classes that provide operations for accessing the keyboard configuration tables
   494 // Two classes that provide operations for accessing the keyboard configuration tables
   482 //
   495 //
   483 typedef void (*TLibFnDataConv)(SConvTable &aConvTable, TUint &aConvTableFirstScanCode,TUint &aConvTableLastScanCode,
   496 typedef void (*TLibFnDataConv)(SConvTable &aConvTable, TUint &aConvTableFirstScanCode,TUint &aConvTableLastScanCode,
   484 							   SScanCodeBlockList &aKeypadScanCode,SKeyCodeList &aNonAutorepKeyCodes);
   497 							   SScanCodeBlockList &aKeypadScanCode,SKeyCodeList &aNonAutorepKeyCodes);
   485 //
   498 /**
       
   499 Populates the object with conversion table data from aLibrary
       
   500 */
   486 void TConvTable::Update(RLibrary aLibrary)
   501 void TConvTable::Update(RLibrary aLibrary)
   487 #pragma warning (disable: 4705)
   502 #pragma warning (disable: 4705)
   488 	{
   503 	{
   489 #pragma warning (default: 4705)
   504 #pragma warning (default: 4705)
   490 	((TLibFnDataConv)aLibrary.Lookup(EKeyDataConv))(iConvTable,iFirstScanCode,iLastScanCode,iKeypadScanCodes,iNonAutorepKeyCodes);
   505 	((TLibFnDataConv)aLibrary.Lookup(EKeyDataConv))(iConvTable,iFirstScanCode,iLastScanCode,iKeypadScanCodes,iNonAutorepKeyCodes);