sl@0: // Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // This module define the class and constants used for the different display sl@0: // mode supported. sl@0: // Include files sl@0: // sl@0: // sl@0: sl@0: /** sl@0: @file sl@0: */ sl@0: /********************************************************************/ sl@0: #if !defined__SCDRAW_H__ sl@0: #define __SCDRAW_H__ sl@0: sl@0: #if !defined(__E32SVR_H__) sl@0: #include sl@0: #endif /* __E32SVR_H__ */ sl@0: sl@0: #include "BMDRAW.H" sl@0: sl@0: /** sl@0: * Define the palette constants size sl@0: * sl@0: */ sl@0: const TInt KEightBppPaletteEntries = 256 ; sl@0: sl@0: /* sl@0: * Define the constants of the Bpp mode to set in the sl@0: * palette entry 0 sl@0: * sl@0: */ sl@0: const TUint16 KEightBppPixelBitSize = 3 << 12 ; sl@0: const TUint16 KSixteenBppPixelBitSize = 4 << 12 ; // In active mode (TFT) sl@0: sl@0: /** sl@0: * Define the CDrawEightBppScreenBitmapColor class sl@0: * 8 bpp Color sl@0: */ sl@0: NONSHARABLE_CLASS(CDrawEightBppScreenBitmapColor) : public CDrawEightBppBitmapColor sl@0: { sl@0: public: sl@0: virtual TInt InitScreen() ; sl@0: virtual TInt ConstructScreenL(TInt aScreenNo, TAny *aBitmapAddress, TSize aSize) ; sl@0: virtual void OrientationsAvailable(TBool aOrientation[4]) ; sl@0: virtual TBool SetOrientation(TOrientation aOrientation) ; sl@0: TInt SetCustomPalette(const CPalette* aPalette); sl@0: virtual void SetDisplayMode(CFbsDrawDevice*); sl@0: virtual TInt HorzTwipsPerThousandPixels() const; sl@0: virtual TInt VertTwipsPerThousandPixels() const; sl@0: protected: sl@0: virtual void SetSize(const TSize& aSize); sl@0: TUint16* iPaletteAddress ; sl@0: TInt iScreenNo; sl@0: }; sl@0: sl@0: /** sl@0: * Define the CDrawSixteenBppScreenBitmap class sl@0: * 16 bpp Color sl@0: * sl@0: */ sl@0: class CDrawSixteenBppScreenBitmap : public CDrawSixteenBppBitmap sl@0: { sl@0: public: sl@0: virtual TInt InitScreen() ; sl@0: virtual TInt ConstructScreenL(TInt aScreenNo, TAny *aBitmapAddress, TSize aSize) ; sl@0: virtual void OrientationsAvailable(TBool aOrientation[4]) ; sl@0: virtual TBool SetOrientation(TOrientation aOrientation) ; sl@0: virtual void SetDisplayMode(CFbsDrawDevice*); sl@0: virtual TInt HorzTwipsPerThousandPixels() const; sl@0: virtual TInt VertTwipsPerThousandPixels() const; sl@0: protected: sl@0: virtual void SetSize(const TSize& aSize); sl@0: TInt iScreenNo; sl@0: }; sl@0: sl@0: sl@0: /** sl@0: * Define the CDrawUTwentyFourBppScreenBitmap class sl@0: * 24 bpp Color sl@0: * sl@0: */ sl@0: class CDrawUTwentyFourBppScreenBitmap : public CDrawUTwentyFourBppBitmap sl@0: { sl@0: public: sl@0: virtual TInt InitScreen() ; sl@0: virtual TInt ConstructScreenL(TInt aScreenNo, TAny *aBitmapAddress, TSize aSize) ; sl@0: virtual void OrientationsAvailable(TBool aOrientation[4]) ; sl@0: virtual TBool SetOrientation(TOrientation aOrientation) ; sl@0: virtual void SetDisplayMode(CFbsDrawDevice*); sl@0: virtual TInt HorzTwipsPerThousandPixels() const; sl@0: virtual TInt VertTwipsPerThousandPixels() const; sl@0: protected: sl@0: virtual void SetSize(const TSize& aSize); sl@0: TUint16* iPaletteAddress ; sl@0: TInt iScreenNo; sl@0: }; sl@0: sl@0: /** sl@0: * Define the CDrawThirtyTwoBppScreenBitmapAlpha class sl@0: * 32 bpp Color sl@0: * sl@0: */ sl@0: class CDrawThirtyTwoBppScreenBitmapAlpha : public CDrawThirtyTwoBppBitmapAlpha sl@0: { sl@0: public: sl@0: virtual TInt InitScreen() ; sl@0: virtual TInt ConstructScreenL(TInt aScreenNo, TAny *aBitmapAddress, TSize aSize) ; sl@0: virtual void OrientationsAvailable(TBool aOrientation[4]) ; sl@0: virtual TBool SetOrientation(TOrientation aOrientation) ; sl@0: virtual void SetDisplayMode(CFbsDrawDevice*); sl@0: virtual TInt HorzTwipsPerThousandPixels() const; sl@0: virtual TInt VertTwipsPerThousandPixels() const; sl@0: protected: sl@0: virtual void SetSize(const TSize& aSize); sl@0: TUint16* iPaletteAddress ; sl@0: TInt iScreenNo; sl@0: }; sl@0: sl@0: /** sl@0: * Define the CDrawThirtyTwoBppScreenBitmapAlphaPM class sl@0: * 32 bpp Color sl@0: * sl@0: */ sl@0: class CDrawThirtyTwoBppScreenBitmapAlphaPM : public CDrawThirtyTwoBppBitmapAlphaPM sl@0: { sl@0: public: sl@0: virtual TInt InitScreen() ; sl@0: virtual TInt ConstructScreenL(TInt aScreenNo, TAny *aBitmapAddress, TSize aSize) ; sl@0: virtual void OrientationsAvailable(TBool aOrientation[4]) ; sl@0: virtual TBool SetOrientation(TOrientation aOrientation) ; sl@0: virtual void SetDisplayMode(CFbsDrawDevice*); sl@0: virtual TInt HorzTwipsPerThousandPixels() const; sl@0: virtual TInt VertTwipsPerThousandPixels() const; sl@0: protected: sl@0: virtual void SetSize(const TSize& aSize); sl@0: TUint16* iPaletteAddress ; sl@0: TInt iScreenNo; sl@0: }; sl@0: sl@0: #endif /* __SCDRAW_H__ */ sl@0: