fepstub/inc/aknfeppeninputimeplugin.h
changeset 24 fc42a86c98e3
equal deleted inserted replaced
15:806570e85b3d 24:fc42a86c98e3
       
     1 /*
       
     2 * Copyright (c) 2002-2005 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:            Input mode plugin interac
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 
       
    23 
       
    24 
       
    25 
       
    26 
       
    27 
       
    28 
       
    29 
       
    30 #ifndef C_AKNFEPPENINPUTIMEPLUGIN_H
       
    31 #define C_AKNFEPPENINPUTIMEPLUGIN_H
       
    32 
       
    33 //Include 
       
    34 #include <ecom/ecom.h>
       
    35 
       
    36 //Forward declaration
       
    37 class MAknFepManagerInterface;
       
    38 class MAknFepManagerUIInterface;
       
    39 class CAknFepUiInterfaceMenuPane;
       
    40 class CPtiEngine;
       
    41 
       
    42 /** UID of IME plugin this interface */
       
    43 const TInt KImePluginInterfaceId = 0x10207363;
       
    44 
       
    45 /** Maxlength of IME plugin name */
       
    46 const TInt KMaxImePluginName = 20;
       
    47 
       
    48 /**
       
    49  *  Pen input mode plugin interface
       
    50  *
       
    51  *  @since S60 v3.2
       
    52  */
       
    53 class CAknFepPenInputImePlugin: public CBase
       
    54     {
       
    55 public:
       
    56     /**
       
    57      *  IME plugin implemetation detail struct
       
    58      *
       
    59      *  @since S60 v3.2
       
    60      */
       
    61     class TImePlguinImplDetail
       
    62         {
       
    63     public:
       
    64         TInt iImplementationId;
       
    65         TInt iMode;
       
    66         TInt iMeritValue;
       
    67         TInt iLanguage;
       
    68         TBuf<KMaxImePluginName> iDisplayName;
       
    69         };
       
    70         
       
    71     /**
       
    72      *  IME plugin weight number, if there are more than one
       
    73      *  IME plugin for some language, the system select the
       
    74      *  biggest meritvalue one.
       
    75      *
       
    76      *  @since S60 v3.2
       
    77      */
       
    78     enum TImePluginMerit
       
    79         {
       
    80         EImeMerit_NotUsed = 0,
       
    81         EImeMerit_Normal = 100,
       
    82         EImeMerit_Preferred = 200
       
    83         };
       
    84         
       
    85     /**
       
    86      * Destructor
       
    87      *
       
    88      * @since S60 v3.2
       
    89      */
       
    90      virtual ~CAknFepPenInputImePlugin() 
       
    91         { 
       
    92         REComSession::DestroyedImplementation(iDtor_ID_Key);                        
       
    93         }
       
    94 
       
    95 public:
       
    96     /**
       
    97      * Pure virtual functions to implement the interface.
       
    98      */
       
    99 
       
   100     /**
       
   101      * Get layout UI interface
       
   102      * 
       
   103      * @since S60 v3.2
       
   104      * @param aFepManager Fep manager interface pointer
       
   105      * @param aLanguage Language that layout UI need to support
       
   106      * @param aMode Speicifed layout UI mode to create
       
   107      * @param aData Initialization data.
       
   108      *
       
   109      * @return The layout UI interface..
       
   110      */
       
   111     virtual MAknFepManagerInterface* GetInputMethodUiL(
       
   112                                         MAknFepManagerUIInterface* aFepManager,
       
   113                                         TLanguage aLanguage, 
       
   114                                         TInt      aMode,
       
   115                                         const TDesC8& aData,
       
   116                                         const TBool aIsSplitView = EFalse) = 0;
       
   117     
       
   118     /**
       
   119      * Get layout UI interface
       
   120      * 
       
   121      * @since S60 v3.2
       
   122      * @param aFepManager Fep manager interface pointer
       
   123      * @param aLayoutId Speicifed layout UI id to create
       
   124      * @param aData Initialization data.
       
   125      *
       
   126      * @return The layout UI interface..
       
   127      */
       
   128     virtual MAknFepManagerInterface* GetInputMethodUiL(
       
   129                                         MAknFepManagerUIInterface* aFepManager,
       
   130                                         TInt aLayoutId,
       
   131                                         const TDesC8& aData) = 0;
       
   132     
       
   133     /**
       
   134      * Activate current IME plugin.
       
   135      * 
       
   136      * @since S60 v3.2
       
   137      *
       
   138      * @return None.
       
   139      */
       
   140     virtual void Activate() = 0;
       
   141 
       
   142     /**
       
   143      * Deactivate current IME plugin.
       
   144      * 
       
   145      * @since S60 v3.2
       
   146      *
       
   147      * @return None.
       
   148      */
       
   149     virtual void DeActivate() = 0;
       
   150 
       
   151     /**
       
   152      * Get current IME plugin implementation ID.
       
   153      * 
       
   154      * @since S60 v3.2
       
   155      *
       
   156      * @return IME plugin implementation id.
       
   157      */
       
   158     virtual TInt ImeImplId() = 0;
       
   159 
       
   160     /**
       
   161      * Get current layout UI implementation id.
       
   162      * 
       
   163      * @since S60 v3.2
       
   164      *
       
   165      * @return None.
       
   166      */
       
   167     virtual TInt LayoutUiImplId() = 0;
       
   168 
       
   169     /**
       
   170      * Handle pen input server event.
       
   171      * 
       
   172      * @param aEventId The event id, defined in <peninputcmd.h>
       
   173      * @param aData The event related data.
       
   174      * @since S60 v3.2
       
   175      *
       
   176      * @return None.
       
   177      */
       
   178     virtual TBool HandleServerEventL(TInt aEventId, const TDesC& aData) = 0;
       
   179 
       
   180     /**
       
   181      * Get suppored layout UI modes(VKB/HWR).
       
   182      * 
       
   183      * @since S60 v3.2
       
   184      *
       
   185      * @return Supported modes.
       
   186      */
       
   187     virtual TInt SupportModes(CPtiEngine* aPtiEngine, 
       
   188                               RArray<TImePlguinImplDetail>& aSupportList) const = 0;
       
   189     
       
   190     /**
       
   191      * Get current layout UI mode.
       
   192      * 
       
   193      * @since S60 v3.2
       
   194      *
       
   195      * @return Current layout UI mode.
       
   196      */
       
   197     virtual TInt CurrentMode() const = 0;
       
   198     
       
   199     /**
       
   200      * Handle the menu command.The menu is launched by FEP
       
   201      * The menu command is first passed to IME plugin, if 
       
   202      * this function return EFalse, FEP handles it defaultly.
       
   203      * 
       
   204      * @param aCommandId The menu command id
       
   205      * @return ETrue if IME plugin handled the command; 
       
   206      *         EFalse otherwise.
       
   207      */
       
   208     virtual TBool HandleMenuCommandL(TInt aCommandId) = 0;
       
   209     
       
   210     /**
       
   211      * Dynamiclly update menu items during it displays. 
       
   212      * 
       
   213      * aMenuPane The menu pane pointer.
       
   214      * @return None.
       
   215      */
       
   216     virtual void DynInitMenuPaneL(CAknFepUiInterfaceMenuPane* aMenuPane) = 0;
       
   217     
       
   218 protected:
       
   219     /**
       
   220      * C++ default constructor.
       
   221      *
       
   222      * @param aServer Pen input server pointer
       
   223      */
       
   224     CAknFepPenInputImePlugin()
       
   225         {
       
   226         }
       
   227     
       
   228 public:
       
   229 
       
   230     /**
       
   231      * Destructor key.
       
   232      */
       
   233     TUid iDtor_ID_Key;
       
   234 
       
   235 protected:
       
   236     /**
       
   237      * Current language.
       
   238      */
       
   239     TLanguage iLanguage;
       
   240 
       
   241     /**
       
   242      * Fep manager UI interface. Not own.
       
   243      */
       
   244     MAknFepManagerUIInterface* iFepManager;
       
   245     };
       
   246 
       
   247 #endif //C_AKNFEPPENINPUTIMEPLUGIN_H
       
   248 //End Of File