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