ICU 74.2 74.2

ushape.h
Go to the documentation of this file.
1 // © 2016 and later: Unicode, Inc. and others.
2 // License & terms of use: http://www.unicode.org/copyright.html
3 /*
4 ******************************************************************************
5 *
6 * Copyright (C) 2000-2012, International Business Machines
7 * Corporation and others. All Rights Reserved.
8 *
9 ******************************************************************************
10 * file name: ushape.h
11 * encoding: UTF-8
12 * tab size: 8 (not used)
13 * indentation:4
14 *
15 * created on: 2000jun29
16 * created by: Markus W. Scherer
17 */
18
19 #ifndef __USHAPE_H__
20 #define __USHAPE_H__
21
22 #include "unicode/utypes.h"
23
101 U_CAPI int32_t U_EXPORT2
102 u_shapeArabic(const UChar *source, int32_t sourceLength,
103 UChar *dest, int32_t destSize,
104 uint32_t options,
105 UErrorCode *pErrorCode);
106
112 #define U_SHAPE_LENGTH_GROW_SHRINK 0
113
120 #define U_SHAPE_LAMALEF_RESIZE 0
121
127 #define U_SHAPE_LENGTH_FIXED_SPACES_NEAR 1
128
136 #define U_SHAPE_LAMALEF_NEAR 1
137
143 #define U_SHAPE_LENGTH_FIXED_SPACES_AT_END 2
144
152 #define U_SHAPE_LAMALEF_END 2
153
159 #define U_SHAPE_LENGTH_FIXED_SPACES_AT_BEGINNING 3
160
168 #define U_SHAPE_LAMALEF_BEGIN 3
169
170
184 #define U_SHAPE_LAMALEF_AUTO 0x10000
185
187 #define U_SHAPE_LENGTH_MASK 0x10003 /* Changed old value 3 */
188
189
194 #define U_SHAPE_LAMALEF_MASK 0x10003 /* updated */
195
197 #define U_SHAPE_TEXT_DIRECTION_LOGICAL 0
198
206 #define U_SHAPE_TEXT_DIRECTION_VISUAL_RTL 0
207
214 #define U_SHAPE_TEXT_DIRECTION_VISUAL_LTR 4
215
217 #define U_SHAPE_TEXT_DIRECTION_MASK 4
218
219
221 #define U_SHAPE_LETTERS_NOOP 0
222
224 #define U_SHAPE_LETTERS_SHAPE 8
225
227 #define U_SHAPE_LETTERS_UNSHAPE 0x10
228
236 #define U_SHAPE_LETTERS_SHAPE_TASHKEEL_ISOLATED 0x18
237
238
240 #define U_SHAPE_LETTERS_MASK 0x18
241
242
244 #define U_SHAPE_DIGITS_NOOP 0
245
251 #define U_SHAPE_DIGITS_EN2AN 0x20
252
258 #define U_SHAPE_DIGITS_AN2EN 0x40
259
271 #define U_SHAPE_DIGITS_ALEN2AN_INIT_LR 0x60
272
283 #define U_SHAPE_DIGITS_ALEN2AN_INIT_AL 0x80
284
286 #define U_SHAPE_DIGITS_RESERVED 0xa0
287
289 #define U_SHAPE_DIGITS_MASK 0xe0
290
291
293 #define U_SHAPE_DIGIT_TYPE_AN 0
294
296 #define U_SHAPE_DIGIT_TYPE_AN_EXTENDED 0x100
297
299 #define U_SHAPE_DIGIT_TYPE_RESERVED 0x200
300
302 #define U_SHAPE_DIGIT_TYPE_MASK 0x300 /* I need to change this from 0x3f00 to 0x300 */
303
311 #define U_SHAPE_AGGREGATE_TASHKEEL 0x4000
313 #define U_SHAPE_AGGREGATE_TASHKEEL_NOOP 0
315 #define U_SHAPE_AGGREGATE_TASHKEEL_MASK 0x4000
316
323 #define U_SHAPE_PRESERVE_PRESENTATION 0x8000
329 #define U_SHAPE_PRESERVE_PRESENTATION_NOOP 0
331 #define U_SHAPE_PRESERVE_PRESENTATION_MASK 0x8000
332
333 /* Seen Tail option */
346 #define U_SHAPE_SEEN_TWOCELL_NEAR 0x200000
347
352 #define U_SHAPE_SEEN_MASK 0x700000
353
354 /* YehHamza option */
367 #define U_SHAPE_YEHHAMZA_TWOCELL_NEAR 0x1000000
368
369
374 #define U_SHAPE_YEHHAMZA_MASK 0x3800000
375
376 /* New Tashkeel options */
386 #define U_SHAPE_TASHKEEL_BEGIN 0x40000
387
397 #define U_SHAPE_TASHKEEL_END 0x60000
398
407 #define U_SHAPE_TASHKEEL_RESIZE 0x80000
408
418 #define U_SHAPE_TASHKEEL_REPLACE_BY_TATWEEL 0xC0000
419
424 #define U_SHAPE_TASHKEEL_MASK 0xE0000
425
426
427 /* Space location Control options */
448 #define U_SHAPE_SPACES_RELATIVE_TO_TEXT_BEGIN_END 0x4000000
449
454 #define U_SHAPE_SPACES_RELATIVE_TO_TEXT_MASK 0x4000000
455
468 #define U_SHAPE_TAIL_NEW_UNICODE 0x8000000
469
474 #define U_SHAPE_TAIL_TYPE_MASK 0x8000000
475
476 #endif
U_CAPI
#define U_CAPI
This is used to declare a function as a public ICU C API.
Definition: umachine.h:110
UChar
char16_t UChar
The base type for UTF-16 code units and pointers.
Definition: umachine.h:386
u_shapeArabic
U_CAPI 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.
utypes.h
Basic definitions for ICU, for both C and C++ APIs.
UErrorCode
UErrorCode
Standard ICU4C error code type, a substitute for exceptions.
Definition: utypes.h:415