#[cfg(not(feature = "gtk"))]
pub mod c;
#[cfg(feature = "gtk")]
pub mod gtk;
use std::{
os::raw::{c_char, c_int},
time::Duration,
};
#[cfg(not(feature = "gtk"))]
pub use c::ApplicationImpl;
#[cfg(feature = "gtk")]
pub use gtk::ApplicationImpl;
use crate::{application::ApplicationSettings, error::Result};
pub trait ApplicationExt: Clone {
fn assert_correct_thread(&self);
fn dispatch(&self, work: fn(ApplicationImpl, *mut ()), data: *mut ()) -> bool;
fn dispatch_delayed(
&self, work: fn(ApplicationImpl, *mut ()), data: *mut (), delay: Duration,
) -> bool;
fn exit(&self, exit_code: i32);
fn exit_threadsafe(self: &Self, exit_code: i32);
fn free(&self) {}
fn initialize(
argc: c_int, argv: *mut *mut c_char, settings: &ApplicationSettings,
) -> Result<ApplicationImpl>;
fn mark_as_done(&self);
fn run(&self, on_ready: fn(ApplicationImpl, *mut ()), data: *mut ()) -> i32;
}