objc2_core_foundation/generated/
CFPlugInCOM.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4#[cfg(feature = "objc2")]
5use objc2::__framework_prelude::*;
6
7use crate::*;
8
9/// [Apple's documentation](https://developer.apple.com/documentation/corefoundation/hresult?language=objc)
10pub type HRESULT = i32;
11
12/// [Apple's documentation](https://developer.apple.com/documentation/corefoundation/ulong?language=objc)
13pub type ULONG = u32;
14
15/// [Apple's documentation](https://developer.apple.com/documentation/corefoundation/lpvoid?language=objc)
16pub type LPVOID = *mut c_void;
17
18/// [Apple's documentation](https://developer.apple.com/documentation/corefoundation/refiid?language=objc)
19#[cfg(feature = "CFUUID")]
20pub type REFIID = CFUUIDBytes;
21
22/// [Apple's documentation](https://developer.apple.com/documentation/corefoundation/iunknownvtbl?language=objc)
23#[cfg(feature = "CFUUID")]
24#[repr(C)]
25#[allow(unpredictable_function_pointer_comparisons)]
26#[derive(Clone, Copy, Debug, PartialEq)]
27pub struct IUnknownVTbl {
28    pub(crate) _reserved: *mut c_void,
29    pub QueryInterface:
30        Option<unsafe extern "C-unwind" fn(*mut c_void, REFIID, *mut LPVOID) -> HRESULT>,
31    pub AddRef: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
32    pub Release: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
33}
34
35#[cfg(all(feature = "CFUUID", feature = "objc2"))]
36unsafe impl Encode for IUnknownVTbl {
37    const ENCODING: Encoding = Encoding::Struct("IUnknownVTbl", &[
38        <*mut c_void>::ENCODING,
39        <Option<unsafe extern "C-unwind" fn(*mut c_void,REFIID,*mut LPVOID,) -> HRESULT>>::ENCODING,
40        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
41        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
42    ]);
43}
44
45#[cfg(all(feature = "CFUUID", feature = "objc2"))]
46unsafe impl RefEncode for IUnknownVTbl {
47    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
48}