1/* FriBidi
2 * fribidi-common.h - common include for library headers
3 *
4 * Author:
5 * Behdad Esfahbod, 2004
6 *
7 * Copyright (C) 2004 Sharif FarsiWeb, Inc.
8 *
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public
11 * License as published by the Free Software Foundation; either
12 * version 2.1 of the License, or (at your option) any later version.
13 *
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
18 *
19 * You should have received a copy of the GNU Lesser General Public License
20 * along with this library, in a file named COPYING; if not, write to the
21 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
22 * Boston, MA 02110-1301, USA
23 *
24 * For licensing issues, contact <fribidi.license@gmail.com>.
25 */
26#ifndef _FRIBIDI_COMMON_H
27#define _FRIBIDI_COMMON_H
28
29#ifdef DONT_HAVE_FRIBIDI_CONFIG_H
30# define FRIBIDI "fribidi"
31# define FRIBIDI_NAME "fribidi"
32# define FRIBIDI_VERSION "unknown"
33# define FRIBIDI_BUGREPORT "unknown"
34# define FRIBIDI_INTERFACE_VERSION_STRING "unknown"
35#else /* !DONT_HAVE_FRIBIDI_CONFIG_H */
36# include "fribidi-config.h"
37#endif /* !DONT_HAVE_FRIBIDI_CONFIG_H */
38
39#ifdef HAVE_FRIBIDI_CUSTOM_H
40# include <fribidi-custom.h>
41#endif /* HAVE_FRIBIDI_CUSTOM_H */
42
43
44/* FRIBIDI_ENTRY is a macro used to declare library entry points. */
45#ifndef FRIBIDI_LIB_STATIC
46# ifndef FRIBIDI_ENTRY
47# ifdef _WIN32
48# ifdef FRIBIDI_BUILD
49# define FRIBIDI_ENTRY __declspec(dllexport)
50# else
51# define FRIBIDI_ENTRY __declspec(dllimport)
52# endif
53# elif (defined(__SUNPRO_C) || defined(__SUNPRO_CC))
54# define FRIBIDI_ENTRY __global
55# else
56# if (defined(__GNUC__) && __GNUC__ >= 4) || defined(__ICC)
57# define FRIBIDI_ENTRY __attribute__ ((visibility("default")))
58# else
59# define FRIBIDI_ENTRY
60# endif
61# endif
62# endif
63#else
64# ifndef FRIBIDI_ENTRY
65# define FRIBIDI_ENTRY
66# endif
67#endif
68
69#define FRIBIDI_EXTERN extern
70
71#ifdef __ICC
72#define FRIBIDI_BEGIN_IGNORE_DEPRECATIONS \
73 _Pragma ("warning (push)") \
74 _Pragma ("warning (disable:1478)")
75#define FRIBIDI_END_IGNORE_DEPRECATIONS \
76 _Pragma ("warning (pop)")
77#elif __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
78#define FRIBIDI_BEGIN_IGNORE_DEPRECATIONS \
79 _Pragma ("GCC diagnostic push") \
80 _Pragma ("GCC diagnostic ignored \"-Wdeprecated-declarations\"")
81#define FRIBIDI_END_IGNORE_DEPRECATIONS \
82 _Pragma ("GCC diagnostic pop")
83#elif defined (_MSC_VER) && (_MSC_VER >= 1500)
84#define FRIBIDI_BEGIN_IGNORE_DEPRECATIONS \
85 __pragma (warning (push)) \
86 __pragma (warning (disable : 4996))
87#define FRIBIDI_END_IGNORE_DEPRECATIONS \
88 __pragma (warning (pop))
89#elif defined (__clang__)
90#define FRIBIDI_BEGIN_IGNORE_DEPRECATIONS \
91 _Pragma("clang diagnostic push") \
92 _Pragma("clang diagnostic ignored \"-Wdeprecated-declarations\"")
93#define FRIBIDI_END_IGNORE_DEPRECATIONS \
94 _Pragma("clang diagnostic pop")
95#else
96#define FRIBIDI_BEGIN_IGNORE_DEPRECATIONS
97#define FRIBIDI_END_IGNORE_DEPRECATIONS
98#endif
99
100#if (defined(__GNUC__) && (__GNUC__ > 2)) && ! defined(_WIN32)
101# define FRIBIDI_GNUC_WARN_UNUSED __attribute__((__warn_unused_result__))
102# define FRIBIDI_GNUC_MALLOC __attribute__((__malloc__))
103# define FRIBIDI_GNUC_HIDDEN __attribute__((__visibility__ ("hidden")))
104# define FRIBIDI_GNUC_CONST __attribute__((__const__))
105# define FRIBIDI_GNUC_DEPRECATED __attribute__((__unused__))
106#else /* __GNUC__ */
107# define FRIBIDI_GNUC_WARN_UNUSED
108# define FRIBIDI_GNUC_MALLOC
109# define FRIBIDI_GNUC_HIDDEN
110# define FRIBIDI_GNUC_CONST
111# define FRIBIDI_GNUC_DEPRECATED
112#endif /* __GNUC__ */
113
114/* FRIBIDI_BEGIN_DECLS should be used at the beginning of your declarations,
115 * so that C++ compilers don't mangle their names. Use FRIBIDI_END_DECLS at
116 * the end of C declarations. */
117#ifndef FRIBIDI_BEGIN_DECLS
118# ifdef __cplusplus
119# define FRIBIDI_BEGIN_DECLS extern "C" {
120# define FRIBIDI_END_DECLS }
121# else /* !__cplusplus */
122# define FRIBIDI_BEGIN_DECLS /* empty */
123# define FRIBIDI_END_DECLS /* empty */
124# endif /* !__cplusplus */
125#endif /* !FRIBIDI_BEGIN_DECLS */
126
127
128
129
130/* fribidi_debug_status - get current debug state
131 *
132 */
133FRIBIDI_ENTRY int fribidi_debug_status (
134 void
135);
136
137/* fribidi_set_debug - set debug state
138 *
139 */
140FRIBIDI_ENTRY int
141fribidi_set_debug (
142 int state /* new state to set */
143);
144
145
146
147
148
149
150
151
152
153
154
155#endif /* !_FRIBIDI_COMMON_H */
156/* Editor directions:
157 * vim:textwidth=78:tabstop=8:shiftwidth=2:autoindent:cindent
158 */
159

source code of gtk/subprojects/fribidi/lib/fribidi-common.h