os/graphics/graphicsdeviceinterface/gdi/inc/ShapeImpl.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/graphics/graphicsdeviceinterface/gdi/inc/ShapeImpl.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,86 @@
     1.4 +// Copyright (c) 2005-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 SHAPEIMPL_H_
    1.20 +#define SHAPEIMPL_H_
    1.21 +
    1.22 +#include <e32cmn.h>
    1.23 +
    1.24 +/**@file
    1.25 +@internalTechnology
    1.26 +*/
    1.27 +
    1.28 +class CFont;
    1.29 +class TDesC16;
    1.30 +
    1.31 +const TUid KFontGetShaping = {0x10274246};
    1.32 +const TUid KFontDeleteShaping = {0x102744D7};
    1.33 +
    1.34 +/** Internal class describing shaping information. */
    1.35 +class TShapeHeader
    1.36 +	{
    1.37 +public:
    1.38 +	/** Number of glyphs output. */
    1.39 +	TInt iGlyphCount;
    1.40 +	/** Number of characters consumed from the input. */
    1.41 +	TInt iCharacterCount;
    1.42 +	/** Reserved for future expansion. */
    1.43 +	TInt iReserved0;
    1.44 +	/** Reserved for future expansion. */
    1.45 +	TInt iReserved1;
    1.46 +	/** The glyph, position and indices data.
    1.47 +
    1.48 +	The first iGlyphCount * 4 bytes contain the glyph codes
    1.49 +	as 2-byte values. The next iGlyphCount * 4 + 4 bytes contain the
    1.50 +	positions in which these glyphs are to be drawn, in pixels, taking
    1.51 +	the original pen position as origin, with the x axis going right and
    1.52 +	the y axis going down. The next iGlyphCount * 2 bytes contain the
    1.53 +	indices of the characters in the input string that correspond to the
    1.54 +	glyphs in the output.
    1.55 +	
    1.56 +	The final entry in the position array is the total advance of the text.
    1.57 +
    1.58 +	Therefore this buffer is actually iGlyphCount * 10 + 4 bytes long. */
    1.59 +	TInt8 iBuffer[1];
    1.60 +	};
    1.61 +
    1.62 +/** For CFont::ExtendedFunctions aParam argument, with KFontGetShaping
    1.63 +function ID. */
    1.64 +class TFontShapeFunctionParameters
    1.65 +	{
    1.66 +public:
    1.67 +	/** The text, including context. */
    1.68 +	const TDesC16* iText;
    1.69 +	/** The start of the meat within iText. */
    1.70 +	TInt iStart;
    1.71 +	/** The end of the meat within iText. */
    1.72 +	TInt iEnd;
    1.73 +	/** Script code. */
    1.74 +	TInt iScript;
    1.75 +	/** Language code. 0 for default. */
    1.76 +	TInt iLanguage;
    1.77 +	/** Output from the shaper; a TShapeHeader on the shared heap. */
    1.78 +	const TShapeHeader* iShapeHeaderOutput;
    1.79 +	};
    1.80 +
    1.81 +/** For CFont::ExtendedFunctions aParam argument, with KFontDeleteShaping
    1.82 +function ID. */
    1.83 +class TFontShapeDeleteFunctionParameters
    1.84 +	{
    1.85 +public:
    1.86 +	const TShapeHeader* iShapeHeader;
    1.87 +	};
    1.88 +
    1.89 +#endif