summaryrefslogtreecommitdiff
path: root/src/til.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/til.h')
-rw-r--r--src/til.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/til.h b/src/til.h
index b074158..64cdd8a 100644
--- a/src/til.h
+++ b/src/til.h
@@ -15,17 +15,18 @@ typedef struct til_frame_plan_t {
til_fragmenter_t fragmenter; /* fragmenter to use in rendering the frame */
} til_frame_plan_t;
+typedef struct til_module_t til_module_t;
+typedef struct til_knob_t til_knob_t;
typedef struct til_settings_t settings;
typedef struct til_setting_desc_t til_setting_desc_t;
-typedef struct til_knob_t til_knob_t;
typedef struct til_stream_t til_stream_t;
#define TIL_MODULE_OVERLAYABLE 1u /* module is appropriate for overlay use */
#define TIL_MODULE_HERMETIC 2u /* module doesn't work readily with other modules / requires manual settings */
#define TIL_MODULE_EXPERIMENTAL 4u /* module is buggy / unfinished */
-typedef struct til_module_t {
- til_module_context_t * (*create_context)(til_stream_t *stream, unsigned seed, unsigned ticks, unsigned n_cpus, char *path, til_setup_t *setup);
+struct til_module_t {
+ til_module_context_t * (*create_context)(const til_module_t *module, til_stream_t *stream, unsigned seed, unsigned ticks, unsigned n_cpus, char *path, til_setup_t *setup);
void (*destroy_context)(til_module_context_t *context); /* destroy gets stream in context, but the render-related functions should always use the passed-in stream so it can potentially change */
void (*prepare_frame)(til_module_context_t *context, til_stream_t *stream, unsigned ticks, til_fb_fragment_t **fragment_ptr, til_frame_plan_t *res_frame_plan);
void (*render_fragment)(til_module_context_t *context, til_stream_t *stream, unsigned ticks, unsigned cpu, til_fb_fragment_t **fragment_ptr);
@@ -36,7 +37,7 @@ typedef struct til_module_t {
char *description;
char *author;
unsigned flags;
-} til_module_t;
+};
int til_init(void);
void til_quiesce(void);
© All Rights Reserved