browserui/browser/FavouritesInc/BrowserFaviconScaler.h
changeset 51 48e827313edd
parent 37 481242ead638
child 53 f427d27b98d8
equal deleted inserted replaced
37:481242ead638 51:48e827313edd
     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 CBROWSERFAVICONSCALER_H
       
    21 #define CBROWSERFAVICONSCALER_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 MBrowserFaviconScalerCallback
       
    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 CBrowserFaviconScaler : public CActive
       
    58     {
       
    59     public:  // Constructors and destructor
       
    60 
       
    61         /**
       
    62         * Two-phased constructor.
       
    63         */
       
    64         static CBrowserFaviconScaler* NewL(MBrowserFaviconScalerCallback& aCallback);
       
    65 
       
    66         /**
       
    67         * Destructor.
       
    68         */
       
    69         virtual ~CBrowserFaviconScaler();
       
    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, TBool aIsMask);
       
    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         CBrowserFaviconScaler(MBrowserFaviconScalerCallback& 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         MBrowserFaviconScalerCallback* iCallback;
       
   106 
       
   107         CFbsBitmap* iResultBitmap; // owned
       
   108         CBitmapScaler* iScaler; // owned
       
   109 
       
   110         TRect iTargetRect;
       
   111 
       
   112     };
       
   113 
       
   114 #endif      // CBROWSERFAVICONSCALER_H
       
   115 
       
   116 // End of File