7a972927c007bf93cd93d406b2ee89b3c6c68d5b
[platform/upstream/fribidi.git] / lib / fribidi-deprecated.c
1 /* FriBidi
2  * fribidi-deprecated.c - deprecated interfaces.
3  *
4  * Authors:
5  *   Behdad Esfahbod, 2001, 2002, 2004
6  *   Dov Grobgeld, 1999, 2000
7  *
8  * Copyright (C) 2004 Sharif FarsiWeb, Inc
9  * Copyright (C) 2001,2002 Behdad Esfahbod
10  * Copyright (C) 1999,2000 Dov Grobgeld
11  * 
12  * This library is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU Lesser General Public
14  * License as published by the Free Software Foundation; either
15  * version 2.1 of the License, or (at your option) any later version.
16  * 
17  * This library is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
20  * Lesser General Public License for more details.
21  * 
22  * You should have received a copy of the GNU Lesser General Public License
23  * along with this library, in a file named COPYING; if not, write to the
24  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
25  * Boston, MA 02110-1301, USA
26  * 
27  * For licensing issues, contact <fribidi.license@gmail.com>.
28  */
29
30 #include "common.h"
31
32 #undef FRIBIDI_NO_DEPRECATED
33
34 #include <fribidi-deprecated.h>
35 #include <fribidi.h>
36
37 #ifdef FRIBIDI_NO_DEPRECATED
38 #else
39
40 static FriBidiFlags flags = FRIBIDI_FLAGS_DEFAULT | FRIBIDI_FLAGS_ARABIC;
41
42 FRIBIDI_ENTRY fribidi_boolean
43 fribidi_set_mirroring (
44   /* input */
45   fribidi_boolean state
46 )
47 {
48   return FRIBIDI_ADJUST_AND_TEST_BITS (flags, FRIBIDI_FLAG_SHAPE_MIRRORING, state);
49 }
50
51 FRIBIDI_ENTRY fribidi_boolean
52 fribidi_mirroring_status (
53   void
54 )
55 {
56   return FRIBIDI_TEST_BITS (flags, FRIBIDI_FLAG_SHAPE_MIRRORING);
57 }
58
59 FRIBIDI_ENTRY fribidi_boolean
60 fribidi_set_reorder_nsm (
61   /* input */
62   fribidi_boolean state
63 )
64 {
65   return FRIBIDI_ADJUST_AND_TEST_BITS (flags, FRIBIDI_FLAG_REORDER_NSM, state);
66 }
67
68 fribidi_boolean
69 fribidi_reorder_nsm_status (
70   void
71 )
72 {
73   return FRIBIDI_TEST_BITS (flags, FRIBIDI_FLAG_REORDER_NSM);
74 }
75
76
77
78
79 FRIBIDI_ENTRY FriBidiCharType
80 fribidi_get_type (
81   FriBidiChar ch                /* input character */
82 )
83 {
84   return fribidi_get_bidi_type (ch);
85 }
86
87 FRIBIDI_ENTRY FriBidiCharType
88 fribidi_get_type_internal (
89   FriBidiChar ch                /* input character */
90 )
91 {
92   return fribidi_get_bidi_type (ch);
93 }
94
95
96 FRIBIDI_ENTRY FriBidiLevel
97 fribidi_get_par_embedding_levels (
98   /* input */
99   const FriBidiCharType *bidi_types,
100   const FriBidiStrIndex len,
101   /* input and output */
102   FriBidiParType *pbase_dir,
103   /* output */
104   FriBidiLevel *embedding_levels
105 )
106 {
107   return fribidi_get_par_embedding_levels_ex (/* input */
108                                               bidi_types,
109                                               NULL, /* No bracket_types */
110                                               len,
111                                               /* input and output */
112                                               pbase_dir,
113                                               /* output */
114                                               embedding_levels);
115 }
116
117 #endif /* !FRIBIDI_NO_DEPRECATED */
118
119 /* Editor directions:
120  * vim:textwidth=78:tabstop=8:shiftwidth=2:autoindent:cindent
121  */