21 #ifndef INCLUDED_LOADER 22 #define INCLUDED_LOADER 119 typedef int (*
LoadFunc)(
void* param,
double time_left);
130 int estimated_duration_ms);
161 extern Status LDR_ProgressiveLoad(
double time_budget,
wchar_t* next_description,
size_t max_chars,
int* progress_percent);
172 #define LDR_CHECK_TIMEOUT(completed_jobs, total_jobs)\ 173 if(timer_Time() > end_time)\ 175 size_t progress_percent = ((completed_jobs)*100 / (total_jobs));\ 177 if(progress_percent == 0)\ 178 progress_percent = 1;\ 179 ENSURE(0 < progress_percent && progress_percent <= 100);\ 180 return (int)progress_percent;\ 183 #endif // #ifndef INCLUDED_LOADER void LDR_Cancel()
Definition: Loader.cpp:145
void LDR_Register(LoadFunc func, void *param, const wchar_t *description, int estimated_duration_ms)
Definition: Loader.cpp:118
i64 Status
Error handling system.
Definition: status.h:171
void LDR_BeginRegistering()
Definition: Loader.cpp:101
Status LDR_NonprogressiveLoad()
Definition: Loader.cpp:308
void LDR_EndRegistering()
Definition: Loader.cpp:130
int(* LoadFunc)(void *param, double time_left)
Definition: Loader.h:119
Status LDR_ProgressiveLoad(double time_budget, wchar_t *next_description, size_t max_chars, int *progress_percent)
Definition: Loader.cpp:193