/
cbindgen.toml
91 lines (80 loc) · 2.4 KB
/
cbindgen.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# See https://github.com/eqrion/cbindgen/blob/master/docs.md#cbindgentoml
# for detailed documentation of every option here.
language = "C"
############## Options for Wrapping the Contents of the Header #################
header = """
/*
* Copyright (c) 2023
* libchewing Core Team. See ChangeLog for details.
*
* See the file "COPYING" for information on usage and redistribution
* of this file.
*/"""
autogen_warning = "/* Warning, this file is autogenerated by cbindgen. Don't modify this manually. */"
include_guard = "chewing_public_bindings_h"
pragma_once = true
cpp_compat = true
after_includes = """
/** @brief context handle used for Chewing IM APIs
*/
typedef struct ChewingContext ChewingContext;
/* specified to Chewing API */
#if defined(_WIN32) || defined(_WIN64) || defined(_WIN32_WCE)
# define CHEWING_DLL_IMPORT __declspec(dllimport)
# define CHEWING_DLL_EXPORT __declspec(dllexport)
# ifdef CHEWINGDLL_EXPORTS
# define CHEWING_API CHEWING_DLL_EXPORT
# define CHEWING_PRIVATE
# elif CHEWINGDLL_IMPORTS
# define CHEWING_API CHEWING_DLL_IMPORT
# define CHEWING_PRIVATE
# else
# define CHEWING_API
# define CHEWING_PRIVATE
# endif
#elif (__GNUC__ > 3) && (defined(__ELF__) || defined(__PIC__))
# define CHEWING_API __attribute__((__visibility__("default")))
# define CHEWING_PRIVATE __attribute__((__visibility__("hidden")))
#else
# define CHEWING_API
# define CHEWING_PRIVATE
#endif
#ifndef UNUSED
# if defined(__GNUC__) /* gcc specific */
# define UNUSED __attribute__((unused))
# else
# define UNUSED
# endif
#endif
#ifndef DEPRECATED
# if defined(__GNUC__) && __GNUC__ > 3 || \
(__GNUC__ == 3 && __GNUC_MINOR__ >= 1) /* gcc specific */
# define DEPRECATED __attribute__((deprecated))
# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)
# define DEPRECATED_FOR(f) \
__attribute__((deprecated("Use " #f " instead")))
# else
# define DEPRECATED_FOR(f) DEPRECATED
# endif
# else
# define DEPRECATED
# define DEPRECATED_FOR(f)
# endif
#endif
"""
[parse]
parse_deps = true
include = ["chewing"]
[struct]
rename_fields = "CamelCase"
[enum]
rename_variants = "ScreamingSnakeCase"
[export]
include = [
"ChewingConfigData",
"IntervalType",
"ChewingContext",
"KB",
"UserUpdate",
"ChewingContext",
]