Revised autoreload interface

Make the header only contain the public interface and nothing from the
implementation. All functions get a handle to their self object, like the img_
and tns_ and win_ functions. All necessary data (file path) is also passed as
an argument, so that no extern redeclarations are needed.

Make arl_setup_dir() private, it's not called outside the module.

Make arl_handle() return true if the file has changed, so that the reloading of
the file can be done by the caller.
This commit is contained in:
Bert Münnich
2017-05-17 20:07:32 +02:00
parent edb117e3bd
commit 3724d3fc17
4 changed files with 97 additions and 88 deletions

View File

@ -18,14 +18,26 @@
#include "autoreload.h"
void arl_cleanup(void) { }
void arl_cleanup(arl_t *arl)
{
(void) arl;
}
void arl_handle(void) { }
bool arl_handle(arl_t *arl, const char *filepath)
{
(void) arl;
(void) filepath;
return false;
}
void arl_init(void) { }
void arl_setup(void) { }
void arl_setup_dir(void) { }
void arl_init(arl_t *arl)
{
(void) arl;
}
void arl_setup(arl_t *arl, const char *filepath)
{
(void) arl;
(void) filepath;
}