Skip to main content

CefWindowDispatcher

Struct CefWindowDispatcher 

Source
pub struct CefWindowDispatcher<T: UserEvent> { /* private fields */ }

Trait Implementations§

Source§

impl<T: Clone + UserEvent> Clone for CefWindowDispatcher<T>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<T: Debug + UserEvent> Debug for CefWindowDispatcher<T>

Source§

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

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

impl<T: UserEvent> WindowDispatch<T> for CefWindowDispatcher<T>

Source§

type Runtime = CefRuntime<T>

The runtime this WindowDispatch runs under.
Source§

type WindowBuilder = WindowBuilderWrapper

The window builder type.
Source§

fn run_on_main_thread<F: FnOnce() + Send + 'static>(&self, f: F) -> Result<()>

Run a task on the main thread.
Source§

fn on_window_event<F: Fn(&WindowEvent) + Send + 'static>( &self, f: F, ) -> WindowEventId

Registers a window event handler.
Source§

fn scale_factor(&self) -> Result<f64>

Returns the scale factor that can be used to map logical pixels to physical pixels, and vice versa.
Source§

fn inner_position(&self) -> Result<PhysicalPosition<i32>>

Returns the position of the top-left hand corner of the window’s client area relative to the top-left hand corner of the desktop.
Source§

fn outer_position(&self) -> Result<PhysicalPosition<i32>>

Returns the position of the top-left hand corner of the window relative to the top-left hand corner of the desktop.
Source§

fn inner_size(&self) -> Result<PhysicalSize<u32>>

Returns the physical size of the window’s client area. Read more
Source§

fn outer_size(&self) -> Result<PhysicalSize<u32>>

Returns the physical size of the entire window. Read more
Source§

fn is_fullscreen(&self) -> Result<bool>

Gets the window’s current fullscreen state.
Source§

fn is_minimized(&self) -> Result<bool>

Gets the window’s current minimized state.
Source§

fn is_maximized(&self) -> Result<bool>

Gets the window’s current maximized state.
Source§

fn is_focused(&self) -> Result<bool>

Gets the window’s current focus state.
Source§

fn is_decorated(&self) -> Result<bool>

Gets the window’s current decoration state.
Source§

fn is_resizable(&self) -> Result<bool>

Gets the window’s current resizable state.
Source§

fn is_maximizable(&self) -> Result<bool>

Gets the window’s native maximize button state. Read more
Source§

fn is_minimizable(&self) -> Result<bool>

Gets the window’s native minimize button state. Read more
Source§

fn is_closable(&self) -> Result<bool>

Gets the window’s native close button state. Read more
Source§

fn is_visible(&self) -> Result<bool>

Gets the window’s current visibility state.
Source§

fn is_enabled(&self) -> Result<bool>

Whether the window is enabled or disable.
Source§

fn is_always_on_top(&self) -> Result<bool>

Gets the window alwaysOnTop flag state. Read more
Source§

fn title(&self) -> Result<String>

Gets the window’s current title.
Source§

fn current_monitor(&self) -> Result<Option<Monitor>>

Returns the monitor on which the window currently resides. Read more
Source§

fn primary_monitor(&self) -> Result<Option<Monitor>>

Returns the primary monitor of the system. Read more
Source§

fn monitor_from_point(&self, x: f64, y: f64) -> Result<Option<Monitor>>

Returns the monitor that contains the given point.
Source§

fn available_monitors(&self) -> Result<Vec<Monitor>>

Returns the list of all the monitors available on the system.
Source§

fn gtk_window(&self) -> Result<*mut c_void>

Returns the GTK application window pointer (GtkApplicationWindow*) that is used by this window. Read more
Source§

fn default_vbox(&self) -> Result<*mut c_void>

Returns the vertical GTK box pointer (GtkBox*) that is added by default as the sole child of this window. Read more
Source§

fn window_handle(&self) -> Result<WindowHandle<'_>, HandleError>

Raw window handle.
Source§

fn theme(&self) -> Result<Theme>

Returns the current window theme.
Source§

fn center(&self) -> Result<()>

Centers the window.
Source§

fn request_user_attention( &self, request_type: Option<UserAttentionType>, ) -> Result<()>

Requests user attention to the window. Read more
Source§

