pub struct NoopWindowOps;Expand description
No-op implementation used by standalone WidgetTrees constructed
outside of an app (tests, headless scenarios). Every method
returns None / does nothing; open_window panics because a
standalone tree has no winit back-end to create windows in.
Trait Implementations§
Source§impl WindowOps for NoopWindowOps
impl WindowOps for NoopWindowOps
Source§fn open_window(&mut self, _config: WindowConfig) -> TeksiloWindowId
fn open_window(&mut self, _config: WindowConfig) -> TeksiloWindowId
Open a new window. Creates the winit-level window
synchronously inside this call and returns its id, which is
immediately valid for any other method on this trait.
Source§fn find_window(&self, _string_id: &str) -> Option<TeksiloWindowId>
fn find_window(&self, _string_id: &str) -> Option<TeksiloWindowId>
Look up a window by the stable string id it was opened with
(
WindowConfig::id). Returns None if no live window carries
that id.Source§fn window_state(&self, _id: TeksiloWindowId) -> Option<WindowState>
fn window_state(&self, _id: TeksiloWindowId) -> Option<WindowState>
Read the reactive state for a specific window.
Source§fn windows(&self) -> Vec<WindowState>
fn windows(&self) -> Vec<WindowState>
Every live window’s state, in creation order.
Source§fn focus_window(&mut self, _id: TeksiloWindowId)
fn focus_window(&mut self, _id: TeksiloWindowId)
Raise a window and give it keyboard focus.
Source§fn close_window_by_id(&mut self, _id: TeksiloWindowId)
fn close_window_by_id(&mut self, _id: TeksiloWindowId)
Close a specific window by id. The window is fully torn down
before the next event-loop tick.
Source§fn request_activation_token(
&mut self,
_id: TeksiloWindowId,
cb: Box<dyn FnOnce(Option<String>)>,
)
fn request_activation_token( &mut self, _id: TeksiloWindowId, cb: Box<dyn FnOnce(Option<String>)>, )
Request an
xdg_activation_v1 token for id — to hand to another window
or a child process so it can raise itself on Wayland. cb fires once with
the token string, or with None where unsupported (everything but
Wayland/X11). Default implementation: immediate None.Source§fn request_activation_token_self(&mut self, cb: Box<dyn FnOnce(Option<String>)>)
fn request_activation_token_self(&mut self, cb: Box<dyn FnOnce(Option<String>)>)
Like
request_activation_token but for
the current dispatching window — the one whose handler is running.
Works even mid-dispatch, when that window is temporarily out of the
manager’s map, because it uses the captured window handle instead of an id
lookup. Use this when a focused widget needs a token to hand to another
window or process. Default implementation: immediate None.Source§fn current_parent_handle(&self) -> Option<ParentHandle>
fn current_parent_handle(&self) -> Option<ParentHandle>
Extract the platform parent handle of the window currently
dispatching the event (the one that owns the in-flight
EventContext). Used by native-dialog integrations
(teksilo_platform::file_dialog) to parent OS dialogs to the
originating Teksilo window. Read moreSource§fn set_ime_cursor_area(&mut self, _area: Rect)
fn set_ime_cursor_area(&mut self, _area: Rect)
Report the focused text widget’s caret rectangle (in window-logical
pixels) so the platform can position the OS IME candidate window
next to the insertion point. Called from text-editing widgets
whenever the caret moves. The app applies it to the in-flight
window’s
set_ime_cursor_area, deduped against the last value. Read moreSource§fn begin_os_drag(
&mut self,
_data: OutboundDragData,
_image: Option<DragImageData>,
) -> bool
fn begin_os_drag( &mut self, _data: OutboundDragData, _image: Option<DragImageData>, ) -> bool
Hand an OS-level drag to the platform when an in-app drag escalates at
the window boundary (the pointer left the window carrying an
OS-exportable payload). The platform backend
(
teksilo_platform::external_dnd) starts a native drag session
(NSDraggingSource / wl_data_source / OLE IDropSource) using
data, optionally drawing image as the drag cursor. Read moreSource§fn cancel_os_drag(&mut self)
fn cancel_os_drag(&mut self)
Abandon an OS drag started by
Self::begin_os_drag (the user pressed
Escape). Read moreAuto Trait Implementations§
impl Freeze for NoopWindowOps
impl RefUnwindSafe for NoopWindowOps
impl Send for NoopWindowOps
impl Sync for NoopWindowOps
impl Unpin for NoopWindowOps
impl UnsafeUnpin for NoopWindowOps
impl UnwindSafe for NoopWindowOps
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more