First public contribution.
2 * Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
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".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
19 #if (!defined __T_SCREEN_DRIVER_DATA_H__)
20 #define __T_SCREEN_DRIVER_DATA_H__
24 #include "T_HALData.h"
27 * Test Active Notification class
30 class CT_ScreenDriverData : public CT_HALData
36 ~CT_ScreenDriverData();
39 * Two phase constructor
41 * @leave system wide error
43 static CT_ScreenDriverData* NewL();
45 virtual TAny* GetObject();
46 virtual TBool DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex);
50 * Protected constructor. First phase construction
52 CT_ScreenDriverData();
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);
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);
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);
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);
100 TInt iDisplayMaxBrightness;
101 TInt iDisplayBrightness;
102 TInt iDisplayMaxContrast;
103 TInt iDisplayContrast;
104 TUint8* iDisplayMemoryAddress;
105 TInt iDisplayIsPixelOrderRGB;
106 TInt iDisplayIsPixelOrderLandscape;
108 TInt iDisplayNumModes;
110 TInt iDisplayPaletteEntry;
111 TInt iDisplayXPixels;
112 TInt iDisplayYPixels;
115 TInt iDisplayBitsPerPixel;
116 TInt iDisplayOffsetToFirstPixel;
117 TInt iDisplayOffsetBetweenLines;
118 TBool iDisplayIsPalettized;
119 TInt iDisplayNumberOfScreens;
122 RArray<TInt> iPalette;
125 static const THalTableLookup iTableLookup[];
128 #endif /* __T_SCREEN_DRIVER_DATA_H__ */