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