sl@0: /* sl@0: * Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: * All rights reserved. sl@0: * This component and the accompanying materials are made available sl@0: * under the terms of "Eclipse Public License v1.0" sl@0: * which accompanies this distribution, and is available sl@0: * at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: * sl@0: * Initial Contributors: sl@0: * Nokia Corporation - initial contribution. sl@0: * sl@0: * Contributors: sl@0: * sl@0: * Description: sl@0: * This wraps the ICU layout Engine in a CBase class sl@0: * and maps the Symbian structures to ICU structures sl@0: * sl@0: */ sl@0: sl@0: sl@0: #ifndef __CICULAYOUTENGINE_H__ sl@0: #define __CICULAYOUTENGINE_H__ sl@0: sl@0: // System includes sl@0: #include sl@0: sl@0: #include sl@0: #include sl@0: #include sl@0: #include "ScriptAndLanguageTags.h" sl@0: sl@0: class SymbianFontInstance; sl@0: sl@0: // if ICU headers not used define sl@0: #ifndef U_NAMESPACE_USE sl@0: class LayoutEngine; sl@0: #endif sl@0: sl@0: /** sl@0: Encapsulates the ICU Layout Engine in a CShaper class sl@0: and maps the Symbian objects to ICU objects sl@0: @internalTechnology sl@0: */ sl@0: class CIcuLayoutEngine : public CShaper sl@0: { sl@0: public: sl@0: sl@0: static CShaper* NewL(CBitmapFont* aBitmapFont, TInt aScript, TInt aLanguage, RHeap* aHeap); sl@0: ~CIcuLayoutEngine(); sl@0: sl@0: virtual TInt ShapeText(TShapeHeader*& aOutput, const TInput& aInput, RHeap* aHeapForOutput); sl@0: virtual void* ExtendedInterface (TUid aInterfaceId); sl@0: sl@0: private: sl@0: CIcuLayoutEngine(TUint32 aScript, TUint32 aLanguage); sl@0: TInt ConstructL(CBitmapFont*, TInt aScript, TInt aLanguage, RHeap* iHeap); sl@0: sl@0: // leaving version of shaping method sl@0: void IcuShapeTextL(TShapeHeader*& aOutput, const TInput& aInput, RHeap* aHeapForOutput); sl@0: sl@0: // the client heap pointer passed in during construction sl@0: RHeap* iClientHeap; sl@0: sl@0: // Open source Icu layout engine sl@0: LayoutEngine* iEngine; sl@0: sl@0: // Symbian font data sl@0: SymbianFontInstance* iFontInstance; sl@0: sl@0: // The script which this shaper will shape sl@0: TUint32 iScript; sl@0: sl@0: //The language which this shaper will shape sl@0: TUint32 iLanguage; sl@0: }; sl@0: #endif