diff options
author | David Walter Seikel | 2013-01-13 17:29:19 +1000 |
---|---|---|
committer | David Walter Seikel | 2013-01-13 17:29:19 +1000 |
commit | 07274513e984f0b5544586c74508ccd16e7dcafa (patch) | |
tree | b32ff2a9136fbc1a4a6a0ed1e4d79cde0f5f16d9 /libraries/evas/src/lib/engines/common/language/evas_bidi_utils.h | |
parent | Added Irrlicht 1.8, but without all the Windows binaries. (diff) | |
download | SledjHamr-07274513e984f0b5544586c74508ccd16e7dcafa.zip SledjHamr-07274513e984f0b5544586c74508ccd16e7dcafa.tar.gz SledjHamr-07274513e984f0b5544586c74508ccd16e7dcafa.tar.bz2 SledjHamr-07274513e984f0b5544586c74508ccd16e7dcafa.tar.xz |
Remove EFL, since it's been released now.
Diffstat (limited to 'libraries/evas/src/lib/engines/common/language/evas_bidi_utils.h')
-rw-r--r-- | libraries/evas/src/lib/engines/common/language/evas_bidi_utils.h | 157 |
1 files changed, 0 insertions, 157 deletions
diff --git a/libraries/evas/src/lib/engines/common/language/evas_bidi_utils.h b/libraries/evas/src/lib/engines/common/language/evas_bidi_utils.h deleted file mode 100644 index f1a374b..0000000 --- a/libraries/evas/src/lib/engines/common/language/evas_bidi_utils.h +++ /dev/null | |||
@@ -1,157 +0,0 @@ | |||
1 | #ifndef _EVAS_BIDI_UTILS | ||
2 | #define _EVAS_BIDI_UTILS | ||
3 | |||
4 | /** | ||
5 | * @internal | ||
6 | * @addtogroup Evas_Utils | ||
7 | * | ||
8 | * @{ | ||
9 | */ | ||
10 | /** | ||
11 | * @internal | ||
12 | * @defgroup Evas_BiDi Evas BiDi utility functions | ||
13 | * | ||
14 | * This set of functions and types helps evas handle BiDi strings correctly. | ||
15 | * @todo Document types, structures and macros. | ||
16 | * | ||
17 | * @{ | ||
18 | */ | ||
19 | #ifdef HAVE_CONFIG_H | ||
20 | # include "config.h" | ||
21 | #endif | ||
22 | |||
23 | #ifdef HAVE_FRIBIDI | ||
24 | # define USE_FRIBIDI | ||
25 | # define BIDI_SUPPORT | ||
26 | #endif | ||
27 | |||
28 | #include <Eina.h> | ||
29 | |||
30 | #ifdef USE_FRIBIDI | ||
31 | # include <fribidi/fribidi.h> | ||
32 | #endif | ||
33 | |||
34 | /* abstract fribidi - we statically define sizes here because otherwise we would | ||
35 | * have to ifdef everywhere (because function decorations may change with/without | ||
36 | * bidi support) | ||
37 | * These types should only be passed as pointers! i.e do not directely use any of | ||
38 | * these types in function declarations. Defining as void should help ensuring that. | ||
39 | */ | ||
40 | |||
41 | /* Evas_BiDi_Direction is defined in evas.h */ | ||
42 | |||
43 | #ifdef USE_FRIBIDI | ||
44 | # define _EVAS_BIDI_TYPEDEF(type) \ | ||
45 | typedef FriBidi ## type EvasBiDi ## type | ||
46 | #else | ||
47 | # define _EVAS_BIDI_TYPEDEF(type) \ | ||
48 | typedef void EvasBiDi ## type | ||
49 | #endif | ||
50 | |||
51 | #if 0 /* We are using Eina_Unicode instead */ | ||
52 | _EVAS_BIDI_TYPEDEF(Char); | ||
53 | #endif | ||
54 | _EVAS_BIDI_TYPEDEF(CharType); | ||
55 | _EVAS_BIDI_TYPEDEF(ParType); | ||
56 | _EVAS_BIDI_TYPEDEF(StrIndex); | ||
57 | _EVAS_BIDI_TYPEDEF(Level); | ||
58 | _EVAS_BIDI_TYPEDEF(JoiningType); | ||
59 | |||
60 | typedef struct _Evas_BiDi_Paragraph_Props Evas_BiDi_Paragraph_Props; | ||
61 | typedef struct _Evas_BiDi_Props Evas_BiDi_Props; | ||
62 | |||
63 | /* This structure defines a set of properties of a BiDi string. In case of a | ||
64 | * non-bidi string, all values should be NULL. | ||
65 | * To check if a structure describes a bidi string or not, use the macro | ||
66 | * EVAS_BIDI_IS_BIDI_PROP. RTL-only strings are also treated as bidi ATM. | ||
67 | */ | ||
68 | struct _Evas_BiDi_Paragraph_Props { | ||
69 | EvasBiDiCharType *char_types; /* BiDi char types */ | ||
70 | EvasBiDiLevel *embedding_levels; /* BiDi embedding levels */ | ||
71 | int refcount; /* The number of references to this object */ | ||
72 | #ifdef USE_FRIBIDI | ||
73 | EvasBiDiParType direction; | ||
74 | #endif | ||
75 | }; | ||
76 | |||
77 | #include "Evas.h" | ||
78 | struct _Evas_BiDi_Props | ||
79 | { | ||
80 | Evas_BiDi_Direction dir; | ||
81 | }; | ||
82 | |||
83 | |||
84 | |||
85 | #ifdef USE_FRIBIDI | ||
86 | |||
87 | #define EVAS_BIDI_PARAGRAPH_NEUTRAL FRIBIDI_PAR_ON | ||
88 | #define EVAS_BIDI_PARAGRAPH_LTR FRIBIDI_PAR_LTR | ||
89 | #define EVAS_BIDI_PARAGRAPH_RTL FRIBIDI_PAR_RTL | ||
90 | #define EVAS_BIDI_PARAGRAPH_WLTR FRIBIDI_PAR_WLTR | ||
91 | #define EVAS_BIDI_PARAGRAPH_WRTL FRIBIDI_PAR_WRTL | ||
92 | |||
93 | #define EVAS_BIDI_PARAGRAPH_DIRECTION_IS_RTL(x) \ | ||
94 | (((x) && \ | ||
95 | ((x->direction == EVAS_BIDI_PARAGRAPH_RTL) || \ | ||
96 | (x->direction == EVAS_BIDI_PARAGRAPH_WRTL))) ? \ | ||
97 | EINA_TRUE : EINA_FALSE) | ||
98 | |||
99 | |||
100 | # define evas_bidi_position_visual_to_logical(list, position) \ | ||
101 | (list) ? list[position] : position; | ||
102 | |||
103 | EvasBiDiStrIndex | ||
104 | evas_bidi_position_logical_to_visual(EvasBiDiStrIndex *v_to_l, int len, EvasBiDiStrIndex position); | ||
105 | |||
106 | EvasBiDiStrIndex | ||
107 | evas_bidi_position_reverse(const Evas_BiDi_Props *props, int len, EvasBiDiStrIndex position); | ||
108 | |||
109 | Eina_Bool | ||
110 | evas_bidi_is_rtl_str(const Eina_Unicode *str); | ||
111 | |||
112 | Eina_Bool | ||
113 | evas_bidi_is_rtl_char(const Evas_BiDi_Paragraph_Props *bidi_props, size_t start, EvasBiDiStrIndex index); | ||
114 | |||
115 | int | ||
116 | evas_bidi_end_of_run_get(const Evas_BiDi_Paragraph_Props *bidi_props, size_t start, int len); | ||
117 | |||
118 | Eina_Bool | ||
119 | evas_bidi_props_reorder_line(Eina_Unicode *eina_ustr, size_t start, size_t len, const Evas_BiDi_Paragraph_Props *props, EvasBiDiStrIndex **_v_to_l); | ||
120 | |||
121 | Evas_BiDi_Paragraph_Props * | ||
122 | evas_bidi_paragraph_props_get(const Eina_Unicode *eina_ustr, size_t len, int *segment_idxs) EINA_ARG_NONNULL(1) EINA_MALLOC EINA_WARN_UNUSED_RESULT; | ||
123 | |||
124 | void | ||
125 | evas_bidi_props_copy_and_ref(const Evas_BiDi_Props *src, Evas_BiDi_Props *dst); | ||
126 | |||
127 | EAPI Eina_Bool | ||
128 | evas_bidi_shape_string(Eina_Unicode *eina_ustr, const Evas_BiDi_Paragraph_Props *bidi_props, size_t start, size_t len); | ||
129 | |||
130 | void | ||
131 | evas_bidi_props_clean(Evas_BiDi_Props *intl_props) EINA_ARG_NONNULL(1); | ||
132 | |||
133 | void | ||
134 | evas_bidi_paragraph_props_clean(Evas_BiDi_Paragraph_Props *bidi_props) EINA_ARG_NONNULL(1); | ||
135 | |||
136 | Evas_BiDi_Paragraph_Props * | ||
137 | evas_bidi_paragraph_props_ref(Evas_BiDi_Paragraph_Props *bidi_props) EINA_ARG_NONNULL(1); | ||
138 | |||
139 | void | ||
140 | evas_bidi_paragraph_props_unref(Evas_BiDi_Paragraph_Props *bidi_props) EINA_ARG_NONNULL(1); | ||
141 | |||
142 | Evas_BiDi_Paragraph_Props * | ||
143 | evas_bidi_paragraph_props_new(void) EINA_MALLOC EINA_WARN_UNUSED_RESULT; | ||
144 | |||
145 | int * | ||
146 | evas_bidi_segment_idxs_get(const Eina_Unicode *str, const char *delim) EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT EINA_MALLOC; | ||
147 | |||
148 | #endif | ||
149 | /** | ||
150 | * @} | ||
151 | */ | ||
152 | /** | ||
153 | * @} | ||
154 | */ | ||
155 | |||
156 | #endif | ||
157 | |||