aboutsummaryrefslogtreecommitdiff
path: root/shared/unstable
diff options
context:
space:
mode:
Diffstat (limited to 'shared/unstable')
-rw-r--r--shared/unstable/forky.c16
-rw-r--r--shared/unstable/forky.h4
2 files changed, 17 insertions, 3 deletions
diff --git a/shared/unstable/forky.c b/shared/unstable/forky.c
index 1feae26..be4dced 100644
--- a/shared/unstable/forky.c
+++ b/shared/unstable/forky.c
@@ -27,10 +27,22 @@ void forky_setsavefn(t_class *c, t_forkysavefn fn)
post("cloning widgetbehavior...");
#endif
*wb = *c->c_wb;
- wb->w_savefn = fn;
+ wb->w_savefn = sf;
class_setwidget(c, wb);
}
- else c->c_wb->w_savefn = fn;
+ else c->c_wb->w_savefn = sf;
+#endif
+}
+
+void forky_setpropertiesfn(t_class *c, t_forkypropertiesfn fn)
+{
+#if FORKY_VERSION >= 37
+ class_setpropertiesfn(c, fn);
+#else
+ /* assuming wb has already been either cloned (in forky_setsavefn),
+ or defined from scratch -- it is unlikely to ever need props without
+ a specialized save (always be sure to set props after save, though). */
+ c->c_wb->w_propertiesfn = pf;
#endif
}
diff --git a/shared/unstable/forky.h b/shared/unstable/forky.h
index df27690..cd0dbd8 100644
--- a/shared/unstable/forky.h
+++ b/shared/unstable/forky.h
@@ -19,9 +19,11 @@
#define FORKY_WIDGETPADDING 0,0
#endif
-typedef void (*t_forkysavefn)(t_gobj *x, t_binbuf *b);
+typedef void (*t_forkysavefn)(t_gobj *x, t_binbuf *bb);
+typedef void (*t_forkypropertiesfn)(t_gobj *x, t_glist *gl);
void forky_setsavefn(t_class *c, t_forkysavefn fn);
+void forky_setpropertiesfn(t_class *c, t_forkypropertiesfn fn);
int forky_hasfeeders(t_object *x, t_glist *glist, int inno, t_symbol *outsym);
t_int forky_getbitmask(int ac, t_atom *av);