view_quit_ui
September 8th 2024
Try to force a view to exit a UI loop and return to the default buffer display behavior
Signature
b32
view_quit_ui(Application_Links* app,
View_ID view_id);
Parameters
app
the standard custom layer context pointer
view_id
the id of the view to modify
Return
non-zero if the view exists, zero otherwise
Details
A view is considered to be in a UI loop when it's context details have set their 'hides_buffer' field to true. This call attemps to get the view to a state with this field set to false by sending abort events repeatedly. This can fail due to buggy or non-compliant implementations of views. It can either fail because the UI loop refuses to respond to the abort after repeated attempts to close it, or because the view shuts down completely rather than returning to a buffer viewing state. The core ensures that if this happens to the final view, a new root panel and empty view will be initialized.