ocarina/design/callback.txt

27 lines
657 B
Plaintext

== Files ==
ocarina/include/
callback.h
ocarina/lib/
callback.cpp
== Depends ==
version print
Callbacks: (lib/callback.cpp)
Callbacks are used to notify a unit test or the gui that something in
the backend has changed. The callbacks structure should be initialized
with no-op default values and filled in by the user through the
get_callbacks() function.
- Callback functions:
struct Callbacks {
void (*on_library_add)(unsigned int, library :: Library *);
void (*on_library_update)(unsigned int, library :: Library *);
};
static struct Callbacks callbacks;
- API:
struct Callbacks *get_callbacks();
Return the Callbacks structure;