sl@0
|
1 |
// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
|
sl@0
|
2 |
// All rights reserved.
|
sl@0
|
3 |
// This component and the accompanying materials are made available
|
sl@0
|
4 |
// under the terms of "Eclipse Public License v1.0"
|
sl@0
|
5 |
// which accompanies this distribution, and is available
|
sl@0
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
sl@0
|
7 |
//
|
sl@0
|
8 |
// Initial Contributors:
|
sl@0
|
9 |
// Nokia Corporation - initial contribution.
|
sl@0
|
10 |
//
|
sl@0
|
11 |
// Contributors:
|
sl@0
|
12 |
//
|
sl@0
|
13 |
// Description:
|
sl@0
|
14 |
//
|
sl@0
|
15 |
|
sl@0
|
16 |
#ifndef SHAPEINFO_H_
|
sl@0
|
17 |
#define SHAPEINFO_H_
|
sl@0
|
18 |
|
sl@0
|
19 |
#include <e32cmn.h>
|
sl@0
|
20 |
|
sl@0
|
21 |
class CFont;
|
sl@0
|
22 |
class TDesC16;
|
sl@0
|
23 |
class TShapeHeader;
|
sl@0
|
24 |
|
sl@0
|
25 |
/** Holds shaping information for text that requires it (for example Indic
|
sl@0
|
26 |
text).
|
sl@0
|
27 |
@publishedAll
|
sl@0
|
28 |
@released
|
sl@0
|
29 |
*/
|
sl@0
|
30 |
class RShapeInfo
|
sl@0
|
31 |
{
|
sl@0
|
32 |
public:
|
sl@0
|
33 |
struct TPoint16
|
sl@0
|
34 |
{
|
sl@0
|
35 |
TInt16 iX;
|
sl@0
|
36 |
TInt16 iY;
|
sl@0
|
37 |
};
|
sl@0
|
38 |
IMPORT_C RShapeInfo();
|
sl@0
|
39 |
TInt Open(const CFont* aFont, const TDesC16& aText,
|
sl@0
|
40 |
TInt aStartOfTextToShape, TInt aEndOfTextToShape,
|
sl@0
|
41 |
TInt aScriptCode, TInt aLanguageCode);
|
sl@0
|
42 |
IMPORT_C void Close();
|
sl@0
|
43 |
TInt GlyphCount() const;
|
sl@0
|
44 |
const TInt32* Glyphs() const;
|
sl@0
|
45 |
const TPoint16* GlyphPositions() const;
|
sl@0
|
46 |
TPoint16 Advance() const;
|
sl@0
|
47 |
const TInt16* Indices() const;
|
sl@0
|
48 |
TInt EndOfShapedText();
|
sl@0
|
49 |
IMPORT_C TBool IsOpen();
|
sl@0
|
50 |
void SetContext(TAny* aContextualProcessFunc);
|
sl@0
|
51 |
TAny* GetContext();
|
sl@0
|
52 |
private:
|
sl@0
|
53 |
const CFont* iFont;
|
sl@0
|
54 |
const TShapeHeader* iHeader;
|
sl@0
|
55 |
TInt iEndOfShapedText;
|
sl@0
|
56 |
TAny* iContextualProcessFunc;
|
sl@0
|
57 |
};
|
sl@0
|
58 |
|
sl@0
|
59 |
#endif
|