int C74_EXPORT main(void) { t_class *c; c = class_new("dummy", (method)dummy_new, (method)dummy_free, (long)sizeof(t_dummy), 0L /* leave NULL!! */, A_GIMME, 0); class_addmethod(c, (method)dummy_bang, "bang", 0); class_addmethod(c, (method)dummy_int, "int", A_LONG, 0); class_addmethod(c, (method)dummy_float, "float", A_FLOAT, 0); class_addmethod(c, (method)dummy_anything, "anything", A_GIMME, 0); class_addmethod(c, (method)dummy_identify, "identify", 0); CLASS_METHOD_ATTR_PARSE(c, "identify", "undocumented", gensym("long"), 0, "1"); // we want to 'reveal' the otherwise hidden 'xyzzy' method class_addmethod(c, (method)dummy_anything, "xyzzy", A_GIMME, 0); // here's an otherwise undocumented method, which does something that the user can't actually // do from the patcher however, we want them to know about it for some weird documentation reason. // so let's make it documentable. it won't appear in the quickref, because we can't send it from a message. class_addmethod(c, (method)dummy_acant, "blooop", A_CANT, 0); CLASS_METHOD_ATTR_PARSE(c, "blooop", "documentable", gensym("long"), 0, "1"); /* you CAN'T call this from the patcher */ class_addmethod(c, (method)dummy_assist, "assist", A_CANT, 0); class_addmethod(c, (method)dummy_dblclick, "dblclick", A_CANT, 0); CLASS_ATTR_SYM(c, "name", 0, t_dummy, name); class_register(CLASS_BOX, c); dummy_class = c; return 0; }
int C74_EXPORT main(void) { t_class *c; c = class_new("breakgen", (method)breakgen_new, (method)breakgen_free, (long)sizeof(t_breakgen), 0L /* leave NULL!! */, A_GIMME, 0); class_addmethod(c, (method)breakgen_bang, "bang", 0); class_addmethod(c, (method)breakgen_identify, "identify", 0); CLASS_METHOD_ATTR_PARSE(c, "identify", "undocumented", gensym("long"), 0, "1"); // here's an otherwise undocumented method, which does something that the user can't actually // do from the patcher however, we want them to know about it for some weird documentation reason. // so let's make it documentable. it won't appear in the quickref, because we can't send it from a message. class_addmethod(c, (method)breakgen_acant, "blooop", A_CANT, 0); CLASS_METHOD_ATTR_PARSE(c, "blooop", "documentable", gensym("long"), 0, "1"); class_addmethod(c, (method)breakgen_wavetype, "wavetype", A_LONG, 0); class_addmethod(c, (method)breakgen_setfreq, "freq", A_FLOAT, 0); class_addmethod(c, (method)breakgen_setconstsig, "constval", A_FLOAT, 0); class_addmethod(c, (method)breakgen_setsr, "sr", A_FLOAT, 0); class_addmethod(c, (method)breakgen_setter, "set", A_GIMME, 0); class_addmethod(c, (method)breakgen_writebuf, "writebuf", A_GIMME, 0); class_addmethod(c, (method)breakgen_writefile, "writefile", A_GIMME, 0); /* you CAN'T call this from the patcher */ class_addmethod(c, (method)breakgen_assist, "assist", A_CANT, 0); class_addmethod(c, (method)breakgen_dblclick, "dblclick", A_CANT, 0); class_addmethod(c, (method)breakgen_getrand, "getrand", A_CANT, 0); CLASS_ATTR_SYM(c, "name", 0, t_breakgen, name); class_register(CLASS_BOX, c); breakgen_class = c; buffy_modified = gensym("buffer_modified"); return 0; }