textinput/peninputarc/inc/peninputlayoutcontrolinc/peninputlayoutminterface.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 layout interface
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef M_LAYOUTMINTERFACE_H
       
    20 #define M_LAYOUTMINTERFACE_H
       
    21 //#include <gdi.h>
       
    22 //#include <bitdev.h>
       
    23 //#include <peninputcmdparam.h>
       
    24 
       
    25 /**
       
    26  * Class MTimerHandler
       
    27  *
       
    28  * Interface for sending time event handling
       
    29  *
       
    30  * @lib fepbasecontrol.lib
       
    31  *  @since S60 v4.0
       
    32  */
       
    33 class MTimerHandler
       
    34     {
       
    35 public:
       
    36     /**
       
    37      * HandleTimerOut. Handling time out event
       
    38      * @since S60 v4.0
       
    39      * @param aTimeType The timer type
       
    40      */                
       
    41     virtual void HandleTimerOut(TInt aTimeType) = 0;
       
    42     };
       
    43 
       
    44 
       
    45 /**
       
    46  * MPositionObserver
       
    47  *
       
    48  * Interface for dragbar moving event. There can be lots of observer for a dragbar.
       
    49  * But when one observer processs the event, others wont't have a chance to process it.  
       
    50  * The processing order is revesed to the order which observers added. 
       
    51  * i.e.The last added observer will precess the event first
       
    52  *
       
    53  * @lib fepbasecontrol.lib
       
    54  * @since S60 v4.0
       
    55  */
       
    56 class MPositionObserver
       
    57     {
       
    58 public:
       
    59     /**
       
    60      * Handle position change event
       
    61      *
       
    62      * @since S60 v4.0
       
    63      * @param aOffset The moving offset
       
    64      * @return The flag whether this observer has processed the event.
       
    65      *         ETrue if processed.Otherwise EFalse.
       
    66      */            
       
    67     virtual TBool HandlePositionChange(const TPoint& aOffset) = 0;
       
    68     
       
    69      /**
       
    70       * return observer's area to be moved when position changed
       
    71       *
       
    72       * @since S60 v4.0
       
    73       * @return The rect of observer's moving area
       
    74       */            
       
    75     virtual const TRect& MovingArea() = 0;
       
    76     
       
    77     /**
       
    78      * Tell whether this observer is a fep base control
       
    79      *
       
    80      * @since S60 v4.0
       
    81      * @return ETrue if this observer is a control, otherwise, EFalse.
       
    82      */
       
    83     virtual TBool IsFepBaseControl() = 0;
       
    84     };
       
    85 
       
    86 /**
       
    87  * MCandidateBuffer
       
    88  *
       
    89  * Interface for candidate data buffer
       
    90  *
       
    91  * @lib fepbasecontrol.lib 
       
    92  * @since S60 v4.0
       
    93  */
       
    94 class MCandidateBuffer
       
    95     {
       
    96 public:
       
    97     /**
       
    98      * Set candidate buffer 
       
    99      *
       
   100      * @since S60 v4.0
       
   101      * @param aCandidateData Candidate data
       
   102      */        
       
   103     virtual void SetCandidateL(const RPointerArray<HBufC>& aCandidateData) = 0;
       
   104     };
       
   105 
       
   106 /**
       
   107  * MEventObserver
       
   108  *
       
   109  * Interface for event observer
       
   110  *
       
   111  * @lib fepbasecontrol.lib
       
   112  * @since S60 v4.0
       
   113  */
       
   114 class CFepUiBaseCtrl;
       
   115 class MEventObserver
       
   116     {
       
   117 public:
       
   118     /**
       
   119      * Handle control event 
       
   120      *
       
   121      * @since S60 v4.0
       
   122      * @param aEventType The event type
       
   123      * @param aCtrl The control who sends the event
       
   124      * @param aEventData The event data
       
   125      */            
       
   126     virtual void HandleControlEvent(TInt aEventType, CFepUiBaseCtrl* aCtrl,
       
   127                                                 const TDesC& aEventData) = 0;
       
   128     };
       
   129 
       
   130 /**
       
   131  * MOnResourceChangFunctions
       
   132  *
       
   133  * Interface for handling resource change
       
   134  *
       
   135  * @lib fepbasecontrol.lib
       
   136  * @since S60 v4.0
       
   137  */    
       
   138  class MOnResourceChangFunctions
       
   139     {
       
   140 public:
       
   141     /**
       
   142      * Set the resource Id.
       
   143      *
       
   144      * @since S60 v4.0
       
   145      * @param aId The control resource Id
       
   146      */                 
       
   147     virtual void SetResourceId(TInt32 aResId) = 0;
       
   148     
       
   149     /**
       
   150      * Construct the control from resource again due to resource change.
       
   151      *
       
   152      * @since S60 v4.0
       
   153      */            
       
   154     virtual void ConstructFromResourceL() = 0;
       
   155     };
       
   156 
       
   157 #endif //M_LAYOUTMINTERFACE_H