sl@0
|
1 |
/*
|
sl@0
|
2 |
* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
|
sl@0
|
3 |
* All rights reserved.
|
sl@0
|
4 |
* This component and the accompanying materials are made available
|
sl@0
|
5 |
* under the terms of "Eclipse Public License v1.0"
|
sl@0
|
6 |
* which accompanies this distribution, and is available
|
sl@0
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
sl@0
|
8 |
*
|
sl@0
|
9 |
* Initial Contributors:
|
sl@0
|
10 |
* Nokia Corporation - initial contribution.
|
sl@0
|
11 |
*
|
sl@0
|
12 |
* Contributors:
|
sl@0
|
13 |
*
|
sl@0
|
14 |
* Description:
|
sl@0
|
15 |
* This wraps the ICU layout Engine in a CBase class
|
sl@0
|
16 |
* and maps the Symbian structures to ICU structures
|
sl@0
|
17 |
*
|
sl@0
|
18 |
*/
|
sl@0
|
19 |
|
sl@0
|
20 |
|
sl@0
|
21 |
#ifndef __CICULAYOUTENGINE_H__
|
sl@0
|
22 |
#define __CICULAYOUTENGINE_H__
|
sl@0
|
23 |
|
sl@0
|
24 |
// System includes
|
sl@0
|
25 |
#include <e32base.h>
|
sl@0
|
26 |
|
sl@0
|
27 |
#include <openfont.h>
|
sl@0
|
28 |
#include <shapeinfo.h>
|
sl@0
|
29 |
#include <graphics/shapeimpl.h>
|
sl@0
|
30 |
#include "ScriptAndLanguageTags.h"
|
sl@0
|
31 |
|
sl@0
|
32 |
class SymbianFontInstance;
|
sl@0
|
33 |
|
sl@0
|
34 |
// if ICU headers not used define
|
sl@0
|
35 |
#ifndef U_NAMESPACE_USE
|
sl@0
|
36 |
class LayoutEngine;
|
sl@0
|
37 |
#endif
|
sl@0
|
38 |
|
sl@0
|
39 |
/**
|
sl@0
|
40 |
Encapsulates the ICU Layout Engine in a CShaper class
|
sl@0
|
41 |
and maps the Symbian objects to ICU objects
|
sl@0
|
42 |
@internalTechnology
|
sl@0
|
43 |
*/
|
sl@0
|
44 |
class CIcuLayoutEngine : public CShaper
|
sl@0
|
45 |
{
|
sl@0
|
46 |
public:
|
sl@0
|
47 |
|
sl@0
|
48 |
static CShaper* NewL(CBitmapFont* aBitmapFont, TInt aScript, TInt aLanguage, RHeap* aHeap);
|
sl@0
|
49 |
~CIcuLayoutEngine();
|
sl@0
|
50 |
|
sl@0
|
51 |
virtual TInt ShapeText(TShapeHeader*& aOutput, const TInput& aInput, RHeap* aHeapForOutput);
|
sl@0
|
52 |
virtual void* ExtendedInterface (TUid aInterfaceId);
|
sl@0
|
53 |
|
sl@0
|
54 |
private:
|
sl@0
|
55 |
CIcuLayoutEngine(TUint32 aScript, TUint32 aLanguage);
|
sl@0
|
56 |
TInt ConstructL(CBitmapFont*, TInt aScript, TInt aLanguage, RHeap* iHeap);
|
sl@0
|
57 |
|
sl@0
|
58 |
// leaving version of shaping method
|
sl@0
|
59 |
void IcuShapeTextL(TShapeHeader*& aOutput, const TInput& aInput, RHeap* aHeapForOutput);
|
sl@0
|
60 |
|
sl@0
|
61 |
// the client heap pointer passed in during construction
|
sl@0
|
62 |
RHeap* iClientHeap;
|
sl@0
|
63 |
|
sl@0
|
64 |
// Open source Icu layout engine
|
sl@0
|
65 |
LayoutEngine* iEngine;
|
sl@0
|
66 |
|
sl@0
|
67 |
// Symbian font data
|
sl@0
|
68 |
SymbianFontInstance* iFontInstance;
|
sl@0
|
69 |
|
sl@0
|
70 |
// The script which this shaper will shape
|
sl@0
|
71 |
TUint32 iScript;
|
sl@0
|
72 |
|
sl@0
|
73 |
//The language which this shaper will shape
|
sl@0
|
74 |
TUint32 iLanguage;
|
sl@0
|
75 |
};
|
sl@0
|
76 |
#endif
|