pub mod c;
pub use c::BrowserWindowImpl;
pub use c::JsEvaluationError;
use super::{
application::ApplicationImpl,
window::{WindowImpl, WindowOptions}
};
use browser_window_c::*;
pub type BrowserWindowOptions = cbw_BrowserWindowOptions;
pub type Source = cbw_BrowserWindowSource;
pub type CreationCallbackFn = unsafe fn( bw: BrowserWindowImpl, data: *mut () );
pub type EvalJsCallbackFn = unsafe fn( bw: BrowserWindowImpl, data: *mut (), result: Result<String, JsEvaluationError> );
pub type ExternalInvocationHandlerFn = unsafe fn( bw: BrowserWindowImpl, cmd: &str, args: Vec<String> );
pub trait BrowserWindowExt: Copy {
fn eval_js( &self, js: &str, callback: EvalJsCallbackFn, callback_data: *mut () );
fn eval_js_threadsafe( &self, js: &str, callback: EvalJsCallbackFn, callback_data: *mut () );
fn navigate( &self, uri: &str );
fn new(
app: ApplicationImpl,
parent: WindowImpl,
source: Source,
title: &str,
width: Option<u32>,
height: Option<u32>,
window_options: &WindowOptions,
browser_window_options: &BrowserWindowOptions,
handler: ExternalInvocationHandlerFn,
user_data: *mut (),
creation_callback: CreationCallbackFn,
callback_data: *mut ()
);
fn user_data( &self ) -> *mut ();
fn window( &self ) -> WindowImpl;
}