Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10234
Modified Files: Tag: devel_0_37 m_glob.c Log Message: added ";pd" methods: update-class-list update-class-info update-path help
Index: m_glob.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/m_glob.c,v retrieving revision 1.1.1.2.2.6 retrieving revision 1.1.1.2.2.7 diff -C2 -d -r1.1.1.2.2.6 -r1.1.1.2.2.7 *** m_glob.c 22 Feb 2004 17:36:51 -0000 1.1.1.2.2.6 --- m_glob.c 25 Oct 2004 15:21:32 -0000 1.1.1.2.2.7 *************** *** 60,63 **** --- 60,88 ---- }
+ /* see also canvas_done_popup */ + void glob_help(t_pd *bogus, t_symbol *s) { + char namebuf[MAXPDSTRING], *dir; + t_class *c = class_find(s); + if (!c) { post("HUH? no help because no class. (!)"); return; } + strcpy(namebuf, class_gethelpname(c)); + dir = class_gethelpdir(c); + if (strcmp(namebuf + strlen(namebuf) - 3, ".pd")) strcat(namebuf, ".pd"); + open_via_helppath(namebuf, dir); + } + + void glob_update_class_list (t_pd *self, t_symbol *callback) { + int i; + int n = pd_objectmaker->c_nmethod; + sys_gui("global class_list; set class_list {"); + for (i=0; i<n; i++) { + sys_vgui("%s ", pd_objectmaker->c_methods[i].me_name->s_name); + } + sys_gui("}\n"); + sys_vgui("%s\n",callback->s_name); + } + + EXTERN void glob_update_class_info (t_pd *bogus, t_symbol *s); + EXTERN void glob_update_path (void); + void glob_init(void) { *************** *** 101,104 **** --- 126,138 ---- class_addmethod(glob_pdobject, (t_method)glob_tooltips, gensym("tooltips"), A_DEFFLOAT, 0); + class_addmethod(glob_pdobject, (t_method)glob_update_class_list, + gensym("update-class-list"), A_SYMBOL, 0); + class_addmethod(glob_pdobject, (t_method)glob_update_class_info, + gensym("update-class-info"), A_SYMBOL, 0); + class_addmethod(glob_pdobject, (t_method)glob_update_path, + gensym("update-path"), 0); + class_addmethod(glob_pdobject, (t_method)glob_help, + gensym("help"), A_SYMBOL, 0); + #ifdef __linux__ class_addmethod(glob_pdobject, (t_method)glob_ping, gensym("ping"), 0);