Skip to main content

ferroui_ios/
lib.rs

1//! ferroui-ios
2//!
3//! The platform of FerroUI for iOS: a `UIView` that hosts a top-level, the
4//! application delegate with the single-view lifetime, the dispatcher on
5//! the run loop of the main thread, the render timer on a display link,
6//! Metal or OpenGL ES graphics over the layer of the view, touch, key and
7//! scroll input, text input from the keyboard of the system, the settings
8//! of the system, the safe area and the screens. `docs/porting/ios-platform.md` has the design, the file
9//! table and the stages.
10//!
11//! The platform calls UIKit, Core Animation, Metal and EAGL through the `objc2`
12//! family of crates; nothing of it is written in Objective-C. Everything
13//! that touches UIKit exists on iOS only. What is logic and not a call into
14//! the system (the options, the translation of touches, the safe area, the
15//! geometry of a screen, the insets manager, the lifetimes' contracts)
16//! builds on every system, and the dispatcher builds on every Apple system
17//! (it needs Core Foundation and libdispatch only): that is what the tests
18//! of the crate run on the development machine.
19
20pub mod activatable_lifetime;
21pub mod automation_peer_wrapper;
22pub mod clipboard;
23pub mod combined_span3;
24pub mod completion;
25pub mod extensions;
26pub mod ferro_app_delegate;
27pub mod input_handler;
28pub mod insets_manager;
29pub mod native_control_host_impl;
30pub mod ios_platform_feedback;
31pub mod ios_screens;
32pub mod platform;
33pub mod platform_settings;
34pub mod storage;
35pub mod stubs;
36pub mod text_input_responder;
37pub mod ui_kit_input_pane;
38pub mod view_controller;
39
40#[cfg(target_vendor = "apple")]
41pub mod dispatcher_impl;
42#[cfg(target_vendor = "apple")]
43pub mod interop;
44
45#[cfg(target_os = "ios")]
46pub mod display_link_timer;
47// OpenGL ES, which Apple deprecated in iOS 12, as are its bindings.
48#[cfg(target_os = "ios")]
49#[allow(deprecated)]
50pub mod eagl;
51#[cfg(target_os = "ios")]
52pub mod ferro_scene_delegate;
53#[cfg(target_os = "ios")]
54pub mod ferro_view;
55#[cfg(target_os = "ios")]
56pub mod ios_launcher;
57#[cfg(target_os = "ios")]
58pub mod metal;
59#[cfg(target_os = "ios")]
60pub mod single_view_lifetime;
61
62pub use ferro_app_delegate::{FerroApplicationDelegate, IFerroAppDelegate};
63pub use platform::{IosPlatformOptions, IosRenderingMode};
64pub use view_controller::{IFerroViewController, StatusBarStyle};
65
66#[cfg(target_os = "ios")]
67pub use ferro_app_delegate::{run_application, run_application_with, FerroAppDelegate};
68#[cfg(target_os = "ios")]
69pub use ferro_view::FerroView;
70#[cfg(target_os = "ios")]
71pub use native_control_host_impl::UIViewControlHandle;
72#[cfg(target_os = "ios")]
73pub use platform::{IosApplicationExtensions, Platform};
74#[cfg(target_os = "ios")]
75pub use view_controller::DefaultFerroViewController;