Tab

Struct Tab 

Source
pub struct Tab {
    pub message_router_browser_side: MessageRouterBrowserSide,
    pub data: TabData,
    pub pixel_buffer: PixelBuffer,
    pub text_input_mode: KeyboardTextInputModeWui,
    /* private fields */
}
Expand description

Main tab structure

Fields§

§message_router_browser_side: MessageRouterBrowserSide§data: TabData

Tab data protected by RwLock

§pixel_buffer: PixelBuffer

Current pixel buffer

§text_input_mode: KeyboardTextInputModeWui

Implementations§

Source§

impl Tab

Source

pub fn new(id: TabId) -> Self

Create a new tab

Source

pub fn set_cef_client(&mut self, client: Client)

Source

pub fn set_cef_browser(&mut self, browser: Browser)

Source

pub fn id(&self) -> TabId

Get the tab ID

Source§

impl Tab

Source

pub fn get_info(tab_id: TabId) -> TabInfo

Source§

impl Tab

Source

pub fn resize(tab_id: TabId, width: usize, height: usize) -> WuiResult<()>

Source

pub fn load_url(tab_id: TabId, url: &str) -> WuiResult<()>

Load a URL

Source

pub fn copy_pixel_buffer(&self) -> WuiResult<PixelBuffer>

Copy the current pixel buffer out

Source§

impl Tab

Source

pub fn register_event_listener( &mut self, event_name: String, listener: EventListenerFn, ) -> WuiResult<()>

Register event listener

Source

pub fn unregister_event_listener( &mut self, event_name: &String, ) -> Result<EventListenerFn, WuiError>

Unregister event listener

Source

pub fn send_event(&self, event_name: &String, payload: Value) -> WuiResult<()>

Send event to DOM

Source

pub fn get_callbacks(&self) -> TabCallbacks

Source

pub fn set_callbacks(&mut self, callbacks: &TabCallbacks)

Source§

impl Tab

Source

pub fn start_event_logging(&mut self, log_path: &Path) -> WuiResult<()>

Start event logging

Source

pub fn stop_event_logging(&mut self) -> WuiResult<()>

Stop event logging

Source§

impl Tab

Trait Implementations§

Source§

impl Debug for Tab

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Drop for Tab

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

§

impl Freeze for Tab

§

impl !RefUnwindSafe for Tab

§

impl Send for Tab

§

impl Sync for Tab

§

impl Unpin for Tab

§

impl !UnwindSafe for Tab

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T, U> ConvertParam<U> for T
where T: Into<U>,

Source§

fn into_raw(self) -> U

Source§

impl<T, U> ConvertReturnValue<U> for T
where T: Into<U>,

Source§

fn wrap_result(self) -> U

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.