os/graphics/graphicsdeviceinterface/gdi/inc/ShapeInfo.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/graphics/graphicsdeviceinterface/gdi/inc/ShapeInfo.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,59 @@
     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 SHAPEINFO_H_
    1.20 +#define SHAPEINFO_H_
    1.21 +
    1.22 +#include <e32cmn.h>
    1.23 +
    1.24 +class CFont;
    1.25 +class TDesC16;
    1.26 +class TShapeHeader;
    1.27 +
    1.28 +/** Holds shaping information for text that requires it (for example Indic
    1.29 +text).
    1.30 +@publishedAll
    1.31 +@released
    1.32 +*/
    1.33 +class RShapeInfo
    1.34 +	{
    1.35 +public:
    1.36 +	struct TPoint16
    1.37 +		{
    1.38 +		TInt16 iX;
    1.39 +		TInt16 iY;
    1.40 +		};
    1.41 +	IMPORT_C RShapeInfo();
    1.42 +	TInt Open(const CFont* aFont, const TDesC16& aText,
    1.43 +		TInt aStartOfTextToShape, TInt aEndOfTextToShape,
    1.44 +		TInt aScriptCode, TInt aLanguageCode);
    1.45 +	IMPORT_C void Close();
    1.46 +	TInt GlyphCount() const;
    1.47 +	const TInt32* Glyphs() const;
    1.48 +	const TPoint16* GlyphPositions() const;
    1.49 +	TPoint16 Advance() const;
    1.50 +	const TInt16* Indices() const;
    1.51 +	TInt EndOfShapedText();
    1.52 +	IMPORT_C TBool IsOpen();
    1.53 +	void SetContext(TAny* aContextualProcessFunc);
    1.54 +	TAny* GetContext();
    1.55 +private:
    1.56 +	const CFont* iFont;
    1.57 +	const TShapeHeader* iHeader;
    1.58 +	TInt iEndOfShapedText;
    1.59 +	TAny* iContextualProcessFunc;
    1.60 +	};
    1.61 +
    1.62 +#endif