Imported Upstream version 0.19.4
[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., 59 Temple Place, Suite 330,
28  * Boston, MA 02111-1307, 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 # if (defined(WIN32)) || (defined(_WIN32_WCE))
57 #  define FRIBIDI_ENTRY __declspec(dllimport)
58 # else /* !WIN32 */
59 #  define FRIBIDI_ENTRY         /* empty */
60 # endif /* !WIN32 */
61 #endif /* !FRIBIDI_ENTRY */
62
63 #if FRIBIDI_USE_GLIB+0
64 # ifndef __FRIBIDI_DOC
65 #  include <glib.h>
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
71 # if __GNUC__ > 2
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 */
90
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
95 # ifdef __cplusplus
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 */
103
104
105
106
107 #define fribidi_debug_status FRIBIDI_NAMESPACE(debug_status)
108 FRIBIDI_ENTRY int fribidi_debug_status (
109   void
110 );
111 #define fribidi_set_debug FRIBIDI_NAMESPACE(set_debug)
112 FRIBIDI_ENTRY int
113 fribidi_set_debug (
114   int state             /* new state to set */
115 );
116
117
118
119
120
121
122
123
124
125
126
127 #endif /* !_FRIBIDI_COMMON_H */
128 /* Editor directions:
129  * vim:textwidth=78:tabstop=8:shiftwidth=2:autoindent:cindent
130  */