\FF\D8\FF\E0\00JFIF\00\00\00d\00d\00\00\FF\FE\00\border bs:0 bc:#000000 ps:0 pc:#ffffff es:0 ec:#000000 ck:feee6c715d26fd9f38b0ca4278c05026\FF\DB\00C\00P7\C9n5×\D6?\BDê\9Ds\EBp\9F[`8m\B7)o\B5\E8\E6I\99\FE3]]A2\BA\8Cw\D6E\93\\DEv\C8\009\F2\F1NI?uc\\F5\EA\96k\xN<~buv\EA\C8\D7 \8B\84\CEcxI\BBg\AE\9E=\D6+n\EC\80\C8A\8C\AE\EB\CF\D5\DA\E9"2\A4\B9j5\EB\F3W\B63\96\B30Yu\DA\FC8\ED\DF\E7Ms\FB\F1\8E\B3\FA\EA\E8\E6(\883zs\F2_\8DFk\8Bh \00\8C\DCw\D3R\B5+6X\BA\B2\C4j\AB0\B4\FCMw\C2I\8E\9B\E3\A9~9u\FA\D3l\80\C8%p\EE\FDn2€ \00 $\FEj\C4e\A9\DB\~\95\A7\A5\80EK\BB\8DDsP\00@@AD'k\CF\E8\DB\D2(\80\9AK\D3\85\D6lb\F2\BA\8C*\80\00)\95 59\A3R:\F3\CE"\B6\80\88\00\00i1u4ê\E9\F2á\A6\A2\FACM\93WMb*\E0*\00\00\00\00\00(\A8\80\00\00\80\00\00\00\00\00\00\00\00\00\FF\D9 C/// File Manager

File Manager

Path: /usr/include/layout/

Viewing File: loengine.h

/*
 *
 * (C) Copyright IBM Corp. 1998-2011 - All Rights Reserved
 *
 */

#ifndef __LOENGINE_H
#define __LOENGINE_H

#include "LETypes.h"

#ifndef U_HIDE_INTERNAL_API
/**
 * \file 
 * \brief C API for complex text layout.
 * \internal
 *
 * This is a technology preview. The API may
 * change significantly.
 *
 */

/**
 * The opaque type for a LayoutEngine.
 *
 * @internal
 */
typedef void le_engine;

/**
 * The opaque type for a font instance.
 *
 * @internal
 */
typedef void le_font;

/**
 * This function returns an le_engine capable of laying out text
 * in the given font, script and langauge. Note that the LayoutEngine
 * returned may be a subclass of LayoutEngine.
 *
 * @param font - the font of the text
 * @param scriptCode - the script of the text
 * @param languageCode - the language of the text
 * @param typo_flags - flags that control layout features like kerning and ligatures.
 * @param success - output parameter set to an error code if the operation fails
 *
 * @return an le_engine which can layout text in the given font.
 *
 * @internal
 */
U_INTERNAL le_engine * U_EXPORT2
le_create(const le_font *font,
          le_int32 scriptCode,
          le_int32 languageCode,
          le_int32 typo_flags,
          LEErrorCode *success);

/**
 * This function closes the given LayoutEngine. After
 * it returns, the le_engine is no longer valid.
 *
 * @param engine - the LayoutEngine to close.
 *
 * @internal
 */
U_INTERNAL void U_EXPORT2
le_close(le_engine *engine);

/**
 * This routine will compute the glyph, character index and position arrays.
 *
 * @param engine - the LayoutEngine
 * @param chars - the input character context
 * @param offset - the offset of the first character to process
 * @param count - the number of characters to process
 * @param max - the number of characters in the input context
 * @param rightToLeft - TRUE if the characers are in a right to left directional run
 * @param x - the initial X position
 * @param y - the initial Y position
 * @param success - output parameter set to an error code if the operation fails
 *
 * @return the number of glyphs in the glyph array
 *
 * Note: The glyph, character index and position array can be accessed
 * using the getter routines below.
 *
 * Note: If you call this function more than once, you must call the reset()
 * function first to free the glyph, character index and position arrays
 * allocated by the previous call.
 *
 * @internal
 */
