Make ttf,image,mixer,gfx work withut use-bindgen

This commit is contained in:
Cobrand
2019-04-03 13:04:54 +00:00
parent 95c973f194
commit 023051d400
7 changed files with 481 additions and 531 deletions
+11 -11
View File
@@ -3,7 +3,7 @@
pub const FPS_UPPER_LIMIT: u32 = 200;
pub const FPS_LOWER_LIMIT: u32 = 1;
pub const FPS_DEFAULT: u32 = 30;
pub type __uint32_t = ::std::os::raw::c_uint;
pub type __uint32_t = libc::c_uint;
pub type Uint32 = u32;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
@@ -17,17 +17,17 @@ pub struct FPSmanager {
#[test]
fn bindgen_test_layout_FPSmanager() {
assert_eq!(
::std::mem::size_of::<FPSmanager>(),
::core::mem::size_of::<FPSmanager>(),
20usize,
concat!("Size of: ", stringify!(FPSmanager))
);
assert_eq!(
::std::mem::align_of::<FPSmanager>(),
::core::mem::align_of::<FPSmanager>(),
4usize,
concat!("Alignment of ", stringify!(FPSmanager))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<FPSmanager>())).framecount as *const _ as usize },
unsafe { &(*(::core::ptr::null::<FPSmanager>())).framecount as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
@@ -37,7 +37,7 @@ fn bindgen_test_layout_FPSmanager() {
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<FPSmanager>())).rateticks as *const _ as usize },
unsafe { &(*(::core::ptr::null::<FPSmanager>())).rateticks as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
@@ -47,7 +47,7 @@ fn bindgen_test_layout_FPSmanager() {
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<FPSmanager>())).baseticks as *const _ as usize },
unsafe { &(*(::core::ptr::null::<FPSmanager>())).baseticks as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
@@ -57,7 +57,7 @@ fn bindgen_test_layout_FPSmanager() {
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<FPSmanager>())).lastticks as *const _ as usize },
unsafe { &(*(::core::ptr::null::<FPSmanager>())).lastticks as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
@@ -67,7 +67,7 @@ fn bindgen_test_layout_FPSmanager() {
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<FPSmanager>())).rate as *const _ as usize },
unsafe { &(*(::core::ptr::null::<FPSmanager>())).rate as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
@@ -81,13 +81,13 @@ extern "C" {
pub fn SDL_initFramerate(manager: *mut FPSmanager);
}
extern "C" {
pub fn SDL_setFramerate(manager: *mut FPSmanager, rate: Uint32) -> ::std::os::raw::c_int;
pub fn SDL_setFramerate(manager: *mut FPSmanager, rate: Uint32) -> libc::c_int;
}
extern "C" {
pub fn SDL_getFramerate(manager: *mut FPSmanager) -> ::std::os::raw::c_int;
pub fn SDL_getFramerate(manager: *mut FPSmanager) -> libc::c_int;
}
extern "C" {
pub fn SDL_getFramecount(manager: *mut FPSmanager) -> ::std::os::raw::c_int;
pub fn SDL_getFramecount(manager: *mut FPSmanager) -> libc::c_int;
}
extern "C" {
pub fn SDL_framerateDelay(manager: *mut FPSmanager) -> Uint32;
+140 -140
View File
@@ -1,7 +1,7 @@
/* automatically generated by rust-bindgen */
extern "C" {
pub fn SDL_imageFilterMMXdetect() -> ::std::os::raw::c_int;
pub fn SDL_imageFilterMMXdetect() -> libc::c_int;
}
extern "C" {
pub fn SDL_imageFilterMMXoff();
@@ -11,221 +11,221 @@ extern "C" {
}
extern "C" {
pub fn SDL_imageFilterAdd(
Src1: *mut ::std::os::raw::c_uchar,
Src2: *mut ::std::os::raw::c_uchar,
Dest: *mut ::std::os::raw::c_uchar,
length: ::std::os::raw::c_uint,
) -> ::std::os::raw::c_int;
Src1: *mut libc::c_uchar,
Src2: *mut libc::c_uchar,
Dest: *mut libc::c_uchar,
length: libc::c_uint,
) -> libc::c_int;
}
extern "C" {
pub fn SDL_imageFilterMean(
Src1: *mut ::std::os::raw::c_uchar,
Src2: *mut ::std::os::raw::c_uchar,
Dest: *mut ::std::os::raw::c_uchar,
length: ::std::os::raw::c_uint,
) -> ::std::os::raw::c_int;
Src1: *mut libc::c_uchar,
Src2: *mut libc::c_uchar,
Dest: *mut libc::c_uchar,
length: libc::c_uint,
) -> libc::c_int;
}
extern "C" {
pub fn SDL_imageFilterSub(
Src1: *mut ::std::os::raw::c_uchar,
Src2: *mut ::std::os::raw::c_uchar,
Dest: *mut ::std::os::raw::c_uchar,
length: ::std::os::raw::c_uint,
) -> ::std::os::raw::c_int;
Src1: *mut libc::c_uchar,
Src2: *mut libc::c_uchar,
Dest: *mut libc::c_uchar,
length: libc::c_uint,
) -> libc::c_int;
}
extern "C" {
pub fn SDL_imageFilterAbsDiff(
Src1: *mut ::std::os::raw::c_uchar,
Src2: *mut ::std::os::raw::c_uchar,
Dest: *mut ::std::os::raw::c_uchar,
length: ::std::os::raw::c_uint,
) -> ::std::os::raw::c_int;
Src1: *mut libc::c_uchar,
Src2: *mut libc::c_uchar,
Dest: *mut libc::c_uchar,
length: libc::c_uint,
) -> libc::c_int;
}
extern "C" {
pub fn SDL_imageFilterMult(
Src1: *mut ::std::os::raw::c_uchar,
Src2: *mut ::std::os::raw::c_uchar,
Dest: *mut ::std::os::raw::c_uchar,
length: ::std::os::raw::c_uint,
) -> ::std::os::raw::c_int;
Src1: *mut libc::c_uchar,
Src2: *mut libc::c_uchar,
Dest: *mut libc::c_uchar,
length: libc::c_uint,
) -> libc::c_int;
}
extern "C" {
pub fn SDL_imageFilterMultNor(
Src1: *mut ::std::os::raw::c_uchar,
Src2: *mut ::std::os::raw::c_uchar,
Dest: *mut ::std::os::raw::c_uchar,
length: ::std::os::raw::c_uint,
) -> ::std::os::raw::c_int;
Src1: *mut libc::c_uchar,
Src2: *mut libc::c_uchar,
Dest: *mut libc::c_uchar,
length: libc::c_uint,
) -> libc::c_int;
}
extern "C" {
pub fn SDL_imageFilterMultDivby2(
Src1: *mut ::std::os::raw::c_uchar,
Src2: *mut ::std::os::raw::c_uchar,
Dest: *mut ::std::os::raw::c_uchar,
length: ::std::os::raw::c_uint,
) -> ::std::os::raw::c_int;
Src1: *mut libc::c_uchar,
Src2: *mut libc::c_uchar,
Dest: *mut libc::c_uchar,
length: libc::c_uint,
) -> libc::c_int;
}
extern "C" {
pub fn SDL_imageFilterMultDivby4(
Src1: *mut ::std::os::raw::c_uchar,
Src2: *mut ::std::os::raw::c_uchar,
Dest: *mut ::std::os::raw::c_uchar,
length: ::std::os::raw::c_uint,
) -> ::std::os::raw::c_int;
Src1: *mut libc::c_uchar,
Src2: *mut libc::c_uchar,
Dest: *mut libc::c_uchar,
length: libc::c_uint,
) -> libc::c_int;
}
extern "C" {
pub fn SDL_imageFilterBitAnd(
Src1: *mut ::std::os::raw::c_uchar,
Src2: *mut ::std::os::raw::c_uchar,
Dest: *mut ::std::os::raw::c_uchar,
length: ::std::os::raw::c_uint,
) -> ::std::os::raw::c_int;
Src1: *mut libc::c_uchar,
Src2: *mut libc::c_uchar,
Dest: *mut libc::c_uchar,
length: libc::c_uint,
) -> libc::c_int;
}
extern "C" {
pub fn SDL_imageFilterBitOr(
Src1: *mut ::std::os::raw::c_uchar,
Src2: *mut ::std::os::raw::c_uchar,
Dest: *mut ::std::os::raw::c_uchar,
length: ::std::os::raw::c_uint,
) -> ::std::os::raw::c_int;
Src1: *mut libc::c_uchar,
Src2: *mut libc::c_uchar,
Dest: *mut libc::c_uchar,
length: libc::c_uint,
) -> libc::c_int;
}
extern "C" {
pub fn SDL_imageFilterDiv(
Src1: *mut ::std::os::raw::c_uchar,
Src2: *mut ::std::os::raw::c_uchar,
Dest: *mut ::std::os::raw::c_uchar,
length: ::std::os::raw::c_uint,
) -> ::std::os::raw::c_int;
Src1: *mut libc::c_uchar,
Src2: *mut libc::c_uchar,
Dest: *mut libc::c_uchar,
length: libc::c_uint,
) -> libc::c_int;
}
extern "C" {
pub fn SDL_imageFilterBitNegation(
Src1: *mut ::std::os::raw::c_uchar,
Dest: *mut ::std::os::raw::c_uchar,
length: ::std::os::raw::c_uint,
) -> ::std::os::raw::c_int;
Src1: *mut libc::c_uchar,
Dest: *mut libc::c_uchar,
length: libc::c_uint,
) -> libc::c_int;
}
extern "C" {
pub fn SDL_imageFilterAddByte(
Src1: *mut ::std::os::raw::c_uchar,
Dest: *mut ::std::os::raw::c_uchar,
length: ::std::os::raw::c_uint,
C: ::std::os::raw::c_uchar,
) -> ::std::os::raw::c_int;
Src1: *mut libc::c_uchar,
Dest: *mut libc::c_uchar,
length: libc::c_uint,
C: libc::c_uchar,
) -> libc::c_int;
}
extern "C" {
pub fn SDL_imageFilterAddUint(
Src1: *mut ::std::os::raw::c_uchar,
Dest: *mut ::std::os::raw::c_uchar,
length: ::std::os::raw::c_uint,
C: ::std::os::raw::c_uint,
) -> ::std::os::raw::c_int;
Src1: *mut libc::c_uchar,
Dest: *mut libc::c_uchar,
length: libc::c_uint,
C: libc::c_uint,
) -> libc::c_int;
}
extern "C" {
pub fn SDL_imageFilterAddByteToHalf(
Src1: *mut ::std::os::raw::c_uchar,
Dest: *mut ::std::os::raw::c_uchar,
length: ::std::os::raw::c_uint,
C: ::std::os::raw::c_uchar,
) -> ::std::os::raw::c_int;
Src1: *mut libc::c_uchar,
Dest: *mut libc::c_uchar,
length: libc::c_uint,
C: libc::c_uchar,
) -> libc::c_int;
}
extern "C" {
pub fn SDL_imageFilterSubByte(
Src1: *mut ::std::os::raw::c_uchar,
Dest: *mut ::std::os::raw::c_uchar,
length: ::std::os::raw::c_uint,
C: ::std::os::raw::c_uchar,
) -> ::std::os::raw::c_int;
Src1: *mut libc::c_uchar,
Dest: *mut libc::c_uchar,
length: libc::c_uint,
C: libc::c_uchar,
) -> libc::c_int;
}
extern "C" {
pub fn SDL_imageFilterSubUint(
Src1: *mut ::std::os::raw::c_uchar,
Dest: *mut ::std::os::raw::c_uchar,
length: ::std::os::raw::c_uint,
C: ::std::os::raw::c_uint,
) -> ::std::os::raw::c_int;
Src1: *mut libc::c_uchar,
Dest: *mut libc::c_uchar,
length: libc::c_uint,
C: libc::c_uint,
) -> libc::c_int;
}
extern "C" {
pub fn SDL_imageFilterShiftRight(
Src1: *mut ::std::os::raw::c_uchar,
Dest: *mut ::std::os::raw::c_uchar,
length: ::std::os::raw::c_uint,
N: ::std::os::raw::c_uchar,
) -> ::std::os::raw::c_int;
Src1: *mut libc::c_uchar,
Dest: *mut libc::c_uchar,
length: libc::c_uint,
N: libc::c_uchar,
) -> libc::c_int;
}
extern "C" {
pub fn SDL_imageFilterShiftRightUint(
Src1: *mut ::std::os::raw::c_uchar,
Dest: *mut ::std::os::raw::c_uchar,
length: ::std::os::raw::c_uint,
N: ::std::os::raw::c_uchar,
) -> ::std::os::raw::c_int;
Src1: *mut libc::c_uchar,
Dest: *mut libc::c_uchar,
length: libc::c_uint,
N: libc::c_uchar,
) -> libc::c_int;
}
extern "C" {
pub fn SDL_imageFilterMultByByte(
Src1: *mut ::std::os::raw::c_uchar,
Dest: *mut ::std::os::raw::c_uchar,
length: ::std::os::raw::c_uint,
C: ::std::os::raw::c_uchar,
) -> ::std::os::raw::c_int;
Src1: *mut libc::c_uchar,
Dest: *mut libc::c_uchar,
length: libc::c_uint,
C: libc::c_uchar,
) -> libc::c_int;
}
extern "C" {
pub fn SDL_imageFilterShiftRightAndMultByByte(
Src1: *mut ::std::os::raw::c_uchar,
Dest: *mut ::std::os::raw::c_uchar,
length: ::std::os::raw::c_uint,
N: ::std::os::raw::c_uchar,
C: ::std::os::raw::c_uchar,
) -> ::std::os::raw::c_int;
Src1: *mut libc::c_uchar,
Dest: *mut libc::c_uchar,
length: libc::c_uint,
N: libc::c_uchar,
C: libc::c_uchar,
) -> libc::c_int;
}
extern "C" {
pub fn SDL_imageFilterShiftLeftByte(
Src1: *mut ::std::os::raw::c_uchar,
Dest: *mut ::std::os::raw::c_uchar,
length: ::std::os::raw::c_uint,
N: ::std::os::raw::c_uchar,
) -> ::std::os::raw::c_int;
Src1: *mut libc::c_uchar,
Dest: *mut libc::c_uchar,
length: libc::c_uint,
N: libc::c_uchar,
) -> libc::c_int;
}
extern "C" {
pub fn SDL_imageFilterShiftLeftUint(
Src1: *mut ::std::os::raw::c_uchar,
Dest: *mut ::std::os::raw::c_uchar,
length: ::std::os::raw::c_uint,
N: ::std::os::raw::c_uchar,
) -> ::std::os::raw::c_int;
Src1: *mut libc::c_uchar,
Dest: *mut libc::c_uchar,
length: libc::c_uint,
N: libc::c_uchar,
) -> libc::c_int;
}
extern "C" {
pub fn SDL_imageFilterShiftLeft(
Src1: *mut ::std::os::raw::c_uchar,
Dest: *mut ::std::os::raw::c_uchar,
length: ::std::os::raw::c_uint,
N: ::std::os::raw::c_uchar,
) -> ::std::os::raw::c_int;
Src1: *mut libc::c_uchar,
Dest: *mut libc::c_uchar,
length: libc::c_uint,
N: libc::c_uchar,
) -> libc::c_int;
}
extern "C" {
pub fn SDL_imageFilterBinarizeUsingThreshold(
Src1: *mut ::std::os::raw::c_uchar,
Dest: *mut ::std::os::raw::c_uchar,
length: ::std::os::raw::c_uint,
T: ::std::os::raw::c_uchar,
) -> ::std::os::raw::c_int;
Src1: *mut libc::c_uchar,
Dest: *mut libc::c_uchar,
length: libc::c_uint,
T: libc::c_uchar,
) -> libc::c_int;
}
extern "C" {
pub fn SDL_imageFilterClipToRange(
Src1: *mut ::std::os::raw::c_uchar,
Dest: *mut ::std::os::raw::c_uchar,
length: ::std::os::raw::c_uint,
Tmin: ::std::os::raw::c_uchar,
Tmax: ::std::os::raw::c_uchar,
) -> ::std::os::raw::c_int;
Src1: *mut libc::c_uchar,
Dest: *mut libc::c_uchar,
length: libc::c_uint,
Tmin: libc::c_uchar,
Tmax: libc::c_uchar,
) -> libc::c_int;
}
extern "C" {
pub fn SDL_imageFilterNormalizeLinear(
Src: *mut ::std::os::raw::c_uchar,
Dest: *mut ::std::os::raw::c_uchar,
length: ::std::os::raw::c_uint,
Cmin: ::std::os::raw::c_int,
Cmax: ::std::os::raw::c_int,
Nmin: ::std::os::raw::c_int,
Nmax: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
Src: *mut libc::c_uchar,
Dest: *mut libc::c_uchar,
length: libc::c_uint,
Cmin: libc::c_int,
Cmax: libc::c_int,
Nmin: libc::c_int,
Nmax: libc::c_int,
) -> libc::c_int;
}
File diff suppressed because it is too large Load Diff
+22 -20
View File
@@ -1,7 +1,9 @@
/* automatically generated by rust-bindgen */
pub type __uint8_t = ::std::os::raw::c_uchar;
pub type __uint32_t = ::std::os::raw::c_uint;
use crate::*;
pub type __uint8_t = libc::c_uchar;
pub type __uint32_t = libc::c_uint;
pub type Uint8 = u8;
pub type Uint32 = u32;
extern "C" {
@@ -9,7 +11,7 @@ extern "C" {
src: *mut SDL_Surface,
angle: f64,
zoom: f64,
smooth: ::std::os::raw::c_int,
smooth: libc::c_int,
) -> *mut SDL_Surface;
}
extern "C" {
@@ -18,28 +20,28 @@ extern "C" {
angle: f64,
zoomx: f64,
zoomy: f64,
smooth: ::std::os::raw::c_int,
smooth: libc::c_int,
) -> *mut SDL_Surface;
}
extern "C" {
pub fn rotozoomSurfaceSize(
width: ::std::os::raw::c_int,
height: ::std::os::raw::c_int,
width: libc::c_int,
height: libc::c_int,
angle: f64,
zoom: f64,
dstwidth: *mut ::std::os::raw::c_int,
dstheight: *mut ::std::os::raw::c_int,
dstwidth: *mut libc::c_int,
dstheight: *mut libc::c_int,
);
}
extern "C" {
pub fn rotozoomSurfaceSizeXY(
width: ::std::os::raw::c_int,
height: ::std::os::raw::c_int,
width: libc::c_int,
height: libc::c_int,
angle: f64,
zoomx: f64,
zoomy: f64,
dstwidth: *mut ::std::os::raw::c_int,
dstheight: *mut ::std::os::raw::c_int,
dstwidth: *mut libc::c_int,
dstheight: *mut libc::c_int,
);
}
extern "C" {
@@ -47,29 +49,29 @@ extern "C" {
src: *mut SDL_Surface,
zoomx: f64,
zoomy: f64,
smooth: ::std::os::raw::c_int,
smooth: libc::c_int,
) -> *mut SDL_Surface;
}
extern "C" {
pub fn zoomSurfaceSize(
width: ::std::os::raw::c_int,
height: ::std::os::raw::c_int,
width: libc::c_int,
height: libc::c_int,
zoomx: f64,
zoomy: f64,
dstwidth: *mut ::std::os::raw::c_int,
dstheight: *mut ::std::os::raw::c_int,
dstwidth: *mut libc::c_int,
dstheight: *mut libc::c_int,
);
}
extern "C" {
pub fn shrinkSurface(
src: *mut SDL_Surface,
factorx: ::std::os::raw::c_int,
factory: ::std::os::raw::c_int,
factorx: libc::c_int,
factory: libc::c_int,
) -> *mut SDL_Surface;
}
extern "C" {
pub fn rotateSurface90Degrees(
src: *mut SDL_Surface,
numClockwiseTurns: ::std::os::raw::c_int,
numClockwiseTurns: libc::c_int,
) -> *mut SDL_Surface;
}
+41 -42
View File
@@ -1,10 +1,12 @@
/* automatically generated by rust-bindgen */
pub type __uint8_t = ::std::os::raw::c_uchar;
pub type __uint32_t = ::std::os::raw::c_uint;
pub type __int64_t = ::std::os::raw::c_long;
pub type __off_t = ::std::os::raw::c_long;
pub type __off64_t = ::std::os::raw::c_long;
use crate::*;
pub type __uint8_t = libc::c_uchar;
pub type __uint32_t = libc::c_uint;
pub type __int64_t = libc::c_long;
pub type __off_t = libc::c_long;
pub type __off64_t = libc::c_long;
pub type Uint8 = u8;
pub type Uint32 = u32;
pub type Sint64 = i64;
@@ -17,7 +19,7 @@ pub const IMG_InitFlags_IMG_INIT_TIF: IMG_InitFlags = 4;
pub const IMG_InitFlags_IMG_INIT_WEBP: IMG_InitFlags = 8;
pub type IMG_InitFlags = u32;
extern "C" {
pub fn IMG_Init(flags: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
pub fn IMG_Init(flags: libc::c_int) -> libc::c_int;
}
extern "C" {
pub fn IMG_Quit();
@@ -25,81 +27,81 @@ extern "C" {
extern "C" {
pub fn IMG_LoadTyped_RW(
src: *mut SDL_RWops,
freesrc: ::std::os::raw::c_int,
type_: *const ::std::os::raw::c_char,
freesrc: libc::c_int,
type_: *const libc::c_char,
) -> *mut SDL_Surface;
}
extern "C" {
pub fn IMG_Load(file: *const ::std::os::raw::c_char) -> *mut SDL_Surface;
pub fn IMG_Load(file: *const libc::c_char) -> *mut SDL_Surface;
}
extern "C" {
pub fn IMG_Load_RW(src: *mut SDL_RWops, freesrc: ::std::os::raw::c_int) -> *mut SDL_Surface;
pub fn IMG_Load_RW(src: *mut SDL_RWops, freesrc: libc::c_int) -> *mut SDL_Surface;
}
extern "C" {
pub fn IMG_LoadTexture(
renderer: *mut SDL_Renderer,
file: *const ::std::os::raw::c_char,
file: *const libc::c_char,
) -> *mut SDL_Texture;
}
extern "C" {
pub fn IMG_LoadTexture_RW(
renderer: *mut SDL_Renderer,
src: *mut SDL_RWops,
freesrc: ::std::os::raw::c_int,
freesrc: libc::c_int,
) -> *mut SDL_Texture;
}
extern "C" {
pub fn IMG_LoadTextureTyped_RW(
renderer: *mut SDL_Renderer,
src: *mut SDL_RWops,
freesrc: ::std::os::raw::c_int,
type_: *const ::std::os::raw::c_char,
freesrc: libc::c_int,
type_: *const libc::c_char,
) -> *mut SDL_Texture;
}
extern "C" {
pub fn IMG_isICO(src: *mut SDL_RWops) -> ::std::os::raw::c_int;
pub fn IMG_isICO(src: *mut SDL_RWops) -> libc::c_int;
}
extern "C" {
pub fn IMG_isCUR(src: *mut SDL_RWops) -> ::std::os::raw::c_int;
pub fn IMG_isCUR(src: *mut SDL_RWops) -> libc::c_int;
}
extern "C" {
pub fn IMG_isBMP(src: *mut SDL_RWops) -> ::std::os::raw::c_int;
pub fn IMG_isBMP(src: *mut SDL_RWops) -> libc::c_int;
}
extern "C" {
pub fn IMG_isGIF(src: *mut SDL_RWops) -> ::std::os::raw::c_int;
pub fn IMG_isGIF(src: *mut SDL_RWops) -> libc::c_int;
}
extern "C" {
pub fn IMG_isJPG(src: *mut SDL_RWops) -> ::std::os::raw::c_int;
pub fn IMG_isJPG(src: *mut SDL_RWops) -> libc::c_int;
}
extern "C" {
pub fn IMG_isLBM(src: *mut SDL_RWops) -> ::std::os::raw::c_int;
pub fn IMG_isLBM(src: *mut SDL_RWops) -> libc::c_int;
}
extern "C" {
pub fn IMG_isPCX(src: *mut SDL_RWops) -> ::std::os::raw::c_int;
pub fn IMG_isPCX(src: *mut SDL_RWops) -> libc::c_int;
}
extern "C" {
pub fn IMG_isPNG(src: *mut SDL_RWops) -> ::std::os::raw::c_int;
pub fn IMG_isPNG(src: *mut SDL_RWops) -> libc::c_int;
}
extern "C" {
pub fn IMG_isPNM(src: *mut SDL_RWops) -> ::std::os::raw::c_int;
pub fn IMG_isPNM(src: *mut SDL_RWops) -> libc::c_int;
}
extern "C" {
pub fn IMG_isSVG(src: *mut SDL_RWops) -> ::std::os::raw::c_int;
pub fn IMG_isSVG(src: *mut SDL_RWops) -> libc::c_int;
}
extern "C" {
pub fn IMG_isTIF(src: *mut SDL_RWops) -> ::std::os::raw::c_int;
pub fn IMG_isTIF(src: *mut SDL_RWops) -> libc::c_int;
}
extern "C" {
pub fn IMG_isXCF(src: *mut SDL_RWops) -> ::std::os::raw::c_int;
pub fn IMG_isXCF(src: *mut SDL_RWops) -> libc::c_int;
}
extern "C" {
pub fn IMG_isXPM(src: *mut SDL_RWops) -> ::std::os::raw::c_int;
pub fn IMG_isXPM(src: *mut SDL_RWops) -> libc::c_int;
}
extern "C" {
pub fn IMG_isXV(src: *mut SDL_RWops) -> ::std::os::raw::c_int;
pub fn IMG_isXV(src: *mut SDL_RWops) -> libc::c_int;
}
extern "C" {
pub fn IMG_isWEBP(src: *mut SDL_RWops) -> ::std::os::raw::c_int;
pub fn IMG_isWEBP(src: *mut SDL_RWops) -> libc::c_int;
}
extern "C" {
pub fn IMG_LoadICO_RW(src: *mut SDL_RWops) -> *mut SDL_Surface;
@@ -150,33 +152,30 @@ extern "C" {
pub fn IMG_LoadWEBP_RW(src: *mut SDL_RWops) -> *mut SDL_Surface;
}
extern "C" {
pub fn IMG_ReadXPMFromArray(xpm: *mut *mut ::std::os::raw::c_char) -> *mut SDL_Surface;
pub fn IMG_ReadXPMFromArray(xpm: *mut *mut libc::c_char) -> *mut SDL_Surface;
}
extern "C" {
pub fn IMG_SavePNG(
surface: *mut SDL_Surface,
file: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
pub fn IMG_SavePNG(surface: *mut SDL_Surface, file: *const libc::c_char) -> libc::c_int;
}
extern "C" {
pub fn IMG_SavePNG_RW(
surface: *mut SDL_Surface,
dst: *mut SDL_RWops,
freedst: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
freedst: libc::c_int,
) -> libc::c_int;
}
extern "C" {
pub fn IMG_SaveJPG(
surface: *mut SDL_Surface,
file: *const ::std::os::raw::c_char,
quality: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
file: *const libc::c_char,
quality: libc::c_int,
) -> libc::c_int;
}
extern "C" {
pub fn IMG_SaveJPG_RW(
surface: *mut SDL_Surface,
dst: *mut SDL_RWops,
freedst: ::std::os::raw::c_int,
quality: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
freedst: libc::c_int,
quality: libc::c_int,
) -> libc::c_int;
}
File diff suppressed because it is too large Load Diff
+67 -68
View File
@@ -1,8 +1,10 @@
/* automatically generated by rust-bindgen */
use crate::*;
pub const TTF_MAJOR_VERSION: u32 = 2;
pub const TTF_MINOR_VERSION: u32 = 0;
pub const TTF_PATCHLEVEL: u32 = 14;
pub const TTF_PATCHLEVEL: u32 = 15;
pub const TTF_STYLE_NORMAL: u32 = 0;
pub const TTF_STYLE_BOLD: u32 = 1;
pub const TTF_STYLE_ITALIC: u32 = 2;
@@ -12,12 +14,12 @@ pub const TTF_HINTING_NORMAL: u32 = 0;
pub const TTF_HINTING_LIGHT: u32 = 1;
pub const TTF_HINTING_MONO: u32 = 2;
pub const TTF_HINTING_NONE: u32 = 3;
pub type __uint8_t = ::std::os::raw::c_uchar;
pub type __uint16_t = ::std::os::raw::c_ushort;
pub type __uint32_t = ::std::os::raw::c_uint;
pub type __int64_t = ::std::os::raw::c_long;
pub type __off_t = ::std::os::raw::c_long;
pub type __off64_t = ::std::os::raw::c_long;
pub type __uint8_t = libc::c_uchar;
pub type __uint16_t = libc::c_ushort;
pub type __uint32_t = libc::c_uint;
pub type __int64_t = libc::c_long;
pub type __off_t = libc::c_long;
pub type __off64_t = libc::c_long;
pub type Uint8 = u8;
pub type Uint16 = u16;
pub type Uint32 = u32;
@@ -26,7 +28,7 @@ extern "C" {
pub fn TTF_Linked_Version() -> *const SDL_version;
}
extern "C" {
pub fn TTF_ByteSwappedUNICODE(swapped: ::std::os::raw::c_int);
pub fn TTF_ByteSwappedUNICODE(swapped: libc::c_int);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
@@ -35,133 +37,130 @@ pub struct _TTF_Font {
}
pub type TTF_Font = _TTF_Font;
extern "C" {
pub fn TTF_Init() -> ::std::os::raw::c_int;
pub fn TTF_Init() -> libc::c_int;
}
extern "C" {
pub fn TTF_OpenFont(
file: *const ::std::os::raw::c_char,
ptsize: ::std::os::raw::c_int,
) -> *mut TTF_Font;
pub fn TTF_OpenFont(file: *const libc::c_char, ptsize: libc::c_int) -> *mut TTF_Font;
}
extern "C" {
pub fn TTF_OpenFontIndex(
file: *const ::std::os::raw::c_char,
ptsize: ::std::os::raw::c_int,
index: ::std::os::raw::c_long,
file: *const libc::c_char,
ptsize: libc::c_int,
index: libc::c_long,
) -> *mut TTF_Font;
}
extern "C" {
pub fn TTF_OpenFontRW(
src: *mut SDL_RWops,
freesrc: ::std::os::raw::c_int,
ptsize: ::std::os::raw::c_int,
freesrc: libc::c_int,
ptsize: libc::c_int,
) -> *mut TTF_Font;
}
extern "C" {
pub fn TTF_OpenFontIndexRW(
src: *mut SDL_RWops,
freesrc: ::std::os::raw::c_int,
ptsize: ::std::os::raw::c_int,
index: ::std::os::raw::c_long,
freesrc: libc::c_int,
ptsize: libc::c_int,
index: libc::c_long,
) -> *mut TTF_Font;
}
extern "C" {
pub fn TTF_GetFontStyle(font: *const TTF_Font) -> ::std::os::raw::c_int;
pub fn TTF_GetFontStyle(font: *const TTF_Font) -> libc::c_int;
}
extern "C" {
pub fn TTF_SetFontStyle(font: *mut TTF_Font, style: ::std::os::raw::c_int);
pub fn TTF_SetFontStyle(font: *mut TTF_Font, style: libc::c_int);
}
extern "C" {
pub fn TTF_GetFontOutline(font: *const TTF_Font) -> ::std::os::raw::c_int;
pub fn TTF_GetFontOutline(font: *const TTF_Font) -> libc::c_int;
}
extern "C" {
pub fn TTF_SetFontOutline(font: *mut TTF_Font, outline: ::std::os::raw::c_int);
pub fn TTF_SetFontOutline(font: *mut TTF_Font, outline: libc::c_int);
}
extern "C" {
pub fn TTF_GetFontHinting(font: *const TTF_Font) -> ::std::os::raw::c_int;
pub fn TTF_GetFontHinting(font: *const TTF_Font) -> libc::c_int;
}
extern "C" {
pub fn TTF_SetFontHinting(font: *mut TTF_Font, hinting: ::std::os::raw::c_int);
pub fn TTF_SetFontHinting(font: *mut TTF_Font, hinting: libc::c_int);
}
extern "C" {
pub fn TTF_FontHeight(font: *const TTF_Font) -> ::std::os::raw::c_int;
pub fn TTF_FontHeight(font: *const TTF_Font) -> libc::c_int;
}
extern "C" {
pub fn TTF_FontAscent(font: *const TTF_Font) -> ::std::os::raw::c_int;
pub fn TTF_FontAscent(font: *const TTF_Font) -> libc::c_int;
}
extern "C" {
pub fn TTF_FontDescent(font: *const TTF_Font) -> ::std::os::raw::c_int;
pub fn TTF_FontDescent(font: *const TTF_Font) -> libc::c_int;
}
extern "C" {
pub fn TTF_FontLineSkip(font: *const TTF_Font) -> ::std::os::raw::c_int;
pub fn TTF_FontLineSkip(font: *const TTF_Font) -> libc::c_int;
}
extern "C" {
pub fn TTF_GetFontKerning(font: *const TTF_Font) -> ::std::os::raw::c_int;
pub fn TTF_GetFontKerning(font: *const TTF_Font) -> libc::c_int;
}
extern "C" {
pub fn TTF_SetFontKerning(font: *mut TTF_Font, allowed: ::std::os::raw::c_int);
pub fn TTF_SetFontKerning(font: *mut TTF_Font, allowed: libc::c_int);
}
extern "C" {
pub fn TTF_FontFaces(font: *const TTF_Font) -> ::std::os::raw::c_long;
pub fn TTF_FontFaces(font: *const TTF_Font) -> libc::c_long;
}
extern "C" {
pub fn TTF_FontFaceIsFixedWidth(font: *const TTF_Font) -> ::std::os::raw::c_int;
pub fn TTF_FontFaceIsFixedWidth(font: *const TTF_Font) -> libc::c_int;
}
extern "C" {
pub fn TTF_FontFaceFamilyName(font: *const TTF_Font) -> *mut ::std::os::raw::c_char;
pub fn TTF_FontFaceFamilyName(font: *const TTF_Font) -> *mut libc::c_char;
}
extern "C" {
pub fn TTF_FontFaceStyleName(font: *const TTF_Font) -> *mut ::std::os::raw::c_char;
pub fn TTF_FontFaceStyleName(font: *const TTF_Font) -> *mut libc::c_char;
}
extern "C" {
pub fn TTF_GlyphIsProvided(font: *const TTF_Font, ch: Uint16) -> ::std::os::raw::c_int;
pub fn TTF_GlyphIsProvided(font: *const TTF_Font, ch: Uint16) -> libc::c_int;
}
extern "C" {
pub fn TTF_GlyphMetrics(
font: *mut TTF_Font,
ch: Uint16,
minx: *mut ::std::os::raw::c_int,
maxx: *mut ::std::os::raw::c_int,
miny: *mut ::std::os::raw::c_int,
maxy: *mut ::std::os::raw::c_int,
advance: *mut ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
minx: *mut libc::c_int,
maxx: *mut libc::c_int,
miny: *mut libc::c_int,
maxy: *mut libc::c_int,
advance: *mut libc::c_int,
) -> libc::c_int;
}
extern "C" {
pub fn TTF_SizeText(
font: *mut TTF_Font,
text: *const ::std::os::raw::c_char,
w: *mut ::std::os::raw::c_int,
h: *mut ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
text: *const libc::c_char,
w: *mut libc::c_int,
h: *mut libc::c_int,
) -> libc::c_int;
}
extern "C" {
pub fn TTF_SizeUTF8(
font: *mut TTF_Font,
text: *const ::std::os::raw::c_char,
w: *mut ::std::os::raw::c_int,
h: *mut ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
text: *const libc::c_char,
w: *mut libc::c_int,
h: *mut libc::c_int,
) -> libc::c_int;
}
extern "C" {
pub fn TTF_SizeUNICODE(
font: *mut TTF_Font,
text: *const Uint16,
w: *mut ::std::os::raw::c_int,
h: *mut ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
w: *mut libc::c_int,
h: *mut libc::c_int,
) -> libc::c_int;
}
extern "C" {
pub fn TTF_RenderText_Solid(
font: *mut TTF_Font,
text: *const ::std::os::raw::c_char,
text: *const libc::c_char,
fg: SDL_Color,
) -> *mut SDL_Surface;
}
extern "C" {
pub fn TTF_RenderUTF8_Solid(
font: *mut TTF_Font,
text: *const ::std::os::raw::c_char,
text: *const libc::c_char,
fg: SDL_Color,
) -> *mut SDL_Surface;
}
@@ -182,7 +181,7 @@ extern "C" {
extern "C" {
pub fn TTF_RenderText_Shaded(
font: *mut TTF_Font,
text: *const ::std::os::raw::c_char,
text: *const libc::c_char,
fg: SDL_Color,
bg: SDL_Color,
) -> *mut SDL_Surface;
@@ -190,7 +189,7 @@ extern "C" {
extern "C" {
pub fn TTF_RenderUTF8_Shaded(
font: *mut TTF_Font,
text: *const ::std::os::raw::c_char,
text: *const libc::c_char,
fg: SDL_Color,
bg: SDL_Color,
) -> *mut SDL_Surface;
@@ -214,14 +213,14 @@ extern "C" {
extern "C" {
pub fn TTF_RenderText_Blended(
font: *mut TTF_Font,
text: *const ::std::os::raw::c_char,
text: *const libc::c_char,
fg: SDL_Color,
) -> *mut SDL_Surface;
}
extern "C" {
pub fn TTF_RenderUTF8_Blended(
font: *mut TTF_Font,
text: *const ::std::os::raw::c_char,
text: *const libc::c_char,
fg: SDL_Color,
) -> *mut SDL_Surface;
}
@@ -235,7 +234,7 @@ extern "C" {
extern "C" {
pub fn TTF_RenderText_Blended_Wrapped(
font: *mut TTF_Font,
text: *const ::std::os::raw::c_char,
text: *const libc::c_char,
fg: SDL_Color,
wrapLength: Uint32,
) -> *mut SDL_Surface;
@@ -243,7 +242,7 @@ extern "C" {
extern "C" {
pub fn TTF_RenderUTF8_Blended_Wrapped(
font: *mut TTF_Font,
text: *const ::std::os::raw::c_char,
text: *const libc::c_char,
fg: SDL_Color,
wrapLength: Uint32,
) -> *mut SDL_Surface;
@@ -270,19 +269,19 @@ extern "C" {
pub fn TTF_Quit();
}
extern "C" {
pub fn TTF_WasInit() -> ::std::os::raw::c_int;
pub fn TTF_WasInit() -> libc::c_int;
}
extern "C" {
pub fn TTF_GetFontKerningSize(
font: *mut TTF_Font,
prev_index: ::std::os::raw::c_int,
index: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
prev_index: libc::c_int,
index: libc::c_int,
) -> libc::c_int;
}
extern "C" {
pub fn TTF_GetFontKerningSizeGlyphs(
font: *mut TTF_Font,
previous_ch: Uint16,
ch: Uint16,
) -> ::std::os::raw::c_int;
) -> libc::c_int;
}