textinput/peninputarc/src/peninputlayoutcontrol/peninputuilayout.cpp
branchRCL_3
changeset 12 5e18d8c489d6
parent 9 e6a39382bb9c
child 13 1bbdde98cc2d
equal deleted inserted replaced
11:c8fb4cf7b3ae 12:5e18d8c489d6
    26 
    26 
    27 #include <aknfeppeninputenums.h>
    27 #include <aknfeppeninputenums.h>
    28 #include <AknDef.h>
    28 #include <AknDef.h>
    29 #include <AknsConstants.h>
    29 #include <AknsConstants.h>
    30 #include <coemain.h>
    30 #include <coemain.h>
    31 #include <aknsutils.h> 
    31 #include <AknsUtils.h> 
    32 #include <aknsskininstance.h> 
    32 #include <AknsSkinInstance.h> 
    33 
    33 
    34 #ifdef RD_TACTILE_FEEDBACK
    34 #ifdef RD_TACTILE_FEEDBACK
    35 #include <touchfeedback.h>
    35 #include <touchfeedback.h>
    36 #include <featmgr.h>
    36 #include <featmgr.h>
    37 #endif //RD_TACTILE_FEEDBACK
    37 #endif //RD_TACTILE_FEEDBACK
    82 #ifdef RD_TACTILE_FEEDBACK
    82 #ifdef RD_TACTILE_FEEDBACK
    83     iExtension->iTactileSupported = EFalse;
    83     iExtension->iTactileSupported = EFalse;
    84 #endif // RD_TACTILE_FEEDBACK
    84 #endif // RD_TACTILE_FEEDBACK
    85     iExtension->iSkinInstance = AknsUtils::SkinInstance();
    85     iExtension->iSkinInstance = AknsUtils::SkinInstance();
    86     iExtension->iTouchFeedbackInstance = MTouchFeedback::Instance();
    86     iExtension->iTouchFeedbackInstance = MTouchFeedback::Instance();
       
    87 	iExtension->iDisableDrawing = EFalse;
    87     }
    88     }
    88 
    89 
    89 // ---------------------------------------------------------------------------
    90 // ---------------------------------------------------------------------------
    90 // CFepUiLayout::HandleEventL
    91 // CFepUiLayout::HandleEventL
    91 // handle event from window server
    92 // handle event from window server
   173         case ECmdPenInputSendEditorTextAndCurPos:
   174         case ECmdPenInputSendEditorTextAndCurPos:
   174             {
   175             {
   175             TRAP_IGNORE(SendEditorTextAndCursorPosL(aData));
   176             TRAP_IGNORE(SendEditorTextAndCursorPosL(aData));
   176             }
   177             }
   177             break;
   178             break;
       
   179         case ECmdPeninputEnableOwnBitmap:
       
   180             {
       
   181             SetSelfBmpDeviceFlag(*(reinterpret_cast<TBool*>(aData)));
       
   182             OnResourceChange(KPenInputOwnDeviceChange);
       
   183             }
       
   184             break;
       
   185         case ECmdPeninputDisableLayoutDrawing:
       
   186             {
       
   187             DisableLayoutDrawing(*(reinterpret_cast<TBool*>(aData)));
       
   188             }
       
   189             break;
   178         default: 
   190         default: 
   179             {
   191             {
   180             ret = -1;
   192             ret = -1;
   181             }	
   193             }	
   182             break;
   194             break;
   570 //       
   582 //       
   571 EXPORT_C void CFepUiLayout::UpdateArea(const CFepUiBaseCtrl* aCtrl,
   583 EXPORT_C void CFepUiLayout::UpdateArea(const CFepUiBaseCtrl* aCtrl,
   572                         const TRect& aRect,TBool aUpdateFlag,TBool aImmedFlag)
   584                         const TRect& aRect,TBool aUpdateFlag,TBool aImmedFlag)
   573     {
   585     {
   574     //do nothing if it's locked and aCtrl is not the owner.
   586     //do nothing if it's locked and aCtrl is not the owner.
       
   587     if(!iLayoutReady || iExtension->iDisableDrawing)
       
   588         return;
   575     TBool bUpdate = ETrue;
   589     TBool bUpdate = ETrue;
   576     if(!iLockedArea.IsEmpty() )
   590     if(!iLockedArea.IsEmpty() )
   577         {
   591         {
   578         bUpdate = EFalse;
   592         bUpdate = EFalse;
   579         if( iLockedAreaOwner == aCtrl )
   593         if( iLockedAreaOwner == aCtrl )
   874     
   888     
   875 EXPORT_C CFepUiCursor* CFepUiLayout::CreateCursor()
   889 EXPORT_C CFepUiCursor* CFepUiLayout::CreateCursor()
   876     {
   890     {
   877     return iRootCtrl->CreateCursor();
   891     return iRootCtrl->CreateCursor();
   878     }
   892     }
       
   893 
       
   894 EXPORT_C TBool CFepUiLayout::NotDrawToLayoutDevice()
       
   895     {
       
   896     return iExtension->iSelfBmpDeviceFlag;
       
   897     }
       
   898 
       
   899 void CFepUiLayout::SetSelfBmpDeviceFlag(TBool aFlag)
       
   900     {
       
   901     iExtension->iSelfBmpDeviceFlag = aFlag;
       
   902     }
       
   903 
       
   904 
       
   905 EXPORT_C void CFepUiLayout::DisableLayoutDrawing(TBool aFlag)
       
   906     {
       
   907     if(iExtension->iDisableDrawing == aFlag)
       
   908         return;
       
   909     iExtension->iDisableDrawing = aFlag;
       
   910     TPtrC ptr;
       
   911     ptr.Set(reinterpret_cast<const TUint16*>(&aFlag),sizeof(aFlag)/sizeof(TUint16));
       
   912     
       
   913     SignalOwner(ESignalDisableUpdating,ptr);
       
   914     }
       
   915 
   879 //end of file
   916 //end of file