Imported Upstream version 0.19.7
[platform/upstream/fribidi.git] / lib / fribidi-common.h
1 /* FriBidi
2  * fribidi-common.h - common include for library headers
3  *
4  * $Id: fribidi-common.h,v 1.14 2010-02-24 19:40:04 behdad Exp $
5  * $Author: behdad $
6  * $Date: 2010-02-24 19:40:04 $
7  * $Revision: 1.14 $
8  * $Source: /home/behdad/src/fdo/fribidi/togit/git/../fribidi/fribidi2/lib/fribidi-common.h,v $
9  *
10  * Author:
11  *   Behdad Esfahbod, 2004
12  *
13  * Copyright (C) 2004 Sharif FarsiWeb, Inc.
14  * 
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.
19  * 
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.
24  * 
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
29  * 
30  * For licensing issues, contact <license@farsiweb.info>.
31  */
32 #ifndef _FRIBIDI_COMMON_H
33 #define _FRIBIDI_COMMON_H
34
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 */
44
45 #if HAVE_FRIBIDI_CUSTOM_H+0
46 # include <fribidi-custom.h>
47 #endif /* HAVE_FRIBIDI_CUSTOM_H */
48
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 */
53
54 /* FRIBIDI_ENTRY is a macro used to declare library entry points. */
55 #ifndef FRIBIDI_ENTRY
56 #  define FRIBIDI_ENTRY         /* empty */
57 #endif /* !FRIBIDI_ENTRY */
58
59 #if FRIBIDI_USE_GLIB+0
60 # ifndef __FRIBIDI_DOC
61 #  include <glib.h>
62 # endif /* !__FRIBIDI_DOC */
63 # define FRIBIDI_BEGIN_DECLS            G_BEGIN_DECLS
64 # define FRIBIDI_END_DECLS              G_END_DECLS
65 # define FRIBIDI_GNUC_CONST             G_GNUC_CONST
66 # define FRIBIDI_GNUC_DEPRECATED        G_GNUC_DEPRECATED
67 # if __GNUC__ > 2
68 #  define FRIBIDI_GNUC_WARN_UNUSED      \
69         __attribute__((__warn_unused_result__))
70 #  define FRIBIDI_GNUC_MALLOC           \
71         __attribute__((__malloc__))
72 #  define FRIBIDI_GNUC_HIDDEN           \
73         __attribute__((__visibility__ ("hidden")))
74 # else /* __GNUC__ <= 2 */
75 #  define FRIBIDI_GNUC_WARN_UNUSED
76 #  define FRIBIDI_GNUC_MALLOC
77 #  define FRIBIDI_GNUC_HIDDEN
78 # endif /* __GNUC__ <= 2 */
79 #else /* !FRIBIDI_USE_GLIB */
80 # define FRIBIDI_GNUC_CONST
81 # define FRIBIDI_GNUC_DEPRECATED
82 # define FRIBIDI_GNUC_WARN_UNUSED
83 # define FRIBIDI_GNUC_MALLOC
84 # define FRIBIDI_GNUC_HIDDEN
85 #endif /* !FRIBIDI_USE_GLIB */
86
87 /* FRIBIDI_BEGIN_DECLS should be used at the beginning of your declarations,
88  * so that C++ compilers don't mangle their names.  Use FRIBIDI_END_DECLS at
89  * the end of C declarations. */
90 #ifndef FRIBIDI_BEGIN_DECLS
91 # ifdef __cplusplus
92 #  define FRIBIDI_BEGIN_DECLS extern "C" {
93 #  define FRIBIDI_END_DECLS }
94 # else /* !__cplusplus */
95 #  define FRIBIDI_BEGIN_DECLS   /* empty */
96 #  define FRIBIDI_END_DECLS     /* empty */
97 # endif /* !__cplusplus */
98 #endif /* !FRIBIDI_BEGIN_DECLS */
99
100
101
102
103 #define fribidi_debug_status FRIBIDI_NAMESPACE(debug_status)
104 FRIBIDI_ENTRY int fribidi_debug_status (
105   void
106 );
107 #define fribidi_set_debug FRIBIDI_NAMESPACE(set_debug)
108 FRIBIDI_ENTRY int
109 fribidi_set_debug (
110   int state             /* new state to set */
111 );
112
113
114
115
116
117
118
119
120
121
122
123 #endif /* !_FRIBIDI_COMMON_H */
124 /* Editor directions:
125  * vim:textwidth=78:tabstop=8:shiftwidth=2:autoindent:cindent
126  */