mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/inc/mccscreen.h
branchRCL_3
changeset 33 bc78a40cd63c
parent 32 73a1feb507fb
child 35 6c57ef9392d2
equal deleted inserted replaced
32:73a1feb507fb 33:bc78a40cd63c
     1 /*
       
     2 * Copyright (c) 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:    
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef MCCSCREEN_H
       
    21 #define MCCSCREEN_H
       
    22 
       
    23 #include <w32std.h>
       
    24 
       
    25 class CMccScreen : public CBase, 
       
    26                    public MDirectScreenAccess
       
    27 	{
       
    28 
       
    29 	public:
       
    30 
       
    31 		// Construction & destruction
       
    32 		static CMccScreen* NewL( TPoint aPos, 
       
    33                                  TSize aArea, 
       
    34                                  TInt aIndex, 
       
    35                                  TInt aWindowOrdinalPosition,
       
    36                                  TInt aWindowOrdinalPriority,
       
    37                                  TSize aViewFinderImageSize );
       
    38 
       
    39 		~CMccScreen();
       
    40 		
       
    41 		void ConstructL( TSize aViewFinderImageSize );
       
    42 	    
       
    43 	public:
       
    44 
       
    45 		void StartL();
       
    46 		
       
    47 		void Stop();
       
    48 		
       
    49 		void Draw( CFbsBitmap& aFrame );
       
    50 		
       
    51 		void AttachFrameL( CFbsBitmap* aFrame );
       
    52 		
       
    53 		void DetachFrame();
       
    54 		
       
    55 	private:
       
    56 
       
    57 		CMccScreen( TPoint aPos, 
       
    58                     TSize aArea, 
       
    59                     TInt aIndex, 
       
    60                     TInt aWindowOrdinalPosition,
       
    61                     TInt aWindowOrdinalPriority );
       
    62 		
       
    63 		void Restart( RDirectScreenAccess::TTerminationReasons aReason );
       
    64 		
       
    65 		void AbortNow( RDirectScreenAccess::TTerminationReasons aReason );
       
    66 		
       
    67 		TPoint UpdateViewFinderArea( TSize aViewFinderImageSize );
       
    68 
       
    69         void DoDraw( CFbsBitmap& aFrame );
       
    70         
       
    71         void DoScreenDeviceUpdate();
       
    72         
       
    73 	private:
       
    74 
       
    75 	    RWsSession           iRwSession;
       
    76 		RWindowGroup*        iRwGroup;
       
    77 		RWindow*             iRw;
       
    78 		CWsScreenDevice*     iDev;
       
    79 		TInt 				 iDeviceIndex;
       
    80 		CDirectScreenAccess* iDirectScreenAccess;
       
    81 		CFbsBitGc* iGc;
       
    82 		RRegion* iRegion;
       
    83 		CFbsScreenDevice* iFbsDev;
       
    84 		
       
    85 		TPoint iPosition;
       
    86 		TSize  iArea;
       
    87 		
       
    88 		TInt iWindowOrdinalPosition;
       
    89 		TInt iWindowOrdinalPriority;
       
    90 		
       
    91 		TRect iViewFinderImageRect;	
       
    92 		
       
    93 		TBool iFirstImageDrawn;
       
    94 		
       
    95 		CFbsBitmap* iAttachedFrame;
       
    96 		
       
    97 		TBool iAborted;
       
    98 		
       
    99     #ifdef TEST_EUNIT
       
   100     	friend class UT_CMccCameraHandler;
       
   101     #endif
       
   102     	
       
   103 	};
       
   104 
       
   105 #endif