textinput/peninputarc/inc/pensrvcliinc/rpeninputanim.h
changeset 0 eb1f2e154e89
child 6 6ceef9a83b1a
equal deleted inserted replaced
-1:000000000000 0:eb1f2e154e89
       
     1 /*
       
     2 * Copyright (c) 2005-2007 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:  Interface to animation
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef R_RPENINPUTANIM_H
       
    20 #define R_RPENINPUTANIM_H
       
    21 
       
    22 //  INCLUDES
       
    23 #include <e32std.h>
       
    24 #include <e32base.h>
       
    25 #include <w32std.h>
       
    26 #include <peninputcmd.h>
       
    27 #include "peninputcmdparamext.h"
       
    28 /**
       
    29  * Class for implementing animation functinality. 
       
    30  *
       
    31  * This is the client side interface to the CSpriteAnim derived server side class.
       
    32  *
       
    33  * @since S60 v4.0
       
    34  */
       
    35 class RPeninputAnim : public RAnim
       
    36     {
       
    37 public:
       
    38     // Constructors and destructor
       
    39 
       
    40     /**
       
    41      * Default constructor. This is defined just to allow RPeninputAnim
       
    42      * to be defined as non-pointer member. Use the other overloaded
       
    43      * constructor for actual initialization.
       
    44      *
       
    45      * @since S60 v4.0
       
    46      */
       
    47     RPeninputAnim();
       
    48 
       
    49     /**
       
    50      * Constructor.
       
    51      *
       
    52      * @since S60 v4.0
       
    53      * @param aDll reference to loaded RAnimDll
       
    54      */
       
    55      RPeninputAnim( RAnimDll& aDll );
       
    56 
       
    57     /**
       
    58      * Second phase construction.
       
    59      *
       
    60      * @since S60 v4.0
       
    61      * @param aDevice reference to window server sprite.
       
    62      */
       
    63     void ConstructL( const RWsSprite& aDevice );
       
    64 
       
    65     /**
       
    66      * Activates the sprite ie. makes it visible.
       
    67      *
       
    68      * @since S60 v4.0
       
    69      */
       
    70     void Activate();
       
    71 
       
    72     /**
       
    73      * De-activates the sprite ie. makes it invisible.
       
    74      *
       
    75      * @since S60 v4.0
       
    76      */
       
    77     void Deactivate();
       
    78 
       
    79 
       
    80     /**
       
    81      * Inform pen input animation thata the UI layout size has been changed
       
    82      *
       
    83      * @since S60 v4.0
       
    84      * @param aSize The new layout size
       
    85      * @return The operation code
       
    86      */
       
    87     TInt LayoutSizeChangedL(const TSize& aSize);        
       
    88 
       
    89     /**
       
    90      * set ui layout postion 
       
    91      *
       
    92      * @since S60 v4.0
       
    93      * @param aPt The layout position
       
    94      * @return The operation result
       
    95      */
       
    96     TInt SetUiLayoutPos(const TPoint& aPt);
       
    97 
       
    98     
       
    99     /**
       
   100      * Infor animation that display mode changed
       
   101      *
       
   102      * @since S60 v4.0
       
   103      */
       
   104     void ChangeDisplayMode();
       
   105 
       
   106     /**
       
   107      * Update screen area
       
   108      *
       
   109      * @since S60 v4.0
       
   110      * @param aRect The area to be updated.
       
   111      * @param aFullUpdate The full-updating flag.
       
   112      */    
       
   113     void UpdateArea(const TRect& aRect,TBool aFullUpdate);
       
   114 
       
   115     /**
       
   116      * Update screen area
       
   117      *
       
   118      * @since S60 v4.0
       
   119      * @param aArea The array of area to be updated
       
   120      * @return None
       
   121      */    
       
   122     void UpdateArea(const RArray<TUpdateArea>& aArea);
       
   123 
       
   124     /**
       
   125      * Ask window server to capture the pointer
       
   126      *
       
   127      * @since S60 v4.0     
       
   128      * @param aFlag ETrue if need to capture the pointer
       
   129      */        
       
   130     void CapturePointer(TBool aFlag, TInt aCaptureCtrlID);
       
   131     
       
   132     /**
       
   133      * Ask animation simulate the event
       
   134      *
       
   135      * @since S60 v4.0     
       
   136      * @param aEvent The event to be simulated
       
   137      */            
       
   138     void SimulateEvent(const TRawEvent& aEvent);
       
   139 
       
   140 #ifdef RD_TACTILE_FEEDBACK
       
   141 
       
   142     /**
       
   143      * Add feedback area. Send command to pen input animation
       
   144      *
       
   145      * @since S60 v4.0     
       
   146      * @param aArea The area data
       
   147      * @param aCount area num
       
   148      * @param Flag tells whether the command will be bufferred.
       
   149      */                
       
   150     void AddFeedbackAreaL(const TTactileFeedbackArea* aArea, TInt aCount,TBool aFlag);
       
   151     
       
   152     /**
       
   153      * Remove feedback area. Send command to pen input animation
       
   154      *
       
   155      * @since S60 v4.0     
       
   156      * @param aArea The area data
       
   157      * @param aCount area num
       
   158      * @param Flag tells whether the command will be bufferred.
       
   159      */                    
       
   160     void RemoveFeedbackAreaL(const TTactileFeedbackArea* aArea, TInt aCount,TBool aFlag);
       
   161     
       
   162     /**
       
   163      * Change feedback area. Send command to pen input animation
       
   164      *
       
   165      * @since S60 v4.0     
       
   166      * @param aArea The area data
       
   167      * @param aCount area num
       
   168      * @param Flag tells whether the command will be bufferred.
       
   169      */                    
       
   170     void ChangeFeedbackAreaL(const TTactileFeedbackArea* aArea, TInt aCount,TBool aFlag);
       
   171     
       
   172     /**
       
   173      * Change feedback type. Send command to pen input animation
       
   174      *
       
   175      * @since S60 v4.0     
       
   176      * @param aArea The area data
       
   177      * @param aCount area num
       
   178      * @param Flag tells whether the command will be bufferred.
       
   179      */  
       
   180     void ChangeFeedbackTypeL(const TTactileFeedbackArea* aArea, TInt aCount,TBool aFlag);
       
   181 
       
   182 #endif // RD_TACTILE_FEEDBACK
       
   183     
       
   184     void EnableSprite(TBool aFlag);    
       
   185     
       
   186     void GetDSAState(TBool& aState);
       
   187 private:
       
   188 
       
   189     /**
       
   190      * Completes the sprite anim construction.
       
   191      *
       
   192      * @since S60 v4.0
       
   193      */
       
   194     void FinishConstructionL();
       
   195 
       
   196 #ifdef RD_TACTILE_FEEDBACK
       
   197 
       
   198     /**
       
   199      * Send feedback command to animation dll by Command
       
   200      *
       
   201      * @since S60 v4.0
       
   202      * @param aArea The area data
       
   203      * @param aCount The area number
       
   204      * @param aOp The command id
       
   205      */    
       
   206     void DoFeedbackAreaOpL(const TTactileFeedbackArea* aArea, TInt aCount,TPeninputOpcodes aOp);
       
   207     
       
   208     /**
       
   209      * Send feedback command to animation dll by CommandReplyL
       
   210      *
       
   211      * @since S60 v4.0
       
   212      * @param aArea The area data
       
   213      * @param aCount The area number
       
   214      * @param aOp The command id
       
   215      */        
       
   216     void DoFeedbackAreaOpReplyL(const TTactileFeedbackArea* aArea, 
       
   217                                 TInt aCount,TPeninputOpcodes aOp);    
       
   218     
       
   219 #endif // RD_TACTILE_FEEDBACK    
       
   220     };
       
   221 #endif //R_RPENINPUTANIM_H
       
   222 
       
   223 // End of File