1 // +-----------------------------------------------------------------------------------------------+ 2 // | Copyright 2015 Sean Kerr | 3 // | | 4 // | Licensed under the Apache License, Version 2.0 (the "License"); | 5 // | you may not use this file except in compliance with the License. | 6 // | You may obtain a copy of the License Author | 7 // | | 8 // | http://www.apache.org/licenses/LICENSE-2.0 | 9 // | | 10 // | Unless required by applicable law or agreed to in writing, software | 11 // | distributed under the License is distributed on an "AS IS" BASIS, | 12 // | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 13 // | See the License for the specific language governing permissions and | 14 // | limitations under the License. | 15 // +-----------------------------------------------------------------------------------------------+ 16 // | Author: Sean Kerr <sean@metatomic.io> | 17 // +-----------------------------------------------------------------------------------------------+ 18 19 #![crate_name = "khronos"] 20 #![allow(non_camel_case_types)] 21 22 extern crate libc; 23 24 use libc::{ c_float, 25 int8_t, 26 int16_t, 27 int32_t, 28 int64_t, 29 uint8_t, 30 uint16_t, 31 uint32_t, 32 uint64_t }; 33 34 // ------------------------------------------------------------------------------------------------- 35 // TYPES 36 // ------------------------------------------------------------------------------------------------- 37 38 pub type khronos_float_t = c_float; 39 pub type khronos_int8_t = int8_t; 40 pub type khronos_uint8_t = uint8_t; 41 pub type khronos_int16_t = int16_t; 42 pub type khronos_uint16_t = uint16_t; 43 pub type khronos_int32_t = int32_t; 44 pub type khronos_uint32_t = uint32_t; 45 pub type khronos_int64_t = int64_t; 46 pub type khronos_uint64_t = uint64_t; 47 48 pub type khronos_intptr_t = int32_t; 49 pub type khronos_uintptr_t = uint32_t; 50 pub type khronos_ssize_t = int32_t; 51 pub type khronos_usize_t = uint32_t; 52 53 pub type khronos_stime_nanoseconds_t = khronos_int64_t; 54 pub type khronos_utime_nanoseconds_t = khronos_uint64_t; 55