Module browser_window::prelude
source · Expand description
Some common traits that need to be often available.
Re-exports§
pub use crate::javascript::JsValue;
Modules§
- The 2015 version of the core prelude.
- The 2018 version of the core prelude.
- The 2021 version of the core prelude.
- The first version of the core prelude.
- rust_2024ExperimentalThe 2024 edition of the core prelude.
Structs§
- This future executes a closure on the GUI thread and returns the result.
- This future runs a future on the GUI thread and returns its output.
- A ‘const string slice’ Points to a immutable, non-zero-terminated, UTF-8 encoded string. Using rust’s string’s memory layout.
- A ‘string slice’ Points to a mutable, non-zero-terminated, UTF-8 encoded string. Using rust’s string’s memory layout.
Enums§
- The error that occurs when you’re delegating work to the GUI thread, but it fails to finish and/or return a result.
Constants§
Statics§
Traits§
- A property is something that has a setter and a getter.
Functions§
- cabs⚠
- Safety check that makes sure the given application handle is used on the correct thread. Does nothing in release mode.
- Dispatches the given function to be executed on the thread this application instance has been created on, and passes the given data to it. This function is thread safe.
- Executes the given closure after the specified delay.
- Exits the main loop, returning execution to the function that invoked the run call. The exit_code will be returned by bw_Application_run.
- Same as bw_Application_exit, but guaranteed to be thread-safe The exit_code will be returned by bw_Application_run.
- Shuts down the applcation runtime & frees it’s memory.
- Initializes browser window. Starts up browser engine process(es). Returns an application handle.
- Runs the event loop. Calls the
on_ready
callback whenapp
can be used. - Adds the browser framework to the browser window. Should be called right after
bw_BrowserWindow_new
. - Marks the browser window handle as not being used anymore. This makes it so that if and when the window gets closed, everything is freed and cleaned from memory. This function can be called from any thread so it needs to be thread safe.
- Executes the given JavaScript and calls the given callback (on the GUI thread) to provide the result.
- Allocates a browser window and creates the window for it. Call
bw_BrowserWindow_create
on it to add the actual browser framework to this window. - Destroy the window, releasing all resources it holds. After this call, the handle is considered invalid.
- Invalidates the window handle. The window will get destroyed when it is deemed possible.
- Gets the width and height of the usable area inside the window.
- Gets the opacity of the window as a value from 0 to 255.
- Gets the X and Y coordinates of the window position relative to the desktop screen.
- Copies as many bytes into
title
that fit in there. Returns the number of characters the title actually has. - Gets the width and height of the window including the title bar and borders.
- Returns whether or not the window is not hidden.
bw_Window_show
andbw_Window_hide
change the visibility. - Creates a new (empty) window The returned pointer is a handler for the window. bw_Window_drop needs to be called on it after it is done being used, otherwise the window is never actually destroyed and memory leakes happen.
- Applies the given title;
- Shows the window if it was previously hidden Is generally called after window creation.
- Copies the string from the given
bw_CStrSlice
to a C compatible, nul-terminated string. - Frees the string allocated with any of the functions of this module.
- cdiv⚠
- cffs⚠