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