1#![cfg_attr(not(target_os = "android"), allow(dead_code))]
20
21pub mod automation;
22pub mod interop;
23pub mod log;
24pub mod platform;
25
26mod android_platform;
27mod android_runtime_platform;
28mod application_lifetime;
29mod cursor_factory;
30mod explore_by_touch_helper;
31mod ferro_access_helper;
32mod i_activity_result_handler;
33mod i_android_navigation_service;
34mod i_ferro_activity;
35mod i_init_editor_info;
36mod platform_icon_loader;
37mod stubs;
38
39#[cfg(target_os = "android")]
40mod android_dispatcher_impl;
41#[cfg(target_os = "android")]
42mod android_egl;
43#[cfg(target_os = "android")]
44mod android_view_control_handle;
45#[cfg(target_os = "android")]
46mod back_pressed_callback;
47#[cfg(target_os = "android")]
48mod choreographer_timer;
49#[cfg(target_os = "android")]
50mod ferro_activity;
51#[cfg(target_os = "android")]
52mod ferro_android_application;
53#[cfg(target_os = "android")]
54mod ferro_main_activity;
55#[cfg(target_os = "android")]
56mod ferro_view;
57#[cfg(target_os = "android")]
58mod ferro_view_input;
59
60pub use android_platform::{AndroidPlatformOptions, AndroidRenderingMode};
61pub use application_lifetime::ApplicationLifetime;
62pub use cursor_factory::CursorFactory;
63pub use i_activity_result_handler::{
64 ActivityResultHandler, IActivityResultHandler, Intent, RequestPermissionsResultHandler, PERMISSION_DENIED,
65 PERMISSION_GRANTED, RESULT_CANCELED, RESULT_FIRST_USER, RESULT_OK,
66};
67pub use i_android_navigation_service::{AndroidBackRequestedEventArgs, IActivityNavigationService};
68pub use i_ferro_activity::IFerroActivity;
69pub use platform_icon_loader::PlatformIconLoader;
70pub use stubs::{PlatformIconLoaderStub, WindowingPlatformStub};
71
72#[cfg(target_os = "android")]
73pub use android_dispatcher_impl::AndroidDispatcherImpl;
74#[cfg(target_os = "android")]
75pub use android_platform::{AndroidApplicationExtensions, AndroidPlatform};
76#[cfg(target_os = "android")]
77pub use android_runtime_platform::{AndroidRuntimePlatform, AndroidRuntimePlatformServices};
78#[cfg(target_os = "android")]
79pub use android_view_control_handle::AndroidViewControlHandle;
80#[cfg(target_os = "android")]
81pub use choreographer_timer::ChoreographerTimer;
82#[cfg(target_os = "android")]
83pub use ferro_activity::FerroActivity;
84#[cfg(target_os = "android")]
85pub use ferro_android_application::FerroAndroidApplication;
86#[cfg(target_os = "android")]
87pub use ferro_main_activity::FerroMainActivity;
88#[cfg(target_os = "android")]
89pub use ferro_view::FerroView;
90#[cfg(target_os = "android")]
91pub use interop::natives::on_load;
92
93#[macro_export]
103macro_rules! android_application {
104 ($build:expr) => {
105 #[cfg(target_os = "android")]
110 #[no_mangle]
111 pub unsafe extern "system" fn JNI_OnLoad(
112 vm: *mut ::std::ffi::c_void,
113 _reserved: *mut ::std::ffi::c_void,
114 ) -> i32 {
115 unsafe { $crate::on_load(vm, $build) }
117 }
118 };
119}