From d0f6986345970955d6390a6953c35babf587c262 Mon Sep 17 00:00:00 2001 From: "N.N." Date: Thu, 19 Feb 2004 22:23:18 +0000 Subject: many small improvements in toxy, plustot added svn path=/trunk/externals/miXed/; revision=1321 --- toxy/plustot.h | 81 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 toxy/plustot.h (limited to 'toxy/plustot.h') diff --git a/toxy/plustot.h b/toxy/plustot.h new file mode 100644 index 0000000..e08e7b0 --- /dev/null +++ b/toxy/plustot.h @@ -0,0 +1,81 @@ +/* Copyright (c) 2003 krzYszcz and others. + * For information on usage and redistribution, and for a DISCLAIMER OF ALL + * WARRANTIES, see the file, "LICENSE.txt," in this distribution. */ + +#ifndef __PLUSTOT_H__ +#define __PLUSTOT_H__ + +#define PD_EXTERN EXTERN +#undef EXTERN +#include +#undef EXTERN +#define EXTERN PD_EXTERN +#undef PD_EXTERN + +EXTERN_STRUCT _plustin; +#define t_plustin struct _plustin +EXTERN_STRUCT _plustob; +#define t_plustob struct _plustob +EXTERN_STRUCT _plusvar; +#define t_plusvar struct _plusvar + +t_symbol *plusps_Ti; +t_symbol *plusps_To; +t_symbol *plusps_Tv; + +#define PLUSTOB_MAKEIT ((Tcl_Obj *)-1) + +typedef int (*t_plusifsharedfn)(t_plusbob *, Tcl_Obj *); + +enum { PLUSTIN_GLIST_THIS, PLUSTIN_GLIST_ANY, PLUSTIN_GLIST_UP }; + +void plusloud_tclerror(t_pd *caller, Tcl_Interp *interp, char *msg); + +t_plustin *plustin_create(t_plustype *tp, t_plusbob *parent, t_symbol *id); +Tcl_Interp *plustin_getinterp(t_plustin *tin); +t_symbol *plustin_glistid(t_glist *gl); +t_plustin *plustin_glistfind(t_glist *gl, int mode); +t_plustin *plustin_glistprovide(t_glist *gl, int mode, int create); +t_symbol *plustin_getglistname(t_plustin *tin); + +t_plustob *plustob_create(t_plustype *tp, t_plustin *tin, Tcl_Obj *ob); +t_plustob *plustob_new(t_plustin *tin, Tcl_Obj *ob); +void plustob_setifshared(t_plustob *tob, t_plusifsharedfn ifsharedfn); +int plustob_isshared(t_plustob *tob); +Tcl_Obj *plustob_getvalue(t_plustob *tob); +t_plustin *plustag_tobtin(t_symbol *s, t_pd *caller); +Tcl_Obj *plustag_tobvalue(t_symbol *s, t_pd *caller); +Tcl_Obj *plusatom_tobvalue(t_atom *ap, t_pd *caller); +Tcl_Obj *plustob_set(t_plustob *tob, t_plustin *tin, Tcl_Obj *ob); +Tcl_Obj *plustob_setfloat(t_plustob *tob, t_float f); +Tcl_Obj *plustob_setsymbol(t_plustob *tob, t_symbol *s); +Tcl_Obj *plustob_setlist(t_plustob *tob, int ac, t_atom *av); +Tcl_Obj *plustob_setbinbuf(t_plustob *tob, t_binbuf *bb); +Tcl_Obj *plustob_grabresult(t_plustob *tob); +Tcl_Obj *plustob_evalob(t_plustob *tob, Tcl_Obj *ob); + +t_plusvar *plusvar_create(t_plustype *tp, t_plustin *tin, Tcl_Obj *ob, + char *name, char *index); +t_plusvar *plusvar_new(char *name, char *index, t_plustin *tin); +Tcl_Obj *plusvar_push(t_plusvar *var); +Tcl_Obj *plusvar_pull(t_plusvar *var); +Tcl_Obj *plusvar_set(t_plusvar *var, Tcl_Obj *ob, int doit); +Tcl_Obj *plusvar_setfloat(t_plusvar *var, t_float f, int doit); +Tcl_Obj *plusvar_setsymbol(t_plusvar *var, t_symbol *s, int doit); +Tcl_Obj *plusvar_setlist(t_plusvar *var, int ac, t_atom *av, int doit); + +void plustot_env_setup(void); +void plustot_in_setup(void); +void plustot_var_setup(void); +void plustot_out_setup(void); +void plustot_qlist_setup(void); +void plustot_print_setup(void); + +void *plustot_env_new(t_symbol *s, int ac, t_atom *av); +void *plustot_in_new(t_symbol *s, int ac, t_atom *av); +void *plustot_var_new(t_symbol *s, int ac, t_atom *av); +void *plustot_out_new(t_symbol *s, int ac, t_atom *av); +void *plustot_qlist_new(t_symbol *s, int ac, t_atom *av); +void *plustot_print_new(t_symbol *s, int ac, t_atom *av); + +#endif -- cgit v1.2.1