os/textandloc/fontservices/textbase/inc/ShapeImpl.h
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
sl@0
     1
// Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies).
sl@0
     2
// All rights reserved.
sl@0
     3
// This component and the accompanying materials are made available
sl@0
     4
// under the terms of "Eclipse Public License v1.0"
sl@0
     5
// which accompanies this distribution, and is available
sl@0
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     7
//
sl@0
     8
// Initial Contributors:
sl@0
     9
// Nokia Corporation - initial contribution.
sl@0
    10
//
sl@0
    11
// Contributors:
sl@0
    12
//
sl@0
    13
// Description:
sl@0
    14
//
sl@0
    15
sl@0
    16
#ifndef SHAPEIMPL_H_
sl@0
    17
#define SHAPEIMPL_H_
sl@0
    18
sl@0
    19
#include <e32cmn.h>
sl@0
    20
sl@0
    21
/**@file
sl@0
    22
@internalTechnology
sl@0
    23
*/
sl@0
    24
sl@0
    25
class CFont;
sl@0
    26
class TDesC16;
sl@0
    27
sl@0
    28
const TUid KFontGetShaping = {0x10274246};
sl@0
    29
const TUid KFontDeleteShaping = {0x102744D7};
sl@0
    30
sl@0
    31
/** Internal class describing shaping information. */
sl@0
    32
class TShapeHeader
sl@0
    33
	{
sl@0
    34
public:
sl@0
    35
	/** Number of glyphs output. */
sl@0
    36
	TInt iGlyphCount;
sl@0
    37
	/** Number of characters consumed from the input. */
sl@0
    38
	TInt iCharacterCount;
sl@0
    39
	/** Reserved for future expansion. */
sl@0
    40
	TInt iReserved0;
sl@0
    41
	/** Reserved for future expansion. */
sl@0
    42
	TInt iReserved1;
sl@0
    43
	/** The glyph, position and indices data.
sl@0
    44
sl@0
    45
	The first iGlyphCount * 4 bytes contain the glyph codes
sl@0
    46
	as 2-byte values. The next iGlyphCount * 4 + 4 bytes contain the
sl@0
    47
	positions in which these glyphs are to be drawn, in pixels, taking
sl@0
    48
	the original pen position as origin, with the x axis going right and
sl@0
    49
	the y axis going down. The next iGlyphCount * 2 bytes contain the
sl@0
    50
	indices of the characters in the input string that correspond to the
sl@0
    51
	glyphs in the output.
sl@0
    52
	
sl@0
    53
	The final entry in the position array is the total advance of the text.
sl@0
    54
sl@0
    55
	Therefore this buffer is actually iGlyphCount * 10 + 4 bytes long. */
sl@0
    56
	TInt8 iBuffer[1];
sl@0
    57
	};
sl@0
    58
sl@0
    59
/** For CFont::ExtendedFunctions aParam argument, with KFontGetShaping
sl@0
    60
function ID. */
sl@0
    61
class TFontShapeFunctionParameters
sl@0
    62
	{
sl@0
    63
public:
sl@0
    64
	/** The text, including context. */
sl@0
    65
	const TDesC16* iText;
sl@0
    66
	/** The start of the meat within iText. */
sl@0
    67
	TInt iStart;
sl@0
    68
	/** The end of the meat within iText. */
sl@0
    69
	TInt iEnd;
sl@0
    70
	/** Script code. */
sl@0
    71
	TInt iScript;
sl@0
    72
	/** Language code. 0 for default. */
sl@0
    73
	TInt iLanguage;
sl@0
    74
	/** Output from the shaper; a TShapeHeader on the shared heap. */
sl@0
    75
	const TShapeHeader* iShapeHeaderOutput;
sl@0
    76
	};
sl@0
    77
sl@0
    78
/** For CFont::ExtendedFunctions aParam argument, with KFontDeleteShaping
sl@0
    79
function ID. */
sl@0
    80
class TFontShapeDeleteFunctionParameters
sl@0
    81
	{
sl@0
    82
public:
sl@0
    83
	const TShapeHeader* iShapeHeader;
sl@0
    84
	};
sl@0
    85
sl@0
    86
#endif