vtengines/videoteleng/Inc/Media/MVtEngImageScaler.h
changeset 18 d9b6a8729acd
parent 4 6dc066157ed4
child 23 c378a0498b84
child 27 dcbddbbaf8fd
equal deleted inserted replaced
4:6dc066157ed4 18:d9b6a8729acd
     1 /*
       
     2 * Copyright (c) 2004-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:  Interface used for scaling images to certain size.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef VTENGIMAGESCALER_H
       
    21 #define VTENGIMAGESCALER_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include <gdi.h>
       
    25 
       
    26 // FORWARD DECLARATIONS
       
    27 class CFbsBitmap;
       
    28 
       
    29 /**
       
    30 * Image scaler observer.
       
    31 *
       
    32 *  @lib videoteleng.lib
       
    33 *  @since Series 60 2.8
       
    34 */
       
    35 class MVtEngScalerObserver
       
    36     {
       
    37     public:
       
    38 
       
    39         /**
       
    40         * Called when scaling is ready.
       
    41         * @param aBitmap a scaled bitmap
       
    42         * @param aError Symbian OS error code
       
    43         */
       
    44         virtual void ScalingCompleted( 
       
    45             CFbsBitmap* aBitmap,
       
    46             TInt aError ) = 0;
       
    47     };
       
    48 
       
    49 /**
       
    50 * Image scaler.
       
    51 *
       
    52 *  @lib videoteleng
       
    53 *  @since 2.6
       
    54 */
       
    55 class MVtEngImageScaler
       
    56     {
       
    57     public: // new functions
       
    58 
       
    59         /**
       
    60         * Used to start the scaling of an image.
       
    61         * @param aSourceIndex the index of the source to use.
       
    62         */
       
    63         virtual void ScaleL( 
       
    64             TInt aSourceIndex ) = 0;
       
    65 
       
    66         /**
       
    67         * Configures the scaler.
       
    68         * @param aDisplayMode which kind of display
       
    69         * @param aSize the width and height of the display
       
    70         * @return ETrue if previous scaling was cancelled
       
    71         */
       
    72         virtual TBool ConfigureL(
       
    73             TDisplayMode aDisplayMode,
       
    74             TSize aSize,
       
    75             TInt aSourceHandle1,
       
    76             TInt aSourceHandle2 ) = 0;
       
    77 
       
    78         /**
       
    79         * Deletes the scaling object.
       
    80         */
       
    81         virtual void Release() = 0;
       
    82 
       
    83         /**
       
    84         * Possibility to cancel the scaling.
       
    85         * @return error code of canceling.
       
    86         */
       
    87         virtual TInt Cancel() = 0;
       
    88     };
       
    89 
       
    90 /**
       
    91 * Image scaler factory.
       
    92 *
       
    93 *  @lib videoteleng.lib
       
    94 *  @since Series 60 2.8
       
    95 */
       
    96 class VtEngScalerFactory
       
    97     {
       
    98     public:
       
    99         /**
       
   100         * Factory method for creating scaler
       
   101         * @param aObserver a callback interface
       
   102         */
       
   103         static MVtEngImageScaler* CreateScalerL(
       
   104             MVtEngScalerObserver& aObserver );
       
   105     };
       
   106 
       
   107 #endif  // VTENGIMAGESCALER_H
       
   108 
       
   109 // End of File