graphicsdeviceinterface/colourpalette/inc/palette.h
changeset 0 5d03bc08d59c
equal deleted inserted replaced
-1:000000000000 0:5d03bc08d59c
       
     1 // Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 #ifndef __PALETTE_H__
       
    17 #define __PALETTE_H__
       
    18 
       
    19 #include <e32base.h>
       
    20 
       
    21 class TColor256Util;
       
    22 
       
    23 
       
    24 class DynamicPalette
       
    25 /** Hooks to allow dynamic palette switching in 256 colour mode.
       
    26 
       
    27 TRgb::Color256() transparently invokes hooks in this class. The behaviour 
       
    28 of the system can be customized by replacing the implementation in palette.dll 
       
    29 with device-specific functionality to switch the colour palette at run-time. 
       
    30 @publishedAll
       
    31 @released
       
    32 */
       
    33 	{
       
    34 public:
       
    35 	/** Stores the index values of the palettes defined. This enum may be as 
       
    36 	short or as long as desired - there is no requirement that the size of the 
       
    37 	enum in any given implementation be limited to the five sample values given 
       
    38 	in this example implementation. */
       
    39 	enum TIndex
       
    40 		{
       
    41 		/** A palette index number. */
       
    42 		EIndex0,
       
    43 		/** A palette index number. */
       
    44 		EIndex1,
       
    45 		/** A palette index number. */
       
    46 		EIndex2,
       
    47 		/** A palette index number. */
       
    48 		EIndex4,
       
    49 		/** A palette index number. */
       
    50 		EIndex5,
       
    51 	};
       
    52 
       
    53 	IMPORT_C static const TColor256Util* DefaultColor256Util();
       
    54 	IMPORT_C static void SetColor256Util(TIndex aIndex);
       
    55 
       
    56 	IMPORT_C static const TUint32* Color16array();
       
    57 	IMPORT_C static const TUint8* Color16inverse();
       
    58 	};
       
    59 
       
    60 #endif