use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct GCPoint2 {
pub x: c_float,
pub y: c_float,
}
unsafe impl Encode for GCPoint2 {
const ENCODING: Encoding =
Encoding::Struct("GCPoint2", &[<c_float>::ENCODING, <c_float>::ENCODING]);
}
unsafe impl RefEncode for GCPoint2 {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern "C" {
pub static GCPoint2Zero: GCPoint2;
}
impl GCPoint2 {
}
#[inline]
pub unsafe extern "C-unwind" fn NSStringFromGCPoint2(point: GCPoint2) -> Retained<NSString> {
extern "C-unwind" {
fn NSStringFromGCPoint2(point: GCPoint2) -> *mut NSString;
}
let ret = unsafe { NSStringFromGCPoint2(point) };
unsafe { Retained::retain_autoreleased(ret) }
.expect("function was marked as returning non-null, but actually returned NULL")
}
mod private_NSValueGCTypes {
pub trait Sealed {}
}
#[doc(alias = "GCTypes")]
pub unsafe trait NSValueGCTypes: ClassType + Sized + private_NSValueGCTypes::Sealed {
extern_methods!(
#[unsafe(method(valueWithGCPoint2:))]
#[unsafe(method_family = none)]
unsafe fn valueWithGCPoint2(point: GCPoint2) -> Retained<Self>;
#[unsafe(method(GCPoint2Value))]
#[unsafe(method_family = none)]
unsafe fn GCPoint2Value(&self) -> GCPoint2;
);
}
impl private_NSValueGCTypes::Sealed for NSValue {}
unsafe impl NSValueGCTypes for NSValue {}