Trait BrowserWindowExt

Source
pub trait BrowserWindowExt: BrowserWindowEventExt + Clone {
    // Required methods
    fn cookie_jar(&self) -> Option<CookieJarImpl>;
    fn eval_js(
        &self,
        js: &str,
        callback: fn(bw: BrowserWindowImpl, data: *mut (), result: Result<JsValue, JsEvaluationError>),
        callback_data: *mut (),
    );
    fn eval_js_threadsafe(
        &self,
        js: &str,
        callback: fn(bw: BrowserWindowImpl, data: *mut (), result: Result<JsValue, JsEvaluationError>),
        callback_data: *mut (),
    );
    fn free(&self);
    fn navigate(&self, uri: &str);
    fn url<'a>(&'a self) -> Cow<'a, str>;
    fn window(&self) -> WindowImpl;
    fn new(
        app: ApplicationImpl,
        parent: WindowImpl,
        source: Source,
        title: &str,
        width: Option<u32>,
        height: Option<u32>,
        options: &cbw_WindowOptions,
        browser_window_options: &cbw_BrowserWindowOptions,
        creation_callback: fn(bw: BrowserWindowImpl, data: *mut ()),
        callback_data: *mut (),
    );
}

Required Methods§

Source

fn cookie_jar(&self) -> Option<CookieJarImpl>

Source

fn eval_js( &self, js: &str, callback: fn(bw: BrowserWindowImpl, data: *mut (), result: Result<JsValue, JsEvaluationError>), callback_data: *mut (), )

Executes the given JavaScript string. The result will be provided by invoking the callback function.

Source

fn eval_js_threadsafe( &self, js: &str, callback: fn(bw: BrowserWindowImpl, data: *mut (), result: Result<JsValue, JsEvaluationError>), callback_data: *mut (), )

Like eval_js, except it can be called from any thread.

Source

fn free(&self)

Source

fn navigate(&self, uri: &str)

Causes the browser to navigate to the given URI.

Source

fn url<'a>(&'a self) -> Cow<'a, str>

Source

fn window(&self) -> WindowImpl

Gives a handle to the underlying window.

Source

fn new( app: ApplicationImpl, parent: WindowImpl, source: Source, title: &str, width: Option<u32>, height: Option<u32>, options: &cbw_WindowOptions, browser_window_options: &cbw_BrowserWindowOptions, creation_callback: fn(bw: BrowserWindowImpl, data: *mut ()), callback_data: *mut (), )

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§