textinput/peninputarc/inc/peninputlayoutenginc/peninputlayouteng.h
changeset 0 eb1f2e154e89
equal deleted inserted replaced
-1:000000000000 0:eb1f2e154e89
       
     1 /*
       
     2 * Copyright (c) 2005-2006 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:  header file of peninput layout engine
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef C_CPENINPUTLAYOUTENGINE_H
       
    21 #define C_CPENINPUTLAYOUTENGINE_H
       
    22 
       
    23 // INCLUDES
       
    24 #include <e32base.h>
       
    25 #include <badesca.h> 
       
    26 #include <peninputuilayoutbase.h>
       
    27 
       
    28 #include <AknFepGlobalEnums.h>
       
    29 
       
    30 class CFepUiLayoutInterface;
       
    31 class MLayoutOwner;
       
    32 class CImePluginFinder;
       
    33 class CPtiEngine;
       
    34 /**
       
    35 * CFepLayoutEngine class.
       
    36 *
       
    37 * This is main class for outside users to create layout engine
       
    38 *
       
    39 * @lib feplayouteng.lib
       
    40 * @since S60 V4.0
       
    41 */
       
    42 class CFepLayoutEngine : public CBase
       
    43     {
       
    44 public:
       
    45     /**
       
    46      * Factory creator.
       
    47      *
       
    48      * @since S60 V4.0
       
    49      * @return The layout engine instance
       
    50      */
       
    51     IMPORT_C static CFepLayoutEngine* NewL();
       
    52 
       
    53     /**
       
    54      * Factory creator.
       
    55      *
       
    56      * @since S60 V4.0
       
    57 	 * @param aPtiEngine The predictive engine instance
       
    58      * @return The layout engine instance
       
    59      */
       
    60     IMPORT_C static CFepLayoutEngine* NewL(CPtiEngine* aPtiEngine);
       
    61     
       
    62     /**
       
    63      * Destructor.
       
    64      *
       
    65      * @since S60 V4.0
       
    66      */
       
    67     ~CFepLayoutEngine();
       
    68     
       
    69 
       
    70     /**
       
    71      * Ceate ui layout 
       
    72      *
       
    73      * @since S60 V4.0
       
    74      * @param aInputMethodId The input method layout id
       
    75      * @param aLayoutOwner The layout owner
       
    76      * @param aData Data for layout creation. E.g, The screen resolution data
       
    77      * @return Pointer to Fep ui layout.
       
    78      */
       
    79     IMPORT_C MPenUiLayoutBase* GetUiLayout(TUid aInputMethodId, 
       
    80                                            MLayoutOwner* aLayoutOwner,const TAny* aData = NULL);
       
    81 
       
    82     /**
       
    83      * Return internal array
       
    84      *
       
    85      * @since S60 V4.0
       
    86      * @param aInputMethodId The input method layout id
       
    87      */
       
    88     IMPORT_C const RArray<TInt>& UiLayoutListL(TInt aInputMethodId);
       
    89     
       
    90     /**
       
    91      * Return internal array to requried Ime plugin list
       
    92      *
       
    93      * @since S60 V4.0
       
    94      * @param aLanguage The required supporting language
       
    95      * @param aPluginMode The required supporting mode
       
    96      */
       
    97     IMPORT_C const RArray<TInt>& ImePluginListL(TInt aLanguage, TInt aPluginMode);
       
    98     
       
    99     /**
       
   100      * Return internal array to all supporing touch input languages
       
   101      *
       
   102      * @since S60 V4.0
       
   103      */
       
   104     IMPORT_C const RArray<TInt>& TouchSupportLanguagesL();    
       
   105     
       
   106         
       
   107     /**
       
   108      * Is support TPluginInputMode for aLanguage. 
       
   109      *
       
   110      * @since S60 v4.0
       
   111      * @param aLanguage Value of TLanguage
       
   112      * @param aMode Value of TPluginInputMode
       
   113      * @return ETrue if supported. Otherwise EFalse.
       
   114      */
       
   115     IMPORT_C TBool IsSupportPluginMode( TLanguage aLanguage, TPluginInputMode aMode ) ;
       
   116     
       
   117     /**
       
   118      * Initialize finder. 
       
   119      *
       
   120      * @since S60 v4.0
       
   121      */
       
   122     IMPORT_C void InitializeL();
       
   123     
       
   124 private:
       
   125     /**
       
   126      * 2nd phase constructor.
       
   127     *
       
   128      * @since S60 V4.0 
       
   129      */
       
   130     void ConstructL();
       
   131 
       
   132     /**
       
   133      * Destructor
       
   134      *
       
   135      * @since S60 V4.0 
       
   136      */
       
   137     CFepLayoutEngine(CPtiEngine* aPtiEngine = NULL);
       
   138 
       
   139     /**
       
   140      * Create UI layout plugin list after input method changed 
       
   141      *
       
   142      * @since S60 V4.0 
       
   143      * @param aInputMethodId The layout implementation id.
       
   144      */
       
   145     void FindImeLayoutL(TInt aInputMethodId);
       
   146 
       
   147 private:
       
   148     /**
       
   149      * current layout id
       
   150      */
       
   151     TUid	iLayoutId;
       
   152     /**
       
   153      * current input method id. HWR, VKB ...
       
   154      */
       
   155     TInt	iInputMethodId;
       
   156     /**
       
   157      * layout id list for current input method
       
   158      * Own
       
   159      */
       
   160     RArray<TInt> iLayoutIdList;
       
   161     /**
       
   162      * current layout implementation
       
   163      */
       
   164     CFepUiLayoutInterface* iCurInterface;
       
   165     
       
   166     /**
       
   167      * current layout implementation
       
   168      */
       
   169     CImePluginFinder* iImeFinder;
       
   170     
       
   171     /**
       
   172      * current language support
       
   173      */
       
   174     RArray<TInt>    iTouchSupportLanguages;
       
   175     
       
   176     /**
       
   177      * current ime plugin list
       
   178      */
       
   179     RArray<TInt>    iImePluginIdList;
       
   180     
       
   181     /**
       
   182      * pti engine, NOT OWN
       
   183      */
       
   184     CPtiEngine*     iPtiEngine;
       
   185     };
       
   186     
       
   187 #endif  C_CPENINPUTLAYOUTENGINE_H
       
   188 
       
   189 // End of file