First public contribution.
1 // Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
17 #ifndef OPENVGENGINE_H_
18 #define OPENVGENGINE_H_
23 #include <VG/openvg.h>
27 const TInt KMaxDisplayCoversExample3 = 40;
28 const TInt KMaxDisplayLeftExample3 = -3;
29 const TInt KMaxDisplayRightExample3 = 3;
31 // the max number of covers visible on the screen at any given time
32 const TInt KMaxCoversExample3 = 40;
35 class COpenVGEngine : public CBase, public MEngine
38 static COpenVGEngine* NewL(RWindow& aWindow, EGLDisplay& aDisplay, EGLSurface& aSurface, EGLContext& aContext);
48 TKeyResponse HandleKeyEventL(const TKeyEvent& aKeyEvent);
51 COpenVGEngine(RWindow& aWindow, EGLDisplay& aDisplay, EGLSurface& aSurface, EGLContext& aContext);
52 void DrawCover(TInt i);
55 void ToggleCoverReflection();
56 VGfloat GetMiddleCoverScalingFactor(VGfloat coverPosition);
67 VGfloat iCoverLocation[KMaxCoversExample3];
69 TBool iHasPendingDraw;
70 TBool iShowCoverImage;
77 RArray<VGImage> iImages;
78 TInt iCurrentImageIndex;