os/graphics/graphicsdeviceinterface/screendriver/smomap/scdraw.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/graphics/graphicsdeviceinterface/screendriver/smomap/scdraw.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,153 @@
     1.4 +// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// under the terms of "Eclipse Public License v1.0"
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +// This module define the class and constants used for the different display
    1.18 +// mode supported.
    1.19 +// Include files                                                   
    1.20 +// 
    1.21 +//
    1.22 +
    1.23 +/**
    1.24 + @file
    1.25 +*/
    1.26 +/********************************************************************/
    1.27 +#if !defined__SCDRAW_H__
    1.28 +#define __SCDRAW_H__
    1.29 +
    1.30 +#if !defined(__E32SVR_H__)
    1.31 +    #include <e32svr.h>
    1.32 +#endif /* __E32SVR_H__ */
    1.33 +
    1.34 +#include "BMDRAW.H"
    1.35 +
    1.36 +/**
    1.37 + *  Define the palette constants size
    1.38 + * 
    1.39 + */ 
    1.40 +const TInt		KEightBppPaletteEntries		= 256 ;
    1.41 +
    1.42 +/*
    1.43 + *  Define the constants of the Bpp mode to set in the 
    1.44 + *  palette entry 0
    1.45 + *
    1.46 + */
    1.47 +const TUint16	KEightBppPixelBitSize		= 3 << 12 ;
    1.48 +const TUint16	KSixteenBppPixelBitSize		= 4 << 12 ;	// In active mode (TFT)
    1.49 +
    1.50 +/**
    1.51 + *  Define the CDrawEightBppScreenBitmapColor class
    1.52 + *  8 bpp Color
    1.53 + */
    1.54 +NONSHARABLE_CLASS(CDrawEightBppScreenBitmapColor) : public CDrawEightBppBitmapColor
    1.55 +	{
    1.56 +public:
    1.57 +	virtual TInt  InitScreen() ;
    1.58 +	virtual TInt  ConstructScreenL(TInt aScreenNo, TAny *aBitmapAddress, TSize aSize) ;
    1.59 +	virtual void  OrientationsAvailable(TBool aOrientation[4]) ;
    1.60 +	virtual TBool SetOrientation(TOrientation aOrientation) ;
    1.61 +    TInt SetCustomPalette(const CPalette* aPalette);
    1.62 +    virtual void SetDisplayMode(CFbsDrawDevice*);
    1.63 +   	virtual TInt HorzTwipsPerThousandPixels() const;
    1.64 +	virtual TInt VertTwipsPerThousandPixels() const;
    1.65 +protected:
    1.66 +	virtual void SetSize(const TSize& aSize);	
    1.67 +	TUint16* iPaletteAddress ;
    1.68 +    TInt iScreenNo;
    1.69 +	};
    1.70 +
    1.71 +/**
    1.72 + *  Define the CDrawSixteenBppScreenBitmap class
    1.73 + *  16 bpp Color
    1.74 + *
    1.75 + */
    1.76 +class CDrawSixteenBppScreenBitmap : public CDrawSixteenBppBitmap
    1.77 +	{
    1.78 +public:
    1.79 +	virtual TInt  InitScreen() ;
    1.80 +	virtual TInt  ConstructScreenL(TInt aScreenNo, TAny *aBitmapAddress, TSize aSize) ;
    1.81 +	virtual void  OrientationsAvailable(TBool aOrientation[4]) ;
    1.82 +	virtual TBool SetOrientation(TOrientation aOrientation) ;
    1.83 +    virtual void SetDisplayMode(CFbsDrawDevice*);
    1.84 +    virtual TInt HorzTwipsPerThousandPixels() const;
    1.85 +	virtual TInt VertTwipsPerThousandPixels() const;
    1.86 +protected:
    1.87 +	virtual void SetSize(const TSize& aSize);	
    1.88 +    TInt iScreenNo;
    1.89 +	};
    1.90 +
    1.91 +
    1.92 +/**
    1.93 + *  Define the CDrawUTwentyFourBppScreenBitmap class
    1.94 + *  24 bpp Color
    1.95 + *
    1.96 + */
    1.97 +class CDrawUTwentyFourBppScreenBitmap : public CDrawUTwentyFourBppBitmap
    1.98 +	{
    1.99 +public:
   1.100 +	virtual TInt  InitScreen() ;
   1.101 +	virtual TInt  ConstructScreenL(TInt aScreenNo, TAny *aBitmapAddress, TSize aSize) ;
   1.102 +	virtual void  OrientationsAvailable(TBool aOrientation[4]) ;
   1.103 +	virtual TBool SetOrientation(TOrientation aOrientation) ;
   1.104 +    virtual void SetDisplayMode(CFbsDrawDevice*);
   1.105 +    virtual TInt HorzTwipsPerThousandPixels() const;
   1.106 +	virtual TInt VertTwipsPerThousandPixels() const;
   1.107 +protected:
   1.108 +	virtual void SetSize(const TSize& aSize);	
   1.109 +	TUint16* iPaletteAddress ;
   1.110 +    TInt iScreenNo;	
   1.111 +    };
   1.112 +
   1.113 +/**
   1.114 + *  Define the CDrawThirtyTwoBppScreenBitmapAlpha class
   1.115 + *  32 bpp Color
   1.116 + *
   1.117 + */
   1.118 +class CDrawThirtyTwoBppScreenBitmapAlpha : public CDrawThirtyTwoBppBitmapAlpha
   1.119 +	{
   1.120 +public:
   1.121 +	virtual TInt  InitScreen() ;
   1.122 +	virtual TInt  ConstructScreenL(TInt aScreenNo, TAny *aBitmapAddress, TSize aSize) ;
   1.123 +	virtual void  OrientationsAvailable(TBool aOrientation[4]) ;
   1.124 +	virtual TBool SetOrientation(TOrientation aOrientation) ;
   1.125 +    virtual void SetDisplayMode(CFbsDrawDevice*);
   1.126 +    virtual TInt HorzTwipsPerThousandPixels() const;
   1.127 +	virtual TInt VertTwipsPerThousandPixels() const;
   1.128 +protected:
   1.129 +	virtual void SetSize(const TSize& aSize);	
   1.130 +	TUint16* iPaletteAddress ;
   1.131 +    TInt iScreenNo;
   1.132 +    };
   1.133 +
   1.134 +/**
   1.135 + *  Define the CDrawThirtyTwoBppScreenBitmapAlphaPM class
   1.136 + *  32 bpp Color
   1.137 + *
   1.138 + */
   1.139 +class CDrawThirtyTwoBppScreenBitmapAlphaPM : public CDrawThirtyTwoBppBitmapAlphaPM
   1.140 +	{
   1.141 +public:
   1.142 +	virtual TInt  InitScreen() ;
   1.143 +	virtual TInt  ConstructScreenL(TInt aScreenNo, TAny *aBitmapAddress, TSize aSize) ;
   1.144 +	virtual void  OrientationsAvailable(TBool aOrientation[4]) ;
   1.145 +	virtual TBool SetOrientation(TOrientation aOrientation) ;
   1.146 +    virtual void SetDisplayMode(CFbsDrawDevice*);
   1.147 +    virtual TInt HorzTwipsPerThousandPixels() const;
   1.148 +	virtual TInt VertTwipsPerThousandPixels() const;
   1.149 +protected:
   1.150 +	virtual void SetSize(const TSize& aSize);	
   1.151 +	TUint16* iPaletteAddress ;
   1.152 +    TInt iScreenNo;
   1.153 +    };
   1.154 +
   1.155 +#endif /* __SCDRAW_H__ */
   1.156 +