コード例 #1
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_ATTR(_jit_findbounds_class,"category",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_ATTR(_jit_findbounds_class,"category",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_ATTR_CLEAR(_jit_findbounds_class, "category");
	
	jit_class_register(_jit_findbounds_class);

	return JIT_ERR_NONE;
}
コード例 #2
0
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;
}
コード例 #3
0
ファイル: jit.glue.c プロジェクト: pukulsesuatu/max6-sdk
t_jit_err jit_glue_init(void) 
{
	long attrflags=0;
	void *attr,*mop,*o;
	
	_jit_glue_class = jit_class_new("jit_glue",(method)jit_glue_new,(method)jit_glue_free,
		sizeof(t_jit_glue),0L);

	//add mop
	mop = jit_object_new(_jit_sym_jit_mop,-1,1); //#inputs,#outputs(variable)
	o = jit_object_method(mop,_jit_sym_getoutput,1);
	jit_attr_setlong(o,_jit_sym_dimlink,0);
	jit_class_addadornment(_jit_glue_class,mop);
	//add methods
	jit_class_addmethod(_jit_glue_class, (method)jit_glue_matrix_calc, 		"matrix_calc", 		A_CANT, 0L);

	//add attributes	
	attrflags = JIT_ATTR_GET_DEFER_LOW | JIT_ATTR_SET_USURP_LOW;
	
	CLASS_STICKY_ATTR(_jit_glue_class,"category",0,"Behavior");
	CLASS_STICKY_ATTR(_jit_glue_class,"basic",0,"1");

	attr = jit_object_new(_jit_sym_jit_attr_offset,"rows",_jit_sym_long,attrflags,
		(method)0,(method)0,calcoffset(t_jit_glue,rows));
	jit_attr_addfilterset_clip(attr,1,16,1,1);
	jit_class_addattr(_jit_glue_class,attr);
	CLASS_ATTR_LABEL(_jit_glue_class,"rows",0,"Rows");	

	attr = jit_object_new(_jit_sym_jit_attr_offset,"columns",_jit_sym_long,attrflags,
		(method)0,(method)0,calcoffset(t_jit_glue,cols));
	jit_attr_addfilterset_clip(attr,1,16,1,1);
	jit_class_addattr(_jit_glue_class,attr);
	CLASS_ATTR_LABEL(_jit_glue_class,"columns",0,"Columns");	

	CLASS_STICKY_ATTR_CLEAR(_jit_glue_class, "category");
	CLASS_STICKY_ATTR_CLEAR(_jit_glue_class, "basic");

	attrflags = JIT_ATTR_GET_OPAQUE_USER | JIT_ATTR_SET_OPAQUE_USER;
	attr = jit_object_new(_jit_sym_jit_attr_offset,"input",_jit_sym_long,attrflags,
		(method)0,(method)0,calcoffset(t_jit_glue,input));
	jit_class_addattr(_jit_glue_class,attr);

	jit_class_register(_jit_glue_class);

	return JIT_ERR_NONE;
}
コード例 #4
0
ファイル: uisimp.c プロジェクト: CICM/max6-sdk
int C74_EXPORT main(void)
{	
	t_class *c;
		
	c = class_new("uisimp", (method)uisimp_new, (method)uisimp_free, sizeof(t_uisimp), 0L, A_GIMME, 0);

	c->c_flags |= CLASS_FLAG_NEWDICTIONARY;
	jbox_initclass(c, JBOX_FIXWIDTH | JBOX_COLOR);

	class_addmethod(c, (method)uisimp_paint,		"paint",	A_CANT, 0);
	class_addmethod(c, (method)uisimp_mousedown,	"mousedown",	A_CANT, 0);
	class_addmethod(c, (method)uisimp_mousedrag,	"mousedrag",	A_CANT, 0);
	class_addmethod(c, (method)uisimp_mouseup,		"mouseup",	A_CANT, 0);
	class_addmethod(c, (method)uisimp_mouseenter,	"mouseenter",	A_CANT, 0);
	class_addmethod(c, (method)uisimp_mouseleave,	"mouseleave",	A_CANT, 0);
	class_addmethod(c, (method)uisimp_mousemove,	"mousemove",	A_CANT, 0);
	class_addmethod(c, (method)uisimp_assist,		"assist",	A_CANT, 0);  
	
	// messages for state setting / retrieval
	
	class_addmethod(c, (method)uisimp_int,			"int",	A_LONG, 0);
	class_addmethod(c, (method)uisimp_bang,			"bang", 0);
	
	// attributes
	
	CLASS_ATTR_CHAR(c, "trackmouse", 0, t_uisimp, u_trackmouse);
	CLASS_ATTR_STYLE_LABEL(c, "trackmouse", 0, "onoff", "Track Mouse");
	CLASS_ATTR_SAVE(c, "trackmouse", 0);
	CLASS_ATTR_CATEGORY(c, "trackmouse", 0, "Behavior");
	
	CLASS_STICKY_ATTR(c, "category", 0, "Color");
	CLASS_ATTR_RGBA(c, "bgcolor", 0, t_uisimp, u_background); 
	CLASS_ATTR_DEFAULTNAME_SAVE_PAINT(c, "bgcolor", 0, "1. 1. 1. 1."); 
	CLASS_ATTR_STYLE_LABEL(c,"bgcolor",0,"rgba","Background Color");
	
	CLASS_ATTR_RGBA(c, "bordercolor", 0, t_uisimp, u_outline); 
	CLASS_ATTR_DEFAULTNAME_SAVE_PAINT(c, "bordercolor", 0, "0.5 0.5 0.5 1."); 
	CLASS_ATTR_STYLE_LABEL(c,"bordercolor",0,"rgba","Border Color");
	
	CLASS_ATTR_RGBA(c, "hilitecolor", 0, t_uisimp, u_hilite); 
	CLASS_ATTR_DEFAULTNAME_SAVE_PAINT(c, "hilitecolor", 0, "0.5 0.5 0.5 1."); 
	CLASS_ATTR_STYLE_LABEL(c,"hilitecolor",0,"rgba","Hilite Color");

    // color uses the color declared in t_jbox.b_color
	CLASS_ATTR_DEFAULTNAME_SAVE_PAINT(c, "color", 0, "0. 0. 0. 1."); 
	CLASS_ATTR_STYLE_LABEL(c,"color",0,"rgba","Check Color");
	
	CLASS_STICKY_ATTR_CLEAR(c, "category");
	
	
	CLASS_ATTR_DEFAULT(c,"patching_rect",0, "0. 0. 20. 20.");
	
	class_register(CLASS_BOX, c);
	s_uisimp_class = c;

	return 0;
}
コード例 #5
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;
}
コード例 #6
0
ファイル: jit.dimmap.c プロジェクト: pukulsesuatu/max6-sdk
t_jit_err jit_dimmap_init(void) 
{
	long attrflags=0;
	t_jit_object *attr,*mop,*o;
	t_symbol *atsym;
	
	atsym = gensym("jit_attr_offset");
	
	_jit_dimmap_class = jit_class_new("jit_dimmap",(method)jit_dimmap_new,(method)jit_dimmap_free,
		sizeof(t_jit_dimmap),0L);

	//add mop
	mop = jit_object_new(_jit_sym_jit_mop,1,1);
	jit_mop_output_nolink(mop,1);	
	jit_class_addadornment(_jit_dimmap_class,mop);
	o = jit_object_method(mop,_jit_sym_getoutput,1);
	//add methods
	jit_class_addmethod(_jit_dimmap_class, (method)jit_dimmap_matrix_calc, 		"matrix_calc", 		A_CANT, 0L);	
	//add attributes	
	attrflags = JIT_ATTR_GET_DEFER_LOW | JIT_ATTR_SET_USURP_LOW;

	CLASS_STICKY_ATTR(_jit_dimmap_class,"category",0,"Behavior");
	CLASS_STICKY_ATTR(_jit_dimmap_class,"basic",0,"1");
	
	attr = jit_object_new(_jit_sym_jit_attr_offset_array,"map",_jit_sym_long,JIT_MATRIX_MAX_DIMCOUNT,attrflags,
		(method)0L,(method)jit_dimmap_map,calcoffset(t_jit_dimmap,mapcount),calcoffset(t_jit_dimmap,map));
	jit_class_addattr(_jit_dimmap_class,attr);
	CLASS_ATTR_LABEL(_jit_dimmap_class,"map",0,"Dimension Map");	
	
	attr = jit_object_new(_jit_sym_jit_attr_offset_array,"invert",_jit_sym_long,JIT_MATRIX_MAX_DIMCOUNT,attrflags,
		(method)0L,(method)0L,calcoffset(t_jit_dimmap,invertcount),calcoffset(t_jit_dimmap,invert));
	jit_class_addattr(_jit_dimmap_class,attr);
	CLASS_ATTR_LABEL(_jit_dimmap_class,"invert",0,"Dimension Invert");	

	CLASS_STICKY_ATTR_CLEAR(_jit_dimmap_class, "basic");
	CLASS_STICKY_ATTR_CLEAR(_jit_dimmap_class, "category");

	jit_class_register(_jit_dimmap_class);

	return JIT_ERR_NONE;
}
コード例 #7
0
ファイル: jit.gradient.c プロジェクト: CICM/max6-sdk
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;
}
コード例 #8
0
ファイル: jit.map.c プロジェクト: pukulsesuatu/max6-sdk
t_jit_err jit_map_init(void) 
{
	long attrflags=0;
	t_jit_object *attr,*mop;
	
	_jit_map_class = jit_class_new("jit_map",(method)jit_map_new,(method)jit_map_free,
		sizeof(t_jit_map),0L);

	//add mop
	mop = jit_object_new(_jit_sym_jit_mop,1,1); //#inputs,#outputs
	jit_class_addadornment(_jit_map_class,mop);
	//add methods
	jit_class_addmethod(_jit_map_class, (method)jit_map_matrix_calc, 		"matrix_calc", 		A_CANT, 0L);
	//add attributes	
	attrflags = JIT_ATTR_GET_DEFER_LOW | JIT_ATTR_SET_USURP_LOW;
	
	CLASS_STICKY_ATTR(_jit_map_class,"category",0,"Behavior");
	CLASS_STICKY_ATTR(_jit_map_class,"basic",0,"1");

	attr = jit_object_new(_jit_sym_jit_attr_offset_array,"map",_jit_sym_float64,4,attrflags,
		(method)0L,(method)0L,0/*fix*/,calcoffset(t_jit_map,map));
	jit_class_addattr(_jit_map_class,attr);
	CLASS_ATTR_LABEL(_jit_map_class,"map",0,"Input to Output Map");	
	
	attr = jit_object_new(_jit_sym_jit_attr_offset,"clip",_jit_sym_long,attrflags,
		(method)0L,(method)0L,calcoffset(t_jit_map,clip));
	jit_class_addattr(_jit_map_class,attr);
	CLASS_ATTR_STYLE_LABEL(_jit_map_class,"clip",0,"onoff","Clip Values");	
	
	CLASS_STICKY_ATTR_CLEAR(_jit_map_class, "category");
	CLASS_STICKY_ATTR_CLEAR(_jit_map_class, "basic");

	jit_class_register(_jit_map_class);

	return JIT_ERR_NONE;
}
コード例 #9
0
ファイル: jit.change.c プロジェクト: CICM/max6-sdk
t_jit_err jit_change_init(void) 
{
	long attrflags=0;
	t_jit_object *attr;
	t_jit_object *mop;
	
	_jit_change_class = jit_class_new("jit_change",(method)jit_change_new,(method)jit_change_free,
		sizeof(t_jit_change),0L);

	//add mop
	mop = jit_object_new(_jit_sym_jit_mop,1,1);
	jit_class_addadornment(_jit_change_class,mop);
	//add methods
	jit_class_addmethod(_jit_change_class, (method)jit_change_matrix_calc, "matrix_calc", A_CANT, 0L);
	//add attributes	
	attrflags = JIT_ATTR_GET_DEFER_LOW | JIT_ATTR_SET_USURP_LOW;

	CLASS_STICKY_CATEGORY(_jit_change_class,0,"Behavior");
	CLASS_STICKY_ATTR(_jit_change_class,"basic",0,"1");
	
	attr = jit_object_new(_jit_sym_jit_attr_offset,"thresh",_jit_sym_long,attrflags,
		(method)0L,(method)0L,calcoffset(t_jit_change,thresh));
	jit_class_addattr(_jit_change_class,attr);
	CLASS_ATTR_LABEL(_jit_change_class,"thresh",0,"Threshold");	
	
	attr = jit_object_new(_jit_sym_jit_attr_offset,"mode",_jit_sym_char,attrflags,
		(method)0L,(method)0L,calcoffset(t_jit_change,mode));
	jit_class_addattr(_jit_change_class,attr);
	CLASS_ATTR_LABEL(_jit_change_class,"mode",0,"Pass Mode");	
	CLASS_ATTR_ENUMINDEX2(_jit_change_class, "mode", 0, "More-Than-Threshold", "Less-Than-Threshold");
	
	CLASS_STICKY_CATEGORY_CLEAR(_jit_change_class);
	CLASS_STICKY_ATTR_CLEAR(_jit_change_class, "basic");

	attrflags = JIT_ATTR_GET_OPAQUE_USER | JIT_ATTR_SET_OPAQUE_USER;
	attr = jit_object_new(_jit_sym_jit_attr_offset,"change",_jit_sym_long,attrflags,
		(method)0L,(method)0L,calcoffset(t_jit_change,change));
	jit_class_addattr(_jit_change_class,attr);
	
	jit_class_register(_jit_change_class);
	
//	ps_change = gensym("change");

	return JIT_ERR_NONE;
}
コード例 #10
0
int C74_EXPORT main(void)
{
	t_class *c;

	c = class_new("hoa.connect", (method)connect_new, (method)connect_free, sizeof(t_connect), 0L, A_GIMME, 0);
	
	hoa_initclass(c, (method)NULL);
	
	class_addmethod(c, (method)connect_notify,	"notify",	A_CANT, 0);
	class_addmethod(c, (method)connect_bang,	"bang",		A_CANT,	0);
    class_addmethod(c, (method)connect_assist,	"assist",	A_CANT,	0);
	
	CLASS_STICKY_ATTR		(c, "category", 0, "Behavior");
	CLASS_ATTR_RGBA			(c, "zhcolor", 0, t_connect, f_color_zero);
	CLASS_ATTR_ACCESSORS	(c, "zhcolor", NULL, connect_setattr_zerocolor);
	CLASS_ATTR_SAVE			(c, "zhcolor", 1);
	CLASS_ATTR_STYLE_LABEL	(c, "zhcolor", 0, "rgba", "zero harmonics color");
	
	CLASS_ATTR_RGBA			(c, "phcolor", 0, t_connect, f_color_positiv);
	CLASS_ATTR_ACCESSORS	(c, "phcolor", NULL, connect_setattr_poscolor);
	CLASS_ATTR_SAVE			(c, "phcolor", 1);
	CLASS_ATTR_STYLE_LABEL	(c, "phcolor", 0, "rgba", "positive harmonics color");
    
	CLASS_ATTR_RGBA			(c, "nhcolor", 0, t_connect, f_color_negativ);
	CLASS_ATTR_ACCESSORS	(c, "nhcolor", NULL, connect_setattr_negcolor);
	CLASS_ATTR_SAVE			(c, "nhcolor", 1);
	CLASS_ATTR_STYLE_LABEL	(c, "nhcolor", 0, "rgba", "negative harmonics color");
	
	CLASS_ATTR_RGBA			(c, "planecolor", 0, t_connect, f_color_plane);
	CLASS_ATTR_ACCESSORS	(c, "planecolor", NULL, connect_setattr_planecolor);
	CLASS_ATTR_STYLE_LABEL	(c, "planecolor", 0, "rgba", "planewaves signals color");
	CLASS_ATTR_SAVE			(c, "planecolor", 1);
    
	CLASS_STICKY_ATTR_CLEAR	(c, "category");
	
	class_register(CLASS_BOX, c);
	connect_class = c;
	hoa_print_credit();
	return 0;
}
コード例 #11
0
t_jit_err jit_openlase_trace_init(void) 
{
	long attrflags=0;
	t_jit_object *attr, *mop;
	
	_jit_openlase_trace_class = jit_class_new("jit_openlase_trace",(method)jit_openlase_trace_new,(method)jit_openlase_trace_free,
		sizeof(t_jit_openlase_trace),0L);

	//add mop
	mop = jit_object_new(_jit_sym_jit_mop,1,0);
	jit_class_addadornment(_jit_openlase_trace_class, mop);
	//add methods
	jit_class_addmethod(_jit_openlase_trace_class, (method)jit_openlase_trace_matrix_calc, 		"matrix_calc", 		A_CANT, 0L);

	//add attributes	
	attrflags = JIT_ATTR_GET_DEFER_LOW | JIT_ATTR_SET_USURP_LOW;	
	CLASS_STICKY_ATTR(_jit_openlase_trace_class,"category",0,"Laser");
	CLASS_STICKY_ATTR(_jit_openlase_trace_class,"basic",0,"1");
	
	attr = jit_object_new(_jit_sym_jit_attr_offset, "rate", _jit_sym_long, attrflags,
						  (method)0L, (method)0L, calcoffset(t_jit_openlase_trace, params.rate));
	jit_class_addattr(_jit_openlase_trace_class,attr);
	CLASS_ATTR_LABEL(_jit_openlase_trace_class, "rate", 0, "rate: Speed of Laser Scanner (Hz)");

	attr = jit_object_new(_jit_sym_jit_attr_offset, "on_speed", _jit_sym_float32, attrflags,
						  (method)0L, (method)0L, calcoffset(t_jit_openlase_trace, params.on_speed));
	jit_class_addattr(_jit_openlase_trace_class,attr);
	CLASS_ATTR_LABEL(_jit_openlase_trace_class, "on_speed", 0, "");
	
	attr = jit_object_new(_jit_sym_jit_attr_offset, "off_speed", _jit_sym_float32, attrflags,
						  (method)0L, (method)0L, calcoffset(t_jit_openlase_trace, params.off_speed));
	jit_class_addattr(_jit_openlase_trace_class,attr);
	CLASS_ATTR_LABEL(_jit_openlase_trace_class, "off_speed", 0, "");
	
	attr = jit_object_new(_jit_sym_jit_attr_offset, "start_wait", _jit_sym_long, attrflags,
						  (method)0L, (method)0L, calcoffset(t_jit_openlase_trace, params.start_wait));
	jit_class_addattr(_jit_openlase_trace_class,attr);
	CLASS_ATTR_LABEL(_jit_openlase_trace_class, "start_wait", 0, "");
	
	attr = jit_object_new(_jit_sym_jit_attr_offset, "end_wait", _jit_sym_long, attrflags,
						  (method)0L, (method)0L, calcoffset(t_jit_openlase_trace, params.end_wait));
	jit_class_addattr(_jit_openlase_trace_class, attr);
	CLASS_ATTR_LABEL(_jit_openlase_trace_class, "end_wait", 0, "");
	
	attr = jit_object_new(_jit_sym_jit_attr_offset, "start_dwell", _jit_sym_long, attrflags,
						  (method)0L, (method)0L, calcoffset(t_jit_openlase_trace, params.start_dwell));
	jit_class_addattr(_jit_openlase_trace_class, attr);
	CLASS_ATTR_LABEL(_jit_openlase_trace_class, "start_dwell", 0, "");
	
	attr = jit_object_new(_jit_sym_jit_attr_offset, "end_dwell", _jit_sym_long, attrflags,
						  (method)0L, (method)0L, calcoffset(t_jit_openlase_trace, params.end_dwell));
	jit_class_addattr(_jit_openlase_trace_class, attr);
	CLASS_ATTR_LABEL(_jit_openlase_trace_class, "end_dwell", 0, "");
	
	attr = jit_object_new(_jit_sym_jit_attr_offset, "corner_dwell", _jit_sym_long, attrflags,
						  (method)0L, (method)0L, calcoffset(t_jit_openlase_trace, params.corner_dwell));
	jit_class_addattr(_jit_openlase_trace_class, attr);
	CLASS_ATTR_LABEL(_jit_openlase_trace_class, "corner_dwell", 0, "");
	
	attr = jit_object_new(_jit_sym_jit_attr_offset, "min_length", _jit_sym_long, attrflags,
						  (method)0L, (method)0L, calcoffset(t_jit_openlase_trace, params.min_length));
	jit_class_addattr(_jit_openlase_trace_class, attr);
	CLASS_ATTR_LABEL(_jit_openlase_trace_class, "min_length", 0, "");

	attr = jit_object_new(_jit_sym_jit_attr_offset, "overscan", _jit_sym_float32, attrflags,
						  (method)0L, (method)0L, calcoffset(t_jit_openlase_trace, overscan));
	jit_class_addattr(_jit_openlase_trace_class, attr);
	CLASS_ATTR_LABEL(_jit_openlase_trace_class, "overscan", 0, "");
	
	attr = jit_object_new(_jit_sym_jit_attr_offset, "aspect", _jit_sym_float32, attrflags,
						  (method)0L, (method)0L, calcoffset(t_jit_openlase_trace, aspect));
	jit_class_addattr(_jit_openlase_trace_class, attr);
	CLASS_ATTR_LABEL(_jit_openlase_trace_class, "aspect", 0, "");
	
	attr = jit_object_new(_jit_sym_jit_attr_offset, "decimate", _jit_sym_long, attrflags,
						  (method)0L, (method)0L, calcoffset(t_jit_openlase_trace, decimate));
	jit_class_addattr(_jit_openlase_trace_class, attr);
	CLASS_ATTR_LABEL(_jit_openlase_trace_class, "decimate", 0, "");
	
	attr = jit_object_new(_jit_sym_jit_attr_offset, "snap_pix", _jit_sym_long, attrflags,
						  (method)0L, (method)0L, calcoffset(t_jit_openlase_trace, snap_pix));
	jit_class_addattr(_jit_openlase_trace_class, attr);
	CLASS_ATTR_LABEL(_jit_openlase_trace_class, "snap_pix", 0, "");
	
	CLASS_STICKY_ATTR_CLEAR(_jit_openlase_trace_class, "category");
	CLASS_STICKY_ATTR_CLEAR(_jit_openlase_trace_class, "basic");
	
	jit_class_register(_jit_openlase_trace_class);
	return JIT_ERR_NONE;
}
コード例 #12
0
int JAMOMA_EXPORT_MAXOBJ main(void)
{
	long		flags;
	t_class*	c;
	long		numDataspaces = 0;
	t_symbol**	dataspaceNames = NULL;
	TTValue		functionNames;
	TTSymbol*	functionName;
	char		dataspaces[2048];
	char		functions[2048];
	char		tempstr[64];
	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, " ");
	}
	FunctionLib::getUnitNames(functionNames);
	functions[0] = 0;
	for(i=0; i<functionNames.getSize(); i++){
		functionNames.get(i, &functionName);
		strcat(functions, functionName->getCString());	
		strcat(functions, " ");
	}

	c = class_new("jcom.paramui",
				  (method)paramui_new,
				  (method)paramui_free,
				  sizeof(t_paramui),
				  (method)NULL,
				  A_GIMME,
				  0L);

	flags = JBOX_TEXTFIELD | JBOX_COLOR;
	jbox_initclass(c, flags);
	c->c_flags |= CLASS_FLAG_NEWDICTIONARY; // to specify dictionary constructor

	class_addmethod(c, (method)paramui_notify,			"notify",			A_CANT, 0);
	class_addmethod(c, (method)paramui_paint,			"paint",			A_CANT, 0);
	class_addmethod(c, (method)paramui_mousedown,		"mousedown",		A_CANT, 0);
	class_addmethod(c, (method)paramui_mousedragdelta,	"mousedragdelta",	A_CANT, 0);
	class_addmethod(c, (method)paramui_mouseup,			"mouseup",			A_CANT, 0);
	class_addmethod(c, (method)paramui_oksize,			"oksize",			A_CANT, 0);

	CLASS_ATTR_DEFAULT(c,		"patching_rect",	0, "0. 0. 144. 20.");
	CLASS_ATTR_DEFAULT(c,		"fontname",			0, JAMOMA_DEFAULT_FONT);
	snprintf(tempstr, 64, "%f", JAMOMA_DEFAULT_FONTSIZE);
	CLASS_ATTR_DEFAULT(c,		"fontsize",			0, tempstr);

	CLASS_STICKY_ATTR(c,		"category",			0, "Jamoma");
	
	CLASS_ATTR_SYM(c,			"name",				0, t_paramui, attr_name);
	CLASS_ATTR_LABEL(c,			"name",				0, "Parameter Name");
	CLASS_ATTR_DEFAULT(c,		"name",				0, "my/parameter");
	CLASS_ATTR_SAVE(c,			"name",				0);
	CLASS_ATTR_ACCESSORS(c,		"name",				paramui_getName, paramui_setName);

	CLASS_ATTR_SYM(c,			"label",			0, t_paramui, attr_label);
	CLASS_ATTR_LABEL(c,			"label",			0, "Parameter Label");
	CLASS_ATTR_STYLE(c,			"label",			0, "text_onesymbol");
	CLASS_ATTR_DEFAULT(c,		"label",			0, "");
	CLASS_ATTR_SAVE(c,			"label",			0);

	CLASS_ATTR_SYM(c,			"type",				0, t_paramui, attr_type);
	CLASS_ATTR_LABEL(c,			"type",				0, "Data Type");
	CLASS_ATTR_ENUM(c,			"type",				0, "decimal integer string boolean");
	CLASS_ATTR_DEFAULT(c,		"type",				0, "decimal");
	CLASS_ATTR_SAVE(c,			"type",				0);
	CLASS_ATTR_ACCESSORS(c,		"type",				paramui_getType, paramui_setType);

	CLASS_ATTR_FLOAT_VARSIZE(c,	"value/default",	0, t_paramui, attr_default, attr_defaultSize, LISTSIZE);
	CLASS_ATTR_LABEL(c,			"value/default",	0, "Default Value");
	CLASS_ATTR_DEFAULT(c,		"value/default",	0, "0.");
	CLASS_ATTR_SAVE(c,			"value/default",	0);
	CLASS_ATTR_ACCESSORS(c,		"value/default",	paramui_getDefault, paramui_setDefault);

	CLASS_ATTR_SYM(c,			"ramp/drive",		0, t_paramui, attr_rampDrive);
	CLASS_ATTR_LABEL(c,			"ramp/drive",		0, "Ramp Drive");
	CLASS_ATTR_DEFAULT(c,		"ramp/drive",		0, "none");
	CLASS_ATTR_SAVE(c,			"ramp/drive",		0);
	CLASS_ATTR_ACCESSORS(c,		"ramp/drive",		paramui_getRampDrive, paramui_setRampDrive);

	CLASS_ATTR_SYM(c,			"ramp/function",	0, t_paramui, attr_rampFunction);
	CLASS_ATTR_LABEL(c,			"ramp/function",	0, "Ramp Function/Shape");
	CLASS_ATTR_ENUM(c,			"ramp/function",	0, functions);
	CLASS_ATTR_DEFAULT(c,		"ramp/function",	0, "linear");
	CLASS_ATTR_SAVE(c,			"ramp/function",	0);
	CLASS_ATTR_ACCESSORS(c,		"ramp/function",	paramui_getRampFunction, paramui_setRampFunction);

	CLASS_ATTR_LONG(c,			"view/freeze",		0, t_paramui, attr_uiFreeze);
	CLASS_ATTR_LABEL(c,			"view/freeze",		0, "Freeze the UI");
	CLASS_ATTR_STYLE(c,			"view/freeze",		0, "onoff");
	CLASS_ATTR_DEFAULT(c,		"view/freeze",		0, "0");
	CLASS_ATTR_SAVE(c,			"view/freeze",		0);
	CLASS_ATTR_ACCESSORS(c,		"view/freeze",		paramui_getUIFreeze, paramui_setUIFreeze);

	CLASS_ATTR_FLOAT(c,			"value/stepsize",	0, t_paramui, attr_stepsize);
	CLASS_ATTR_LABEL(c,			"value/stepsize",	0, "Step Size for inc/dec");
	CLASS_ATTR_DEFAULT(c,		"value/stepsize",	0, "1.0");
	CLASS_ATTR_SAVE(c,			"value/stepsize",	0);
	CLASS_ATTR_ACCESSORS(c,		"value/stepsize",	paramui_getStepsize, paramui_setStepsize);

	CLASS_ATTR_LONG(c,			"priority",			0, t_paramui, attr_priority);
	CLASS_ATTR_LABEL(c,			"priority",			0, "Priority when Recalled from Presets");
	CLASS_ATTR_DEFAULT(c,		"priority",			0, "0");
	CLASS_ATTR_SAVE(c,			"priority",			0);
	CLASS_ATTR_ACCESSORS(c,		"priority",			paramui_getPriority, paramui_setPriority);

	CLASS_ATTR_FLOAT_ARRAY(c,	"range/bounds",		0, t_paramui, attr_range, 2);
	CLASS_ATTR_LABEL(c,			"range/bounds",		0, "Range");
	CLASS_ATTR_DEFAULT(c,		"range/bounds",		0, "0.0 1.0");
	CLASS_ATTR_SAVE(c,			"range/bounds",		0);
	CLASS_ATTR_ACCESSORS(c,		"range/bounds",		paramui_getRange, paramui_setRange);

	CLASS_ATTR_LONG(c,			"repetitions/allow",		0, t_paramui, attr_repetitions);
	CLASS_ATTR_LABEL(c,			"repetitions/allow",		0, "Allow Repeated Values");
	CLASS_ATTR_STYLE(c,			"repetitions/allow",		0, "onoff");
	CLASS_ATTR_DEFAULT(c,		"repetitions/allow",		0, "0");
	CLASS_ATTR_SAVE(c,			"repetitions/allow",		0);
	CLASS_ATTR_ACCESSORS(c,		"repetitions/allow",		paramui_getRepetitions, paramui_setRepetitions);

	CLASS_ATTR_SYM(c,			"range/clipmode",	0, t_paramui, attr_clipmode);
	CLASS_ATTR_LABEL(c,			"range/clipmode",	0, "Mode for Clipping to Range");
	CLASS_ATTR_ENUM(c,			"range/clipmode",	0, "none low high both");
	CLASS_ATTR_DEFAULT(c,		"range/clipmode",	0, "none");
	CLASS_ATTR_SAVE(c,			"range/clipmode",	0);
	CLASS_ATTR_ACCESSORS(c,		"range/clipmode",	paramui_getClipmode, paramui_setClipmode);

	CLASS_ATTR_SYM(c,			"description",		0, t_paramui, attr_description);
	CLASS_ATTR_LABEL(c,			"description",		0, "Parameter Description");
	//CLASS_ATTR_STYLE(c,			"description",		0, "text_large");
	CLASS_ATTR_STYLE(c,			"description",		0, "text_onesymbol");
	CLASS_ATTR_DEFAULT(c,		"description",		0, "This parameter should do something.");
	CLASS_ATTR_SAVE(c,			"description",		0);
	CLASS_ATTR_ACCESSORS(c,		"description",		paramui_getDescription, paramui_setDescription);

	CLASS_ATTR_SYM(c,			"dataspace",		0, t_paramui, attr_dataspace);
	CLASS_ATTR_LABEL(c,			"dataspace",		0, "Dataspace");
	CLASS_ATTR_ENUM(c,			"dataspace",		0, dataspaces);
	CLASS_ATTR_DEFAULT(c,		"dataspace",		0, "none");
	CLASS_ATTR_SAVE(c,			"dataspace",		0);
	CLASS_ATTR_ACCESSORS(c,		"dataspace",		paramui_getDataspace, paramui_setDataspace);

	CLASS_ATTR_SYM(c,			"dataspace/unit/active",		0, t_paramui, attr_unitActive);
	CLASS_ATTR_LABEL(c,			"dataspace/unit/active",		0, "Active Unit within the Dataspace");
	CLASS_ATTR_DEFAULT(c,		"dataspace/unit/active",		0, "none");
	CLASS_ATTR_SAVE(c,			"dataspace/unit/active",		0);
	CLASS_ATTR_ACCESSORS(c,		"dataspace/unit/active",		paramui_getUnitActive, paramui_setUnitActive);

	CLASS_ATTR_SYM(c,			"dataspace/unit/native",		0, t_paramui, attr_unitNative);
	CLASS_ATTR_LABEL(c,			"dataspace/unit/native",		0, "Native Unit within the Dataspace");
	CLASS_ATTR_DEFAULT(c,		"dataspace/unit/native",		0, "none");
	CLASS_ATTR_SAVE(c,			"dataspace/unit/native",		0);
	CLASS_ATTR_ACCESSORS(c,		"dataspace/unit/native",		paramui_getUnitNative, paramui_setUnitNative);

	CLASS_STICKY_ATTR_CLEAR(c,	"category");

	class_register(CLASS_BOX, c);
	s_ui_class = c;
	
	sysmem_freeptr(dataspaceNames);
	return 0;
}
コード例 #13
0
t_jit_err jit_keyscreen_init(void)
{
	long attrflags=0;
	t_jit_object *attr, *mop;

	_jit_keyscreen_class = jit_class_new("jit_keyscreen",(method)jit_keyscreen_new,(method)jit_keyscreen_free,
										 sizeof(t_jit_keyscreen),0L);

	//add mop
	mop = jit_object_new(_jit_sym_jit_mop,3,1);
	jit_mop_single_type(mop,_jit_sym_char);
	jit_mop_single_planecount(mop,4);
	jit_class_addadornment(_jit_keyscreen_class,mop);

	//add methods
	jit_class_addmethod(_jit_keyscreen_class, (method)jit_keyscreen_matrix_calc, 		"matrix_calc", 		A_CANT, 0L);


	//add attributes
	attrflags = JIT_ATTR_GET_DEFER_LOW | JIT_ATTR_SET_USURP_LOW;

	CLASS_STICKY_CATEGORY(_jit_keyscreen_class,0,"Behavior");
	CLASS_STICKY_ATTR(_jit_keyscreen_class,"basic",0,"1");

	// mode -- switches keying states
	attr = jit_object_new(_jit_sym_jit_attr_offset,"mode",_jit_sym_long,attrflags,
						  (method)0L,(method)0L,calcoffset(t_jit_keyscreen,mode));
	jit_class_addattr(_jit_keyscreen_class,attr);
	CLASS_ATTR_LABEL(_jit_keyscreen_class,"mode",0,"Keying Mode");
	CLASS_ATTR_ENUMINDEX3(_jit_keyscreen_class, "mode", 0, "Wrap", "Clip", "Fold");

	// key,target,mask -- switches who gets keyed with whom by whom
	attr = jit_object_new(_jit_sym_jit_attr_offset,"key",_jit_sym_long,attrflags,
						  (method)0L,(method)0L,calcoffset(t_jit_keyscreen,key));
	jit_class_addattr(_jit_keyscreen_class,attr);
	CLASS_ATTR_LABEL(_jit_keyscreen_class,"key",0,"Key Input");

	attr = jit_object_new(_jit_sym_jit_attr_offset,"target",_jit_sym_long,attrflags,
						  (method)0L,(method)0L,calcoffset(t_jit_keyscreen,target));
	jit_class_addattr(_jit_keyscreen_class,attr);
	CLASS_ATTR_LABEL(_jit_keyscreen_class,"target",0,"Target Input");

	attr = jit_object_new(_jit_sym_jit_attr_offset,"mask",_jit_sym_long,attrflags,
						  (method)0L,(method)0L,calcoffset(t_jit_keyscreen,mask));
	jit_class_addattr(_jit_keyscreen_class,attr);
	CLASS_ATTR_LABEL(_jit_keyscreen_class,"mask",0,"Mask Input");

	// red, green, blue, tols -- changes colors and tolerances of the key
	attr = jit_object_new(_jit_sym_jit_attr_offset,"alpha",_jit_sym_float32,attrflags,
						  (method)0L,(method)0L,calcoffset(t_jit_keyscreen,alpha));
	jit_class_addattr(_jit_keyscreen_class,attr);
	CLASS_ATTR_LABEL(_jit_keyscreen_class,"alpha",0,"Alpha");

	attr = jit_object_new(_jit_sym_jit_attr_offset,"red",_jit_sym_float32,attrflags,
						  (method)0L,(method)0L,calcoffset(t_jit_keyscreen,red));
	jit_class_addattr(_jit_keyscreen_class,attr);
	CLASS_ATTR_LABEL(_jit_keyscreen_class,"red",0,"Red");

	attr = jit_object_new(_jit_sym_jit_attr_offset,"green",_jit_sym_float32,attrflags,
						  (method)0L,(method)0L,calcoffset(t_jit_keyscreen,green));
	jit_class_addattr(_jit_keyscreen_class,attr);
	CLASS_ATTR_LABEL(_jit_keyscreen_class,"green",0,"Green");

	attr = jit_object_new(_jit_sym_jit_attr_offset,"blue",_jit_sym_float32,attrflags,
						  (method)0L,(method)0L,calcoffset(t_jit_keyscreen,blue));
	jit_class_addattr(_jit_keyscreen_class,attr);
	CLASS_ATTR_LABEL(_jit_keyscreen_class,"blue",0,"Blue");

	attr = jit_object_new(_jit_sym_jit_attr_offset,"alphatol",_jit_sym_float32,attrflags,
						  (method)0L,(method)0L,calcoffset(t_jit_keyscreen,alphatol));
	jit_class_addattr(_jit_keyscreen_class,attr);
	CLASS_ATTR_LABEL(_jit_keyscreen_class,"alphatol",0,"Alpha Tolerance");

	attr = jit_object_new(_jit_sym_jit_attr_offset,"redtol",_jit_sym_float32,attrflags,
						  (method)0L,(method)0L,calcoffset(t_jit_keyscreen,redtol));
	jit_class_addattr(_jit_keyscreen_class,attr);
	CLASS_ATTR_LABEL(_jit_keyscreen_class,"redtol",0,"Red Tolerance");

	attr = jit_object_new(_jit_sym_jit_attr_offset,"greentol",_jit_sym_float32,attrflags,
						  (method)0L,(method)0L,calcoffset(t_jit_keyscreen,greentol));
	jit_class_addattr(_jit_keyscreen_class,attr);
	CLASS_ATTR_LABEL(_jit_keyscreen_class,"greentol",0,"Green Tolerance");

	attr = jit_object_new(_jit_sym_jit_attr_offset,"bluetol",_jit_sym_float32,attrflags,
						  (method)0L,(method)0L,calcoffset(t_jit_keyscreen,bluetol));
	jit_class_addattr(_jit_keyscreen_class,attr);
	CLASS_ATTR_LABEL(_jit_keyscreen_class,"bluetol",0,"Blue Tolerance");

	CLASS_STICKY_CATEGORY_CLEAR(_jit_keyscreen_class);
	CLASS_STICKY_ATTR_CLEAR(_jit_keyscreen_class, "basic");

	jit_class_register(_jit_keyscreen_class);

	return JIT_ERR_NONE;
}
コード例 #14
0
ファイル: resdisplay.c プロジェクト: frixid/CNMAT-Externs
int main(void){
	t_class *c = class_new("resdisplay", (method)rd_new, (method)rd_free, sizeof(t_rd), 0L, A_GIMME, 0);

	c->c_flags |= CLASS_FLAG_NEWDICTIONARY; 
 	jbox_initclass(c, JBOX_FIXWIDTH | JBOX_COLOR | JBOX_FONTATTR); 
    
	class_addmethod(c, (method)rd_paint, "paint", A_CANT, 0); 
	class_addmethod(c, (method)rd_bang, "bang", 0);
	class_addmethod(c, (method)rd_int, "int", A_LONG, 0);
	class_addmethod(c, (method)rd_float, "float", A_FLOAT, 0);
	class_addmethod(c, (method)rd_sinusoids, "sinusoids", A_GIMME, 0);
	class_addmethod(c, (method)rd_list, "list", A_GIMME, 0);
	class_addmethod(c, (method)rd_assist, "assist", A_CANT, 0);
	class_addmethod(c, (method)rd_clear, "clear", 0);
	class_addmethod(c, (method)rd_displayrange, "displayrange", A_FLOAT, A_FLOAT, 0);

	class_addmethod(c, (method)rd_mousedown, "mousedown", A_CANT, 0);
	class_addmethod(c, (method)rd_mousedrag, "mousedrag", A_CANT, 0);

	class_addmethod(c, (method)rd_notify, "notify", A_CANT, 0);
    
	CLASS_STICKY_ATTR(c, "category", 0, "Color"); 
    
 	CLASS_ATTR_RGBA(c, "bgcolor", 0, t_rd, bgcolor); 
 	CLASS_ATTR_DEFAULTNAME_SAVE_PAINT(c, "bgcolor", 0, "1. 1. 1. 1."); 
 	CLASS_ATTR_STYLE_LABEL(c, "bgcolor", 0, "rgba", "Background Color"); 

 	CLASS_ATTR_RGBA(c, "datacolor", 0, t_rd, datacolor); 
 	CLASS_ATTR_DEFAULTNAME_SAVE_PAINT(c, "datacolor", 0, "0. 0. 0. 1."); 
 	CLASS_ATTR_STYLE_LABEL(c, "datacolor", 0, "rgba", "Data Color"); 

 	CLASS_ATTR_RGBA(c, "selectioncolor", 0, t_rd, selectioncolor); 
 	CLASS_ATTR_DEFAULTNAME_SAVE_PAINT(c, "selectioncolor", 0, "0. 0. 1. 1."); 
 	CLASS_ATTR_STYLE_LABEL(c, "selectioncolor", 0, "rgba", "Selection Color"); 

 	CLASS_ATTR_RGBA(c, "bordercolor", 0, t_rd, bordercolor); 
 	CLASS_ATTR_DEFAULTNAME_SAVE_PAINT(c, "bordercolor", 0, "0. 0. 0. 1."); 
 	CLASS_ATTR_STYLE_LABEL(c, "bordercolor", 0, "rgba", "Border Color"); 
    
	CLASS_STICKY_ATTR_CLEAR(c, "category");

	CLASS_ATTR_DOUBLE(c, "freqmin", 0, t_rd, freqmin);
	CLASS_ATTR_DEFAULTNAME_SAVE(c, "freqmin", 0, "0.0");
	CLASS_ATTR_DOUBLE(c, "freqmax", 0, t_rd, freqmax);
	CLASS_ATTR_DEFAULTNAME_SAVE(c, "freqmax", 0, "22050.");

	CLASS_ATTR_DOUBLE(c, "ampmin", 0, t_rd, ampmin);
	CLASS_ATTR_DEFAULTNAME_SAVE(c, "ampmin", 0, "0.0");
	CLASS_ATTR_DOUBLE(c, "ampmax", 0, t_rd, ampmax);
	CLASS_ATTR_DEFAULTNAME_SAVE(c, "ampmax", 0, "1.0");

	CLASS_ATTR_DOUBLE(c, "ampmin_log", 0, t_rd, ampmin_log);
	CLASS_ATTR_DEFAULTNAME_SAVE(c, "ampmin_log", 0, "-100.");
	CLASS_ATTR_DOUBLE(c, "ampmax_log", 0, t_rd, ampmax_log);
	CLASS_ATTR_DEFAULTNAME_SAVE(c, "ampmax_log", 0, "0.0");

	CLASS_ATTR_LONG(c, "mode", 0, t_rd, mode);
	CLASS_ATTR_PAINT(c, "mode", 0);
    
	CLASS_ATTR_LONG(c, "log", 0, t_rd, log);
	CLASS_ATTR_DEFAULTNAME_SAVE_PAINT(c, "log", 0, "1");
	CLASS_ATTR_DEFAULT(c, "patching_rect", 0, "0. 0. 300. 100."); 
    
	class_register(CLASS_BOX, c);
	rd_class = c;

	common_symbols_init();

	version_post_copyright();

	return 0;
}