objc2-quartz 0.3.2

Bindings to the Quartz framework
Documentation
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-core-graphics")]
use objc2_core_graphics::*;
use objc2_foundation::*;

use crate::*;

extern_class!(
    /// [Apple's documentation](https://developer.apple.com/documentation/quartz/quartzfilter?language=objc)
    #[unsafe(super(NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct QuartzFilter;
);

extern_conformance!(
    unsafe impl NSObjectProtocol for QuartzFilter {}
);

impl QuartzFilter {
    extern_methods!(
        /// # Safety
        ///
        /// `a_url` might not allow `None`.
        #[unsafe(method(quartzFilterWithURL:))]
        #[unsafe(method_family = none)]
        pub unsafe fn quartzFilterWithURL(a_url: Option<&NSURL>) -> Option<Retained<QuartzFilter>>;

        /// # Safety
        ///
        /// - `properties` generic should be of the correct type.
        /// - `properties` might not allow `None`.
        #[unsafe(method(quartzFilterWithProperties:))]
        #[unsafe(method_family = none)]
        pub unsafe fn quartzFilterWithProperties(
            properties: Option<&NSDictionary>,
        ) -> Option<Retained<QuartzFilter>>;

        /// # Safety
        ///
        /// - `output_intents` generic should be of the correct type.
        /// - `output_intents` might not allow `None`.
        #[unsafe(method(quartzFilterWithOutputIntents:))]
        #[unsafe(method_family = none)]
        pub unsafe fn quartzFilterWithOutputIntents(
            output_intents: Option<&NSArray>,
        ) -> Option<Retained<QuartzFilter>>;

        #[unsafe(method(properties))]
        #[unsafe(method_family = none)]
        pub unsafe fn properties(&self) -> Option<Retained<NSDictionary>>;

        #[unsafe(method(url))]
        #[unsafe(method_family = none)]
        pub unsafe fn url(&self) -> Option<Retained<NSURL>>;

        #[unsafe(method(localizedName))]
        #[unsafe(method_family = none)]
        pub unsafe fn localizedName(&self) -> Option<Retained<NSString>>;

        #[cfg(feature = "objc2-core-graphics")]
        /// # Safety
        ///
        /// `a_context` might not allow `None`.
        #[unsafe(method(applyToContext:))]
        #[unsafe(method_family = none)]
        pub unsafe fn applyToContext(&self, a_context: Option<&CGContext>) -> bool;

        #[cfg(feature = "objc2-core-graphics")]
        /// # Safety
        ///
        /// `a_context` might not allow `None`.
        #[unsafe(method(removeFromContext:))]
        #[unsafe(method_family = none)]
        pub unsafe fn removeFromContext(&self, a_context: Option<&CGContext>);
    );
}

/// Methods declared on superclass `NSObject`.
impl QuartzFilter {
    extern_methods!(
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;
    );
}