os/textandloc/fontservices/textshaperplugin/source/IcuLayoutEngine.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/textandloc/fontservices/textshaperplugin/source/IcuLayoutEngine.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,76 @@
     1.4 +/*
     1.5 +* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.6 +* All rights reserved.
     1.7 +* This component and the accompanying materials are made available
     1.8 +* under the terms of "Eclipse Public License v1.0"
     1.9 +* which accompanies this distribution, and is available
    1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.11 +*
    1.12 +* Initial Contributors:
    1.13 +* Nokia Corporation - initial contribution.
    1.14 +*
    1.15 +* Contributors:
    1.16 +*
    1.17 +* Description: 
    1.18 +* This wraps the ICU layout Engine in a CBase class
    1.19 +* and maps the Symbian structures to ICU structures
    1.20 +*
    1.21 +*/
    1.22 +
    1.23 +
    1.24 +#ifndef __CICULAYOUTENGINE_H__
    1.25 +#define __CICULAYOUTENGINE_H__
    1.26 +
    1.27 +// System includes
    1.28 +#include <e32base.h>
    1.29 +
    1.30 +#include <openfont.h>
    1.31 +#include <shapeinfo.h>
    1.32 +#include <graphics/shapeimpl.h>
    1.33 +#include "ScriptAndLanguageTags.h"
    1.34 +
    1.35 +class SymbianFontInstance;
    1.36 +
    1.37 +// if ICU headers not used define
    1.38 +#ifndef U_NAMESPACE_USE
    1.39 +class LayoutEngine;
    1.40 +#endif
    1.41 +
    1.42 +/**
    1.43 +Encapsulates the ICU Layout Engine in a CShaper class
    1.44 +and maps the Symbian objects to ICU objects
    1.45 +@internalTechnology 
    1.46 +*/
    1.47 +class CIcuLayoutEngine : public CShaper
    1.48 +	{
    1.49 +public:
    1.50 +
    1.51 +	static CShaper* NewL(CBitmapFont* aBitmapFont, TInt aScript, TInt aLanguage, RHeap* aHeap);
    1.52 +	~CIcuLayoutEngine();
    1.53 +	
    1.54 +	virtual TInt ShapeText(TShapeHeader*& aOutput, const TInput& aInput, RHeap* aHeapForOutput);
    1.55 +	virtual void* ExtendedInterface (TUid aInterfaceId);
    1.56 +		
    1.57 +private:
    1.58 +	CIcuLayoutEngine(TUint32 aScript, TUint32 aLanguage);
    1.59 +	TInt  ConstructL(CBitmapFont*, TInt aScript, TInt aLanguage, RHeap* iHeap);
    1.60 +
    1.61 +	// leaving version of shaping method
    1.62 +	void  IcuShapeTextL(TShapeHeader*& aOutput, const TInput& aInput, RHeap* aHeapForOutput);
    1.63 +	
    1.64 +	// the client heap pointer passed in during construction
    1.65 +	RHeap* iClientHeap;
    1.66 +
    1.67 +	// Open source Icu layout engine
    1.68 +	LayoutEngine* iEngine;	 
    1.69 +	
    1.70 +	// Symbian font data
    1.71 +	SymbianFontInstance* iFontInstance;
    1.72 +	
    1.73 +	// The script which this shaper will shape
    1.74 +	TUint32 iScript;
    1.75 +	
    1.76 +	//The language which this shaper will shape
    1.77 +	TUint32 iLanguage;
    1.78 +	};
    1.79 +#endif