ICU 57.1 57.1
ushape.h
Go to the documentation of this file.
1/*
2******************************************************************************
3*
4* Copyright (C) 2000-2012, International Business Machines
5* Corporation and others. All Rights Reserved.
6*
7******************************************************************************
8* file name: ushape.h
9* encoding: US-ASCII
10* tab size: 8 (not used)
11* indentation:4
12*
13* created on: 2000jun29
14* created by: Markus W. Scherer
15*/
16
17#ifndef __USHAPE_H__
18#define __USHAPE_H__
19
20#include "unicode/utypes.h"
21
99U_STABLE int32_t U_EXPORT2
100u_shapeArabic(const UChar *source, int32_t sourceLength,
101 UChar *dest, int32_t destSize,
102 uint32_t options,
103 UErrorCode *pErrorCode);
104
110#define U_SHAPE_LENGTH_GROW_SHRINK 0
111
118#define U_SHAPE_LAMALEF_RESIZE 0
119
125#define U_SHAPE_LENGTH_FIXED_SPACES_NEAR 1
126
134#define U_SHAPE_LAMALEF_NEAR 1
135
141#define U_SHAPE_LENGTH_FIXED_SPACES_AT_END 2
142
150#define U_SHAPE_LAMALEF_END 2
151
157#define U_SHAPE_LENGTH_FIXED_SPACES_AT_BEGINNING 3
158
166#define U_SHAPE_LAMALEF_BEGIN 3
167
168
182#define U_SHAPE_LAMALEF_AUTO 0x10000
183
185#define U_SHAPE_LENGTH_MASK 0x10003 /* Changed old value 3 */
186
187
192#define U_SHAPE_LAMALEF_MASK 0x10003 /* updated */
193
195#define U_SHAPE_TEXT_DIRECTION_LOGICAL 0
196
204#define U_SHAPE_TEXT_DIRECTION_VISUAL_RTL 0
205
212#define U_SHAPE_TEXT_DIRECTION_VISUAL_LTR 4
213
215#define U_SHAPE_TEXT_DIRECTION_MASK 4
216
217
219#define U_SHAPE_LETTERS_NOOP 0
220
222#define U_SHAPE_LETTERS_SHAPE 8
223
225#define U_SHAPE_LETTERS_UNSHAPE 0x10
226
234#define U_SHAPE_LETTERS_SHAPE_TASHKEEL_ISOLATED 0x18
235
236
238#define U_SHAPE_LETTERS_MASK 0x18
239
240
242#define U_SHAPE_DIGITS_NOOP 0
243
249#define U_SHAPE_DIGITS_EN2AN 0x20
250
256#define U_SHAPE_DIGITS_AN2EN 0x40
257
269#define U_SHAPE_DIGITS_ALEN2AN_INIT_LR 0x60
270
281#define U_SHAPE_DIGITS_ALEN2AN_INIT_AL 0x80
282
284#define U_SHAPE_DIGITS_RESERVED 0xa0
285
287#define U_SHAPE_DIGITS_MASK 0xe0
288
289
291#define U_SHAPE_DIGIT_TYPE_AN 0
292
294#define U_SHAPE_DIGIT_TYPE_AN_EXTENDED 0x100
295
297#define U_SHAPE_DIGIT_TYPE_RESERVED 0x200
298
300#define U_SHAPE_DIGIT_TYPE_MASK 0x300 /* I need to change this from 0x3f00 to 0x300 */
301
309#define U_SHAPE_AGGREGATE_TASHKEEL 0x4000
311#define U_SHAPE_AGGREGATE_TASHKEEL_NOOP 0
313#define U_SHAPE_AGGREGATE_TASHKEEL_MASK 0x4000
314
321#define U_SHAPE_PRESERVE_PRESENTATION 0x8000
327#define U_SHAPE_PRESERVE_PRESENTATION_NOOP 0
329#define U_SHAPE_PRESERVE_PRESENTATION_MASK 0x8000
330
331/* Seen Tail option */
344#define U_SHAPE_SEEN_TWOCELL_NEAR 0x200000
345
350#define U_SHAPE_SEEN_MASK 0x700000
351
352/* YehHamza option */
365#define U_SHAPE_YEHHAMZA_TWOCELL_NEAR 0x1000000
366
367
372#define U_SHAPE_YEHHAMZA_MASK 0x3800000
373
374/* New Tashkeel options */
384#define U_SHAPE_TASHKEEL_BEGIN 0x40000
385
395#define U_SHAPE_TASHKEEL_END 0x60000
396
405#define U_SHAPE_TASHKEEL_RESIZE 0x80000
406
416#define U_SHAPE_TASHKEEL_REPLACE_BY_TATWEEL 0xC0000
417
422#define U_SHAPE_TASHKEEL_MASK 0xE0000
423
424
425/* Space location Control options */
446#define U_SHAPE_SPACES_RELATIVE_TO_TEXT_BEGIN_END 0x4000000
447
452#define U_SHAPE_SPACES_RELATIVE_TO_TEXT_MASK 0x4000000
453
466#define U_SHAPE_TAIL_NEW_UNICODE 0x8000000
467
472#define U_SHAPE_TAIL_TYPE_MASK 0x8000000
473
474#endif
uint16_t UChar
Define UChar to be UCHAR_TYPE, if that is #defined (for example, to char16_t), or wchar_t if that is ...
Definition: umachine.h:312
#define U_STABLE
This is used to declare a function as a stable public ICU C API.
Definition: umachine.h:109
int32_t u_shapeArabic(const UChar *source, int32_t sourceLength, UChar *dest, int32_t destSize, uint32_t options, UErrorCode *pErrorCode)
Shape Arabic text on a character basis.
Basic definitions for ICU, for both C and C++ APIs.
UErrorCode
Error code to replace exception handling, so that the code is compatible with all C++ compilers,...
Definition: utypes.h:476