Imported Upstream version 1.0.2
[platform/upstream/fribidi.git] / lib / fribidi-shape.h
1 /* FriBidi
2  * fribidi-shape.h - shaping
3  *
4  * Author:
5  *   Behdad Esfahbod, 2004, 2005
6  *
7  * Copyright (C) 2004 Sharif FarsiWeb, Inc
8  * Copyright (C) 2004, 2005 Behdad Esfahbod
9  * 
10  * This library is free software; you can redistribute it and/or
11  * modify it under the terms of the GNU Lesser General Public
12  * License as published by the Free Software Foundation; either
13  * version 2.1 of the License, or (at your option) any later version.
14  * 
15  * This library is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18  * Lesser General Public License for more details.
19  * 
20  * You should have received a copy of the GNU Lesser General Public License
21  * along with this library, in a file named COPYING; if not, write to the
22  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
23  * Boston, MA 02110-1301, USA
24  * 
25  * For licensing issues, contact <fribidi.license@gmail.com>.
26  */
27 #ifndef _FRIBIDI_SHAPE_H
28 #define _FRIBIDI_SHAPE_H
29
30 #include "fribidi-types.h"
31 #include "fribidi-flags.h"
32 #include "fribidi-bidi-types.h"
33 #include "fribidi-joining-types.h"
34
35 #include "fribidi-begindecls.h"
36
37
38 /* fribidi_shape - do bidi-aware shaping
39  *
40  * This function does all shaping work that depends on the resolved embedding
41  * levels of the characters.  Currently it does mirroring and Arabic shaping,
42  * but the list may grow in the future.  This function is a wrapper around
43  * fribidi_shape_mirroring and fribidi_shape_arabic.
44  *
45  * The flags parameter specifies which shapings are applied.  The only flags
46  * affecting the functionality of this function are those beginning with
47  * FRIBIDI_FLAG_SHAPE_.  Of these, only FRIBIDI_FLAG_SHAPE_MIRRORING is on
48  * in FRIBIDI_FLAGS_DEFAULT.  For details of the Arabic-specific flags see
49  * fribidi_shape_arabic.  If ar_props is NULL, no Arabic shaping is performed.
50  *
51  * Feel free to do your own shaping before or after calling this function,
52  * but you should take care of embedding levels yourself then.
53  */
54 FRIBIDI_ENTRY void fribidi_shape (
55   FriBidiFlags flags, /* shaping flags */
56   const FriBidiLevel *embedding_levels, /* input list of embedding
57                                            levels, as returned by
58                                            fribidi_get_par_embedding_levels */
59   const FriBidiStrIndex len,    /* input string length */
60   FriBidiArabicProp *ar_props, /* input/output Arabic properties as
61                                        * computed by fribidi_join_arabic */
62   FriBidiChar *str              /* string to shape */
63 );
64
65
66 #include "fribidi-enddecls.h"
67
68 #endif /* !_FRIBIDI_SHAPE_H */
69 /* Editor directions:
70  * vim:textwidth=78:tabstop=8:shiftwidth=2:autoindent:cindent
71  */