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 = *mut block2::Block<dyn Fn(NonNull<UIGraphicsRendererContext>)>;
15
16#[cfg(feature = "UIGraphicsRenderer")]
18impl UIGraphicsRenderer {
19 extern_methods!(
20 #[unsafe(method(rendererContextClass))]
21 #[unsafe(method_family = none)]
22 pub unsafe fn rendererContextClass() -> &'static AnyClass;
23
24 #[cfg(feature = "objc2-core-graphics")]
25 #[unsafe(method(contextWithFormat:))]
26 #[unsafe(method_family = copy)]
28 pub unsafe fn contextWithFormat(
29 format: &UIGraphicsRendererFormat,
30 ) -> Option<Retained<CGContext>>;
31
32 #[cfg(feature = "objc2-core-graphics")]
33 #[unsafe(method(prepareCGContext:withRendererContext:))]
34 #[unsafe(method_family = none)]
35 pub unsafe fn prepareCGContext_withRendererContext(
36 context: &CGContext,
37 renderer_context: &UIGraphicsRendererContext,
38 );
39
40 #[cfg(feature = "block2")]
41 #[unsafe(method(runDrawingActions:completionActions:error:_))]
42 #[unsafe(method_family = none)]
43 pub unsafe fn runDrawingActions_completionActions_error(
44 &self,
45 drawing_actions: UIGraphicsDrawingActions,
46 completion_actions: UIGraphicsDrawingActions,
47 ) -> Result<(), Retained<NSError>>;
48 );
49}