Update of /cvsroot/pure-data/externals/tkwidgets/shared In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13308/tkwidgets/shared
Modified Files: tkwidgets.c tkwidgets.h Log Message:
- first working sketch of having a shared dylib for a libdir, I moved query_options() to the dylib, and it works! :D (on Mac OS X, at least)
- minor cleanups in text.c
- first test of saving options to the file, it writes data, but there are bugs
Index: tkwidgets.c =================================================================== RCS file: /cvsroot/pure-data/externals/tkwidgets/shared/tkwidgets.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** tkwidgets.c 14 Nov 2007 03:51:35 -0000 1.2 --- tkwidgets.c 15 Nov 2007 17:27:03 -0000 1.3 *************** *** 33,36 **** --- 33,45 ---- }
+ + void query_options(t_symbol *receive_name, char *widget_id, int argc, char** argv) + { + int i; + for(i = 0; i < argc; i++) + sys_vgui("pd [concat %s query_callback %s [%s cget -%s] \;]\n", + receive_name->s_name, argv[i], widget_id, argv[i]); + } + /* I think I'll probably have to follow Krzsztof and make structs to make this work
Index: tkwidgets.h =================================================================== RCS file: /cvsroot/pure-data/externals/tkwidgets/shared/tkwidgets.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** tkwidgets.h 14 Nov 2007 03:51:35 -0000 1.2 --- tkwidgets.h 15 Nov 2007 17:27:03 -0000 1.3 *************** *** 38,41 **** --- 38,58 ---- #define TKW_HANDLE_INSET -2
+ /* sketch for a common struct */ + typedef struct _tkwidgets + { + t_symbol *canvas_id; /* the canvas that is showing this widget */ + t_symbol *receive_name; /* name to bind to, to receive callbacks */ + t_symbol *window_id; /* the window that contains the widget */ + t_symbol *widget_id; /* the core widget */ + t_symbol *all_tag; /* the tag for moving/deleting everything */ + int resizing; /* flag to tell when being resized */ + int selected; /* flag for when widget is selected */ + } t_tkwidgets; + + + + /* query a tk widget for the state of all its options */ + void query_options(t_symbol *receive_name, char *widget_id, int argc, char** argv); +
/* this should be part of the Pd API */