summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am4
-rw-r--r--src/til.h2
-rw-r--r--src/til_knobs.h91
3 files changed, 2 insertions, 95 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index e3264d1..1b9d932 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,12 +1,12 @@
SUBDIRS = libs modules
noinst_LTLIBRARIES = libtil.la
-libtil_la_SOURCES = til_args.c til_args.h til_fb.c til_fb.h til_jenkins.c til_jenkins.h til_knobs.h til.c til.h til_module_context.c til_module_context.h til_settings.h til_settings.c til_setup.c til_setup.h til_stream.c til_stream.h til_tap.h til_threads.c til_threads.h til_util.c til_util.h
+libtil_la_SOURCES = til_args.c til_args.h til_fb.c til_fb.h til_jenkins.c til_jenkins.h til.c til.h til_module_context.c til_module_context.h til_settings.h til_settings.c til_setup.c til_setup.h til_stream.c til_stream.h til_tap.h til_threads.c til_threads.h til_util.c til_util.h
libtil_la_CPPFLAGS = -I@top_srcdir@/src
libtil_la_LIBADD = modules/blinds/libblinds.la modules/checkers/libcheckers.la modules/compose/libcompose.la modules/drizzle/libdrizzle.la modules/flui2d/libflui2d.la modules/julia/libjulia.la modules/meta2d/libmeta2d.la modules/moire/libmoire.la modules/montage/libmontage.la modules/pixbounce/libpixbounce.la modules/plasma/libplasma.la modules/plato/libplato.la modules/ray/libray.la modules/rocket/librocket.la modules/roto/libroto.la modules/rtv/librtv.la modules/shapes/libshapes.la modules/snow/libsnow.la modules/sparkler/libsparkler.la modules/spiro/libspiro.la modules/stars/libstars.la modules/strobe/libstrobe.la modules/submit/libsubmit.la modules/swab/libswab.la modules/swarm/libswarm.la modules/voronoi/libvoronoi.la libs/grid/libgrid.la libs/puddle/libpuddle.la libs/ray/libray.la libs/rocket/librocket.la libs/sig/libsig.la libs/txt/libtxt.la libs/ascii/libascii.la libs/din/libdin.la
bin_PROGRAMS = rototiller
-rototiller_SOURCES = fps.c fps.h main.c mem_fb.c setup.h setup.c til.h til_fb.c til_fb.h til_knobs.h til_settings.c til_settings.h til_threads.c til_threads.h til_util.c til_util.h
+rototiller_SOURCES = fps.c fps.h main.c mem_fb.c setup.h setup.c til.h til_fb.c til_fb.h til_settings.c til_settings.h til_threads.c til_threads.h til_util.c til_util.h
if ENABLE_SDL
rototiller_SOURCES += sdl_fb.c
endif
diff --git a/src/til.h b/src/til.h
index 64cdd8a..49823ba 100644
--- a/src/til.h
+++ b/src/til.h
@@ -16,7 +16,6 @@ typedef struct til_frame_plan_t {
} 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_stream_t til_stream_t;
@@ -32,7 +31,6 @@ struct til_module_t {
void (*render_fragment)(til_module_context_t *context, til_stream_t *stream, unsigned ticks, unsigned cpu, til_fb_fragment_t **fragment_ptr);
void (*finish_frame)(til_module_context_t *context, til_stream_t *stream, unsigned ticks, til_fb_fragment_t **fragment_ptr);
int (*setup)(const til_settings_t *settings, til_setting_t **res_setting, const til_setting_desc_t **res_desc, til_setup_t **res_setup);
- size_t (*knobs)(til_module_context_t *context, til_knob_t **res_knobs);
char *name;
char *description;
char *author;
diff --git a/src/til_knobs.h b/src/til_knobs.h
deleted file mode 100644
index 370be27..0000000
--- a/src/til_knobs.h
+++ /dev/null
@@ -1,91 +0,0 @@
-#ifndef _TIL_KNOBS_H
-#define _TIL_KNOBS_H
-
-#include <assert.h>
-
-/* A knob exposes a binding for some float in a module's context
- * which can be varied at runtime between frames to influence
- * the output. There's some overlap with settings, but settings
- * are more intended for configuration applied at context
- * creation, which won't vary frame-to-frame, but may influence
- * the initial value and/or automatic behavior of knobs for
- * instance, or even which knobs are available.
- *
- * At this time knobs will only apply to floats, accompanied by
- * some rudimentary bounds.
- *
- * Integer types would probably be useful, and maybe a precision
- * specifier, those can be added in the future as needed, but I'd
- * like to keep it simple for now and see what kind of problems
- * emerge.
- *
- * The current expectation is that a module context struct will
- * incorporate an array of knobs, replacing loose floats already
- * being automatically varied within the module frame-to-frame.
- *
- * The module will then use the knob_auto_* helpers below to
- * access and manipulate the values, instead of directly
- * accessing the loose floats as before.
- *
- * External manipulators of the knobs will use the knob_*
- * helpers, instead of the knob_auto_* helpers, to
- * access+manipulate the knobs. These helpers are basically just
- * to get external and internal manipulators to agree on which
- * side owns control via the managed field.
- */
-typedef struct til_knob_t {
- const char *name; /* Short API-oriented name */
- const char *desc; /* Longer UI-oriented name */
- const float min, max; /* Value bounds */
- float value; /* Value knob affects */
- unsigned managed:1; /* Set when knob control of value is active,
- * suppress automagic control of value when set.
- */
-} til_knob_t;
-
-
-/* helper for modules automating knob controls, use this to
- * change values intead of direct manipulation to respect active.
- * returns new (or unchanged) value
- */
-static inline float til_knob_auto_set(til_knob_t *knob, float value)
-{
- assert(knob);
-
- if (knob->managed)
- return knob->value;
-
- return knob->value = value;
-}
-
-/* identical to knob_auto_set, except adds to existing value.
- */
-static inline float til_knob_auto_add(til_knob_t *knob, float value)
-{
- assert(knob);
-
- return til_knob_auto_set(knob, knob->value + value);
-}
-
-
-/* identical to knob_auto* variants, except intended for
- * external knob-twisters, i.e. the "managed" knob entrypoints.
- */
-static inline float til_knob_set(til_knob_t *knob, float value)
-{
- assert(knob);
-
- knob->managed = 1;
-
- return knob->value = value;
-}
-
-
-static inline float til_knob_add(til_knob_t *knob, float value)
-{
- assert(knob);
-
- return til_knob_set(knob, knob->value + value);
-}
-
-#endif
© All Rights Reserved