fn create_window<F: Fn(RawWindow<'_>) + Send + 'static>( &mut self, pending: PendingWindow<T, Self::Runtime>, after_window_creation: Option<F>, ) -> Result<DetachedWindow<T, Self::Runtime>>

Create a new window.
Source§

fn create_webview( &mut self, pending: PendingWebview<T, Self::Runtime>, ) -> Result<DetachedWebview<T, Self::Runtime>>

Create a new webview.
Source§

fn set_resizable(&self, resizable: bool) -> Result<()>

Updates the window resizable flag.
Source§

fn set_enabled(&self, enabled: bool) -> Result<()>

Enable or disable the window. Read more
Source§

fn set_maximizable(&self, maximizable: bool) -> Result<()>

Updates the window’s native maximize button state. Read more
Source§

fn set_minimizable(&self, minimizable: bool) -> Result<()>

Updates the window’s native minimize button state. Read more
Source§

fn set_closable(&self, closable: bool) -> Result<()>

Updates the window’s native close button state. Read more
Source§

fn set_title<S: Into<String>>(&self, title: S) -> Result<()>

Updates the window title.
Source§

fn maximize(&self) -> Result<()>

Maximizes the window.
Source§

fn unmaximize(&self) -> Result<()>

Unmaximizes the window.
Source§

fn minimize(&self) -> Result<()>

Minimizes the window.
Source§

fn unminimize(&self) -> Result<()>

Unminimizes the window.
Source§

fn show(&self) -> Result<()>

Shows the window.
Source§

fn hide(&self) -> Result<()>

Hides the window.
Source§

fn close(&self) -> Result<()>

Closes the window.
Source§

fn destroy(&self) -> Result<()>

Destroys the window.
Source§

fn set_decorations(&self, decorations: bool) -> Result<()>

Updates the decorations flag.
Source§

fn set_shadow(&self, enable: bool) -> Result<()>

Updates the shadow flag.
Source§

fn set_always_on_bottom(&self, value: bool) -> Result<()>

Updates the window alwaysOnBottom flag.
Source§

fn set_always_on_top(&self, value: bool) -> Result<()>

Updates the window alwaysOnTop flag.
Source§

fn set_visible_on_all_workspaces(&self, value: bool) -> Result<()>

Updates the window visibleOnAllWorkspaces flag.
Source§

fn set_content_protected(&self, protected: bool) -> Result<()>

Prevents the window contents from being captured by other apps.
Source§

fn set_size(&self, size: Size) -> Result<()>

Resizes the window.
Source§

fn set_min_size(&self, size: Option<Size>) -> Result<()>

Updates the window min inner size.
Source§

fn set_max_size(&self, size: Option<Size>) -> Result<()>

Updates the window max inner size.
Source§

fn set_size_constraints(&self, constraints: WindowSizeConstraints) -> Result<()>

Sets this window’s minimum inner width.
Source§

fn set_position(&self, position: Position) -> Result<()>

Updates the window position.
Source§

fn set_fullscreen(&self, fullscreen: bool) -> Result<()>

Updates the window fullscreen state.
Source§

fn set_fullscreen_on_monitor( &self, position: PhysicalPosition<f64>, ) -> Result<()>

Sets the window as fullscreen on the monitor that contains the given physical position. Read more
Source§

fn set_focus(&self) -> Result<()>

Bring the window to front and focus.
Source§

fn set_focusable(&self, focusable: bool) -> Result<()>

Sets whether the window can be focused.
Source§

fn set_icon(&self, icon: Icon<'_>) -> Result<()>

Updates the window icon.
Source§

fn set_skip_taskbar(&self, skip: bool) -> Result<()>

Whether to hide the window icon from the taskbar or not.
Source§

fn set_cursor_grab(&self, grab: bool) -> Result<()>

Grabs the cursor, preventing it from leaving the window. Read more
Source§

fn set_cursor_visible(&self, visible: bool) -> Result<()>

Modifies the cursor’s visibility. Read more
Source§

fn set_cursor_icon(&self, icon: CursorIcon) -> Result<()>

Source§

fn set_cursor_position<Pos: Into<Position>>(&self, position: Pos) -> Result<()>

Changes the position of the cursor in window coordinates.
Source§

fn set_ignore_cursor_events(&self, ignore: bool) -> Result<()>

Ignores the window cursor events.
Source§

fn start_dragging(&self) -> Result<()>

Starts dragging the window.
Source§

fn start_resize_dragging(&self, direction: ResizeDirection) -> Result<()>

Starts resize-dragging the window.
Source§

fn set_badge_count( &self, count: Option<i64>, desktop_filename: Option<String>, ) -> Result<()>

Sets the badge count on the taskbar The badge count appears as a whole for the application Using 0 or using None will remove the badge Read more
Source§

fn set_badge_label(&self, label: Option<String>) -> Result<()>

Sets the badge count on the taskbar macOS only. Using None will remove the badge
Source§

fn set_overlay_icon(&self, icon: Option<Icon<'_>>) -> Result<()>

Sets the overlay icon on the taskbar Windows only. Using None will remove the icon Read more
Source§

fn set_progress_bar(&self, progress_state: ProgressBarState) -> Result<()>

Sets the taskbar progress state. Read more
Source§

fn set_title_bar_style(&self, style: TitleBarStyle) -> Result<()>

Sets the title bar style. Available on macOS only. Read more
Source§

fn set_traffic_light_position(&self, position: Position) -> Result<()>

Change the position of the window controls. Available on macOS only. Read more
Source§

fn set_theme(&self, theme: Option<Theme>) -> Result<()>

Sets the theme for this window. Read more
Source§

fn set_background_color(&self, color: Option<Color>) -> Result<()>

Set the window background.

Auto Trait Implementations§

§

impl<T> !RefUnwindSafe for CefWindowDispatcher<T>

§

impl<T> !UnwindSafe for CefWindowDispatcher<T>

§

impl<T> Freeze for CefWindowDispatcher<T>
where RuntimeContext<T>: Freeze,

§

impl<T> Send for CefWindowDispatcher<T>
where RuntimeContext<T>: Send,

§

impl<T> Sync for CefWindowDispatcher<T>
where RuntimeContext<T>: Sync,

§

impl<T> Unpin for CefWindowDispatcher<T>
where RuntimeContext<T>: Unpin,

§

impl<T> UnsafeUnpin for CefWindowDispatcher<T>
where RuntimeContext<T>: UnsafeUnpin,

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> Downcast for T
where T: Any,

Source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
Source§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
Source§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
Source§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

Source§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send> ⓘ

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.
Source§

impl<T> UserEvent for T
where T: Debug + Clone + Send + 'static,

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more