Revert "[Tizen] Disable indicator"
[platform/core/uifw/dali-adaptor.git] / dali-windows-backend / ExInclude / fribidi / fribidi-types.h
1 /* FriBidi
2  * fribidi-types.h - define data types for the rest of the library
3  *
4  * $Id: fribidi-types.h,v 1.12 2006/01/31 03:23:13 behdad Exp $
5  * $Author: behdad $
6  * $Date: 2006/01/31 03:23:13 $
7  * $Revision: 1.12 $
8  * $Source: /cvs/fribidi/fribidi2/lib/fribidi-types.h,v $
9  *
10  * Author:
11  *   Behdad Esfahbod, 2001, 2002, 2004
12  *
13  * Copyright (C) 2004 Sharif FarsiWeb, Inc.
14  * Copyright (C) 2001,2002 Behdad Esfahbod
15  * 
16  * This library is free software; you can redistribute it and/or
17  * modify it under the terms of the GNU Lesser General Public
18  * License as published by the Free Software Foundation; either
19  * version 2.1 of the License, or (at your option) any later version.
20  * 
21  * This library is distributed in the hope that it will be useful,
22  * but WITHOUT ANY WARRANTY; without even the implied warranty of
23  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
24  * Lesser General Public License for more details.
25  * 
26  * You should have received a copy of the GNU Lesser General Public License
27  * along with this library, in a file named COPYING; if not, write to the
28  * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
29  * Boston, MA 02111-1307, USA
30  *
31  * For licensing issues, contact <license@farsiweb.info>.
32  */
33 #ifndef _FRIBIDI_TYPES_H
34 #define _FRIBIDI_TYPES_H
35
36 #include "fribidi-common.h"
37
38 #include "fribidi-begindecls.h"
39
40
41 #if FRIBIDI_USE_GLIB+0
42 # ifndef __FRIBIDI_DOC
43 #  include <glib/gtypes.h>
44 #  include <glib/gunicode.h>
45 # endif /* !__FRIBIDI_DOC */
46 # define FRIBIDI_INT8_LOCAL             gint8
47 # define FRIBIDI_INT16_LOCAL            gint16
48 # define FRIBIDI_INT32_LOCAL            gint32
49 # define FRIBIDI_UINT8_LOCAL            guint8
50 # define FRIBIDI_UINT16_LOCAL           guint16
51 # define FRIBIDI_UINT32_LOCAL           guint32
52 # define FRIBIDI_BOOLEAN_LOCAL          gboolean
53 # define FRIBIDI_UNICHAR_LOCAL          gunichar
54 #else /* !FRIBIDI_USE_GLIB */
55 # if defined(HAVE_INTTYPES_H) || defined(HAVE_STDINT_H)
56 #  ifndef __FRIBIDI_DOC
57 #   if HAVE_INTTYPES_H
58 #    include <inttypes.h>
59 #   elif HAVE_STDINT_H
60 #    include <stdint.h>
61 #   endif /* !HAVE_STDINT_H */
62 #  endif /* !__FRIBIDI_DOC */
63 #  define FRIBIDI_INT8_LOCAL            int8_t
64 #  define FRIBIDI_INT16_LOCAL           int16_t
65 #  define FRIBIDI_INT32_LOCAL           int32_t
66 #  define FRIBIDI_UINT8_LOCAL           uint8_t
67 #  define FRIBIDI_UINT16_LOCAL          uint16_t
68 #  define FRIBIDI_UINT32_LOCAL          uint32_t
69 # else /* no int types */
70 #  define FRIBIDI_INT8_LOCAL            signed char
71 #  define FRIBIDI_UINT8_LOCAL           unsigned char
72 #  if !defined(FRIBIDI_SIZEOF_INT) || FRIBIDI_SIZEOF_INT >= 4
73 #   define FRIBIDI_INT16_LOCAL          signed short
74 #   define FRIBIDI_UINT16_LOCAL         unsigned short
75 #   define FRIBIDI_INT32_LOCAL          signed int
76 #   define FRIBIDI_UINT32_LOCAL         unsigned int
77 #  else /* SIZEOF_INT < 4 */
78 #   define FRIBIDI_INT16_LOCAL          signed int
79 #   define FRIBIDI_UINT16_LOCAL         unsigned int
80 #   define FRIBIDI_INT32_LOCAL          signed long
81 #   define FRIBIDI_UINT32_LOCAL         unsigned long
82 #  endif /* SIZEOF_INT < 4 */
83 # endif /* no int types */
84 # define FRIBIDI_BOOLEAN_LOCAL          int
85 # if SIZEOF_WCHAR_T >= 4
86 #  ifndef __FRIBIDI_DOC
87 #   if STDC_HEADERS
88 #    include <stdlib.h>
89 #    include <stddef.h>
90 #   else /* !STDC_HEADERS */
91 #    if HAVE_STDLIB_H
92 #     include <stdlib.h>
93 #    endif /* !HAVE_STDLIB_H */
94 #   endif /* !STDC_HEADERS */
95 #  endif /* !__FRIBIDI_DOC */
96 #  define FRIBIDI_UNICHAR_LOCAL         wchar_t
97 # else /* SIZEOF_WCHAR_T < 4 */
98 #  define FRIBIDI_UNICHAR_LOCAL         fribidi_uint32
99 # endif /* SIZEOF_WCHAR_T < 4 */
100 #endif /* !FRIBIDI_USE_GLIB */
101
102 #if FRIBIDI_INT_TYPES+0
103 #else
104 # define FRIBIDI_INT8   FRIBIDI_INT8_LOCAL
105 # define FRIBIDI_INT16  FRIBIDI_INT16_LOCAL
106 # define FRIBIDI_INT32  FRIBIDI_INT32_LOCAL
107 # define FRIBIDI_UINT8  FRIBIDI_UINT8_LOCAL
108 # define FRIBIDI_UINT16 FRIBIDI_UINT16_LOCAL
109 # define FRIBIDI_UINT32 FRIBIDI_UINT32_LOCAL
110 #endif /* !FRIBIDI_INT_TYPES */
111 #ifndef FRIBIDI_BOOLEAN
112 # define FRIBIDI_BOOLEAN        FRIBIDI_BOOLEAN_LOCAL
113 #endif /* !FRIBIDI_BOOLEAN */
114 #ifndef FRIBIDI_UNICHAR
115 # define FRIBIDI_UNICHAR FRIBIDI_UNICHAR_LOCAL
116 #endif /* !FRIBIDI_UNICHAR */
117 #ifndef FRIBIDI_STR_INDEX
118 # define FRIBIDI_STR_INDEX int
119 #endif /* FRIBIDI_STR_INDEX */
120
121
122 typedef FRIBIDI_UINT8 fribidi_int8;
123 typedef FRIBIDI_INT16 fribidi_int16;
124 typedef FRIBIDI_INT32 fribidi_int32;
125 typedef FRIBIDI_UINT8 fribidi_uint8;
126 typedef FRIBIDI_UINT16 fribidi_uint16;
127 typedef FRIBIDI_UINT32 fribidi_uint32;
128 typedef FRIBIDI_BOOLEAN fribidi_boolean;
129
130 typedef FRIBIDI_UNICHAR FriBidiChar;
131 typedef FRIBIDI_STR_INDEX FriBidiStrIndex;
132
133
134 #ifndef FRIBIDI_MAX_STRING_LENGTH
135 # define FRIBIDI_MAX_STRING_LENGTH (sizeof (FriBidiStrIndex) == 2 ?     \
136                 0x7FFF : (sizeof (FriBidiStrIndex) == 1 ? \
137                 0x7F : 0x7FFFFFFFL))
138 #endif
139
140 /* A few macros for working with bits */
141
142 #define FRIBIDI_TEST_BITS(x, mask) (((x) & (mask)) ? 1 : 0)
143
144 #define FRIBIDI_INCLUDE_BITS(x, mask) ((x) | (mask))
145
146 #define FRIBIDI_EXCLUDE_BITS(x, mask) ((x) & ~(mask))
147
148 #define FRIBIDI_SET_BITS(x, mask)       ((x) |= (mask))
149
150 #define FRIBIDI_UNSET_BITS(x, mask)     ((x) &= ~(mask))
151
152 #define FRIBIDI_ADJUST_BITS(x, mask, cond)      \
153         ((x) = ((x) & ~(mask)) | ((cond) ? (mask) : 0))
154
155 #define FRIBIDI_ADJUST_AND_TEST_BITS(x, mask, cond)     \
156         FRIBIDI_TEST_BITS(FRIBIDI_ADJUST_BITS((x), (mask), (cond)), (mask))
157
158 #include "fribidi-enddecls.h"
159
160 #endif /* !_FRIBIDI_TYPES_H */
161 /* Editor directions:
162  * vim:textwidth=78:tabstop=8:shiftwidth=2:autoindent:cindent
163  */