webengine/pagescaler/inc/minimapscaler.h
changeset 0 dd21522fd290
equal deleted inserted replaced
-1:000000000000 0:dd21522fd290
       
     1 /*
       
     2 * Copyright (c) 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 the License "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 CMINIMAPSCALER_H
       
    21 #define CMINIMAPSCALER_H
       
    22 
       
    23 //  INCLUDES
       
    24 
       
    25 #include <e32base.h>
       
    26 
       
    27 // CONSTANTS
       
    28 
       
    29 // MACROS
       
    30 
       
    31 // DATA TYPES
       
    32 
       
    33 // FUNCTION PROTOTYPES
       
    34 
       
    35 // FORWARD DECLARATIONS
       
    36 
       
    37 class CBitmapScaler;
       
    38 class CFbsBitmap;
       
    39 
       
    40 // CLASS DECLARATION
       
    41 
       
    42 class MMinimapScalerCallback
       
    43     {
       
    44     public:        
       
    45         virtual void ScalingCompletedL(CFbsBitmap& aResult, const TRect& aTargetRect) = 0;
       
    46     };
       
    47 
       
    48 
       
    49 // CLASS DECLARATION
       
    50 
       
    51 /**
       
    52 *  
       
    53 *  
       
    54 *  @lib pagescaler.dll
       
    55 *  @since 3.1
       
    56 */
       
    57 class CMinimapScaler : public CActive
       
    58     {
       
    59     public:  // Constructors and destructor
       
    60         
       
    61         /**
       
    62         * Two-phased constructor.
       
    63         */
       
    64         static CMinimapScaler* NewL(MMinimapScalerCallback& aCallback);
       
    65         
       
    66         /**
       
    67         * Destructor.
       
    68         */
       
    69         virtual ~CMinimapScaler();
       
    70 
       
    71     public: // New functions
       
    72         
       
    73         /**
       
    74         * 
       
    75         * @since 3.1
       
    76         * @param 
       
    77         * @return 
       
    78         */
       
    79         void StartScalingL(CFbsBitmap &aSource, const TRect& aTargetRect);
       
    80         
       
    81 
       
    82     private: // Functions from CActive
       
    83     
       
    84         void RunL();
       
    85         
       
    86         void DoCancel();
       
    87         
       
    88 
       
    89     private:
       
    90 
       
    91         /**
       
    92         * C++ constructor.
       
    93         */
       
    94         CMinimapScaler(MMinimapScalerCallback& aCallback);
       
    95 
       
    96         /**
       
    97         * By default Symbian 2nd phase constructor is private.
       
    98         */
       
    99         void ConstructL();
       
   100         
       
   101         void DeleteResultBitmap();
       
   102 
       
   103     private:    // Data
       
   104     
       
   105         MMinimapScalerCallback* iCallback;
       
   106         
       
   107         CFbsBitmap* iResultBitmap; // owned                
       
   108         CBitmapScaler* iScaler; // owned
       
   109         
       
   110         TRect iTargetRect;
       
   111 
       
   112     };
       
   113 
       
   114 #endif      // CMINIMAPSCALER_H   
       
   115             
       
   116 // End of File