1 // Licensed under the Apache License, Version 2.0 2 // <LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license 3 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option. 4 // All files in the project carrying such notice may not be copied, modified, or distributed 5 // except according to those terms. 6 #![cfg(windows)] 7 #![deny(unused, unused_qualifications)] 8 #![warn(unused_attributes)] 9 #![allow(bad_style, overflowing_literals, unused_macros)] 10 #![recursion_limit = "2563"] 11 #![no_std] 12 //Uncomment as needed or once minimum Rust version is bumped to 1.18 13 //#![cfg_attr(feature = "cargo-clippy", warn(clippy::pedantic))] 14 //#![cfg_attr(feature = "cargo-clippy", allow(clippy::absurd_extreme_comparisons, clippy::cast_lossless, clippy::cast_possible_truncation, clippy::cast_possible_wrap, clippy::cast_precision_loss, clippy::cast_ptr_alignment, clippy::cast_sign_loss, clippy::const_static_lifetime, clippy::doc_markdown, clippy::empty_enum, clippy::erasing_op, clippy::excessive_precision, clippy::expl_impl_clone_on_copy, clippy::identity_op, clippy::if_not_else, clippy::many_single_char_names, clippy::module_inception, clippy::cast_possible_truncation, clippy::too_many_arguments, clippy::transmute_int_to_float, clippy::trivially_copy_pass_by_ref, clippy::unreadable_literal, clippy::unseparated_literal_suffix, clippy::used_underscore_binding))] 15 16 #[cfg(feature = "std")] 17 extern crate std; 18 19 /// Hack for exported macros 20 #[doc(hidden)] 21 pub extern crate core as _core; 22 23 // Modules 24 #[macro_use] 25 mod macros; 26 pub mod km; 27 pub mod shared; 28 pub mod um; 29 pub mod vc; 30 pub mod winrt; 31 32 /// Built in primitive types provided by the C language 33 pub mod ctypes { 34 #[cfg(feature = "std")] 35 pub use std::os::raw::c_void; 36 #[cfg(not(feature = "std"))] 37 pub enum c_void {} 38 pub type c_char = i8; 39 pub type c_schar = i8; 40 pub type c_uchar = u8; 41 pub type c_short = i16; 42 pub type c_ushort = u16; 43 pub type c_int = i32; 44 pub type c_uint = u32; 45 pub type c_long = i32; 46 pub type c_ulong = u32; 47 pub type c_longlong = i64; 48 pub type c_ulonglong = u64; 49 pub type c_float = f32; 50 pub type c_double = f64; 51 pub type __int8 = i8; 52 pub type __uint8 = u8; 53 pub type __int16 = i16; 54 pub type __uint16 = u16; 55 pub type __int32 = i32; 56 pub type __uint32 = u32; 57 pub type __int64 = i64; 58 pub type __uint64 = u64; 59 pub type wchar_t = u16; 60 } 61 // This trait should be implemented for all COM interfaces 62 pub trait Interface { 63 // Returns the IID of the Interface uuidof() -> shared::guiddef::GUID64 fn uuidof() -> shared::guiddef::GUID; 65 } 66 // This trait should be implemented for all COM classes 67 pub trait Class { 68 // Returns the CLSID of the Class uuidof() -> shared::guiddef::GUID69 fn uuidof() -> shared::guiddef::GUID; 70 } 71