objc2_ui_kit/generated/
UIGraphicsRendererSubclass.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6#[cfg(feature = "objc2-core-graphics")]
7use objc2_core_graphics::*;
8use objc2_foundation::*;
9
10use crate::*;
11
12#[cfg(all(feature = "UIGraphicsRenderer", feature = "block2"))]
14pub type UIGraphicsDrawingActions =
15 *mut block2::DynBlock<dyn Fn(NonNull<UIGraphicsRendererContext>)>;
16
17#[cfg(feature = "UIGraphicsRenderer")]
19impl UIGraphicsRenderer {
20 extern_methods!(
21 #[unsafe(method(rendererContextClass))]
22 #[unsafe(method_family = none)]
23 pub fn rendererContextClass() -> &'static AnyClass;
24
25 #[cfg(feature = "objc2-core-graphics")]
26 #[unsafe(method(contextWithFormat:))]
27 #[unsafe(method_family = copy)]
29 pub fn contextWithFormat(format: &UIGraphicsRendererFormat) -> Option<Retained<CGContext>>;
30
31 #[cfg(feature = "objc2-core-graphics")]
32 #[unsafe(method(prepareCGContext:withRendererContext:))]
33 #[unsafe(method_family = none)]
34 pub fn prepareCGContext_withRendererContext(
35 context: &CGContext,
36 renderer_context: &UIGraphicsRendererContext,
37 );
38
39 #[cfg(feature = "block2")]
40 #[unsafe(method(runDrawingActions:completionActions:error:_))]
45 #[unsafe(method_family = none)]
46 pub unsafe fn runDrawingActions_completionActions_error(
47 &self,
48 drawing_actions: UIGraphicsDrawingActions,
49 completion_actions: UIGraphicsDrawingActions,
50 ) -> Result<(), Retained<NSError>>;
51 );
52}