#pragma once #include #include enum { PROP_TYPE_BOOL, PROP_TYPE_SLIDER, PROP_TYPE_UNKNOWN }; struct slider_value { f64 min, max; f64 step; f64 value; }; struct prop { u8 type; wstr title; void *value; }; struct entry { str id; str path; s64 compare; bool loaded; bool has_package; str preview_path; bool has_preview; wstr title; array(struct prop) props; }; struct db { array(struct entry) entries; }; void db_init(struct db *db); bool db_load_entries(struct db *db, str *path); void db_sort(struct db *db); bool db_ensure_entry_loaded(struct db *db, struct entry *e); void db_unload(struct db *db);