test/test.rs
1#[cfg(target_os = "android")]
2extern "C" {
3 fn JNI_OnLoad(vm: *mut ::std::ffi::c_void, reserved: *mut ::std::ffi::c_void) -> i32;
4}
5
6#[cfg(target_os = "android")]
7#[no_mangle]
8pub extern "C" fn Java_com_example_tinyfiledialogs_MainActivity_runTest(
9 env: *mut ::std::ffi::c_void,
10 _: *mut ::std::ffi::c_void,
11) {
12 unsafe {
13 // Store JNI environment in thread local storage
14 // Implementation details would depend on your Android setup
15 }
16 main()
17}
18
19fn main() {
20 // Show a color picker
21 let color_result = tfd::ColorChooser::new("Test").run_modal();
22
23 println!("Color chosen: {color_result:?}");
24}