diff options
Diffstat (limited to 'third_party/rust/freetype/etc')
-rwxr-xr-x | third_party/rust/freetype/etc/bindgen.sh | 23 | ||||
-rw-r--r-- | third_party/rust/freetype/etc/bindings.h | 6 |
2 files changed, 29 insertions, 0 deletions
diff --git a/third_party/rust/freetype/etc/bindgen.sh b/third_party/rust/freetype/etc/bindgen.sh new file mode 100755 index 0000000000..2b8b9f684d --- /dev/null +++ b/third_party/rust/freetype/etc/bindgen.sh @@ -0,0 +1,23 @@ +#!/usr/bin/env bash + +cd "$(dirname $0)" + +# We replace the FT_ integer types of known widths, since we can do better. +# +# We blacklist FT_Error and import our own in order to have convenience methods +# on it instead of being a plain integer. +"${BINDGEN}" bindings.h -o ../src/freetype.rs \ + --blacklist-type "FT_(Int16|UInt16|Int32|UInt32|Int16|Int64|UInt64)" \ + --raw-line "pub type FT_Int16 = i16;" \ + --raw-line "pub type FT_UInt16 = u16;" \ + --raw-line "pub type FT_Int32 = i32;" \ + --raw-line "pub type FT_UInt32 = u32;" \ + --raw-line "pub type FT_Int64= i64;" \ + --raw-line "pub type FT_UInt64= u64;" \ + --blacklist-type "FT_Error" \ + --raw-line "pub use FT_Error;" \ + --generate=functions,types,vars \ + --whitelist-function="FT_.*" \ + --whitelist-type="FT_.*" \ + --whitelist-var="FT_.*" \ + -- -I/usr/include/freetype2 diff --git a/third_party/rust/freetype/etc/bindings.h b/third_party/rust/freetype/etc/bindings.h new file mode 100644 index 0000000000..34c894bf0d --- /dev/null +++ b/third_party/rust/freetype/etc/bindings.h @@ -0,0 +1,6 @@ +#include <freetype2/ft2build.h> +#include <freetype2/freetype/freetype.h> +#include <freetype2/freetype/ftlcdfil.h> +#include <freetype2/freetype/tttables.h> +#include <freetype2/freetype/ftmodapi.h> +#include <freetype2/freetype/ftoutln.h> |