os/graphics/graphicsdeviceinterface/colourpalette/inc/palette.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/graphics/graphicsdeviceinterface/colourpalette/inc/palette.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,60 @@
     1.4 +// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// under the terms of "Eclipse Public License v1.0"
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +//
    1.18 +
    1.19 +#ifndef __PALETTE_H__
    1.20 +#define __PALETTE_H__
    1.21 +
    1.22 +#include <e32base.h>
    1.23 +
    1.24 +class TColor256Util;
    1.25 +
    1.26 +
    1.27 +class DynamicPalette
    1.28 +/** Hooks to allow dynamic palette switching in 256 colour mode.
    1.29 +
    1.30 +TRgb::Color256() transparently invokes hooks in this class. The behaviour 
    1.31 +of the system can be customized by replacing the implementation in palette.dll 
    1.32 +with device-specific functionality to switch the colour palette at run-time. 
    1.33 +@publishedAll
    1.34 +@released
    1.35 +*/
    1.36 +	{
    1.37 +public:
    1.38 +	/** Stores the index values of the palettes defined. This enum may be as 
    1.39 +	short or as long as desired - there is no requirement that the size of the 
    1.40 +	enum in any given implementation be limited to the five sample values given 
    1.41 +	in this example implementation. */
    1.42 +	enum TIndex
    1.43 +		{
    1.44 +		/** A palette index number. */
    1.45 +		EIndex0,
    1.46 +		/** A palette index number. */
    1.47 +		EIndex1,
    1.48 +		/** A palette index number. */
    1.49 +		EIndex2,
    1.50 +		/** A palette index number. */
    1.51 +		EIndex4,
    1.52 +		/** A palette index number. */
    1.53 +		EIndex5,
    1.54 +	};
    1.55 +
    1.56 +	IMPORT_C static const TColor256Util* DefaultColor256Util();
    1.57 +	IMPORT_C static void SetColor256Util(TIndex aIndex);
    1.58 +
    1.59 +	IMPORT_C static const TUint32* Color16array();
    1.60 +	IMPORT_C static const TUint8* Color16inverse();
    1.61 +	};
    1.62 +
    1.63 +#endif