U_INTERNAL le_int32 U_EXPORT2
le_layoutChars(le_engine *engine,
               const LEUnicode chars[],
               le_int32 offset,
               le_int32 count,
               le_int32 max,
               le_bool rightToLeft,
               float x,
               float y,
               LEErrorCode *success);

/**
 * This function returns the number of glyphs in the glyph array. Note
 * that the number of glyphs will be greater than or equal to the number
 * of characters used to create the LayoutEngine.
 *
 * @param engine - the LayoutEngine
 * @param success - output parameter set to an error code if the operation fails.
 *
 * @return the number of glyphs in the glyph array
 *
 * @internal
 */
U_INTERNAL le_int32 U_EXPORT2
le_getGlyphCount(le_engine *engine,
                 LEErrorCode *success);

/**
 * This function copies the glyph array into a caller supplied array.
 * The caller must ensure that the array is large enough to hold all
 * the glyphs.
 *
 * @param engine - the LayoutEngine
 * @param glyphs - the destiniation glyph array
 * @param success - set to an error code if the operation fails
 *
 * @internal
 */
U_INTERNAL void U_EXPORT2
le_getGlyphs(le_engine *engine,
             LEGlyphID glyphs[],
             LEErrorCode *success);

/**
 * This function copies the character index array into a caller supplied array.
 * The caller must ensure that the array is large enough to hold a
 * character index for each glyph.
 *
 * @param engine - the LayoutEngine
 * @param charIndices - the destiniation character index array
 * @param success - set to an error code if the operation fails
 *
 * @internal
 */
U_INTERNAL void U_EXPORT2
le_getCharIndices(le_engine *engine,
                  le_int32 charIndices[],
                  LEErrorCode *success);

/**
 * This function copies the character index array into a caller supplied array.
 * The caller must ensure that the array is large enough to hold a
 * character index for each glyph.
 *
 * @param engine - the LayoutEngine
 * @param charIndices - the destiniation character index array
 * @param indexBase - an offset that will be added to each index.
 * @param success - set to an error code if the operation fails
 *
 * @internal
 */
U_INTERNAL void U_EXPORT2
le_getCharIndicesWithBase(le_engine *engine,
                  le_int32 charIndices[],
                  le_int32 indexBase,
                  LEErrorCode *success);

/**
 * This function copies the position array into a caller supplied array.
 * The caller must ensure that the array is large enough to hold an
 * X and Y position for each glyph, plus an extra X and Y for the
 * advance of the last glyph.
 *
 * @param engine - the LayoutEngine
 * @param positions - the destiniation position array
 * @param success - set to an error code if the operation fails
 *
 * @internal
 */
U_INTERNAL void U_EXPORT2
le_getGlyphPositions(le_engine *engine,
                     float positions[],
                     LEErrorCode *success);

/**
 * This function returns the X and Y position of the glyph at
 * the given index.
 *
 * Input parameters:
 * @param engine - the LayoutEngine
 * @param glyphIndex - the index of the glyph
 *
 * Output parameters:
 * @param x - the glyph's X position
 * @param y - the glyph's Y position
 * @param success - set to an error code if the operation fails
 *
 * @internal
 */
U_INTERNAL void U_EXPORT2
le_getGlyphPosition(le_engine *engine,
                    le_int32 glyphIndex,
                    float *x,
                    float *y,
                    LEErrorCode *success);

/**
 * This function frees the glyph, character index and position arrays
 * so that the LayoutEngine can be reused to layout a different
 * characer array. (This function is also called by le_close)
 *
 * @param engine - the LayoutEngine
 * @param success - set to an error code if the operation fails
 *
 * @internal
 */
U_INTERNAL void U_EXPORT2
le_reset(le_engine *engine,
         LEErrorCode *success);
#endif  /* U_HIDE_INTERNAL_API */

#endif