Suckless OGL 1.0.0
A lean, high-performance C11 PBR Renderer
Loading...
Searching...
No Matches
app_subsystem.h
Go to the documentation of this file.
1#ifndef APP_SUBSYSTEM_H
2#define APP_SUBSYSTEM_H
3
15struct App; /* forward — avoids pulling in app.h */
16
21typedef struct {
22 const char* name;
23 int (*init)(
24 struct App* app);
25 void (*cleanup)(struct App* app);
27
37int app_subsystems_init(struct App* app, const SubsystemDescriptor* table);
38
46void app_subsystems_cleanup(struct App* app, const SubsystemDescriptor* table);
47
48#endif /* APP_SUBSYSTEM_H */
int app_subsystems_init(struct App *app, const SubsystemDescriptor *table)
Walk table forward calling init() until the sentinel {0}.
Definition app_subsystem.c:8
void app_subsystems_cleanup(struct App *app, const SubsystemDescriptor *table)
Walk table in reverse, calling cleanup() for each entry.
Definition app_subsystem.c:25
The central state container for the entire application.
Definition app.h:24
Describes one subsystem's lifecycle hooks.
Definition app_subsystem.h:21
const char * name
Definition app_subsystem.h:22