sl@0
|
1 |
/*
|
sl@0
|
2 |
* Copyright (c) 2006-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 |
* Abstract base class from which all shapers drive.
|
sl@0
|
16 |
*
|
sl@0
|
17 |
*/
|
sl@0
|
18 |
|
sl@0
|
19 |
|
sl@0
|
20 |
/**
|
sl@0
|
21 |
@file
|
sl@0
|
22 |
@internalComponent
|
sl@0
|
23 |
*/
|
sl@0
|
24 |
|
sl@0
|
25 |
// Symbian includes
|
sl@0
|
26 |
#include <openfont.h>
|
sl@0
|
27 |
|
sl@0
|
28 |
// ICU includes
|
sl@0
|
29 |
#include "LETypes.h"
|
sl@0
|
30 |
#include "LayoutEngine.h"
|
sl@0
|
31 |
#include "SymbianFontInstance.h"
|
sl@0
|
32 |
#include "IcuLayoutEngine.h"
|
sl@0
|
33 |
#include <ecom/ecom.h>
|
sl@0
|
34 |
#include <ecom/implementationproxy.h>
|
sl@0
|
35 |
|
sl@0
|
36 |
|
sl@0
|
37 |
class CIcuShaperFactory: public CShaperFactory
|
sl@0
|
38 |
{
|
sl@0
|
39 |
public:
|
sl@0
|
40 |
static CIcuShaperFactory* NewL();
|
sl@0
|
41 |
virtual ~CIcuShaperFactory();
|
sl@0
|
42 |
|
sl@0
|
43 |
/**
|
sl@0
|
44 |
Factory function to create an instance of shaper object
|
sl@0
|
45 |
@param aBitmapFont The font that requires shaping
|
sl@0
|
46 |
@param aScript Isic standard script code
|
sl@0
|
47 |
@param aLanguage Isic standard language code
|
sl@0
|
48 |
@param aHeap The heap to be used by the shaper
|
sl@0
|
49 |
@return KErrNone if successful else a system wide error code
|
sl@0
|
50 |
*/
|
sl@0
|
51 |
virtual CShaper* NewShaperL(CBitmapFont* aBitmapFont, TInt aScript, TInt aLanguage, RHeap* aHeap);
|
sl@0
|
52 |
|
sl@0
|
53 |
private:
|
sl@0
|
54 |
CIcuShaperFactory();
|
sl@0
|
55 |
|
sl@0
|
56 |
};
|
sl@0
|
57 |
|
sl@0
|
58 |
|
sl@0
|
59 |
CIcuShaperFactory* CIcuShaperFactory::NewL()
|
sl@0
|
60 |
{
|
sl@0
|
61 |
CIcuShaperFactory* r = new(ELeave) CIcuShaperFactory;
|
sl@0
|
62 |
return r;
|
sl@0
|
63 |
}
|
sl@0
|
64 |
|
sl@0
|
65 |
CIcuShaperFactory::CIcuShaperFactory()
|
sl@0
|
66 |
{
|
sl@0
|
67 |
}
|
sl@0
|
68 |
|
sl@0
|
69 |
CIcuShaperFactory::~CIcuShaperFactory()
|
sl@0
|
70 |
{
|
sl@0
|
71 |
|
sl@0
|
72 |
}
|
sl@0
|
73 |
|
sl@0
|
74 |
|
sl@0
|
75 |
CShaper* CIcuShaperFactory::NewShaperL(CBitmapFont* aBitmapFont, TInt aScript, TInt aLanguage, RHeap* aHeap)
|
sl@0
|
76 |
{
|
sl@0
|
77 |
return CIcuLayoutEngine::NewL(aBitmapFont, aScript, aLanguage, aHeap);
|
sl@0
|
78 |
}
|
sl@0
|
79 |
|
sl@0
|
80 |
void* CShaperFactory::ExtendedInterface(TUid /*aInterfaceId*/)
|
sl@0
|
81 |
{
|
sl@0
|
82 |
return 0;
|
sl@0
|
83 |
}
|
sl@0
|
84 |
|
sl@0
|
85 |
// Exported proxy for instantiation method resolution
|
sl@0
|
86 |
// Define the interface UIDs
|
sl@0
|
87 |
const TImplementationProxy ImplementationTable[] =
|
sl@0
|
88 |
{
|
sl@0
|
89 |
IMPLEMENTATION_PROXY_ENTRY(0x10279727, CIcuShaperFactory::NewL)
|
sl@0
|
90 |
};
|
sl@0
|
91 |
|
sl@0
|
92 |
EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount)
|
sl@0
|
93 |
{
|
sl@0
|
94 |
aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy);
|
sl@0
|
95 |
|
sl@0
|
96 |
return ImplementationTable;
|
sl@0
|
97 |
}
|