williamr@2: // Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies). williamr@2: // All rights reserved. williamr@2: // This component and the accompanying materials are made available williamr@2: // under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members williamr@2: // which accompanies this distribution, and is available williamr@2: // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". williamr@2: // williamr@2: // Initial Contributors: williamr@2: // Nokia Corporation - initial contribution. williamr@2: // williamr@2: // Contributors: williamr@2: // williamr@2: // Description: williamr@2: // williamr@2: williamr@2: #ifndef __PALETTE_H__ williamr@2: #define __PALETTE_H__ williamr@2: williamr@2: #include williamr@2: williamr@2: class TColor256Util; williamr@2: williamr@2: williamr@2: class DynamicPalette williamr@2: /** Hooks to allow dynamic palette switching in 256 colour mode. williamr@2: williamr@2: TRgb::Color256() transparently invokes hooks in this class. The behaviour williamr@2: of the system can be customized by replacing the implementation in palette.dll williamr@2: with device-specific functionality to switch the colour palette at run-time. williamr@2: @publishedAll williamr@2: @released williamr@2: */ williamr@2: { williamr@2: public: williamr@2: /** Stores the index values of the palettes defined. This enum may be as williamr@2: short or as long as desired - there is no requirement that the size of the williamr@2: enum in any given implementation be limited to the five sample values given williamr@2: in this example implementation. */ williamr@2: enum TIndex williamr@2: { williamr@2: /** A palette index number. */ williamr@2: EIndex0, williamr@2: /** A palette index number. */ williamr@2: EIndex1, williamr@2: /** A palette index number. */ williamr@2: EIndex2, williamr@2: /** A palette index number. */ williamr@2: EIndex4, williamr@2: /** A palette index number. */ williamr@2: EIndex5, williamr@2: }; williamr@2: williamr@2: IMPORT_C static const TColor256Util* DefaultColor256Util(); williamr@2: IMPORT_C static void SetColor256Util(TIndex aIndex); williamr@2: williamr@2: IMPORT_C static const TUint32* Color16array(); williamr@2: IMPORT_C static const TUint8* Color16inverse(); williamr@2: }; williamr@2: williamr@2: #endif