int main (void) { this_class = class_new("ircropfade~", (method) ircropfade_new, (method)ircropfade_free, sizeof(t_ircropfade), 0L, 0); class_addmethod(this_class, (method)ircropfade_process, "process", A_GIMME, 0L); class_addmethod(this_class, (method)ircropfade_assist, "assist", A_CANT, 0L); CLASS_STICKY_ATTR(this_class, "category", 0L, "Buffer"); CLASS_ATTR_ATOM_LONG(this_class, "writechan", 0L, t_ircropfade, write_chan); CLASS_ATTR_FILTER_MIN(this_class, "writechan", 1); CLASS_ATTR_LABEL(this_class,"writechan", 0L, "Buffer Write Channel"); CLASS_ATTR_ATOM_LONG(this_class, "resize", 0L, t_ircropfade, resize); CLASS_ATTR_STYLE_LABEL(this_class,"resize", 0L, "onoff","Buffer Resize"); CLASS_ATTR_ATOM_LONG(this_class, "readchan", 0, t_ircropfade, read_chan); CLASS_ATTR_FILTER_MIN(this_class, "readchan", 1); CLASS_ATTR_LABEL(this_class,"readchan", 0, "Buffer Read Channel"); CLASS_STICKY_ATTR_CLEAR(this_class, "category"); class_register(CLASS_BOX, this_class); buffer_access_init(); return 0; }
int C74_EXPORT main(void) { t_class *c; c = class_new("hoa.2d.vector~", (method)hoa_vector_new, (method)hoa_vector_free, (long)sizeof(t_hoa_vector), 0L, A_GIMME, 0); class_alias(c, gensym("hoa.vector~")); hoa_initclass(c, (method)hoa_getinfos); class_addmethod(c, (method)hoa_vector_dsp64, "dsp64", A_CANT, 0); class_addmethod(c, (method)hoa_vector_assist, "assist", A_CANT, 0); CLASS_ATTR_LONG (c, "channels", 0, t_hoa_vector, f_attrs); CLASS_ATTR_CATEGORY (c, "channels", 0, "Planewaves"); CLASS_ATTR_LABEL (c, "channels", 0, "Number of Channels"); CLASS_ATTR_ACCESSORS (c, "channels", channels_get, channels_set); CLASS_ATTR_ORDER (c, "channels", 0, "1"); CLASS_ATTR_DEFAULT (c, "channels", 0, "4"); CLASS_ATTR_SAVE (c, "channels", 0); CLASS_ATTR_FLOAT_VARSIZE (c, "angles", 0, t_hoa_vector, f_attrs, f_attrs, MAX_CHANNELS); CLASS_ATTR_CATEGORY (c, "angles", 0, "Planewaves"); CLASS_ATTR_LABEL (c, "angles", 0, "Angles of Channels"); CLASS_ATTR_ACCESSORS (c, "angles", angles_get, angles_set); CLASS_ATTR_ORDER (c, "angles", 0, "2"); CLASS_ATTR_SAVE (c, "angles", 0); CLASS_ATTR_DEFAULT (c, "angles", 0, "0. 90. 180. 270."); class_dspinit(c); class_register(CLASS_BOX, c); hoa_vector_class = c; return 0; }
int C74_EXPORT main(void) { t_class* c; c = class_new("hoa.in~", (method)hoa_sig_in_new, (method)hoa_sig_in_free, sizeof(t_hoa_sig_in), NULL, A_GIMME, 0); hoa_initclass(c, NULL); class_addmethod(c, (method)hoa_sig_in_dsp64, "dsp64", A_CANT, 0); class_addmethod(c, (method)hoa_sig_in_assist, "assist", A_CANT, 0); class_addmethod(c, (method)hoa_sig_in_int, "int", A_LONG, 0); CLASS_ATTR_LONG (c, "extra", 0, t_hoa_sig_in, extra); CLASS_ATTR_ACCESSORS(c, "extra", 0, hoa_sig_in_setattr_extra); CLASS_ATTR_LABEL (c, "extra", 0, "param index"); CLASS_ATTR_SYM (c, "comment", 0, t_hoa_sig_in, comment); CLASS_ATTR_ACCESSORS(c, "comment", 0, hoa_sig_in_setattr_comment); CLASS_ATTR_LABEL (c, "comment", 0, "Description"); CLASS_ATTR_SAVE (c, "comment", 1); class_dspinit(c); class_register(CLASS_BOX, c); hoa_sig_in_class = c; return 0; }
void ext_main(void *r) #endif { t_class* c; c = class_new("hoa.in", (method)hoa_in_new, (method)hoa_in_free, sizeof(t_hoa_in), NULL, A_GIMME, 0); class_setname((char *)"hoa.in", (char *)"hoa.in"); hoa_initclass(c, (method)NULL); class_addmethod(c, (method)hoa_in_assist, "assist", A_CANT, 0); class_addmethod(c, (method)hoa_in_bang, "bang", A_CANT, 0); class_addmethod(c, (method)hoa_in_int, "int", A_CANT, 0); class_addmethod(c, (method)hoa_in_float, "float", A_CANT, 0); class_addmethod(c, (method)hoa_in_list, "list", A_CANT, 0); class_addmethod(c, (method)hoa_in_anything, "anything", A_CANT, 0); CLASS_ATTR_LONG (c, "extra", 0, t_hoa_in, extra); CLASS_ATTR_ACCESSORS(c, "extra", 0, hoa_in_setattr_extra); CLASS_ATTR_LABEL (c, "extra", 0, "extra index"); CLASS_ATTR_INVISIBLE(c, "extra", 1); CLASS_ATTR_SAVE (c, "extra", 0); // @description Defines an extra inlet. Extra inlet are added to the "normal" instance inlet and can be used to send messages to all instances. CLASS_ATTR_SYM (c, "comment", 0, t_hoa_in, comment); CLASS_ATTR_ACCESSORS(c, "comment", 0, hoa_in_setattr_comment); CLASS_ATTR_LABEL (c, "comment", 0, "Description"); CLASS_ATTR_SAVE (c, "comment", 1); // @description Sets a description to the inlet which will be shown in the assist inlet of the <o>hoa.process~</o> that load this <o>hoa.in</o>. // Only works if the <m>extra</m> parameter is greater than 0. class_register(CLASS_BOX, c); hoa_in_class = c; }
void ext_main(void *r) { t_class *c; c = class_new("smoov", (method)smoov_new, (method)smoov_free, sizeof(t_smoov), 0L, A_GIMME, 0); // class_new() loads our external's class into Max's memory so it can be used in a patch class_addmethod(c, (method)smoov_bang, "bang", 0); // the method it uses when it gets a bang in the left inlet class_addmethod(c, (method)smoov_set, "set", A_GIMME, 0); // the method to set and int or a float in the left inlet (inlet 0) class_addmethod(c, (method)smoov_int, "int", A_LONG, 0); // the method for an int in the left inlet (inlet 0) class_addmethod(c, (method)smoov_list, "list", A_GIMME, 0); // the method for a list in the left inlet (inlet 0) class_addmethod(c, (method)smoov_float, "float", A_FLOAT, 0); // the method for a float in the left inlet (inlet 0) class_addmethod(c, (method)smoov_assist, "assist", A_CANT, 0); // (optional) assistance method needs to be declared like this CLASS_ATTR_CHAR(c, "active", 0, t_smoov, s_active); CLASS_ATTR_ORDER(c, "active", 0, "1"); CLASS_ATTR_STYLE_LABEL(c, "active", 0, "onoff", "Toggle smoothing"); CLASS_ATTR_DOUBLE(c, "smooth", 0, t_smoov, s_smooth); CLASS_ATTR_LABEL(c, "smooth", 0, "Smoothing value"); CLASS_ATTR_ORDER(c, "smooth", 0, "2"); CLASS_ATTR_FILTER_CLIP(c, "smooth", 0., 1.); CLASS_ATTR_CHAR(c, "force_output", 0, t_smoov, s_force_output); CLASS_ATTR_ORDER(c, "force_output", 0, "3"); CLASS_ATTR_ENUMINDEX3(c, "force_output",0,"as input","int output","float output"); CLASS_ATTR_LABEL(c, "force_output", 0, "Fore output style"); class_register(CLASS_BOX, c); smoov_class = c; }
int C74_EXPORT main(void) #endif { t_class* c; c = class_new("hoa.out~", (method) hoa_sig_out_new, (method)hoa_sig_out_free, sizeof(t_hoa_sig_out), NULL, A_GIMME, 0); class_setname((char *)"hoa.out~", (char *)"hoa.out~"); hoa_initclass(c, (method)NULL); // @method signal @digest output signal in the corresponding hoa.process~ object's signal outlet // @description output signal in the corresponding hoa.process~ object's signal outlet class_addmethod(c, (method)hoa_sig_out_dsp64, "dsp64", A_CANT, 0); class_addmethod(c, (method)hoa_sig_out_assist, "assist", A_CANT, 0); CLASS_ATTR_LONG (c, "extra", 0, t_hoa_sig_out, extra); CLASS_ATTR_ACCESSORS(c, "extra", 0, hoa_sig_in_setattr_extra); CLASS_ATTR_LABEL (c, "extra", 0, "extra index"); // @description Defines an extra outlet. Extra outlet are added to the "normal" instance outlet and can be used to receive signal from all instances. CLASS_ATTR_SYM (c, "comment", 0, t_hoa_sig_out, comment); CLASS_ATTR_ACCESSORS(c, "comment", 0, hoa_sig_in_setattr_comment); CLASS_ATTR_LABEL (c, "comment", 0, "Description"); CLASS_ATTR_SAVE (c, "comment", 1); // @description Sets a description to the outlet which will be shown in the assist outlet of the <o>hoa.process~</o> that load this <o>hoa.out~</o>. // Only works if the <m>extra</m> parameter is greater than 0. class_dspinit(c); class_register(CLASS_BOX, c); hoa_sig_out_class = c; return 0; }
extern "C" void setup_c0x2eblackboard(void) { t_eclass *c; c = eclass_new("c.blackboard", (method)blackboard_new, (method)blackboard_free, (short)sizeof(t_blackboard), 0L, A_GIMME, 0); eclass_guiinit(c, 0); eclass_addmethod(c, (method) blackboard_paint, "paint", A_NULL, 0); eclass_addmethod(c, (method) blackboard_notify, "notify", A_NULL, 0); eclass_addmethod(c, (method) blackboard_getdrawparams, "getdrawparams", A_NULL, 0); eclass_addmethod(c, (method) blackboard_oksize, "oksize", A_NULL, 0); eclass_addmethod(c, (method) blackboard_width, "width", A_FLOAT,0); eclass_addmethod(c, (method) blackboard_color, "color", A_GIMME,0); eclass_addmethod(c, (method) blackboard_fill, "fill", A_FLOAT,0); eclass_addmethod(c, (method) blackboard_line, "line", A_GIMME,0); eclass_addmethod(c, (method) blackboard_path, "path", A_GIMME,0); eclass_addmethod(c, (method) blackboard_rect, "rect", A_GIMME,0); eclass_addmethod(c, (method) blackboard_oval, "oval", A_GIMME,0); eclass_addmethod(c, (method) blackboard_arc, "arc", A_GIMME,0); eclass_addmethod(c, (method) blackboard_image, "image", A_GIMME,0); eclass_addmethod(c, (method) blackboard_text, "text", A_GIMME,0); eclass_addmethod(c, (method) blackboard_clear, "clear", A_NULL, 0); eclass_addmethod(c, (method) blackboard_reset, "reset", A_NULL, 0); eclass_addmethod(c, (method) blackboard_mousemove, "mousemove", A_NULL, 0); eclass_addmethod(c, (method) blackboard_mousedrag, "mousedrag", A_NULL, 0); eclass_addmethod(c, (method) blackboard_mousedown, "mousedown", A_NULL, 0); eclass_addmethod(c, (method) blackboard_mouseup, "mouseup", A_NULL, 0); CLASS_ATTR_DEFAULT (c, "size", 0, "200 200"); CLASS_ATTR_INVISIBLE (c, "send", 1); CLASS_ATTR_LONG (c, "chalkmode", 0, t_blackboard, f_pen_mode); CLASS_ATTR_LABEL (c, "chalkmode", 0, "Chalk Mode"); CLASS_ATTR_FILTER_CLIP (c, "chalkmode", 0, 1); CLASS_ATTR_ORDER (c, "chalkmode", 0, "1"); CLASS_ATTR_DEFAULT (c, "chalkmode", 0, "1"); CLASS_ATTR_SAVE (c, "chalkmode", 0); CLASS_ATTR_STYLE (c, "chalkmode", 0, "onoff"); CLASS_ATTR_RGBA (c, "bgcolor", 0, t_blackboard, f_color_background); CLASS_ATTR_LABEL (c, "bgcolor", 0, "Background Color"); CLASS_ATTR_ORDER (c, "bgcolor", 0, "1"); CLASS_ATTR_DEFAULT_SAVE_PAINT (c, "bgcolor", 0, "0.75 0.75 0.75 1."); CLASS_ATTR_STYLE (c, "bgcolor", 0, "color"); CLASS_ATTR_RGBA (c, "bdcolor", 0, t_blackboard, f_color_border); CLASS_ATTR_LABEL (c, "bdcolor", 0, "Border Color"); CLASS_ATTR_ORDER (c, "bdcolor", 0, "2"); CLASS_ATTR_DEFAULT_SAVE_PAINT (c, "bdcolor", 0, "0.5 0.5 0.5 1."); CLASS_ATTR_STYLE (c, "bdcolor", 0, "color"); eclass_register(CLASS_BOX, c); blackboard_class = c; }
int C74_EXPORT main(void) { t_class *c = class_new("j.meter~", (method)meter_new, (method)meter_free, sizeof(t_meter), (method)NULL, A_GIMME, 0L); c->c_flags |= CLASS_FLAG_NEWDICTIONARY; // use dictionary constructor jbox_initclass(c, 0); class_dspinitjbox(c); // jamoma_init(); common_symbols_init(); class_addmethod(c, (method)meter_bang, "bang", 0); class_addmethod(c, (method)meter_int, "int", A_LONG, 0); class_addmethod(c, (method)meter_float, "float", A_FLOAT, 0); class_addmethod(c, (method)meter_set, "set", A_FLOAT, 0); class_addmethod(c, (method)meter_dsp, "dsp", A_CANT, 0); class_addmethod(c, (method)meter_dsp64, "dsp64", A_CANT, 0); class_addmethod(c, (method)meter_paint, "paint", A_CANT, 0); class_addmethod(c, (method)meter_oksize, "oksize", A_CANT, 0); class_addmethod(c, (method)meter_bang, "mousedown", A_CANT, 0); class_addmethod(c, (method)meter_notify, "notify", A_CANT, 0); class_addmethod(c, (method)meter_assist, "assist", A_CANT, 0); // CLASS_ATTR_FLOAT(c, "interval", 0, t_meter, attrInterval); // CLASS_ATTR_FILTER_CLIP(c, "interval", kPollIntervalMinimum, kPollIntervalMaximum); // CLASS_ATTR_DEFAULT_SAVE(c, "interval", 0, "150"); // CLASS_ATTR_LABEL(c, "interval", 0, "Refresh Interval in Milliseconds"); // CLASS_ATTR_RGBA(c, "bordercolor", 0, t_meter, attrBorderColor); // CLASS_ATTR_STYLE_LABEL(c, "bordercolor", 0, "rgba", "Border Color"); // CLASS_ATTR_DEFAULT_SAVE_PAINT(c, "bordercolor", 0, "0.2 0.2 0.2 1."); CLASS_ATTR_LONG(c, "orientation", 0, t_meter, attrOrientation); CLASS_ATTR_LABEL(c, "orientation", 0, "Orientation"); CLASS_ATTR_CATEGORY(c, "orientation", 0,"Appearance"); CLASS_ATTR_ENUMINDEX(c, "orientation", 0, "Automatic Horizontal Vertical"); CLASS_ATTR_DEFAULT_SAVE_PAINT(c, "orientation", 0,"0"); CLASS_ATTR_RGBA(c, "bgcolor", 0, t_meter, attrBgColor); CLASS_ATTR_DEFAULTNAME_SAVE_PAINT(c, "bgcolor", 0, "0.1 0.1 0.1 1.0"); CLASS_ATTR_STYLE(c, "bgcolor", 0, "rgba"); CLASS_ATTR_LABEL(c, "bgcolor", 0, "Background Color"); CLASS_ATTR_LONG(c, "defeat", 0, t_meter, attrDefeat); CLASS_ATTR_LABEL(c, "defeat", 0, "defeat"); CLASS_ATTR_DEFAULT(c, "defeat", 0, "0"); CLASS_ATTR_SAVE(c, "defeat", 0); CLASS_ATTR_STYLE(c, "defeat", 0, "onoff"); CLASS_ATTR_CATEGORY(c, "defeat", 0,"Behavior"); CLASS_ATTR_DEFAULT(c, "patching_rect", 0, "0. 0. 100. 12."); CLASS_ATTR_MIN(c, "patching_size", 0, "1. 1."); // CLASS_ATTR_DEFAULT_SAVE_PAINT(c, "bgcolor", 0, "0.1 0.1 0.1 1.0"); class_register(CLASS_BOX, c); s_meter_class = c; return 0; }
extern "C" void setup_c0x2eincdec(void) { t_eclass *c; c = eclass_new("c.incdec", (method)incdec_new, (method)incdec_free, (short)sizeof(t_incdec), 0L, A_GIMME, 0); eclass_init(c, 0); eclass_addmethod(c, (method) incdec_assist, "assist", A_CANT, 0); eclass_addmethod(c, (method) incdec_paint, "paint", A_CANT, 0); eclass_addmethod(c, (method) incdec_notify, "notify", A_CANT, 0); eclass_addmethod(c, (method) incdec_getdrawparams, "getdrawparams", A_CANT, 0); eclass_addmethod(c, (method) incdec_oksize, "oksize", A_CANT, 0); eclass_addmethod(c, (method) incdec_set, "set", A_FLOAT,0); eclass_addmethod(c, (method) incdec_float, "float", A_FLOAT,0); eclass_addmethod(c, (method) incdec_output, "bang", A_CANT, 0); eclass_addmethod(c, (method) incdec_inc, "inc", A_CANT, 0); eclass_addmethod(c, (method) incdec_dec, "dec", A_CANT, 0); eclass_addmethod(c, (method) incdec_mousedown, "mousedown", A_CANT, 0); eclass_addmethod(c, (method) incdec_mouseup, "mouseup", A_CANT, 0); CLASS_ATTR_INVISIBLE (c, "fontname", 1); CLASS_ATTR_INVISIBLE (c, "fontweight", 1); CLASS_ATTR_INVISIBLE (c, "fontslant", 1); CLASS_ATTR_INVISIBLE (c, "fontsize", 1); CLASS_ATTR_INVISIBLE (c, "send", 1); CLASS_ATTR_DEFAULT (c, "size", 0, "13 20"); CLASS_ATTR_FLOAT (c, "step", 0, t_incdec, f_increment); CLASS_ATTR_LABEL (c, "step", 0, "Step increment"); CLASS_ATTR_FILTER_MIN (c, "step", 0.); CLASS_ATTR_ORDER (c, "step", 0, "1"); CLASS_ATTR_DEFAULT_SAVE_PAINT (c, "step", 0, "1."); CLASS_ATTR_STYLE (c, "step", 0, "number"); CLASS_ATTR_STEP (c, "step", 0.1); CLASS_ATTR_RGBA (c, "bgcolor", 0, t_incdec, f_color_background); CLASS_ATTR_LABEL (c, "bgcolor", 0, "Background Color"); CLASS_ATTR_ORDER (c, "bgcolor", 0, "1"); CLASS_ATTR_DEFAULT_SAVE_PAINT (c, "bgcolor", 0, "0.75 0.75 0.75 1."); CLASS_ATTR_STYLE (c, "bgcolor", 0, "color"); CLASS_ATTR_RGBA (c, "bdcolor", 0, t_incdec, f_color_border); CLASS_ATTR_LABEL (c, "bdcolor", 0, "Border Color"); CLASS_ATTR_ORDER (c, "bdcolor", 0, "2"); CLASS_ATTR_DEFAULT_SAVE_PAINT (c, "bdcolor", 0, "0.5 0.5 0.5 1."); CLASS_ATTR_STYLE (c, "bdcolor", 0, "color"); CLASS_ATTR_RGBA (c, "arcolor", 0, t_incdec, f_color_arrow); CLASS_ATTR_LABEL (c, "arcolor", 0, "Arrow Color"); CLASS_ATTR_ORDER (c, "arcolor", 0, "3"); CLASS_ATTR_DEFAULT_SAVE_PAINT (c, "arcolor", 0, "0. 0. 0. 1."); CLASS_ATTR_STYLE (c, "arcolor", 0, "color"); eclass_register(CLASS_BOX, c); cicm_post(); incdec_class = c; }
extern "C" void setup_c0x2ematrix(void) { t_eclass *c; c = eclass_new("c.matrix", (method)matrixctrl_new, (method)matrixctrl_free, (short)sizeof(t_matrixctrl), 0L, A_GIMME, 0); eclass_guiinit(c, 0); eclass_addmethod(c, (method) matrixctrl_assist, "assist", A_NULL, 0); eclass_addmethod(c, (method) matrixctrl_paint, "paint", A_NULL, 0); eclass_addmethod(c, (method) matrixctrl_notify, "notify", A_NULL, 0); eclass_addmethod(c, (method) matrixctrl_getdrawparams, "getdrawparams", A_NULL, 0); eclass_addmethod(c, (method) matrixctrl_oksize, "oksize", A_NULL, 0); eclass_addmethod(c, (method) matrixctrl_set, "set", A_GIMME,0); eclass_addmethod(c, (method) matrixctrl_list, "list", A_GIMME,0); eclass_addmethod(c, (method) matrixctrl_bang, "bang", A_NULL, 0); eclass_addmethod(c, (method) matrixctrl_clear, "clear", A_NULL, 0); eclass_addmethod(c, (method) matrixctrl_getrow, "getrow", A_FLOAT,0); eclass_addmethod(c, (method) matrixctrl_getcolumn, "getcolumn", A_FLOAT,0); eclass_addmethod(c, (method) matrixctrl_mousedown, "mousedown", A_NULL, 0); eclass_addmethod(c, (method) matrixctrl_mousedrag, "mousedrag", A_NULL, 0); eclass_addmethod(c, (method) matrixctrl_mouseleave, "mouseleave", A_NULL, 0); eclass_addmethod(c, (method) matrixctrl_preset, "preset", A_NULL, 0); CLASS_ATTR_INVISIBLE (c, "fontname", 1); CLASS_ATTR_INVISIBLE (c, "fontweight", 1); CLASS_ATTR_INVISIBLE (c, "fontslant", 1); CLASS_ATTR_INVISIBLE (c, "fontsize", 1); CLASS_ATTR_DEFAULT (c, "size", 0, "105 53"); CLASS_ATTR_FLOAT_ARRAY (c, "matrix", 0, t_matrixctrl, f_size, 2); CLASS_ATTR_LABEL (c, "matrix", 0, "Matrix Size"); CLASS_ATTR_ACCESSORS (c, "matrix", NULL, matrixctrl_matrix_set); CLASS_ATTR_ORDER (c, "matrix", 0, "1"); CLASS_ATTR_DEFAULT (c, "matrix", 0, "8 4"); CLASS_ATTR_SAVE (c, "matrix", 0); CLASS_ATTR_RGBA (c, "bgcolor", 0, t_matrixctrl, f_color_background); CLASS_ATTR_LABEL (c, "bgcolor", 0, "Background Color"); CLASS_ATTR_ORDER (c, "bgcolor", 0, "1"); CLASS_ATTR_DEFAULT_SAVE_PAINT (c, "bgcolor", 0, "0.75 0.75 0.75 1."); CLASS_ATTR_STYLE (c, "bgcolor", 0, "color"); CLASS_ATTR_RGBA (c, "bdcolor", 0, t_matrixctrl, f_color_border); CLASS_ATTR_LABEL (c, "bdcolor", 0, "Border Color"); CLASS_ATTR_ORDER (c, "bdcolor", 0, "2"); CLASS_ATTR_DEFAULT_SAVE_PAINT (c, "bdcolor", 0, "0.5 0.5 0.5 1."); CLASS_ATTR_STYLE (c, "bdcolor", 0, "color"); CLASS_ATTR_RGBA (c, "accolor", 0, t_matrixctrl, f_color_on); CLASS_ATTR_LABEL (c, "accolor", 0, "Active Cell Color"); CLASS_ATTR_ORDER (c, "accolor", 0, "3"); CLASS_ATTR_DEFAULT_SAVE_PAINT (c, "accolor", 0, "0.5 0.5 0.5 1."); CLASS_ATTR_STYLE (c, "accolor", 0, "color"); eclass_register(CLASS_BOX, c); matrixctrl_class = c; }
extern "C" void setup_c0x2enumber_tilde(void) { t_eclass *c; c = eclass_new("c.number~", (method)number_tilde_new, (method)number_tilde_free, (short)sizeof(t_number_tilde), 0L, A_GIMME, 0); eclass_dspinit(c); eclass_init(c, 0); cream_initclass(c); eclass_addmethod(c, (method) number_tilde_dsp, "dsp", A_NULL, 0); eclass_addmethod(c, (method) number_tilde_assist, "assist", A_NULL, 0); eclass_addmethod(c, (method) number_tilde_paint, "paint", A_NULL, 0); eclass_addmethod(c, (method) number_tilde_notify, "notify", A_NULL, 0); eclass_addmethod(c, (method) number_tilde_getdrawparams, "getdrawparams", A_NULL, 0); eclass_addmethod(c, (method) number_tilde_oksize, "oksize", A_NULL, 0); eclass_addmethod(c, (method) number_tilde_output, "bang", A_NULL, 0); CLASS_ATTR_DEFAULT (c, "size", 0, "53 13"); CLASS_ATTR_LONG (c, "interval", 0, t_number_tilde, f_interval); CLASS_ATTR_ORDER (c, "interval", 0, "2"); CLASS_ATTR_LABEL (c, "interval", 0, "Refresh Interval in Milliseconds"); CLASS_ATTR_FILTER_MIN (c, "interval", 20); CLASS_ATTR_DEFAULT (c, "interval", 0, "50"); CLASS_ATTR_SAVE (c, "interval", 1); CLASS_ATTR_STYLE (c, "interval", 0, "number"); CLASS_ATTR_LONG (c, "decimal", 0, t_number_tilde, f_ndecimal); CLASS_ATTR_ORDER (c, "decimal", 0, "3"); CLASS_ATTR_LABEL (c, "decimal", 0, "Number of decimal"); CLASS_ATTR_DEFAULT (c, "decimal", 0, "6"); CLASS_ATTR_FILTER_MIN (c, "decimal", 0); CLASS_ATTR_FILTER_MAX (c, "decimal", 6); CLASS_ATTR_SAVE (c, "decimal", 1); CLASS_ATTR_STYLE (c, "decimal", 0, "number"); CLASS_ATTR_RGBA (c, "bgcolor", 0, t_number_tilde, f_color_background); CLASS_ATTR_LABEL (c, "bgcolor", 0, "Background Color"); CLASS_ATTR_ORDER (c, "bgcolor", 0, "1"); CLASS_ATTR_DEFAULT_SAVE_PAINT (c, "bgcolor", 0, "0.75 0.75 0.75 1."); CLASS_ATTR_STYLE (c, "bgcolor", 0, "color"); CLASS_ATTR_RGBA (c, "bdcolor", 0, t_number_tilde, f_color_border); CLASS_ATTR_LABEL (c, "bdcolor", 0, "Border Color"); CLASS_ATTR_ORDER (c, "bdcolor", 0, "2"); CLASS_ATTR_DEFAULT_SAVE_PAINT (c, "bdcolor", 0, "0.5 0.5 0.5 1."); CLASS_ATTR_STYLE (c, "bdcolor", 0, "color"); CLASS_ATTR_RGBA (c, "textcolor", 0, t_number_tilde, f_color_text); CLASS_ATTR_LABEL (c, "textcolor", 0, "Text Color"); CLASS_ATTR_ORDER (c, "textcolor", 0, "3"); CLASS_ATTR_DEFAULT_SAVE_PAINT (c, "textcolor", 0, "0. 0. 0. 1."); CLASS_ATTR_STYLE (c, "textcolor", 0, "color"); eclass_register(CLASS_BOX, c); number_tilde_class = c; }
int JAMOMA_EXPORT_MAXOBJ main(void) { t_class *c; t_object *attr = NULL; long numDataspaces = 0; SymbolPtr* dataspaceNames = NULL; char dataspaces[2048]; short i; jamoma_init(); common_symbols_init(); jamoma_getDataspaceList(&numDataspaces, &dataspaceNames); dataspaces[0] = 0; for (i=0; i<numDataspaces; i++) { strcat(dataspaces, dataspaceNames[i]->s_name); strcat(dataspaces, " "); } // Define our class c = class_new("jcom.return",(method)return_new, (method)return_free, sizeof(t_return), (method)0L, A_GIMME, 0); // Make methods accessible for our class: class_addmethod(c, (method)return_bang, "bang", A_CANT, 0L); class_addmethod(c, (method)return_int, "int", A_DEFLONG, 0L); class_addmethod(c, (method)return_float, "float", A_DEFFLOAT, 0L); class_addmethod(c, (method)return_list, "list", A_GIMME, 0L); class_addmethod(c, (method)return_symbol, "anything", A_GIMME, 0L); class_addmethod(c, (method)return_dump, "dump", 0L); class_addmethod(c, (method)return_updatename, "update_name", A_CANT, 0L); class_addmethod(c, (method)return_assist, "assist", A_CANT, 0L); jcom_core_subscriber_classinit_extended(c, attr); // ATTRIBUTE: type - options are generic, integer, decimal, string, boolean jamoma_class_attr_new(c, "type", _sym_symbol, (method)return_attr_settype, (method)return_attr_gettype); // ATTRIBUTES: dataspace stuff CLASS_ATTR_SYM(c, "dataspace", 0, t_return, attrDataspace); CLASS_ATTR_LABEL(c, "dataspace", 0, "dataspace"); CLASS_ATTR_ENUM(c, "dataspace", 0, dataspaces); CLASS_ATTR_SYM(c, "dataspace/unit/native", 0, t_return, attrUnitNative); CLASS_ATTR_LABEL(c, "dataspace/unit/native", 0, "dataspace/unit/native"); CLASS_ATTR_CHAR(c, "enable", 0, t_return, attrEnable); CLASS_ATTR_STYLE(c, "enable", 0, "onoff"); // Finalize our class class_register(CLASS_BOX, c); return_class = c; return 0; }
t_jit_err jit_fluoride_init(void) { long attrflags=0; t_jit_object *attr, *mop; _jit_fluoride_class = jit_class_new("jit_fluoride",(method)jit_fluoride_new,(method)jit_fluoride_free, sizeof(t_jit_fluoride),0L); //add mop mop = jit_object_new(_jit_sym_jit_mop,1,1); //#inputs,#outputs jit_mop_single_type(mop,_jit_sym_char); jit_mop_single_planecount(mop,4); jit_class_addadornment(_jit_fluoride_class,mop); //add methods jit_class_addmethod(_jit_fluoride_class, (method)jit_fluoride_matrix_calc, "matrix_calc", A_CANT, 0L); //add attributes attrflags = JIT_ATTR_GET_DEFER_LOW | JIT_ATTR_SET_USURP_LOW; CLASS_STICKY_CATEGORY(_jit_fluoride_class,0,"Behavior"); CLASS_STICKY_ATTR(_jit_fluoride_class,"basic",0,"1"); // glow -- sets color for neon effect attr = jit_object_new(_jit_sym_jit_attr_offset_array, "glow", _jit_sym_float64, 3, attrflags, (method)0L, (method)0L, calcoffset(t_jit_fluoride, glowcount), calcoffset(t_jit_fluoride,glow)); jit_class_addattr(_jit_fluoride_class,attr); CLASS_ATTR_STYLE_LABEL(_jit_fluoride_class,"glow",0,"rgb","Glow Color"); // lum -- moves center luminosity attr = jit_object_new(_jit_sym_jit_attr_offset,"lum",_jit_sym_float64,attrflags, (method)0L,(method)0L,calcoffset(t_jit_fluoride,lum)); jit_class_addattr(_jit_fluoride_class,attr); CLASS_ATTR_LABEL(_jit_fluoride_class,"lum",0,"Luminosity"); // tol -- width of neon tolerance attr = jit_object_new(_jit_sym_jit_attr_offset,"tol",_jit_sym_float64,attrflags, (method)0L,(method)0L,calcoffset(t_jit_fluoride,tol)); jit_class_addattr(_jit_fluoride_class,attr); CLASS_ATTR_LABEL(_jit_fluoride_class,"tol",0,"Tolerance"); // mode -- b/w (0) or color (1) attr = jit_object_new(_jit_sym_jit_attr_offset,"mode",_jit_sym_long,attrflags, (method)0L,(method)0L,calcoffset(t_jit_fluoride,mode)); jit_class_addattr(_jit_fluoride_class,attr); CLASS_ATTR_LABEL(_jit_fluoride_class,"mode",0,"Color Mode"); CLASS_ATTR_ENUMINDEX(_jit_fluoride_class, "mode", 0, "\"Black and White\" Color"); CLASS_STICKY_CATEGORY_CLEAR(_jit_fluoride_class); CLASS_STICKY_ATTR_CLEAR(_jit_fluoride_class, "basic"); jit_class_register(_jit_fluoride_class); return JIT_ERR_NONE; }
void ext_main(void *r) #endif { t_class *c; c = class_new("hoa.3d.decoder~", (method)hoa_3d_decoder_new, (method)hoa_3d_decoder_free, (long)sizeof(t_hoa_3d_decoder), 0L, A_GIMME, 0); class_setname((char *)"hoa.3d.decoder~", (char *)"hoa.3d.decoder~"); hoa_initclass(c, (method)hoa_getinfos); // @method signal @digest Array of spherical harmonic signals to decode for a set of loudspeakers. // @description Array of spherical harmonic signals to decode for a set of loudspeakers. class_addmethod(c, (method)hoa_3d_decoder_dsp64, "dsp64", A_CANT, 0); class_addmethod(c, (method)hoa_3d_decoder_assist, "assist", A_CANT, 0); CLASS_ATTR_SYM (c, "mode", 0, t_hoa_3d_decoder, f_mode); CLASS_ATTR_LABEL (c, "mode", 0, "Mode"); CLASS_ATTR_ENUM (c, "mode", 0, "ambisonic binaural"); CLASS_ATTR_ACCESSORS (c, "mode", NULL, mode_set); CLASS_ATTR_ORDER (c, "mode", 0, "1"); // @description There is two decoding <m>mode</m> : // <ul> // <li><b>regular</b> : for a regular or irregular loudspeakers repartition over a sphere.</li> // <li><b>binaural</b> : for headphones.</li> // </ul> CLASS_ATTR_DOUBLE_VARSIZE (c, "angles", ATTR_SET_DEFER_LOW, t_hoa_3d_decoder, f_angles_of_channels, f_number_of_angles, HOA_MAX_PLANEWAVES*2); CLASS_ATTR_LABEL (c, "angles", 0, "Angles of Channels"); CLASS_ATTR_ACCESSORS (c, "angles", NULL, angles_set); CLASS_ATTR_ORDER (c, "angles", 0, "2"); // @description Set the angles of each channels in degrees. The angles of channels are only settable in <b>irregular</b> <m>mode</m>. Each angles are in degrees, wrapped between 0. and 360. You must specify 2 values per channel corresponding to the azimuth value followed by the elevation value. CLASS_ATTR_DOUBLE_ARRAY (c, "offset", ATTR_SET_DEFER_LOW, t_hoa_3d_decoder, f_offsets, 3); CLASS_ATTR_LABEL (c, "offset", 0, "Offset of Channels"); CLASS_ATTR_ACCESSORS (c, "offset", NULL, offset_set); CLASS_ATTR_ORDER (c, "offset", 0, "3"); // @description Set the offsets of channels with a list of 2 float values corresponding to the azimuth and elevation offset, in degrees between 0. and 360. CLASS_ATTR_LONG (c, "channels", ATTR_SET_DEFER_LOW, t_hoa_3d_decoder, f_number_of_channels); CLASS_ATTR_LABEL (c, "channels", 0, "Number of Channels"); CLASS_ATTR_ACCESSORS (c, "channels", NULL, channel_set); CLASS_ATTR_ORDER (c, "channels", 0, "4"); // @description The number of channels. CLASS_ATTR_LONG (c, "crop", 0, t_hoa_3d_decoder, f_cropsize); CLASS_ATTR_ACCESSORS (c, "crop", NULL, crop_set); CLASS_ATTR_LABEL (c, "crop", 0, "Crop of the Responses"); CLASS_ATTR_ORDER (c, "crop", 0, "5"); // @description The crop attribute can be used in binaural mode to reduce the CPU usage by cropping the impulse responses (between 0 and 512) 0 means no crop class_dspinit(c); class_register(CLASS_BOX, c); hoa_3d_decoder_class = c; }
int main(void) { t_class *c; c = class_new("hoa.convolve~", (method)HoaConvolve_new, (method)HoaConvolve_free, (long)sizeof(t_HoaConvolve), 0L, A_GIMME, 0); class_addmethod(c, (method)HoaConvolve_dsp, "dsp", A_CANT, 0); class_addmethod(c, (method)HoaConvolve_dsp64, "dsp64", A_CANT, 0); class_addmethod(c, (method)HoaConvolve_assist, "assist", A_CANT, 0); class_addmethod(c, (method)HoaConvolve_notify, "notify", A_CANT, 0); class_addmethod(c, (method)HoaConvolve_dblclick, "dblclick", A_CANT, 0); class_addmethod(c, (method)HoaConvolve_clear, "clear", 0); CLASS_ATTR_SYM (c, "buffer", 0, t_HoaConvolve, f_name); CLASS_ATTR_CATEGORY (c, "buffer", 0, "Behavior"); CLASS_ATTR_LABEL (c, "buffer", 0, "buffer~ Object Name"); CLASS_ATTR_ORDER (c, "buffer", 0, "1"); CLASS_ATTR_ACCESSORS (c, "buffer", NULL, buffer_set); CLASS_ATTR_DEFAULT (c, "buffer", 0, ""); CLASS_ATTR_SAVE (c, "buffer", 1); CLASS_ATTR_LONG (c, "channel", 0, t_HoaConvolve, f_channel); CLASS_ATTR_CATEGORY (c, "channel", 0, "Behavior"); CLASS_ATTR_LABEL (c, "channel", 0, "buffer~ Object Channel"); CLASS_ATTR_ORDER (c, "channel", 0, "2"); CLASS_ATTR_ACCESSORS (c, "channel", NULL, channel_set); CLASS_ATTR_DEFAULT (c, "channel", 0, "1"); CLASS_ATTR_SAVE (c, "channel", 1); CLASS_ATTR_DOUBLE (c, "dry", 0, t_HoaConvolve, f_dry); CLASS_ATTR_CATEGORY (c, "dry", 0, "Parameters"); CLASS_ATTR_LABEL (c, "dry", 0, "Dry value"); CLASS_ATTR_ORDER (c, "dry", 0, "1"); CLASS_ATTR_ACCESSORS (c, "dry", NULL, dry_set); CLASS_ATTR_DEFAULT (c, "dry", 0, "0."); CLASS_ATTR_SAVE (c, "dry", 1); CLASS_ATTR_DOUBLE (c, "wet", 0, t_HoaConvolve, f_wet); CLASS_ATTR_CATEGORY (c, "wet", 0, "Parameters"); CLASS_ATTR_LABEL (c, "wet", 0, "Wet value"); CLASS_ATTR_ORDER (c, "wet", 0, "2"); CLASS_ATTR_ACCESSORS (c, "wet", NULL, wet_set); CLASS_ATTR_DEFAULT (c, "wet", 0, "1."); CLASS_ATTR_SAVE (c, "wet", 1); class_dspinit(c); class_register(CLASS_BOX, c); HoaConvolve_class = c; class_findbyname(CLASS_NOBOX, gensym("hoa.encoder~")); return 0; }
int C74_EXPORT main(void) { t_class *c; c = class_new("hoa.2d.decoder~", (method)hoa_decoder_new, (method)hoa_decoder_free, (long)sizeof(t_hoa_decoder), 0L, A_GIMME, 0); class_alias(c, gensym("hoa.decoder~")); hoa_initclass(c, (method)hoa_getinfos); class_addmethod(c, (method)hoa_decoder_dsp64, "dsp64", A_CANT, 0); class_addmethod(c, (method)hoa_decoder_assist, "assist", A_CANT, 0); CLASS_ATTR_LONG (c, "autoconnect", 0, t_hoa_decoder, f_send_config); CLASS_ATTR_CATEGORY (c, "autoconnect", 0, "Behavior"); CLASS_ATTR_STYLE_LABEL (c, "autoconnect", 0, "onoff", "Auto connection"); CLASS_ATTR_ORDER (c, "autoconnect", 0, "1"); CLASS_ATTR_SAVE (c, "autoconnect", 1); CLASS_ATTR_SYM (c, "mode", 0, t_hoa_decoder, f_attr); CLASS_ATTR_CATEGORY (c, "mode", 0, "Planewaves"); CLASS_ATTR_LABEL (c, "mode", 0, "Mode"); CLASS_ATTR_ENUM (c, "mode", 0, "ambisonic binaural irregular"); CLASS_ATTR_ACCESSORS (c, "mode", mode_get, mode_set); CLASS_ATTR_ORDER (c, "mode", 0, "1"); CLASS_ATTR_SAVE (c, "mode", 1); CLASS_ATTR_LONG (c, "channels", 0, t_hoa_decoder, f_attr); CLASS_ATTR_CATEGORY (c, "channels", 0, "Planewaves"); CLASS_ATTR_LABEL (c, "channels", 0, "Number of Channels"); CLASS_ATTR_ACCESSORS (c, "channels", channel_get, channel_set); CLASS_ATTR_DEFAULT (c, "channels", 0, "4"); CLASS_ATTR_ORDER (c, "channels", 0, "2"); CLASS_ATTR_SAVE (c, "channels", 0); CLASS_ATTR_DOUBLE (c, "offset", 0, t_hoa_decoder, f_attr); CLASS_ATTR_CATEGORY (c, "offset", 0, "Planewaves"); CLASS_ATTR_LABEL (c, "offset", 0, "Offset of Channels"); CLASS_ATTR_ACCESSORS (c, "offset", offset_get, offset_set); CLASS_ATTR_DEFAULT (c, "offset", 0, "0"); CLASS_ATTR_ORDER (c, "offset", 0, "3"); CLASS_ATTR_SAVE (c, "offset", 0); CLASS_ATTR_DOUBLE_VARSIZE (c, "angles", 0, t_hoa_decoder, f_attr, f_attr, MAX_CHANNELS); CLASS_ATTR_CATEGORY (c, "angles", 0, "Planewaves"); CLASS_ATTR_LABEL (c, "angles", 0, "Angles of Channels"); CLASS_ATTR_ACCESSORS (c, "angles", angles_get, angles_set); CLASS_ATTR_ORDER (c, "angles", 0, "4"); CLASS_ATTR_SAVE (c, "angles", 0); class_dspinit(c); class_register(CLASS_BOX, c); hoa_decoder_class = c; return 0; }
int C74_EXPORT main(void) #endif { t_class* c; c = class_new("hoa.out", (method)hoa_out_new, (method)hoa_out_free, sizeof(t_hoa_out), NULL, A_GIMME, 0); class_setname((char *)"hoa.out", (char *)"hoa.out"); hoa_initclass(c, (method)NULL); class_addmethod(c, (method)hoa_out_assist, "assist", A_CANT, 0); // @method bang @digest output bang message in the corresponding hoa.process~ object's message outlet // @description The <m>bang</m> output bang message in the corresponding hoa.process~ object's message outlet class_addmethod(c, (method)hoa_out_bang, "bang", 0); // @method int @digest output int message in the corresponding hoa.process~ object's message outlet // @description The <m>int</m> output int message in the corresponding hoa.process~ object's message outlet // @marg 0 @name number @optional 0 @type int class_addmethod(c, (method)hoa_out_int, "int", A_LONG, 0); // @method float @digest output int message in the corresponding hoa.process~ object's message outlet // @description The <m>float</m> output int message in the corresponding hoa.process~ object's message outlet // @marg 0 @name number @optional 0 @type float class_addmethod(c, (method)hoa_out_float, "float", A_FLOAT, 0); // @method list @digest output a list in the corresponding hoa.process~ object's message outlet // @description The <m>list</m> output a list in the corresponding hoa.process~ object's message outlet // @marg 0 @name va-args @optional 0 @type list class_addmethod(c, (method)hoa_out_list, "list", A_GIMME, 0); // @method anything @digest output a message in the corresponding hoa.process~ object's message outlet // @description The <m>list</m> output a message in the corresponding hoa.process~ object's message outlet // @marg 0 @name anything @optional 0 @type symbol class_addmethod(c, (method)hoa_out_anything, "anything", A_GIMME, 0); CLASS_ATTR_LONG (c, "extra", 0, t_hoa_out, extra); CLASS_ATTR_ACCESSORS(c, "extra", 0, hoa_out_setattr_extra); CLASS_ATTR_LABEL (c, "extra", 0, "extra index"); CLASS_ATTR_INVISIBLE(c, "extra", 1); CLASS_ATTR_SAVE (c, "extra", 0); // @description Defines an extra outlet. Extra outlet are added to the "normal" instance outlet and can be used to receive messages from all instances. CLASS_ATTR_SYM (c, "comment", 0, t_hoa_out, comment); CLASS_ATTR_ACCESSORS(c, "comment", 0, hoa_out_setattr_comment); CLASS_ATTR_LABEL (c, "comment", 0, "Description"); CLASS_ATTR_SAVE (c, "comment", 1); // @description Sets a description to the outlet which will be shown in the assist outlet of the <o>hoa.process~</o> that load this <o>hoa.out</o>. // Only works if the <m>extra</m> parameter is greater than 0. class_register(CLASS_BOX, c); hoa_out_class = c; return 0; }
int C74_EXPORT main(void) { t_class *c; c = class_new("hoa.3d.decoder~", (method)hoa_decoder_new, (method)hoa_decoder_free, (long)sizeof(t_hoa_decoder), 0L, A_GIMME, 0); hoa_initclass(c, (method)hoa_getinfos); // @method signal @digest Array of spherical harmonic signals to decode for a set of loudspeakers // @description Array of spherical harmonic signals to decode for a set of loudspeakers class_addmethod(c, (method)hoa_decoder_dsp64, "dsp64", A_CANT, 0); class_addmethod(c, (method)hoa_decoder_assist, "assist", A_CANT, 0); CLASS_ATTR_SYM (c, "mode", 0, t_hoa_decoder, f_mode); CLASS_ATTR_LABEL (c, "mode", 0, "Mode"); CLASS_ATTR_ENUM (c, "mode", 0, "ambisonic binaural irregular"); CLASS_ATTR_ACCESSORS (c, "mode", NULL, mode_set); CLASS_ATTR_ORDER (c, "mode", 0, "1"); CLASS_ATTR_SAVE (c, "mode", 1); // @description There is three decoding <m>mode</m> : // <ul> // <li><b>Ambisonics</b> : for a regular loudspeakers repartition over a sphere.</li> // <li><b>Binaural</b> : for headphones.</li> // <li><b>Irregular</b> : for an irregular loudspeakers repartition</li> // </ul> CLASS_ATTR_DOUBLE_VARSIZE (c, "angles", ATTR_SET_DEFER_LOW, t_hoa_decoder, f_angles_of_channels, f_number_of_angles, MAX_CHANNELS*2); CLASS_ATTR_LABEL (c, "angles", 0, "Angles of Channels"); CLASS_ATTR_ACCESSORS (c, "angles", NULL, angles_set); CLASS_ATTR_ORDER (c, "angles", 0, "2"); // @description Set the angles of each channels in degrees. The angles of channels are only settable in <b>irregular</b> <m>mode</m>. Each angles are in degrees, wrapped between 0. and 360. You must specify 2 values per channel corresponding to the azimuth value followed by the elevation value. CLASS_ATTR_DOUBLE_ARRAY (c, "offset", 0, t_hoa_decoder, f_offset, 2); CLASS_ATTR_LABEL (c, "offset", 0, "Offset of Channels"); CLASS_ATTR_ACCESSORS (c, "offset", NULL, offset_set); CLASS_ATTR_DEFAULT (c, "offset", 0, "0 0"); CLASS_ATTR_ORDER (c, "offset", 0, "3"); // @description Set the offsets of channels with a list of 2 float values corresponding to the azimuth and elevation offset, in degrees between 0. and 360. CLASS_ATTR_SYM (c, "pinna", 0, t_hoa_decoder, f_pinna); CLASS_ATTR_LABEL (c, "pinna", 0, "Pinna Size"); CLASS_ATTR_ENUM (c, "pinna", 0, "small large"); CLASS_ATTR_ACCESSORS (c, "pinna", NULL, pinna_set); CLASS_ATTR_ORDER (c, "pinna", 0, "4"); // @description The pinna size to use for the binaural restitution. The <m>pinna</m> message followed by the <b>symbol</b> <b>small</b> or <b>large</b> set the pinna size of the HRTF responses for the binaural restitution. Choose the one that suits you best. class_dspinit(c); class_register(CLASS_BOX, c); hoa_decoder_class = c; return 0; }
t_jit_err jit_findbounds_init(void) { long attrflags=0; t_jit_object *attr,*mop; _jit_findbounds_class = jit_class_new("jit_findbounds",(method)jit_findbounds_new,(method)jit_findbounds_free, sizeof(t_jit_findbounds),0L); //add mop mop = jit_object_new(_jit_sym_jit_mop,1,0); jit_class_addadornment(_jit_findbounds_class,mop); //add methods jit_class_addmethod(_jit_findbounds_class, (method)jit_findbounds_matrix_calc, "matrix_calc", A_CANT, 0L); //add attributes attrflags = JIT_ATTR_GET_DEFER_LOW | JIT_ATTR_SET_USURP_LOW; CLASS_STICKY_CATEGORY(_jit_findbounds_class,0,"Behavior"); CLASS_STICKY_ATTR(_jit_findbounds_class,"basic",0,"1"); attr = jit_object_new(_jit_sym_jit_attr_offset_array,"min",_jit_sym_float64,JIT_MATRIX_MAX_PLANECOUNT,attrflags, (method)0L,(method)0L,calcoffset(t_jit_findbounds, mincount),calcoffset(t_jit_findbounds,min)); jit_class_addattr(_jit_findbounds_class,attr); CLASS_ATTR_LABEL(_jit_findbounds_class,"min",0,"Minimum"); attr = jit_object_new(_jit_sym_jit_attr_offset_array,"max",_jit_sym_float64,JIT_MATRIX_MAX_PLANECOUNT,attrflags, (method)0L,(method)0L,calcoffset(t_jit_findbounds, maxcount),calcoffset(t_jit_findbounds,max)); jit_class_addattr(_jit_findbounds_class,attr); CLASS_ATTR_LABEL(_jit_findbounds_class,"max",0,"Maximum"); CLASS_STICKY_ATTR_CLEAR(_jit_findbounds_class, "basic"); CLASS_STICKY_CATEGORY(_jit_findbounds_class,0,"Value"); attrflags = JIT_ATTR_GET_DEFER_LOW | JIT_ATTR_SET_OPAQUE_USER; attr = jit_object_new(_jit_sym_jit_attr_offset_array,"boundmin",_jit_sym_long,JIT_MATRIX_MAX_DIMCOUNT,attrflags, (method)0L,(method)0L,calcoffset(t_jit_findbounds, boundmincount),calcoffset(t_jit_findbounds,boundmin)); jit_class_addattr(_jit_findbounds_class,attr); CLASS_ATTR_LABEL(_jit_findbounds_class,"boundmin",0,"Bounding Box Minimum"); attr = jit_object_new(_jit_sym_jit_attr_offset_array,"boundmax",_jit_sym_long,JIT_MATRIX_MAX_DIMCOUNT,attrflags, (method)0L,(method)0L,calcoffset(t_jit_findbounds, boundmaxcount),calcoffset(t_jit_findbounds,boundmax)); jit_class_addattr(_jit_findbounds_class,attr); CLASS_ATTR_LABEL(_jit_findbounds_class,"boundmax",0,"Bounding Box Maximum"); CLASS_STICKY_CATEGORY_CLEAR(_jit_findbounds_class); jit_class_register(_jit_findbounds_class); return JIT_ERR_NONE; }
int main(void) { t_class *c; c = class_new("huygens~", (method)Huygens_new, (method)Huygens_free, (long)sizeof(t_Huygens), 0L, A_GIMME, 0); class_addmethod(c, (method)Huygens_dsp, "dsp", A_CANT, 0); class_addmethod(c, (method)Huygens_dsp64, "dsp64", A_CANT, 0); class_addmethod(c, (method)Huygens_assist, "assist", A_CANT, 0); class_addmethod(c, (method)Huygens_float, "float", A_FLOAT, 0); class_addmethod(c, (method)Huygens_float, "int", A_LONG, 0); CLASS_ATTR_LONG (c, "shape", 0, t_Huygens, f_mode); CLASS_ATTR_LABEL (c, "shape", 0, "Shape of the loudspeakers array"); CLASS_ATTR_ENUMINDEX (c, "shape", 0, "Linear \" \"Circular"); CLASS_ATTR_SAVE (c, "shape", 1); CLASS_ATTR_FILTER_CLIP (c, "shape", 0, 1); CLASS_ATTR_ORDER (c, "shape", 0, "0"); CLASS_ATTR_FLOAT (c, "distance", 0, t_Huygens, f_speakersDistance); CLASS_ATTR_LABEL (c, "distance", 0, "Distance between speakers array and listener"); //CLASS_ATTR_ACCESSORS (c, "distance", NULL, distance_set); CLASS_ATTR_SAVE (c, "distance", 1); CLASS_ATTR_FILTER_MIN (c, "distance", 0.); CLASS_ATTR_ORDER (c, "distance", 0, "1"); CLASS_ATTR_FLOAT (c, "delta", 0, t_Huygens, f_speakersDelta); CLASS_ATTR_LABEL (c, "delta", 0, "Distance between speakers"); //CLASS_ATTR_ACCESSORS (c, "delta", NULL, delta_set); CLASS_ATTR_SAVE (c, "delta", 1); CLASS_ATTR_FILTER_MIN (c, "delta", 0.); CLASS_ATTR_ORDER (c, "delta", 0, "2"); CLASS_ATTR_LONG (c, "interpolation", 0, t_Huygens, f_interpolation); CLASS_ATTR_LABEL (c, "interpolation", 0, "Delay interpolation"); CLASS_ATTR_ENUMINDEX (c, "interpolation", 0, "Linear \" \"Quadratic \" \"Lagrange"); CLASS_ATTR_SAVE (c, "interpolation", 1); CLASS_ATTR_FILTER_CLIP (c, "interpolation", 0, 2); CLASS_ATTR_ORDER (c, "interpolation", 0, "3"); class_dspinit(c); class_register(CLASS_BOX, c); Huygens_class = c; post("huygens~ by Julien Colafrancesco & Pierre Guillot"); post("Copyright (C) 2012, CICM / Universite Paris 8"); return 0; }
int C74_EXPORT main(void) { t_class *c; c = class_new("uisimp4", (method)uisimp_new, (method)uisimp_free, sizeof(t_uisimp), (method)NULL, A_GIMME, 0L); c->c_flags |= CLASS_FLAG_NEWDICTIONARY; jbox_initclass(c, JBOX_COLOR | JBOX_FIXWIDTH | JBOX_FONTATTR); class_addmethod(c, (method) uisimp_paint, "paint", A_CANT, 0); class_addmethod(c, (method) uisimp_int, "int", A_LONG, 0); class_addmethod(c, (method) uisimp_mousedown, "mousedown", A_CANT, 0); class_addmethod(c, (method) uisimp_mousedragdelta, "mousedragdelta", A_CANT, 0); class_addmethod(c, (method) uisimp_mouseup, "mouseup", A_CANT, 0); class_addmethod(c, (method) uisimp_assist, "assist", A_CANT, 0); class_addmethod(c, (method) jbox_notify, "notify", A_CANT, 0); CLASS_ATTR_DEFAULT(c, "patching_rect", 0, "0 0 60 60"); CLASS_ATTR_DEFAULT(c, "color", 0, "0.8 0.5 0.2 1"); CLASS_ATTR_LONG(c,"inset",0, t_uisimp, j_inset); CLASS_ATTR_LABEL(c,"inset",0,"Filled Area Inset"); CLASS_ATTR_CATEGORY(c,"inset",0,"Tweaks"); CLASS_ATTR_DEFAULT_SAVE_PAINT(c,"inset",0,"3"); CLASS_ATTR_CHAR(c,"reset",0, t_uisimp, j_reset); CLASS_ATTR_STYLE_LABEL(c,"reset",0,"onoff","Reset Counter on Click"); CLASS_ATTR_CATEGORY(c,"reset",0,"Tweaks"); CLASS_ATTR_DEFAULT_SAVE(c,"reset",0,"1"); CLASS_ATTR_LONG(c,"shape",0, t_uisimp, j_shape); CLASS_ATTR_LABEL(c,"shape", 0, "Fill Shape"); CLASS_ATTR_CATEGORY(c,"shape",0,"Shape"); CLASS_ATTR_ENUMINDEX(c,"shape", 0, "Square Circle Angle"); CLASS_ATTR_DEFAULT_SAVE_PAINT(c,"shape",0,"0"); s_uisimp_class = c; class_register(CLASS_BOX, s_uisimp_class); return 0; }
extern "C" void setup_c0x2earray(void) { t_eclass *c; c = eclass_new("c.array", (method)carray_new, (method)carray_free, (short)sizeof(t_carray), 0L, A_GIMME, 0); eclass_init(c, 0); eclass_addmethod(c, (method) carray_assist, "assist", A_CANT, 0); eclass_addmethod(c, (method) carray_paint, "paint", A_CANT, 0); eclass_addmethod(c, (method) carray_notify, "notify", A_CANT, 0); eclass_addmethod(c, (method) carray_getdrawparams, "getdrawparams", A_CANT, 0); eclass_addmethod(c, (method) carray_oksize, "oksize", A_CANT, 0); eclass_addmethod(c, (method) carray_output, "float", A_FLOAT,0); eclass_addmethod(c, (method) carray_output, "bang", A_CANT, 0); eclass_addmethod(c, (method) carray_output, "list", A_GIMME,0); eclass_addmethod(c, (method) carray_output, "anything", A_GIMME,0); eclass_addmethod(c, (method) carray_mousedown, "mousedown", A_CANT, 0); eclass_addmethod(c, (method) carray_mouseup, "mouseup", A_CANT, 0); CLASS_ATTR_INVISIBLE (c, "fontname", 1); CLASS_ATTR_INVISIBLE (c, "fontweight", 1); CLASS_ATTR_INVISIBLE (c, "fontslant", 1); CLASS_ATTR_INVISIBLE (c, "fontsize", 1); CLASS_ATTR_DEFAULT (c, "size", 0, "16. 16."); CLASS_ATTR_SYMBOL (c, "array", 0, t_carray, f_name); CLASS_ATTR_ACCESSORS (c, "array", NULL, carray_buffer_set); CLASS_ATTR_LABEL (c, "array", 0, "Array Name"); CLASS_ATTR_ORDER (c, "array", 0, "1"); CLASS_ATTR_DEFAULT_SAVE_PAINT (c, "array", 0, "(null)"); CLASS_ATTR_RGBA (c, "bgcolor", 0, t_carray, f_color_background); CLASS_ATTR_LABEL (c, "bgcolor", 0, "Background Color"); CLASS_ATTR_ORDER (c, "bgcolor", 0, "1"); CLASS_ATTR_DEFAULT_SAVE_PAINT (c, "bgcolor", 0, "0.75 0.75 0.75 1."); CLASS_ATTR_STYLE (c, "bgcolor", 0, "color"); CLASS_ATTR_RGBA (c, "bdcolor", 0, t_carray, f_color_border); CLASS_ATTR_LABEL (c, "bdcolor", 0, "Border Color"); CLASS_ATTR_ORDER (c, "bdcolor", 0, "2"); CLASS_ATTR_DEFAULT_SAVE_PAINT (c, "bdcolor", 0, "0.5 0.5 0.5 1."); CLASS_ATTR_STYLE (c, "bdcolor", 0, "color"); eclass_register(CLASS_BOX, c); cicm_post(); carray_class = c; }
extern "C" void setup_c0x2ebang(void) { t_eclass *c; c = eclass_new("c.bang", (method)bang_new, (method)bang_free, (short)sizeof(t_bang), 0L, A_GIMME, 0); eclass_init(c, 0); eclass_addmethod(c, (method) bang_assist, "assist", A_CANT, 0); eclass_addmethod(c, (method) bang_paint, "paint", A_CANT, 0); eclass_addmethod(c, (method) bang_notify, "notify", A_CANT, 0); eclass_addmethod(c, (method) bang_getdrawparams, "getdrawparams", A_CANT, 0); eclass_addmethod(c, (method) bang_oksize, "oksize", A_CANT, 0); eclass_addmethod(c, (method) bang_output, "float", A_FLOAT,0); eclass_addmethod(c, (method) bang_output, "bang", A_CANT, 0); eclass_addmethod(c, (method) bang_output, "list", A_GIMME,0); eclass_addmethod(c, (method) bang_output, "anything", A_GIMME,0); eclass_addmethod(c, (method) bang_mousedown, "mousedown", A_CANT, 0); eclass_addmethod(c, (method) bang_mouseup, "mouseup", A_CANT, 0); CLASS_ATTR_INVISIBLE (c, "fontname", 1); CLASS_ATTR_INVISIBLE (c, "fontweight", 1); CLASS_ATTR_INVISIBLE (c, "fontslant", 1); CLASS_ATTR_INVISIBLE (c, "fontsize", 1); CLASS_ATTR_DEFAULT (c, "size", 0, "16. 16."); CLASS_ATTR_RGBA (c, "bgcolor", 0, t_bang, f_color_background); CLASS_ATTR_LABEL (c, "bgcolor", 0, "Background Color"); CLASS_ATTR_ORDER (c, "bgcolor", 0, "1"); CLASS_ATTR_DEFAULT_SAVE_PAINT (c, "bgcolor", 0, "0.75 0.75 0.75 1."); CLASS_ATTR_STYLE (c, "bgcolor", 0, "color"); CLASS_ATTR_RGBA (c, "bdcolor", 0, t_bang, f_color_border); CLASS_ATTR_LABEL (c, "bdcolor", 0, "Border Color"); CLASS_ATTR_ORDER (c, "bdcolor", 0, "2"); CLASS_ATTR_DEFAULT_SAVE_PAINT (c, "bdcolor", 0, "0.5 0.5 0.5 1."); CLASS_ATTR_STYLE (c, "bdcolor", 0, "color"); CLASS_ATTR_RGBA (c, "bacolor", 0, t_bang, f_color_bang); CLASS_ATTR_LABEL (c, "bacolor", 0, "Bang Color"); CLASS_ATTR_ORDER (c, "bacolor", 0, "3"); CLASS_ATTR_DEFAULT_SAVE_PAINT (c, "bacolor", 0, "0. 0. 0. 1."); CLASS_ATTR_STYLE (c, "bacolor", 0, "color"); eclass_register(CLASS_BOX, c); cicm_post(); bang_class = c; }
t_jit_err jit_gradient_init(void) { long attrflags=0; t_jit_object *attr; t_jit_object *mop; _jit_gradient_class = jit_class_new("jit_gradient",(method)jit_gradient_new,(method)jit_gradient_free, sizeof(t_jit_gradient),0L); //add mop mop = jit_object_new(_jit_sym_jit_mop,1,1); jit_mop_single_type(mop, _jit_sym_char); jit_mop_single_planecount(mop, 4); jit_class_addadornment(_jit_gradient_class,mop); //add methods jit_class_addmethod(_jit_gradient_class, (method)jit_gradient_matrix_calc, "matrix_calc", A_CANT, 0L); //add attributes attrflags = JIT_ATTR_GET_DEFER_LOW | JIT_ATTR_SET_USURP_LOW; CLASS_STICKY_CATEGORY(_jit_gradient_class,0,"Behavior"); CLASS_STICKY_ATTR(_jit_gradient_class,"basic",0,"1"); // start - beginning gradient cell attr = jit_object_new(_jit_sym_jit_attr_offset_array, "start", _jit_sym_float64, 4, attrflags, (method)0L, (method)0L, calcoffset(t_jit_gradient, startcount), calcoffset(t_jit_gradient,start)); jit_class_addattr(_jit_gradient_class,attr); CLASS_ATTR_LABEL(_jit_gradient_class,"start",0,"Start"); attr = jit_object_new(_jit_sym_jit_attr_offset_array, "end", _jit_sym_float64, 4, attrflags, (method)0L, (method)0L, calcoffset(t_jit_gradient, endcount), calcoffset(t_jit_gradient,end)); jit_class_addattr(_jit_gradient_class,attr); CLASS_ATTR_LABEL(_jit_gradient_class,"end",0,"End"); attr = jit_object_new(_jit_sym_jit_attr_offset_array, "cheby", _jit_sym_float64, 64, attrflags, (method)0L, (method)0L, calcoffset(t_jit_gradient, chebycount), calcoffset(t_jit_gradient,cheby)); jit_class_addattr(_jit_gradient_class,attr); CLASS_ATTR_LABEL(_jit_gradient_class,"cheby",0,"Chebyshev Coefficients"); CLASS_STICKY_CATEGORY_CLEAR(_jit_gradient_class); CLASS_STICKY_ATTR_CLEAR(_jit_gradient_class, "basic"); jit_class_register(_jit_gradient_class); return JIT_ERR_NONE; }
int main(void) { t_class *c = class_new("o.context", (method)ocontext_new, (method)ocontext_free, sizeof(t_ocontext), 0L, A_GIMME, 0); class_addmethod(c, (method)ocontext_fullPacket, "FullPacket", A_GIMME, 0); class_addmethod(c, (method)ocontext_assist, "assist", A_CANT, 0); class_addmethod(c, (method)ocontext_doc, "doc", 0); class_addmethod(c, (method)ocontext_bang, "bang", 0); // remove this if statement when we stop supporting Max 5 //if(omax_dict_resolveDictStubs()){ class_addmethod(c, (method)omax_dict_dictionary, "dictionary", A_GIMME, 0); //} class_addmethod(c, (method)odot_version, "version", 0); CLASS_ATTR_ATOM(c, "prefix", 0, t_ocontext, prefix); CLASS_ATTR_LABEL(c, "prefix", 0, "OSC Address Prefix"); CLASS_ATTR_ACCESSORS(c, "prefix", ocontext_attr_prefix_get, ocontext_attr_prefix_set); class_register(CLASS_BOX, c); ocontext_class = c; common_symbols_init(); ODOT_PRINT_VERSION; return 0; }
int C74_EXPORT main(void) { t_class *c; c = class_new("hoa.optim~", (method)HoaOptim_new, (method)dsp_free, (long)sizeof(t_HoaOptim), 0L, A_GIMME, 0); class_addmethod(c, (method)HoaOptim_dsp64, "dsp64", A_CANT, 0); class_addmethod(c, (method)HoaOptim_assist, "assist", A_CANT, 0); CLASS_ATTR_SYM (c, "optim", 0, t_HoaOptim, f_optim_mode); CLASS_ATTR_CATEGORY (c, "optim", 0, "Behavior"); CLASS_ATTR_LABEL (c, "optim", 0, "Optimization"); CLASS_ATTR_ENUM (c, "optim", 0, "basic maxRe inPhase"); CLASS_ATTR_ORDER (c, "optim", 0, "1"); CLASS_ATTR_ACCESSORS (c, "optim", NULL, HoaOptim_optim); CLASS_ATTR_SAVE (c, "optim", 1); class_dspinit(c); class_register(CLASS_BOX, c); HoaOptim_class = c; class_findbyname(CLASS_BOX, gensym("hoa.encoder~")); return 0; }
void C74_EXPORT ext_main(void *r) { t_class *c; c = class_new("3Dpoltocar", (method)dpoltocar_new,0L, (short)sizeof(t_dpoltocar), 0L, A_DEFLONG, A_DEFLONG, 0); class_addmethod(c, (method)dpoltocar_assist , "assist", A_CANT, 0L); class_addmethod(c, (method)dpoltocar_bang, "bang", 0L); class_addmethod(c, (method)dpoltocar_list, "list", A_GIMME,0L); // class_addmethod(c, (method)dpoltocar_mode, "mode", A_LONG, 0L); // class_addmethod(c, (method)inspector_open, "info", A_CANT, 0L); // CLASS_STICKY_ATTR(c, "category", 0L, "3Dcartopol"); CLASS_ATTR_LONG(c, "mode", 0L, t_dpoltocar, d_mode); CLASS_ATTR_LABEL(c, "mode", 0L, "angle mode"); CLASS_ATTR_STYLE(c, "mode", 0L, "enum"); CLASS_ATTR_ENUMINDEX(c, "mode", 0L, "\"radians\" \"degrees\""); CLASS_ATTR_SAVE(c, "mode", 0L ); CLASS_ATTR_FILTER_CLIP(c, "mode", 0, 1); CLASS_ATTR_ORDER(c, "mode", 0L, "0"); my_pi = 3.141592653589793238462643383279502884197169399375105820974944592307816406286208998628034825342117068; half_pi = my_pi / 2.0; divide_pi = my_pi / 180.0; two_pi = 2.0 * my_pi; divide_two_pi = 1.0 / two_pi; class_register(CLASS_BOX, c); dpoltocar_class = c; post("· 3Dpoltocar · jasch · "__DATE__" · © all rights reserved",0); return; }
int main(void) { t_class *c = class_new("polywave~", (method)polywave_new, (method)polywave_free, (long)sizeof(t_polywave), NULL, A_GIMME, 0); class_addmethod(c, (method)polywave_dsp64, "dsp64", A_CANT, 0); class_addmethod(c, (method)polywave_assist, "assist", A_CANT, 0); CLASS_ATTR_SYM_VARSIZE(c, "buffer", 0, t_polywave, buf_name, numbufs, POLYWAVE_MAX_BUFFERS); CLASS_ATTR_ACCESSORS(c, "buffer", polywave_buf_get, polywave_buf_set); CLASS_ATTR_LABEL(c, "buffer", 0, "buffer list"); CLASS_ATTR_INT32(c, "interpolation", 0, t_polywave, interp_type); CLASS_ATTR_ACCESSORS(c, "interpolation", polywave_interp_get, polywave_interp_set); CLASS_ATTR_ENUMINDEX3(c, "interpolation", 0, "none", "linear", "cubic"); CLASS_ATTR_INT32(c, "dimensions", ATTR_SET_OPAQUE_USER, t_polywave, dims); // CLASS_ATTR_ENUMINDEX3(c, "dimensions", ATTR_SET_OPAQUE_USER, "0D", "1D", "2D"); t_class *bufpxy = class_new("bufferproxy", NULL, NULL, sizeof(t_buffer_proxy), 0L, 0); class_addmethod(bufpxy, (method)buffer_proxy_notify, "notify", A_CANT, 0); class_register(CLASS_NOBOX, bufpxy); buffer_proxy_class = bufpxy; class_dspinit(c); class_register(CLASS_BOX, c); polywave_class = c; ps_buffer_modified = gensym("buffer_modified"); post("%s by %s.", NAME, AUTHORS); post("Copyright (c) " COPYRIGHT_YEARS " Regents of the University of California. All rights reserved."); return 0; }
int C74_EXPORT main(void) { t_class *c; c = class_new("hoa.binaural~", (method)HoaBinaural_new, (method)HoaBinaural_free, (long)sizeof(t_HoaBinaural), 0L, A_GIMME, 0); class_addmethod(c, (method)HoaBinaural_dsp, "dsp", A_CANT, 0); class_addmethod(c, (method)HoaBinaural_dsp64, "dsp64", A_CANT, 0); class_addmethod(c, (method)HoaBinaural_assist, "assist", A_CANT, 0); CLASS_ATTR_SYM (c,"pinnasize", 0, t_HoaBinaural, f_pinna_size); CLASS_ATTR_ACCESSORS (c,"pinnasize", NULL, HoaBinaural_set_pinnasize); CLASS_ATTR_LABEL (c,"pinnasize", 0, "Pinna Size"); CLASS_ATTR_CATEGORY (c,"pinnasize", 0, "Behavior"); CLASS_ATTR_ENUM (c,"pinnasize", 0, "small large"); CLASS_ATTR_DEFAULT (c,"pinnasize", 0, "small"); CLASS_ATTR_ORDER (c,"pinnasize", 0, "1"); CLASS_ATTR_SAVE (c,"pinnasize", 1); class_dspinit(c); class_register(CLASS_BOX, c); HoaBinaural_class = c; class_findbyname(CLASS_NOBOX, gensym("hoa.encoder~")); return 0; }
extern "C" void setup_c0x2etoggle(void) { t_eclass *c; c = eclass_new("c.toggle", (method)toggle_new, (method)toggle_free, (short)sizeof(t_toggle), 0L, A_GIMME, 0); eclass_init(c, 0); eclass_addmethod(c, (method) toggle_assist, "assist", A_CANT, 0); eclass_addmethod(c, (method) toggle_paint, "paint", A_CANT, 0); eclass_addmethod(c, (method) toggle_notify, "notify", A_CANT, 0); eclass_addmethod(c, (method) toggle_getdrawparams, "getdrawparams", A_CANT, 0); eclass_addmethod(c, (method) toggle_oksize, "oksize", A_CANT, 0); eclass_addmethod(c, (method) toggle_float, "float", A_FLOAT,0); eclass_addmethod(c, (method) toggle_set, "set", A_FLOAT,0); eclass_addmethod(c, (method) toggle_bang, "bang", A_CANT, 0); eclass_addmethod(c, (method) toggle_mousedown, "mousedown", A_CANT, 0); eclass_addmethod(c, (method) toggle_preset, "preset", A_CANT, 0); CLASS_ATTR_INVISIBLE (c, "fontname", 1); CLASS_ATTR_INVISIBLE (c, "fontweight", 1); CLASS_ATTR_INVISIBLE (c, "fontslant", 1); CLASS_ATTR_INVISIBLE (c, "fontsize", 1); CLASS_ATTR_DEFAULT (c, "size", 0, "15. 15."); CLASS_ATTR_RGBA (c, "bgcolor", 0, t_toggle, f_color_background); CLASS_ATTR_LABEL (c, "bgcolor", 0, "Background Color"); CLASS_ATTR_ORDER (c, "bgcolor", 0, "1"); CLASS_ATTR_DEFAULT_SAVE_PAINT (c, "bgcolor", 0, "0.75 0.75 0.75 1."); CLASS_ATTR_STYLE (c, "bgcolor", 0, "color"); CLASS_ATTR_RGBA (c, "bdcolor", 0, t_toggle, f_color_border); CLASS_ATTR_LABEL (c, "bdcolor", 0, "Border Color"); CLASS_ATTR_ORDER (c, "bdcolor", 0, "2"); CLASS_ATTR_DEFAULT_SAVE_PAINT (c, "bdcolor", 0, "0.5 0.5 0.5 1."); CLASS_ATTR_STYLE (c, "bdcolor", 0, "color"); CLASS_ATTR_RGBA (c, "crcolor", 0, t_toggle, f_color_cross); CLASS_ATTR_LABEL (c, "crcolor", 0, "Cross Color"); CLASS_ATTR_ORDER (c, "crcolor", 0, "3"); CLASS_ATTR_DEFAULT_SAVE_PAINT (c, "crcolor", 0, "0.5 0.5 0.5 1."); CLASS_ATTR_STYLE (c, "crcolor", 0, "color"); eclass_register(CLASS_BOX, c); cicm_post(); toggle_class = c; }