os/boardsupport/haitest/bspsvs/suite/bsp/lcd/inc/T_ScreenDriverData.h
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
     1 /*
     2 * Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     8 *
     9 * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    11 *
    12 * Contributors:
    13 *
    14 * Description:
    15 *
    16 */
    17 
    18 
    19 #if (!defined __T_SCREEN_DRIVER_DATA_H__)
    20 #define __T_SCREEN_DRIVER_DATA_H__
    21 
    22 
    23 //	User Includes
    24 #include "T_HALData.h"
    25 
    26 /**
    27  * Test Active Notification class
    28  *
    29  */
    30 class CT_ScreenDriverData : public CT_HALData
    31 	{
    32 public:
    33 	/**
    34 	* Public destructor
    35 	*/
    36 	~CT_ScreenDriverData();
    37 
    38 	/**
    39 	* Two phase constructor
    40 	*
    41 	* @leave	system wide error
    42 	*/
    43 	static	CT_ScreenDriverData*	NewL();
    44 
    45 	virtual TAny*	GetObject();
    46 	virtual TBool	DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex);
    47 
    48 protected:
    49 	/**
    50 	* Protected constructor. First phase construction
    51 	*/
    52 	CT_ScreenDriverData();
    53 
    54 	void	ConstructL();
    55 
    56 	static TBool	GetPrepareColorIndex(CDataWrapperBase* aThis, const TDesC& aSection, TInt& aValueStart, TInt& aValueEnd);
    57 	static TBool	GetPrepareDisplayMode(CDataWrapperBase* aThis, const TDesC& aSection, TInt& aValueStart, TInt& aValueEnd);
    58 
    59 	static void		SetDisplayState(CDataWrapperBase* aThis, TInt aValue);
    60 	static void		SetBacklightState(CDataWrapperBase* aThis, TInt aValue);
    61 	static void		SetBacklight(CDataWrapperBase* aThis, TInt aValue);
    62 	static void		SetDisplayMaxBrightness(CDataWrapperBase* aThis, TInt aValue);
    63 	static void		SetDisplayBrightness(CDataWrapperBase* aThis, TInt aValue);
    64 	static void		SetDisplayMaxContrast(CDataWrapperBase* aThis, TInt aValue);
    65 	static void		SetDisplayContrast(CDataWrapperBase* aThis, TInt aValue);
    66 	static void		SetDisplayMemoryAddress(CDataWrapperBase* aThis, TInt aValue);
    67 	static void		SetDisplayIsPixelOrderRGB(CDataWrapperBase* aThis, TInt aValue);
    68 	static void		SetDisplayIsPixelOrderLandscape(CDataWrapperBase* aThis, TInt aValue);
    69 	static void		SetDisplayMode(CDataWrapperBase* aThis, TInt aValue);
    70 	static void		SetDisplayNumModes(CDataWrapperBase* aThis, TInt aValue);
    71 	static void		SetDisplayColors(CDataWrapperBase* aThis, TInt aValue);
    72 	static void		SetDisplayPaletteEntry(CDataWrapperBase* aThis, TInt aValue);
    73 	static void		SetDisplayXPixels(CDataWrapperBase* aThis, TInt aValue);
    74 	static void		SetDisplayYPixels(CDataWrapperBase* aThis, TInt aValue);
    75 	static void		SetDisplayXTwips(CDataWrapperBase* aThis, TInt aValue);
    76 	static void		SetDisplayYTwips(CDataWrapperBase* aThis, TInt aValue);
    77 	static void		SetDisplayBitsPerPixel(CDataWrapperBase* aThis, TInt aValue);
    78 	static void		SetDisplayOffsetToFirstPixel(CDataWrapperBase* aThis, TInt aValue);
    79 	static void		SetDisplayOffsetBetweenLines(CDataWrapperBase* aThis, TInt aValue);
    80 	static void		SetDisplayIsPalettized(CDataWrapperBase* aThis, TInt aValue);
    81 	static void		SetDisplayNumberOfScreens(CDataWrapperBase* aThis, TInt aValue);
    82 
    83 private:
    84 	void	DoCmdUtilityFillColorL(const TDesC& aSection);
    85 	void	DoCmdUtilityFillMultiColorL(const TDesC& aSection);
    86 	void	DoCmdUtilityMovingRectangleL(const TDesC& aSection);
    87 	void	DoCmdUtilityFillHorizontalStripL(const TDesC& aSection);
    88 	void	DoCmdUtilityFillVerticalStripL(const TDesC& aSection);
    89 
    90 	//	Screen Driver Utils
    91 	TBool	GetRgbFromConfig(const TDesC& aSectName, const TDesC& aKeyName, TUint& aRed, TUint& aGreen, TUint& aBlue, TUint& aAlpha);
    92 	TBool	GetRgbFromConfig(const TDesC& aSectName, const TDesC& aKeyName, TInt& aRed, TInt& aGreen, TInt& aBlue, TInt& aAlpha);
    93 	TBool	GetColorFromConfig(const TDesC& aSectName, const TDesC& aKeyName, TUint& aColor, TPtrC& aLogColor);
    94 	void	DrawLine(TUint aColor, TUint8* aMemoryAddress, TInt aLeftMargin, TInt aPixels);
    95 
    96 protected:
    97 	TInt			iDisplayState;
    98 	TInt			iBacklightState;
    99 	TInt			iBacklight;
   100 	TInt			iDisplayMaxBrightness;
   101 	TInt			iDisplayBrightness;
   102 	TInt			iDisplayMaxContrast;
   103 	TInt			iDisplayContrast;
   104 	TUint8*			iDisplayMemoryAddress;
   105 	TInt			iDisplayIsPixelOrderRGB;
   106 	TInt			iDisplayIsPixelOrderLandscape;
   107 	TInt			iDisplayMode;
   108 	TInt			iDisplayNumModes;
   109 	TInt			iDisplayColors;
   110 	TInt			iDisplayPaletteEntry;
   111 	TInt			iDisplayXPixels;
   112 	TInt			iDisplayYPixels;
   113 	TInt			iDisplayXTwips;
   114 	TInt			iDisplayYTwips;
   115 	TInt			iDisplayBitsPerPixel;
   116 	TInt			iDisplayOffsetToFirstPixel;
   117 	TInt			iDisplayOffsetBetweenLines;
   118 	TBool			iDisplayIsPalettized;
   119 	TInt			iDisplayNumberOfScreens;
   120 
   121 	//	Color palette
   122 	RArray<TInt>	iPalette;
   123 
   124 private:
   125 	static const THalTableLookup	iTableLookup[];
   126 	};
   127 
   128 #endif /* __T_SCREEN_DRIVER_DATA_H__ */