From 6adfba996c34b2c78515e8a50ad5928188d78612 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?IOhannes=20m=20zm=C3=B6lnig?= Date: Thu, 7 Feb 2008 23:05:57 +0000 Subject: reorganizing svn path=/trunk/; revision=9376 --- extensions/xgui/xgui-lib/a2s.c | 66 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 extensions/xgui/xgui-lib/a2s.c (limited to 'extensions/xgui/xgui-lib/a2s.c') diff --git a/extensions/xgui/xgui-lib/a2s.c b/extensions/xgui/xgui-lib/a2s.c new file mode 100644 index 00000000..55a9bc47 --- /dev/null +++ b/extensions/xgui/xgui-lib/a2s.c @@ -0,0 +1,66 @@ +/* Copyright (c) 2002 Damien HENRY. +* For information on usage and redistribution, and for a DISCLAIMER OF ALL +* WARRANTIES, see the file, "LICENSE.txt," in this distribution. */ + +/* code for a2s pd class */ + +#include "m_pd.h" +#include + +typedef struct s_pd_obj_a2s +{ + t_object x_obj; +} t_pd_obj_a2s; + + +void a2s_help(t_pd_obj_a2s *x) +{ + post(" "); + post("a2s v001"); + post("+ selector list :"); + post("++ help : this help !!!"); + post("++ symbol : will return the canvas & the obj"); + post(" "); +} + +void a2s_list(t_pd_obj_a2s *x, t_symbol *s, int argc, t_atom *argv) +{ + char buffer[MAXPDSTRING] ; + char *a_string ; + int a_string_l ; + t_binbuf *bbuf ; + int i,l=0,k=0 ; + + bbuf = binbuf_new() ; + for (i=0;ix_obj.ob_outlet,gensym(&buffer[0])); + binbuf_free(bbuf); +} + +void a2s_free(void) { } + +t_class *a2s_class; + +void *a2s_new(void) +{ + t_pd_obj_a2s *x = (t_pd_obj_a2s *)pd_new(a2s_class); + outlet_new(&x->x_obj, &s_float); + return (void *)x; +} + +void a2s_setup(void) +{ + a2s_class = class_new(gensym("a2s"), (t_newmethod)a2s_new,(t_method)a2s_free, sizeof( t_pd_obj_a2s), 0,A_DEFSYMBOL, 0); + class_addlist(a2s_class, (t_method)a2s_list); + class_addmethod(a2s_class, (t_method)a2s_help, gensym("help"), 0); + class_sethelpsymbol(a2s_class, gensym("xgui/help_a2s")); +} -- cgit v1.2.1