diff options
author | Vito Caputo <vcaputo@pengaru.com> | 2023-06-12 16:58:18 -0700 |
---|---|---|
committer | Vito Caputo <vcaputo@pengaru.com> | 2023-06-12 17:02:58 -0700 |
commit | 8b0c8e1e4336ce0c40c467fc86dec40fb2c94128 (patch) | |
tree | 752439cc5c2f3a9163354aa448a3a740ec3e712e /src/til_stream.h | |
parent | ffb0ed186bd33d916633e9501250522b94423766 (diff) |
til_stream: introduce on-stream registered contexts
In order for modules like rkt to be able to do integrated
transitions, there must be a way for discovering existing module
contexts by path and using them for rendering in new
compositions.
This is a first stab at something along those lines. The whole
multiple contexts at the same path pattern has been partially
handled in this implementation, but I think it will just be going
away and checkers::fill_module refactored to not do that.
Diffstat (limited to 'src/til_stream.h')
-rw-r--r-- | src/til_stream.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/til_stream.h b/src/til_stream.h index 1fb709f..cb3c98e 100644 --- a/src/til_stream.h +++ b/src/til_stream.h @@ -24,6 +24,7 @@ #include "til_setup.h" typedef struct til_stream_t til_stream_t; +typedef struct til_stream_module_context_t til_stream_module_context_t; typedef struct til_stream_pipe_t til_stream_pipe_t; typedef struct til_tap_t til_tap_t; @@ -63,4 +64,14 @@ int til_stream_for_each_pipe(til_stream_t *stream, til_stream_pipe_iter_func_t p void til_stream_pipe_set_owner(til_stream_pipe_t *pipe, const void *owner, const void *owner_foo); void til_stream_pipe_set_driving_tap(til_stream_pipe_t *pipe, const til_tap_t *driving_tap); + +typedef int (til_stream_module_context_iter_func_t)(void *context, til_stream_module_context_t *module_context, size_t n_module_contexts, const til_module_context_t **contexts); + +int til_stream_for_each_module_context(til_stream_t *stream, til_stream_module_context_iter_func_t module_context_cb, void *cb_arg); + +int til_stream_register_module_contexts(til_stream_t *stream, size_t n_contexts, til_module_context_t **contexts); +int til_stream_find_module_contexts(til_stream_t *stream, const char *path, size_t n_contexts, til_module_context_t **res_contexts); +void til_stream_gc_module_contexts(til_stream_t *stream); +void til_stream_fprint_module_contexts(til_stream_t *stream, FILE *out); + #endif |