App
For apps that want dvui to provide the mainloop which runs these callbacks.
In your root file, have a declaration named "dvui_app" of this type:
pub const dvui_app: dvui.App = .{ .initFn = AppInit, ...};
Also must use the App's main, panic and log functions:
pub const main = dvui.App.main;
pub const panic = dvui.App.panic;
pub const std_options: std.Options = .{
.logFn = dvui.App.logFn,
};
Fields
- config:AppConfig
The configuration options for the app, either directly or a function that
- initFn:?fn (*dvui.Window) anyerror!void
Runs before the first full frame, allowing for configuring the Window.
- deinitFn:?fn () void
Runs when the app is exiting, before Window.deinit().
- frameFn:frameFunction
Runs once every frame between
Window.beginandWindow.end
Types
Functions
- get
Used internally to get the dvui_app if it's defined
Constants
Variables
- main_init
The init arg passed into main. null if not available (like on web).
Aliases
- App
For apps that want dvui to provide the mainloop which runs these callbacks.