Module browser_window::prelude
source · Expand description
Some common traits that need to be often available.
Re-exports§
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.
cmd
is always a string. The arguments are JS values in the form of a string.- 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§
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
. - 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. - Hides the window and frees the user data
- Invalidates the window handle.
- Frees the user data that was attached to this window.
- 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⚠