Module browser_window::prelude [−][src]
Expand description
Some common traits that need to be often available.
Modules
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
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 all application processes and performs necessary clean-up code.
Frees memory for the application handle.
Call bw_Application_finish
before you call this function.
Freeing the application handle is generally not necessary, as all memory in use by the process gets released anyway after shutdown.
Initializes browser window. Starts up browser engine process(es). Returns an application handle.
Runs the event loop.
Calls the on_ready
callback when app
can be used.
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.
Creates a new browser 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
and bw_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.