webengine/pagescaler/inc/pagescaler.h
changeset 0 dd21522fd290
equal deleted inserted replaced
-1:000000000000 0:dd21522fd290
       
     1 /*
       
     2 * Copyright (c) 2004 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 PAGESCALER_H
       
    21 #define PAGESCALER_H
       
    22 
       
    23 //  INCLUDES
       
    24 
       
    25 #include <e32base.h>
       
    26 #include <gdi.h>
       
    27 
       
    28 // CONSTANTS
       
    29 
       
    30 // MACROS
       
    31 
       
    32 // DATA TYPES
       
    33 
       
    34 // FUNCTION PROTOTYPES
       
    35 
       
    36 // FORWARD DECLARATIONS
       
    37 
       
    38 class CWindowGc;
       
    39 class CFbsBitGc;
       
    40 class CFbsBitmap;
       
    41 class CCoeControl;
       
    42 
       
    43 
       
    44 // CLASS DECLARATION
       
    45 
       
    46 /**
       
    47 *
       
    48 *
       
    49 *  @lib webkit.dll
       
    50 *  @since 3.1
       
    51 */
       
    52 class MPageScalerCallback
       
    53     {
       
    54     public:
       
    55         /**
       
    56         *
       
    57         * @since 3.1
       
    58         * @param
       
    59         * @return
       
    60         */
       
    61         virtual void DrawDocumentPart(CFbsBitGc& aGc, CFbsBitmap* aBitmap, const TRect& aDocumentAreaToDraw) = 0;
       
    62 
       
    63         /**
       
    64         *
       
    65         * @since 3.1
       
    66         * @param
       
    67         * @return
       
    68         */
       
    69         virtual TRect DocumentViewport()  = 0;
       
    70 
       
    71         /**
       
    72         *
       
    73         * @since 3.1
       
    74         * @param
       
    75         * @return
       
    76         */
       
    77         virtual void ScaledPageChanged(const TRect& aArea, TBool aFullScreen, TBool aScroll) = 0;
       
    78 
       
    79         /**
       
    80         *
       
    81         * @since 3.1
       
    82         * @param
       
    83         * @return
       
    84         */
       
    85         virtual TSize DocumentSize() = 0;
       
    86 
       
    87         /**
       
    88         *
       
    89         * @since 3.2
       
    90         * @param
       
    91         * @return
       
    92         */
       
    93         virtual TBool TouchScrolling() = 0;
       
    94         
       
    95         
       
    96         /**
       
    97         *
       
    98         * @since 3.1
       
    99         * @param
       
   100         * @return
       
   101         */
       
   102         virtual CCoeControl& PageControlView() = 0;
       
   103     };
       
   104 
       
   105 // CLASS DECLARATION
       
   106 
       
   107 /**
       
   108 *
       
   109 *
       
   110 *  @lib webkit.dll
       
   111 *  @since 3.1
       
   112 */
       
   113 class CPageScaler : public CBase
       
   114     {
       
   115     public:
       
   116 
       
   117         enum TPosition
       
   118             {
       
   119             ETopLeft,
       
   120             ETopRight,
       
   121             EBottomLeft,
       
   122             EBottomRight
       
   123             };
       
   124 
       
   125     public:  // Constructors and destructor
       
   126 
       
   127         /**
       
   128         * Two-phased constructor.
       
   129         */
       
   130         IMPORT_C static CPageScaler* NewL(MPageScalerCallback& aCallback, TDisplayMode aMode, TBool aLowQuality);
       
   131 
       
   132         /**
       
   133         * Destructor.
       
   134         */
       
   135         virtual ~CPageScaler();
       
   136 
       
   137     public:
       
   138 
       
   139         /**
       
   140         *
       
   141         * @since 3.1
       
   142         * @param
       
   143         * @return
       
   144         */
       
   145         virtual void SetVisibleUntil(TTimeIntervalMicroSeconds32 aUntil);
       
   146 
       
   147         /**
       
   148         *
       
   149         * @since 3.1
       
   150         * @param
       
   151         * @return
       
   152         */
       
   153         virtual void SetVisible(TBool aVisible);
       
   154 
       
   155         /**
       
   156         *
       
   157         * @since 3.1
       
   158         * @param
       
   159         * @return
       
   160         */
       
   161         virtual TBool Visible() const;
       
   162 
       
   163         /**
       
   164         *
       
   165         * @since 3.1
       
   166         * @param
       
   167         * @return
       
   168         */
       
   169         virtual void SetZoomOutLevel(TInt aPercent);
       
   170 
       
   171         /**
       
   172         *
       
   173         * @since 3.1
       
   174         * @param
       
   175         * @return
       
   176         */
       
   177         virtual TInt ZoomOutLevel() const;
       
   178 
       
   179         /**
       
   180         *
       
   181         * @since 3.1
       
   182         * @param
       
   183         * @return
       
   184         */
       
   185         virtual void SetMaxSize(TSize aSize);
       
   186 
       
   187         /**
       
   188         *
       
   189         * @since 3.1
       
   190         * @param
       
   191         * @return
       
   192         */
       
   193         virtual TSize MaxSize() const;
       
   194 
       
   195         /**
       
   196         *
       
   197         * @since 3.1
       
   198         * @param
       
   199         * @return
       
   200         */
       
   201         virtual void SetTransparency(TInt aPercent);
       
   202 
       
   203         /**
       
   204         *
       
   205         * @since 3.1
       
   206         * @param
       
   207         * @return
       
   208         */
       
   209         virtual TInt Transparency() const;
       
   210 
       
   211         /**
       
   212         *
       
   213         * @since 3.1
       
   214         * @param
       
   215         * @return
       
   216         */
       
   217         virtual TRect Rect() const;
       
   218 
       
   219         /**
       
   220         *
       
   221         * @since 3.1
       
   222         * @param
       
   223         * @return
       
   224         */
       
   225         virtual void SetRelativePosition(TInt aXDist, TInt aYDist, TPosition aPosition);
       
   226 
       
   227         /**
       
   228         *
       
   229         * @since 3.1
       
   230         * @param
       
   231         * @return
       
   232         */
       
   233         virtual TRect IndicatorRect() const;
       
   234 
       
   235         /**
       
   236         *
       
   237         * @since 3.1
       
   238         * @param
       
   239         * @return
       
   240         */
       
   241         virtual void DocumentStarted();
       
   242 
       
   243         /**
       
   244         *
       
   245         * @since 3.1
       
   246         * @param
       
   247         * @return
       
   248         */
       
   249         virtual void DocumentChangedL();
       
   250 
       
   251         /**
       
   252         *
       
   253         * @since 3.1
       
   254         * @param
       
   255         * @return
       
   256         */
       
   257         virtual void DocumentCompleted();
       
   258 
       
   259         /**
       
   260         *
       
   261         * @since 3.1
       
   262         * @param
       
   263         * @return
       
   264         */
       
   265         virtual void DocumentViewportMoved();
       
   266 
       
   267         /**
       
   268         * @since 3.1
       
   269         * @param
       
   270         * @return
       
   271         */
       
   272         virtual void Draw(CWindowGc& aGc, const TRect& aRect) const;
       
   273 
       
   274         /**
       
   275         * @since 3.1
       
   276         * @param
       
   277         * @return the scaled copy of the page
       
   278         */
       
   279         virtual CFbsBitmap* ScaledPage() const;
       
   280 
       
   281         /**
       
   282         * @since 3.1
       
   283         * @return
       
   284         */
       
   285         virtual TRect ContainerRect() const;
       
   286 
       
   287         /**
       
   288         * @since 3.1
       
   289         * @return
       
   290         */
       
   291         virtual void SetContainerRect(const TRect& aRect);
       
   292 
       
   293         /**
       
   294         * @since 3.1
       
   295         * @return
       
   296         */
       
   297         virtual TBool FullScreenMode() const;
       
   298 
       
   299         /**
       
   300         * @since 3.1
       
   301         * @return
       
   302         */
       
   303         virtual void SetFullScreenMode(TBool aFullScreen);
       
   304 
       
   305         /**
       
   306         * @since 3.1
       
   307         * @return
       
   308         */
       
   309         IMPORT_C static TBool HasOverlaySupport();
       
   310 
       
   311 
       
   312     protected:
       
   313 
       
   314         /**
       
   315         * C++ default constructor.
       
   316         */
       
   317         CPageScaler();
       
   318 
       
   319         /**
       
   320         * By default Symbian 2nd phase constructor is private.
       
   321         */
       
   322         void ConstructL();
       
   323     };
       
   324 
       
   325 
       
   326 #endif      // PAGESCALER_H
       
   327 
       
   328 // End of File