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#[derive(Clone, Copy, Debug, PartialEq)]
26pub struct IUnknownVTbl {
27    pub(crate) _reserved: *mut c_void,
28    pub QueryInterface:
29        Option<unsafe extern "C-unwind" fn(*mut c_void, REFIID, *mut LPVOID) -> HRESULT>,
30    pub AddRef: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
31    pub Release: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
32}
33
34#[cfg(all(feature = "CFUUID", feature = "objc2"))]
35unsafe impl Encode for IUnknownVTbl {
36    const ENCODING: Encoding = Encoding::Struct("IUnknownVTbl", &[
37        <*mut c_void>::ENCODING,
38        <Option<unsafe extern "C-unwind" fn(*mut c_void,REFIID,*mut LPVOID,) -> HRESULT>>::ENCODING,
39        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
40        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
41    ]);
42}
43
44#[cfg(all(feature = "CFUUID", feature = "objc2"))]
45unsafe impl RefEncode for IUnknownVTbl {
46    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
47}