CicmWrapper
Beta 0.4
A wrapper for Pure Data
|
Data Structures | |
struct | t_ewidget |
The default method of a class. More... | |
struct | t_eattr |
The attribute. More... | |
struct | t_eclass |
The class. More... | |
Macros | |
#define | CLASS_ATTR_INT(c, name, flags, struct, member) eclass_new_attr_typed(c,name, "int", 1, 0, flags, calcoffset(struct,member)) |
Macros that create an int attribute. | |
#define | CLASS_ATTR_LONG(c, name, flags, struct, member) eclass_new_attr_typed(c,name, "long", 1, 0, flags, calcoffset(struct,member)) |
Macros that create a long attribute. | |
#define | CLASS_ATTR_FLOAT(c, name, flags, struct, member) eclass_new_attr_typed(c,name, "float", 1, 0, flags, calcoffset(struct,member)) |
Macros that create a float attribute. | |
#define | CLASS_ATTR_DOUBLE(c, name, flags, struct, member) eclass_new_attr_typed(c,name, "double", 1, 0, flags, calcoffset(struct,member)) |
Macros that create a double attribute. | |
#define | CLASS_ATTR_RGB(c, name, flags, struct, member) eclass_new_attr_typed(c,name, "float", 3, 0, flags, calcoffset(struct,member)) |
Macros that create a rgb attribute. | |
#define | CLASS_ATTR_RGBA(c, name, flags, struct, member) eclass_new_attr_typed(c,name, "float", 4, 0, flags, calcoffset(struct,member)) |
Macros that create a rgba attribute. | |
#define | CLASS_ATTR_SYMBOL(c, name, flags, struct, member) eclass_new_attr_typed(c,name, "symbol", 1, 0, flags, calcoffset(struct,member)) |
Macros that create a symbol attribute. | |
#define | CLASS_ATTR_ATOM(c, name, flags, struct, member) eclass_new_attr_typed(c,name, "atom", 1, 0, flags, calcoffset(struct,member)) |
Macros that create a atom attribute. | |
#define | CLASS_ATTR_INT_ARRAY(c, name, flags, struct, member, size) eclass_new_attr_typed(c,name, "int", size, 0, flags, calcoffset(struct,member)) |
Macros that create an int array attribute. | |
#define | CLASS_ATTR_LONG_ARRAY(c, name, flags, struct, member, size) eclass_new_attr_typed(c,name, "long", size, 0, flags, calcoffset(struct,member)) |
Macros that create a long array attribute. | |
#define | CLASS_ATTR_FLOAT_ARRAY(c, name, flags, struct, member, size) eclass_new_attr_typed(c,name, "float", size, 0, flags, calcoffset(struct,member)) |
Macros that create a float array attribute. | |
#define | CLASS_ATTR_DOUBLE_ARRAY(c, name, flags, struct, member, size) eclass_new_attr_typed(c,name, "double", size, 0, flags, calcoffset(struct,member)) |
Macros that create a double array attribute. | |
#define | CLASS_ATTR_SYMBOL_ARRAY(c, name, flags, struct, member, size) eclass_new_attr_typed(c,name, "symbol", size, 0, flags, calcoffset(struct,member)) |
Macros that create a symbol array attribute. | |
#define | CLASS_ATTR_ATOM_ARRAY(c, name, flags, struct, member, size) eclass_new_attr_typed(c,name, "atom", size, 0, flags, calcoffset(struct,member)) |
Macros that create a atom array attribute. | |
#define | CLASS_ATTR_INT_VARSIZE(c, name, flags, struct, member, size, maxsize) eclass_new_attr_typed(c,name, "int", calcoffset(struct,size), maxsize, flags, calcoffset(struct,member)) |
Macros that create an int array with a variable size attribute. | |
#define | CLASS_ATTR_LONG_VARSIZE(c, name, flags, struct, member, size, maxsize) eclass_new_attr_typed(c,name, "long", calcoffset(struct,size), maxsize, flags, calcoffset(struct,member)) |
Macros that create a long array with a variable size attribute. | |
#define | CLASS_ATTR_FLOAT_VARSIZE(c, name, flags, struct, member, size, maxsize) eclass_new_attr_typed(c,name, "float", calcoffset(struct,size), maxsize, flags, calcoffset(struct,member)) |
Macros that create a float array with a variable size attribute. | |
#define | CLASS_ATTR_DOUBLE_VARSIZE(c, name, flags, struct, member, size, maxsize) eclass_new_attr_typed(c,name, "double", calcoffset(struct,size), maxsize, flags, calcoffset(struct,member)) |
Macros that create a double array with a variable size attribute. | |
#define | CLASS_ATTR_SYMBOL_VARSIZE(c, name, flags, struct, member, size, maxsize) eclass_new_attr_typed(c,name, "symbol", calcoffset(struct,size), maxsize, flags, calcoffset(struct,member)) |
Macros that create a symbol array with a variable size attribute. | |
#define | CLASS_ATTR_ATOM_VARSIZE(c, name, flags, struct, member, size, maxsize) eclass_new_attr_typed(c,name, "atom", calcoffset(struct,size), maxsize, flags, calcoffset(struct,member)) |
Macros that create a atom array with a variable size attribute. | |
#define | CLASS_ATTR_CATEGORY(c, name, flags, categoryname) eclass_attr_category(c,name,flags,categoryname) |
Macros that define the category of the attributes. | |
#define | CLASS_ATTR_ORDER(c, name, flags, order) eclass_attr_order(c,name,flags,order) |
Macros that define the order of the attributes. | |
#define | CLASS_ATTR_LABEL(c, name, flags, label) eclass_attr_label(c,name,flags,label) |
Macros that define the label of the attributes. | |
#define | CLASS_ATTR_STYLE(c, name, flags, style) eclass_attr_style(c,name,flags,style) |
Macros that define the style of the attributes. | |
#define | CLASS_ATTR_DEFAULT(c, name, flags, val) eclass_attr_default(c,name,flags,val) |
Macros that define the default value of the attributes. | |
#define | CLASS_ATTR_FILTER_MIN(c, name, value) eclass_attr_filter_min(c, name, value) |
Macros that define the minimum value of the attributes. | |
#define | CLASS_ATTR_FILTER_MAX(c, name, value) eclass_attr_filter_max(c, name, value) |
Macros that define the maximum value of the attributes. | |
#define | CLASS_ATTR_FILTER_CLIP(c, name, minval, maxval) eclass_attr_filter_min(c, name, minval); eclass_attr_filter_max(c, name, maxval); |
Macros that define the minimum and maximmum values of the attributes. | |
#define | CLASS_ATTR_STEP(c, name, value) eclass_attr_step(c, name, value) |
Macros that define the step value of the attributes. | |
#define | CLASS_ATTR_SAVE(c, name, flags) eclass_attr_save(c,name,flags) |
Macros that define the save behavior of the attributes. | |
#define | CLASS_ATTR_PAINT(c, name, flags) eclass_attr_paint(c,name,flags) |
Macros that define the paint behavior of the attributes. | |
#define | CLASS_ATTR_INVISIBLE(c, name, flags) eclass_attr_invisible(c,name,flags) |
Macros that define the visible behavior of the attributes. | |
#define | CLASS_ATTR_ACCESSORS(c, name, getter, setter) eclass_attr_accessor(c,name,(t_err_method)getter,(t_err_method)setter) |
Macros that define the setter and getter of the attributes. | |
#define | CLASS_ATTR_ITEMS(c, name, flags, list) eclass_attr_itemlist(c,name,flags, list) |
Macros that define the items list of the attributes. | |
#define | CLASS_ATTR_DEFAULT_SAVE_PAINT(c, attrname, flags, parsestr) { CLASS_ATTR_DEFAULT(c,attrname,flags,parsestr); CLASS_ATTR_SAVE(c,attrname,flags); CLASS_ATTR_PAINT(c,attrname,flags); } |
Macros that define the deault value, save and paint bbehavior of the attributes. | |
#define | CLASS_OBJ gensym("obj") |
Macros that define the a default object. | |
#define | CLASS_BOX gensym("box") |
Macros that define the a GUI box. | |
Functions | |
t_eclass * | eclass_new (const char *name, t_typ_method newm, t_typ_method freem, size_t size, int flags, t_atomtype arg1, int arg2) |
Allocates the memory and initialize a new t_eclass. More... | |
void | eclass_guiinit (t_eclass *c, long flags) |
Initialize the t_eclass for the GUI behavior. More... | |
void | eclass_init (t_eclass *c, long flags) _FUNCTION_DEPRECTAED_ |
Initialize the t_eclass for the GUI behavior (deprecated). More... | |
t_pd_err | eclass_register (t_symbol *name, t_eclass *c) |
Initialize the t_eclass in a namespace and preprare the t_eclass to be ready. More... | |
void | eclass_dspinit (t_eclass *c) |
Initialize the t_eclass for the DSP behavior. More... | |
void | eclass_addmethod (t_eclass *c, t_typ_method m, const char *name, t_atomtype type, long dummy) |
Adds a method to the t_eclass. More... | |
void | eclass_new_attr_typed (t_eclass *c, const char *attrname, const char *type, long size, long maxsize, long flags, long offset) |
Creates a new attribute. More... | |
void | eclass_attr_category (t_eclass *c, const char *attrname, long flags, const char *category) |
Sets the category of an attribute. More... | |
void | eclass_attr_order (t_eclass *c, const char *attrname, long flags, const char *order) |
Sets the order of an attribute. More... | |
void | eclass_attr_label (t_eclass *c, const char *attrname, long flags, const char *label) |
Sets the label of an attribute. More... | |
void | eclass_attr_style (t_eclass *c, const char *attrname, long flags, const char *style) |
Sets the style of an attribute. More... | |
void | eclass_attr_default (t_eclass *c, const char *attrname, long flags, const char *value) |
Sets the default value of an attribute. More... | |
void | eclass_attr_filter_min (t_eclass *c, const char *attrname, float value) |
Sets the minimum value of an attribute. More... | |
void | eclass_attr_filter_max (t_eclass *c, const char *attrname, float value) |
Sets the maximum value of an attribute for number attributes. More... | |
void | eclass_attr_step (t_eclass *c, const char *attrname, float value) |
Sets the step value of an attribute. More... | |
void | eclass_attr_save (t_eclass *c, const char *attrname, long flags) |
Sets if the attribute should be saved with the object. More... | |
void | eclass_attr_paint (t_eclass *c, const char *attrname, long flags) |
Sets if the attribute should call the ebox_redraw() function. More... | |
void | eclass_attr_invisible (t_eclass *c, const char *attrname, long flags) |
Sets if the attribute should be displayed in the properties window. More... | |
void | eclass_attr_accessor (t_eclass *c, const char *attrname, t_err_method getter, t_err_method setter) |
Initialize new getter and setter methods for the attributes. More... | |
void | eclass_attr_itemlist (t_eclass *c, const char *attrname, long flags, const char *list) |
Sets the list available items of an attribute. More... | |
The t_eclass part.
This part refers to the methods and structures that can be used by all the t_eclass structures.
struct t_ewidget |
The default method of a class.
It contains the adress of the default methods of a class.
Data Fields | ||
---|---|---|
t_getrectfn | w_getrectfn |
The native Pd get size method. |
t_displacefn | w_displacefn |
The native Pd displace method. |
t_selectfn | w_selectfn |
The native Pd selection method. |
t_activatefn | w_activatefn |
The native (dummy) Pd active method. |
t_deletefn | w_deletefn |
The native Pd deletion method. |
t_visfn | w_visfn |
The native Pd visible method. |
t_clickfn | w_clickfn |
The native Pd click method. |
t_typ_method | w_assist |
The dummy iolets assist method. |
t_typ_method | w_paint |
The paint method. |
t_typ_method | w_mouseenter |
The mouse enter method. |
t_typ_method | w_mouseleave |
The mouse leave method. |
t_typ_method | w_mousemove |
The mouse move method. |
t_typ_method | w_mousedown |
The mouse down method. |
t_typ_method | w_mousedrag |
The mouse drag method. |
t_typ_method | w_mouseup |
The mouse up method. |
t_typ_method | w_mousewheel |
The mouse wheel method. |
t_typ_method | w_dblclick |
The mouse double click method. |
t_typ_method | w_key |
The key method. |
t_typ_method | w_keyfilter |
The key filter method. |
t_typ_method | w_getdrawparameters |
The get draw parameter method. |
t_typ_method | w_save |
The save method. |
t_typ_method | w_dosave |
The real save method. |
t_typ_method | w_popup |
The popup method. |
t_typ_method | w_dsp |
The dsp method. |
t_typ_method | w_oksize |
The size validation method. |
t_err_method | w_notify |
The notification method. |
t_typ_method | w_write |
The write to file method. |
t_typ_method | w_read |
The read from file method. |
struct t_eattr |
The attribute.
It contains the members and the methods for an attribute. It is not already an object but perhaps it will be in the futur.
Data Fields | ||
---|---|---|
t_object | obj |
The dummy object. |
t_symbol * | name |
The name of the attribute. |
t_symbol * | type |
The type of the attribute (int, long, float,d double, rgba, etc.). |
t_symbol * | category |
The dummy category of the attribute. |
t_symbol * | label |
The label of the attribute. |
t_symbol * | style |
The style of the attribute (checkbutton, color, number, entry, menu). |
long | order |
The dummy order of the attribute. |
char | save |
If the attribute should be saved. |
char | paint |
If the attribute should repaint the t_ebox when it has changed. |
char | invisible |
If the attribute is invisible. |
long | flags |
The dummy flags of the attribute. |
long | offset |
The offset of the attribute in the object structure. |
long | sizemax |
The maximum size of the attribute if the attribute is an array. |
long | size |
The size of the attribute if the attribute is an array. |
t_err_method | getter |
The getter method of the attribute. |
t_err_method | setter |
The setter method of the attribute. |
long | clipped |
If the attribute is clipped if it's value or an array of numerical values. |
float | minimum |
The minimum value of the attribute. |
float | maximum |
The maximum value of the attribute. |
float | step |
The increment or decrement step calue of the attribute. |
t_symbol * | defvals |
The default value of the attribute. |
t_symbol ** | itemslist |
The available items of an attribute if it is a menu. |
long | itemssize |
The number of available items of an attribute if it is a menu. |
struct t_eclass |
The class.
It contains the Pure Data default class with extra methods and attributes.
Data Fields | ||
---|---|---|
t_class | c_class |
The default class. |
char | c_box |
The marker if the class is GUI. |
char | c_dsp |
The marker if the class is DSP. |
t_ewidget | c_widget |
The extra widget methods. |
t_eattr ** | c_attr |
The attributes. |
long | c_nattr |
The number of attributes. |
t_eclass* eclass_new | ( | const char * | name, |
t_typ_method | newm, | ||
t_typ_method | freem, | ||
size_t | size, | ||
int | flags, | ||
t_atomtype | arg1, | ||
int | arg2 | ||
) |
Allocates the memory and initialize a new t_eclass.
Allocates and intializes the default Pd t_class then enlarges it to fit a t_eclass.
This function should be replace class_new().
name | The class name. |
newm | The new method. |
freem | The free method. |
size | The size of the object. |
flags | The class flags. |
arg1 | The type of parameters the new function. |
arg2 | The type of object. |
void eclass_guiinit | ( | t_eclass * | c, |
long | flags | ||
) |
void eclass_init | ( | t_eclass * | c, |
long | flags | ||
) |
Initialize the t_eclass for the GUI behavior (deprecated).
Sets the defaults values and initializes the methods of the t_eclass for the GUI behavior.
c | The t_eclass pointer. |
flags | The dummy flags. |
void eclass_dspinit | ( | t_eclass * | c | ) |
void eclass_addmethod | ( | t_eclass * | c, |
t_typ_method | m, | ||
const char * | name, | ||
t_atomtype | type, | ||
long | dummy | ||
) |
Adds a method to the t_eclass.
Adds and wraps the methods of the class. For the moment the funtion takes only 1 type the second type is a dummy one and should always be 0.
c | The t_eclass pointer. |
m | The method. |
name | The name of the method. |
type | The type of the method. |
dummy | The dummy type that should be 0. |
void eclass_new_attr_typed | ( | t_eclass * | c, |
const char * | attrname, | ||
const char * | type, | ||
long | size, | ||
long | maxsize, | ||
long | flags, | ||
long | offset | ||
) |
Creates a new attribute.
Allocates the memory and intializes an new attribute for an eclass. You should prefer to use the MACROS.
c | The t_eclass pointer |
attrname | The attribute name |
type | The attribute type |
size | The attribute size |
maxsize | The attribute max size |
flags | The attribute flags (dummy) |
offset | The attribute bit offset in the object structure |
void eclass_attr_category | ( | t_eclass * | c, |
const char * | attrname, | ||
long | flags, | ||
const char * | category | ||
) |
Sets the category of an attribute.
For the moment the category is a dummy member of the attribute. You should prefer to use the MACROS.
c | The t_eclass pointer |
attrname | The attribute name |
flags | The flags of the attribute (dummy) |
category | The category of the attribute |
void eclass_attr_order | ( | t_eclass * | c, |
const char * | attrname, | ||
long | flags, | ||
const char * | order | ||
) |
Sets the order of an attribute.
For the moment the order is a dummy member of the attribute. You should prefer to use the MACROS.
c | The t_eclass pointer |
attrname | The attribute name |
flags | The flags of the attribute (dummy) |
order | The order of the attribute |
void eclass_attr_label | ( | t_eclass * | c, |
const char * | attrname, | ||
long | flags, | ||
const char * | label | ||
) |
Sets the label of an attribute.
The label is the message that will be displayed in the properties window of the object. You should prefer to use the MACROS.
c | The t_eclass pointer |
attrname | The attribute name |
flags | The flags of the attribute (dummy) |
label | The label of the attribute |
void eclass_attr_style | ( | t_eclass * | c, |
const char * | attrname, | ||
long | flags, | ||
const char * | style | ||
) |
Sets the style of an attribute.
The style is how the attribute will be displayed in the properties window of the object. it could be "onoff", "color", "number", "menu" or "entry". You should prefer to use the MACROS.
c | The t_eclass pointer |
attrname | The attribute name |
flags | The flags of the attribute (dummy) |
style | The style of the attribute |
void eclass_attr_default | ( | t_eclass * | c, |
const char * | attrname, | ||
long | flags, | ||
const char * | value | ||
) |
Sets the default value of an attribute.
The default value is a string that will be parse into an array of atoms or a array of number if needed. You should prefer to use the MACROS.
c | The t_eclass pointer |
attrname | The attribute name |
flags | The flags of the attribute (dummy) |
value | The default value |
void eclass_attr_filter_min | ( | t_eclass * | c, |
const char * | attrname, | ||
float | value | ||
) |
Sets the minimum value of an attribute.
The minimum value is only valid for number attributes. You should prefer to use the MACROS.
c | The t_eclass pointer |
attrname | The attribute name |
value | The minimum value of the attribute |
void eclass_attr_filter_max | ( | t_eclass * | c, |
const char * | attrname, | ||
float | value | ||
) |
Sets the maximum value of an attribute for number attributes.
The maximum value is only valid for number attributes. You should prefer to use the MACROS.
c | The t_eclass pointer |
attrname | The attribute name |
value | The maximum value of the attribute |
void eclass_attr_step | ( | t_eclass * | c, |
const char * | attrname, | ||
float | value | ||
) |
Sets the step value of an attribute.
The step value is only valid for number attributes and will define the step to increment the value in the properties window. You should prefer to use the MACROS.
c | The t_eclass pointer |
attrname | The attribute name |
value | The maximum value of the attribute |
void eclass_attr_save | ( | t_eclass * | c, |
const char * | attrname, | ||
long | flags | ||
) |
Sets if the attribute should be saved with the object.
Only GUI can save their attributes. You should prefer to use the MACROS.
c | The t_eclass pointer |
attrname | The attribute name |
flags | The flags of the attribute (dummy) |
void eclass_attr_paint | ( | t_eclass * | c, |
const char * | attrname, | ||
long | flags | ||
) |
Sets if the attribute should call the ebox_redraw() function.
If the method has been called, when the attribute has changed it call the ebox_redraw function to redraw the object. Only GUI can be repainted. You should prefer to use the MACROS.
c | The t_eclass pointer |
attrname | The attribute name |
flags | The flags of the attribute (dummy) |
void eclass_attr_invisible | ( | t_eclass * | c, |
const char * | attrname, | ||
long | flags | ||
) |
Sets if the attribute should be displayed in the properties window.
You should prefer to use the MACROS.
c | The t_eclass pointer |
attrname | The attribute name |
flags | The flags of the attribute (dummy) |
void eclass_attr_accessor | ( | t_eclass * | c, |
const char * | attrname, | ||
t_err_method | getter, | ||
t_err_method | setter | ||
) |
Initialize new getter and setter methods for the attributes.
By default the attribute is initialized with default getter and setter methods. If you just want to be notify when an attribute has changed, you should prefer to use the notify method. You should prefer to use the MACROS.
c | The t_eclass pointer |
attrname | The attribute name |
getter | The getter method. |
setter | The setter method. |
void eclass_attr_itemlist | ( | t_eclass * | c, |
const char * | attrname, | ||
long | flags, | ||
const char * | list | ||
) |
Sets the list available items of an attribute.
For example, the font weight attribute offers "normal" and "bold". You should prefer to use the MACROS.
c | The t_eclass pointer |
attrname | The attribute name |
flags | The flags of the attribute (dummy) |
list | The list of items. |