2 * fribidi-common.h - common include for library headers
4 * $Id: fribidi-common.h,v 1.14 2010-02-24 19:40:04 behdad Exp $
6 * $Date: 2010-02-24 19:40:04 $
8 * $Source: /home/behdad/src/fdo/fribidi/togit/git/../fribidi/fribidi2/lib/fribidi-common.h,v $
11 * Behdad Esfahbod, 2004
13 * Copyright (C) 2004 Sharif FarsiWeb, Inc.
15 * This library is free software; you can redistribute it and/or
16 * modify it under the terms of the GNU Lesser General Public
17 * License as published by the Free Software Foundation; either
18 * version 2.1 of the License, or (at your option) any later version.
20 * This library is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
23 * Lesser General Public License for more details.
25 * You should have received a copy of the GNU Lesser General Public License
26 * along with this library, in a file named COPYING; if not, write to the
27 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
28 * Boston, MA 02110-1301, USA
30 * For licensing issues, contact <license@farsiweb.info>.
32 #ifndef _FRIBIDI_COMMON_H
33 #define _FRIBIDI_COMMON_H
35 #if DONT_HAVE_FRIBIDI_CONFIG_H+0
36 # define FRIBIDI "fribidi"
37 # define FRIBIDI_NAME "fribidi"
38 # define FRIBIDI_VERSION "unknown"
39 # define FRIBIDI_BUGREPORT "unknown"
40 # define FRIBIDI_INTERFACE_VERSION_STRING "unknown"
41 #else /* !DONT_HAVE_FRIBIDI_CONFIG_H */
42 # include "fribidi-config.h"
43 #endif /* !DONT_HAVE_FRIBIDI_CONFIG_H */
45 #if HAVE_FRIBIDI_CUSTOM_H+0
46 # include <fribidi-custom.h>
47 #endif /* HAVE_FRIBIDI_CUSTOM_H */
49 /* FRIBIDI_NAMESPACE is a macro used to name library symbols. */
50 #ifndef FRIBIDI_NAMESPACE
51 # define FRIBIDI_NAMESPACE(SYMBOL) fribidi##_##SYMBOL
52 #endif /* !FRIBIDI_NAMESPACE */
54 /* FRIBIDI_ENTRY is a macro used to declare library entry points. */
56 # if (defined(WIN32)) || (defined(_WIN32_WCE))
57 # define FRIBIDI_ENTRY __declspec(dllimport)
59 # define FRIBIDI_ENTRY /* empty */
61 #endif /* !FRIBIDI_ENTRY */
63 #if FRIBIDI_USE_GLIB+0
64 # ifndef __FRIBIDI_DOC
66 # endif /* !__FRIBIDI_DOC */
67 # define FRIBIDI_BEGIN_DECLS G_BEGIN_DECLS
68 # define FRIBIDI_END_DECLS G_END_DECLS
69 # define FRIBIDI_GNUC_CONST G_GNUC_CONST
70 # define FRIBIDI_GNUC_DEPRECATED G_GNUC_DEPRECATED
72 # define FRIBIDI_GNUC_WARN_UNUSED \
73 __attribute__((__warn_unused_result__))
74 # define FRIBIDI_GNUC_MALLOC \
75 __attribute__((__malloc__))
76 # define FRIBIDI_GNUC_HIDDEN \
77 __attribute__((__visibility__ ("hidden")))
78 # else /* __GNUC__ <= 2 */
79 # define FRIBIDI_GNUC_WARN_UNUSED
80 # define FRIBIDI_GNUC_MALLOC
81 # define FRIBIDI_GNUC_HIDDEN
82 # endif /* __GNUC__ <= 2 */
83 #else /* !FRIBIDI_USE_GLIB */
84 # define FRIBIDI_GNUC_CONST
85 # define FRIBIDI_GNUC_DEPRECATED
86 # define FRIBIDI_GNUC_WARN_UNUSED
87 # define FRIBIDI_GNUC_MALLOC
88 # define FRIBIDI_GNUC_HIDDEN
89 #endif /* !FRIBIDI_USE_GLIB */
91 /* FRIBIDI_BEGIN_DECLS should be used at the beginning of your declarations,
92 * so that C++ compilers don't mangle their names. Use FRIBIDI_END_DECLS at
93 * the end of C declarations. */
94 #ifndef FRIBIDI_BEGIN_DECLS
96 # define FRIBIDI_BEGIN_DECLS extern "C" {
97 # define FRIBIDI_END_DECLS }
98 # else /* !__cplusplus */
99 # define FRIBIDI_BEGIN_DECLS /* empty */
100 # define FRIBIDI_END_DECLS /* empty */
101 # endif /* !__cplusplus */
102 #endif /* !FRIBIDI_BEGIN_DECLS */
107 #define fribidi_debug_status FRIBIDI_NAMESPACE(debug_status)
108 FRIBIDI_ENTRY int fribidi_debug_status (
111 #define fribidi_set_debug FRIBIDI_NAMESPACE(set_debug)
114 int state /* new state to set */
127 #endif /* !_FRIBIDI_COMMON_H */
128 /* Editor directions:
129 * vim:textwidth=78:tabstop=8:shiftwidth=2:autoindent:cindent