os/graphics/graphicsdeviceinterface/screendriver/smomap/scdraw.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 // Copyright (c) 2003-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".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 // This module define the class and constants used for the different display
    15 // mode supported.
    16 // Include files                                                   
    17 // 
    18 //
    19 
    20 /**
    21  @file
    22 */
    23 /********************************************************************/
    24 #if !defined__SCDRAW_H__
    25 #define __SCDRAW_H__
    26 
    27 #if !defined(__E32SVR_H__)
    28     #include <e32svr.h>
    29 #endif /* __E32SVR_H__ */
    30 
    31 #include "BMDRAW.H"
    32 
    33 /**
    34  *  Define the palette constants size
    35  * 
    36  */ 
    37 const TInt		KEightBppPaletteEntries		= 256 ;
    38 
    39 /*
    40  *  Define the constants of the Bpp mode to set in the 
    41  *  palette entry 0
    42  *
    43  */
    44 const TUint16	KEightBppPixelBitSize		= 3 << 12 ;
    45 const TUint16	KSixteenBppPixelBitSize		= 4 << 12 ;	// In active mode (TFT)
    46 
    47 /**
    48  *  Define the CDrawEightBppScreenBitmapColor class
    49  *  8 bpp Color
    50  */
    51 NONSHARABLE_CLASS(CDrawEightBppScreenBitmapColor) : public CDrawEightBppBitmapColor
    52 	{
    53 public:
    54 	virtual TInt  InitScreen() ;
    55 	virtual TInt  ConstructScreenL(TInt aScreenNo, TAny *aBitmapAddress, TSize aSize) ;
    56 	virtual void  OrientationsAvailable(TBool aOrientation[4]) ;
    57 	virtual TBool SetOrientation(TOrientation aOrientation) ;
    58     TInt SetCustomPalette(const CPalette* aPalette);
    59     virtual void SetDisplayMode(CFbsDrawDevice*);
    60    	virtual TInt HorzTwipsPerThousandPixels() const;
    61 	virtual TInt VertTwipsPerThousandPixels() const;
    62 protected:
    63 	virtual void SetSize(const TSize& aSize);	
    64 	TUint16* iPaletteAddress ;
    65     TInt iScreenNo;
    66 	};
    67 
    68 /**
    69  *  Define the CDrawSixteenBppScreenBitmap class
    70  *  16 bpp Color
    71  *
    72  */
    73 class CDrawSixteenBppScreenBitmap : public CDrawSixteenBppBitmap
    74 	{
    75 public:
    76 	virtual TInt  InitScreen() ;
    77 	virtual TInt  ConstructScreenL(TInt aScreenNo, TAny *aBitmapAddress, TSize aSize) ;
    78 	virtual void  OrientationsAvailable(TBool aOrientation[4]) ;
    79 	virtual TBool SetOrientation(TOrientation aOrientation) ;
    80     virtual void SetDisplayMode(CFbsDrawDevice*);
    81     virtual TInt HorzTwipsPerThousandPixels() const;
    82 	virtual TInt VertTwipsPerThousandPixels() const;
    83 protected:
    84 	virtual void SetSize(const TSize& aSize);	
    85     TInt iScreenNo;
    86 	};
    87 
    88 
    89 /**
    90  *  Define the CDrawUTwentyFourBppScreenBitmap class
    91  *  24 bpp Color
    92  *
    93  */
    94 class CDrawUTwentyFourBppScreenBitmap : public CDrawUTwentyFourBppBitmap
    95 	{
    96 public:
    97 	virtual TInt  InitScreen() ;
    98 	virtual TInt  ConstructScreenL(TInt aScreenNo, TAny *aBitmapAddress, TSize aSize) ;
    99 	virtual void  OrientationsAvailable(TBool aOrientation[4]) ;
   100 	virtual TBool SetOrientation(TOrientation aOrientation) ;
   101     virtual void SetDisplayMode(CFbsDrawDevice*);
   102     virtual TInt HorzTwipsPerThousandPixels() const;
   103 	virtual TInt VertTwipsPerThousandPixels() const;
   104 protected:
   105 	virtual void SetSize(const TSize& aSize);	
   106 	TUint16* iPaletteAddress ;
   107     TInt iScreenNo;	
   108     };
   109 
   110 /**
   111  *  Define the CDrawThirtyTwoBppScreenBitmapAlpha class
   112  *  32 bpp Color
   113  *
   114  */
   115 class CDrawThirtyTwoBppScreenBitmapAlpha : public CDrawThirtyTwoBppBitmapAlpha
   116 	{
   117 public:
   118 	virtual TInt  InitScreen() ;
   119 	virtual TInt  ConstructScreenL(TInt aScreenNo, TAny *aBitmapAddress, TSize aSize) ;
   120 	virtual void  OrientationsAvailable(TBool aOrientation[4]) ;
   121 	virtual TBool SetOrientation(TOrientation aOrientation) ;
   122     virtual void SetDisplayMode(CFbsDrawDevice*);
   123     virtual TInt HorzTwipsPerThousandPixels() const;
   124 	virtual TInt VertTwipsPerThousandPixels() const;
   125 protected:
   126 	virtual void SetSize(const TSize& aSize);	
   127 	TUint16* iPaletteAddress ;
   128     TInt iScreenNo;
   129     };
   130 
   131 /**
   132  *  Define the CDrawThirtyTwoBppScreenBitmapAlphaPM class
   133  *  32 bpp Color
   134  *
   135  */
   136 class CDrawThirtyTwoBppScreenBitmapAlphaPM : public CDrawThirtyTwoBppBitmapAlphaPM
   137 	{
   138 public:
   139 	virtual TInt  InitScreen() ;
   140 	virtual TInt  ConstructScreenL(TInt aScreenNo, TAny *aBitmapAddress, TSize aSize) ;
   141 	virtual void  OrientationsAvailable(TBool aOrientation[4]) ;
   142 	virtual TBool SetOrientation(TOrientation aOrientation) ;
   143     virtual void SetDisplayMode(CFbsDrawDevice*);
   144     virtual TInt HorzTwipsPerThousandPixels() const;
   145 	virtual TInt VertTwipsPerThousandPixels() const;
   146 protected:
   147 	virtual void SetSize(const TSize& aSize);	
   148 	TUint16* iPaletteAddress ;
   149     TInt iScreenNo;
   150     };
   151 
   152 #endif /* __SCDRAW_H__ */
   153