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 unsafe fn rendererContextClass() -> &'static AnyClass;
24
25 #[cfg(feature = "objc2-core-graphics")]
26 #[unsafe(method(contextWithFormat:))]
27 #[unsafe(method_family = copy)]
29 pub unsafe fn contextWithFormat(
30 format: &UIGraphicsRendererFormat,
31 ) -> Option<Retained<CGContext>>;
32
33 #[cfg(feature = "objc2-core-graphics")]
34 #[unsafe(method(prepareCGContext:withRendererContext:))]
35 #[unsafe(method_family = none)]
36 pub unsafe fn prepareCGContext_withRendererContext(
37 context: &CGContext,
38 renderer_context: &UIGraphicsRendererContext,
39 );
40
41 #[cfg(feature = "block2")]
42 #[unsafe(method(runDrawingActions:completionActions:error:_))]
43 #[unsafe(method_family = none)]
44 pub unsafe fn runDrawingActions_completionActions_error(
45 &self,
46 drawing_actions: UIGraphicsDrawingActions,
47 completion_actions: UIGraphicsDrawingActions,
48 ) -> Result<(), Retained<NSError>>;
49 );
50}