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