Max API
8.2.0
|
An attribute of an object is a setting or property that tells the object how to do its job. More...
Data Structures | |
struct | t_attr |
Common attr struct. More... | |
Macros | |
#define | CLASS_ATTR_OFFSET_DUMMY(c, attrname, flags, typesym) |
Create an attribute that does not store its data in the object struct. More... | |
#define | CLASS_ATTR_CHAR(c, attrname, flags, structname, structmember) |
Create a char attribute and add it to a Max class. More... | |
#define | CLASS_ATTR_LONG(c, attrname, flags, structname, structmember) |
Create a long integer attribute and add it to a Max class. More... | |
#define | CLASS_ATTR_ATOM_LONG(c, attrname, flags, structname, structmember) |
Create a t_atom_long integer attribute and add it to a Max class. More... | |
#define | CLASS_ATTR_INT32(c, attrname, flags, structname, structmember) |
Create a t_int32 integer attribute and add it to a Max class. More... | |
#define | CLASS_ATTR_FLOAT(c, attrname, flags, structname, structmember) |
Create a 32-bit float attribute and add it to a Max class. More... | |
#define | CLASS_ATTR_DOUBLE(c, attrname, flags, structname, structmember) |
Create a 64-bit float attribute and add it to a Max class. More... | |
#define | CLASS_ATTR_SYM(c, attrname, flags, structname, structmember) |
Create a t_symbol* attribute and add it to a Max class. More... | |
#define | CLASS_ATTR_ATOM(c, attrname, flags, structname, structmember) |
Create a t_atom attribute and add it to a Max class. More... | |
#define | CLASS_ATTR_OBJ(c, attrname, flags, structname, structmember) |
Create a t_object* attribute and add it to a Max class. More... | |
#define | CLASS_ATTR_CHAR_ARRAY(c, attrname, flags, structname, structmember, size) |
Create an array-of-chars attribute of fixed length, and add it to a Max class. More... | |
#define | CLASS_ATTR_LONG_ARRAY(c, attrname, flags, structname, structmember, size) |
Create an array-of-long-integers attribute of fixed length, and add it to a Max class. More... | |
#define | CLASS_ATTR_ATOM_LONG_ARRAY(c, attrname, flags, structname, structmember, size) |
Create an array-of-t_atom_long-integers attribute of fixed length, and add it to a Max class. More... | |
#define | CLASS_ATTR_FLOAT_ARRAY(c, attrname, flags, structname, structmember, size) |
Create an array-of-32bit-floats attribute of fixed length, and add it to a Max class. More... | |
#define | CLASS_ATTR_DOUBLE_ARRAY(c, attrname, flags, structname, structmember, size) |
Create an array-of-64bit-floats attribute of fixed length, and add it to a Max class. More... | |
#define | CLASS_ATTR_SYM_ARRAY(c, attrname, flags, structname, structmember, size) |
Create an array-of-symbols attribute of fixed length, and add it to a Max class. More... | |
#define | CLASS_ATTR_ATOM_ARRAY(c, attrname, flags, structname, structmember, size) |
Create an array-of-atoms attribute of fixed length, and add it to a Max class. More... | |
#define | CLASS_ATTR_OBJ_ARRAY(c, attrname, flags, structname, structmember, size) |
Create an array-of-objects attribute of fixed length, and add it to a Max class. More... | |
#define | CLASS_ATTR_CHAR_VARSIZE(c, attrname, flags, structname, structmember, sizemember, maxsize) |
Create an array-of-chars attribute of variable length, and add it to a Max class. More... | |
#define | CLASS_ATTR_LONG_VARSIZE(c, attrname, flags, structname, structmember, sizemember, maxsize) |
Create an array-of-long-integers attribute of variable length, and add it to a Max class. More... | |
#define | CLASS_ATTR_FLOAT_VARSIZE(c, attrname, flags, structname, structmember, sizemember, maxsize) |
Create an array-of-32bit-floats attribute of variable length, and add it to a Max class. More... | |
#define | CLASS_ATTR_DOUBLE_VARSIZE(c, attrname, flags, structname, structmember, sizemember, maxsize) |
Create an array-of-64bit-floats attribute of variable length, and add it to a Max class. More... | |
#define | CLASS_ATTR_SYM_VARSIZE(c, attrname, flags, structname, structmember, sizemember, maxsize) |
Create an array-of-symbols attribute of variable length, and add it to a Max class. More... | |
#define | CLASS_ATTR_ATOM_VARSIZE(c, attrname, flags, structname, structmember, sizemember, maxsize) |
Create an array-of-atoms attribute of variable length, and add it to a Max class. More... | |
#define | CLASS_ATTR_OBJ_VARSIZE(c, attrname, flags, structname, structmember, sizemember, maxsize) |
Create an array-of-objects attribute of variable length, and add it to a Max class. More... | |
#define | STRUCT_ATTR_CHAR(c, flags, structname, structmember) |
Create a char attribute and add it to a Max class. More... | |
#define | STRUCT_ATTR_LONG(c, flags, structname, structmember) |
Create a long integer attribute and add it to a Max class. More... | |
#define | STRUCT_ATTR_ATOM_LONG(c, flags, structname, structmember) |
Create a t_atom_long integer attribute and add it to a Max class. More... | |
#define | STRUCT_ATTR_FLOAT(c, flags, structname, structmember) |
Create a 32bit float attribute and add it to a Max class. More... | |
#define | STRUCT_ATTR_DOUBLE(c, flags, structname, structmember) |
Create a 64bit float attribute and add it to a Max class. More... | |
#define | STRUCT_ATTR_SYM(c, flags, structname, structmember) |
Create a t_symbol* attribute and add it to a Max class. More... | |
#define | STRUCT_ATTR_ATOM(c, flags, structname, structmember) |
Create a t_atom attribute and add it to a Max class. More... | |
#define | STRUCT_ATTR_OBJ(c, flags, structname, structmember) |
Create a t_object* attribute and add it to a Max class. More... | |
#define | STRUCT_ATTR_CHAR_ARRAY(c, flags, structname, structmember, size) |
Create an array-of-chars attribute of fixed length, and add it to a Max class. More... | |
#define | STRUCT_ATTR_LONG_ARRAY(c, flags, structname, structmember, size) |
Create an array-of-long-integers attribute of fixed length, and add it to a Max class. More... | |
#define | STRUCT_ATTR_FLOAT_ARRAY(c, flags, structname, structmember, size) |
Create an array-of-32bit-floats attribute of fixed length, and add it to a Max class. More... | |
#define | STRUCT_ATTR_DOUBLE_ARRAY(c, flags, structname, structmember, size) |
Create an array-of-64bit-floats attribute of fixed length, and add it to a Max class. More... | |
#define | STRUCT_ATTR_SYM_ARRAY(c, flags, structname, structmember, size) |
Create an array-of-symbols attribute of fixed length, and add it to a Max class. More... | |
#define | STRUCT_ATTR_ATOM_ARRAY(c, flags, structname, structmember, size) |
Create an array-of-atoms attribute of fixed length, and add it to a Max class. More... | |
#define | STRUCT_ATTR_OBJ_ARRAY(c, flags, structname, structmember, size) |
Create an array-of-objects attribute of fixed length, and add it to a Max class. More... | |
#define | STRUCT_ATTR_CHAR_VARSIZE(c, flags, structname, structmember, sizemember, maxsize) |
Create an array-of-chars attribute of variable length, and add it to a Max class. More... | |
#define | STRUCT_ATTR_LONG_VARSIZE(c, flags, structname, structmember, sizemember, maxsize) |
Create an array-of-long-integers attribute of variable length, and add it to a Max class. More... | |
#define | STRUCT_ATTR_FLOAT_VARSIZE(c, flags, structname, structmember, sizemember, maxsize) |
Create an array-of-32bit-floats attribute of variable length, and add it to a Max class. More... | |
#define | STRUCT_ATTR_DOUBLE_VARSIZE(c, flags, structname, structmember, sizemember, maxsize) |
Create an array-of-64bit-floats attribute of variable length, and add it to a Max class. More... | |
#define | STRUCT_ATTR_SYM_VARSIZE(c, flags, structname, structmember, sizemember, maxsize) |
Create an array-of-symbols attribute of variable length, and add it to a Max class. More... | |
#define | STRUCT_ATTR_ATOM_VARSIZE(c, flags, structname, structmember, sizemember, maxsize) |
Create an array-of-atoms attribute of variable length, and add it to a Max class. More... | |
#define | STRUCT_ATTR_OBJ_VARSIZE(c, flags, structname, structmember, sizemember, maxsize) |
Create an array-of-objects attribute of variable length, and add it to a Max class. More... | |
#define | OBJ_ATTR_CHAR(x, attrname, flags, val) |
Create an instance-local char attribute and add it to a Max class. More... | |
#define | OBJ_ATTR_LONG(x, attrname, flags, val) |
Create an instance-local long integer attribute and add it to a Max class. More... | |
#define | OBJ_ATTR_FLOAT(x, attrname, flags, val) |
Create an instance-local 32bit float attribute and add it to a Max class. More... | |
#define | OBJ_ATTR_DOUBLE(x, attrname, flags, val) |
Create an instance-local 64bit float attribute and add it to a Max class. More... | |
#define | OBJ_ATTR_SYM(x, attrname, flags, val) |
Create an instance-local t_symbol* attribute and add it to a Max class. More... | |
#define | OBJ_ATTR_ATOM(x, attrname, flags, val) |
Create an instance-local t_atom attribute and add it to a Max class. More... | |
#define | OBJ_ATTR_OBJ(x, attrname, flags, val) |
Create an instance-local t_object* attribute and add it to a Max class. More... | |
#define | OBJ_ATTR_CHAR_ARRAY(x, attrname, flags, count, vals) |
Create an instance-local array-of-chars attribute of fixed length, and add it to the object. More... | |
#define | OBJ_ATTR_LONG_ARRAY(x, attrname, flags, count, vals) |
Create an instance-local array-of-long-integers attribute of fixed length, and add it to the object. More... | |
#define | OBJ_ATTR_FLOAT_ARRAY(x, attrname, flags, count, vals) |
Create an instance-local array-of-32bit-floats attribute of fixed length, and add it to the object. More... | |
#define | OBJ_ATTR_DOUBLE_ARRAY(x, attrname, flags, count, vals) |
Create an instance-local array-of-64bit-floats attribute of fixed length, and add it to the object. More... | |
#define | OBJ_ATTR_SYM_ARRAY(x, attrname, flags, count, vals) |
Create an instance-local array-of-symbols attribute of fixed length, and add it to the object. More... | |
#define | OBJ_ATTR_ATOM_ARRAY |
Create an instance-local array-of-atoms attribute of fixed length, and add it to the object. More... | |
#define | OBJ_ATTR_OBJ_ARRAY(x, attrname, flags, count, vals) |
Create an instance-local array-of-objects attribute of fixed length, and add it to the object. More... | |
#define | CLASS_ATTR_ACCESSORS(c, attrname, getter, setter) |
Specify custom accessor methods for an attribute. More... | |
#define | CLASS_ATTR_ADD_FLAGS(c, attrname, flags) |
Add flags to an attribute. More... | |
#define | CLASS_ATTR_REMOVE_FLAGS(c, attrname, flags) |
Remove flags from an attribute. More... | |
#define | CLASS_ATTR_FILTER_MIN(c, attrname, minval) |
Add a filter to the attribute to limit the lower bound of a value. More... | |
#define | CLASS_ATTR_FILTER_MAX(c, attrname, maxval) |
Add a filter to the attribute to limit the upper bound of a value. More... | |
#define | CLASS_ATTR_FILTER_CLIP(c, attrname, minval, maxval) |
Add a filter to the attribute to limit both the lower and upper bounds of a value. More... | |
#define | CLASS_ATTR_ALIAS(c, attrname, aliasname) |
Create a new attribute that is an alias of an existing attribute. More... | |
#define | CLASS_ATTR_DEFAULT(c, attrname, flags, parsestr) |
Add a new attribute to the specified attribute to specify a default value. More... | |
#define | CLASS_ATTR_SAVE(c, attrname, flags) |
Add a new attribute to the specified attribute to indicate that the specified attribute should be saved with the patcher. More... | |
#define | CLASS_ATTR_SELFSAVE(c, attrname, flags) |
Add a new attribute to the specified attribute to indicate that it is saved by the object (so it does not appear in italics in the inspector). More... | |
#define | CLASS_ATTR_DEFAULT_SAVE(c, attrname, flags, parsestr) |
A convenience wrapper for both CLASS_ATTR_DEFAULT and CLASS_ATTR_SAVE. More... | |
#define | CLASS_ATTR_DEFAULTNAME(c, attrname, flags, parsestr) |
Add a new attribute to the specified attribute to specify a default value, based on Max's Object Defaults. More... | |
#define | CLASS_ATTR_DEFAULTNAME_SAVE(c, attrname, flags, parsestr) |
A convenience wrapper for both CLASS_ATTR_DEFAULTNAME and CLASS_ATTR_SAVE. More... | |
#define | CLASS_ATTR_MIN(c, attrname, flags, parsestr) |
Add a new attribute to the specified attribute to specify a lower range. More... | |
#define | CLASS_ATTR_MAX(c, attrname, flags, parsestr) |
Add a new attribute to the specified attribute to specify an upper range. More... | |
#define | CLASS_ATTR_PAINT(c, attrname, flags) |
Add a new attribute indicating that any changes to the specified attribute will trigger a call to the object's paint method. More... | |
#define | CLASS_ATTR_DEFAULT_PAINT(c, attrname, flags, parsestr) |
A convenience wrapper for both CLASS_ATTR_DEFAULT and CLASS_ATTR_PAINT. More... | |
#define | CLASS_ATTR_DEFAULT_SAVE_PAINT(c, attrname, flags, parsestr) |
A convenience wrapper for CLASS_ATTR_DEFAULT, CLASS_ATTR_SAVE, and CLASS_ATTR_PAINT. More... | |
#define | CLASS_ATTR_DEFAULTNAME_PAINT(c, attrname, flags, parsestr) |
A convenience wrapper for CLASS_ATTR_DEFAULTNAME, CLASS_ATTR_SAVE, and CLASS_ATTR_PAINT. More... | |
#define | CLASS_ATTR_DEFAULTNAME_SAVE_PAINT(c, attrname, flags, parsestr) |
A convenience wrapper for CLASS_ATTR_DEFAULTNAME, CLASS_ATTR_SAVE, and CLASS_ATTR_PAINT. More... | |
#define | CLASS_ATTR_STYLE(c, attrname, flags, parsestr) |
Add a new attribute to the specified attribute to specify an editor style for the Max inspector. More... | |
#define | CLASS_ATTR_LABEL(c, attrname, flags, labelstr) |
Add a new attribute to the specified attribute to specify an a human-friendly label for the Max inspector. More... | |
#define | CLASS_ATTR_ENUM(c, attrname, flags, parsestr) |
Add a new attribute to the specified attribute to specify a list of choices to display in a menu for the Max inspector. More... | |
#define | CLASS_ATTR_ENUMINDEX(c, attrname, flags, parsestr) |
Add a new attribute to the specified attribute to specify a list of choices to display in a menu for the Max inspector. More... | |
#define | CLASS_ATTR_CATEGORY(c, attrname, flags, parsestr) |
Add a new attribute to the specified attribute to specify a category to which the attribute is assigned in the Max inspector. More... | |
#define | CLASS_ATTR_STYLE_LABEL(c, attrname, flags, stylestr, labelstr) |
A convenience wrapper for CLASS_ATTR_STYLE, and CLASS_ATTR_LABEL. More... | |
#define | CLASS_ATTR_INVISIBLE(c, attrname, flags) |
Add a new attribute to the specified attribute to flag an attribute as invisible to the Max inspector. More... | |
#define | CLASS_ATTR_ORDER(c, attrname, flags, parsestr) |
Add a new attribute to the specified attribute to specify a default order in which to list attributes. More... | |
#define | CLASS_ATTR_BASIC(c, attrname, flags) |
Add a new attribute to the specified attribute to specify that it should appear in the inspector's Basic tab. More... | |
#define | CLASS_METHOD_ATTR_PARSE(c, methodname, attrname, type, flags, parsestring) |
Define and add attributes to class methods. More... | |
#define | CLASS_ATTR_LEGACYDEFAULT(c, legacyattrname, newattrname, flags, parsestr) |
Add a new attribute to the specified attribute to specify a legacy default value. More... | |
#define | CLASS_ATTR_OBSOLETE(c, attrname, flags) |
Add a new attribute to the specified attribute to flag it as obsolete. More... | |
#define | CLASS_ATTR_RENAMED(c, oldname, newname, flags) |
Add a new attribute to the specified attribute to flag it as renamed. More... | |
#define | CLASS_ATTR_INTRODUCED(c, attrname, flags, versionstr) |
Add a new attribute to the specified attribute to indicate in which version the attribute was introduced. More... | |
#define | CLASS_METHOD_OBSOLETE(c, methodname, flags) |
Add a new attribute to the specified method to flag it as obsolete. More... | |
#define | CLASS_METHOD_RENAMED(c, oldname, newname, flags) |
Add a new attribute to the specified method to flag a method as renamed. More... | |
#define | CLASS_METHOD_INTRODUCED(c, methodname, flags, versionstr) |
Add a new attribute to the specified method to indicate in which version the method was introduced. More... | |
#define | OBJ_ATTR_DEFAULT(x, attrname, flags, parsestr) |
An instance-attribute version of CLASS_ATTR_DEFAULT. More... | |
#define | OBJ_ATTR_SAVE(x, attrname, flags) |
An instance-attribute version of CLASS_ATTR_SAVE. More... | |
#define | OBJ_ATTR_DEFAULT_SAVE(x, attrname, flags, parsestr) |
An instance-attribute version of CLASS_ATTR_DEFAULT_SAVE. More... | |
#define | CLASS_STICKY_ATTR(c, name, flags, parsestr) |
Create an attribute, and add it to all following attribute declarations. More... | |
#define | CLASS_STICKY_ATTR_CLEAR(c, name) |
Close a CLASS_STICKY_ATTR block. More... | |
#define | CLASS_STICKY_METHOD(c, name, flags, parsestr) |
Create an attribute, and add it to all following method declarations. More... | |
#define | CLASS_STICKY_METHOD_CLEAR(c, name) |
Close a CLASS_STICKY_METHOD block. More... | |
#define | CLASS_ATTR_RGBA(c, attrname, flags, structname, structmember) |
Create a color (t_jrgba) attribute and add it to a Max class. More... | |
Enumerations | |
enum | e_max_attrflags { ATTR_FLAGS_NONE , ATTR_GET_OPAQUE , ATTR_SET_OPAQUE , ATTR_GET_OPAQUE_USER , ATTR_SET_OPAQUE_USER , ATTR_GET_DEFER , ATTR_GET_USURP , ATTR_GET_DEFER_LOW , ATTR_GET_USURP_LOW , ATTR_SET_DEFER , ATTR_SET_USURP , ATTR_SET_DEFER_LOW , ATTR_SET_USURP_LOW , ATTR_IS_JBOXATTR , ATTR_DIRTY } |
Attribute flags. More... | |
Functions | |
void * | object_attr_get (void *x, t_symbol *attrname) |
Returns the pointer to an attribute, given its name. More... | |
method | object_attr_method (void *x, t_symbol *methodname, void **attr, long *get) |
Returns the method of an attribute's get or set function, as well as a pointer to the attribute itself, from a message name. More... | |
long | object_attr_usercanset (void *x, t_symbol *s) |
Determines if an object's attribute can be set from the Max interface (i.e. More... | |
long | object_attr_usercanget (void *x, t_symbol *s) |
Determines if the value of an object's attribute can be queried from the Max interface (i.e. More... | |
void | object_attr_getdump (void *x, t_symbol *s, long argc, t_atom *argv) |
Forces a specified object's attribute to send its value from the object's dumpout outlet in the Max interface. More... | |
t_max_err | object_attr_setvalueof (void *x, t_symbol *s, long argc, t_atom *argv) |
Sets the value of an object's attribute. More... | |
t_max_err | object_addattr (void *x, t_object *attr) |
Attaches an attribute directly to an object. More... | |
t_max_err | object_deleteattr (void *x, t_symbol *attrsym) |
Detach an attribute from an object that was previously attached with object_addattr(). More... | |
t_max_err | object_chuckattr (void *x, t_symbol *attrsym) |
Detach an attribute from an object that was previously attached with object_addattr(). More... | |
long | attr_args_offset (short ac, t_atom *av) |
Determines the point in an atom list where attribute arguments begin. More... | |
void | attr_args_process (void *x, short ac, t_atom *av) |
Takes an atom list and properly set any attributes described within. More... | |
t_object * | attribute_new (C74_CONST char *name, t_symbol *type, long flags, method mget, method mset) |
Create a new attribute. More... | |
t_object * | attr_offset_new (C74_CONST char *name, C74_CONST t_symbol *type, long flags, C74_CONST method mget, C74_CONST method mset, long offset) |
Create a new attribute. More... | |
t_object * | attr_offset_array_new (C74_CONST char *name, t_symbol *type, long size, long flags, method mget, method mset, long offsetcount, long offset) |
Create a new attribute. More... | |
t_atom_long | object_attr_getlong (void *x, t_symbol *s) |
Retrieves the value of an attribute, given its parent object and name. More... | |
t_max_err | object_attr_setlong (void *x, t_symbol *s, t_atom_long c) |
Sets the value of an attribute, given its parent object and name. More... | |
t_atom_float | object_attr_getfloat (void *x, t_symbol *s) |
Retrieves the value of an attribute, given its parent object and name. More... | |
t_max_err | object_attr_setfloat (void *x, t_symbol *s, t_atom_float c) |
Sets the value of an attribute, given its parent object and name. More... | |
t_symbol * | object_attr_getsym (void *x, t_symbol *s) |
Retrieves the value of an attribute, given its parent object and name. More... | |
t_max_err | object_attr_setsym (void *x, t_symbol *s, t_symbol *c) |
Sets the value of an attribute, given its parent object and name. More... | |
long | object_attr_getlong_array (void *x, t_symbol *s, long max, t_atom_long *vals) |
Retrieves the value of an attribute, given its parent object and name. More... | |
t_max_err | object_attr_setlong_array (void *x, t_symbol *s, long count, t_atom_long *vals) |
Sets the value of an attribute, given its parent object and name. More... | |
long | object_attr_getchar_array (void *x, t_symbol *s, long max, t_uint8 *vals) |
Retrieves the value of an attribute, given its parent object and name. More... | |
t_max_err | object_attr_setchar_array (void *x, t_symbol *s, long count, C74_CONST t_uint8 *vals) |
Sets the value of an attribute, given its parent object and name. More... | |
long | object_attr_getfloat_array (void *x, t_symbol *s, long max, float *vals) |
Retrieves the value of an attribute, given its parent object and name. More... | |
t_max_err | object_attr_setfloat_array (void *x, t_symbol *s, long count, float *vals) |
Sets the value of an attribute, given its parent object and name. More... | |
long | object_attr_getdouble_array (void *x, t_symbol *s, long max, double *vals) |
Retrieves the value of an attribute, given its parent object and name. More... | |
t_max_err | object_attr_setdouble_array (void *x, t_symbol *s, long count, double *vals) |
Sets the value of an attribute, given its parent object and name. More... | |
long | object_attr_getsym_array (void *x, t_symbol *s, long max, t_symbol **vals) |
Retrieves the value of an attribute, given its parent object and name. More... | |
t_max_err | object_attr_setsym_array (void *x, t_symbol *s, long count, t_symbol **vals) |
Sets the value of an attribute, given its parent object and name. More... | |
t_max_err | attr_addfilterset_clip (void *x, double min, double max, long usemin, long usemax) |
Attaches a clip filter to an attribute. More... | |
t_max_err | attr_addfilterset_clip_scale (void *x, double scale, double min, double max, long usemin, long usemax) |
Attaches a clip/scale filter to an attribute. More... | |
t_max_err | attr_addfilterget_clip (void *x, double min, double max, long usemin, long usemax) |
Attaches a clip filter to an attribute. More... | |
t_max_err | attr_addfilterget_clip_scale (void *x, double scale, double min, double max, long usemin, long usemax) |
Attaches a clip/scale filter to an attribute. More... | |
t_max_err | attr_addfilter_clip (void *x, double min, double max, long usemin, long usemax) |
Attaches a clip filter to an attribute. More... | |
t_max_err | attr_addfilter_clip_scale (void *x, double scale, double min, double max, long usemin, long usemax) |
Attaches a clip/scale filter to an attribute. More... | |
t_max_err | attr_addfilterset_proc (void *x, method proc) |
Attaches a custom filter method to an attribute. More... | |
t_max_err | attr_addfilterget_proc (void *x, method proc) |
Attaches a custom filter method to an attribute. More... | |
void | attr_args_dictionary (t_dictionary *x, short ac, t_atom *av) |
Create a dictionary of attribute-name, attribute-value pairs from an array of atoms containing an attribute definition list. More... | |
void | attr_dictionary_process (void *x, t_dictionary *d) |
Set attributes for an object that are defined in a dictionary. More... | |
void | attr_dictionary_check (void *x, t_dictionary *d) |
Check that a dictionary only contains values for existing attributes of an object. More... | |
t_max_err | object_attr_setparse (t_object *x, t_symbol *s, C74_CONST char *parsestr) |
Set an attribute value with one or more atoms parsed from a C-string. More... | |
void * | object_new_parse (t_symbol *name_space, t_symbol *classname, C74_CONST char *parsestr) |
Create a new object with one or more atoms parsed from a C-string. More... | |
t_max_err | object_attr_getjrgba (void *ob, t_symbol *s, t_jrgba *c) |
Retrieves the value of a color attribute, given its parent object and name. More... | |
t_max_err | object_attr_setjrgba (void *ob, t_symbol *s, t_jrgba *c) |
Sets the value of a color attribute, given its parent object and name. More... | |
t_max_err | object_attr_get_rect (t_object *o, t_symbol *name, t_rect *rect) |
Gets the value of a t_rect attribute, given its parent object and name. More... | |
t_max_err | object_attr_set_rect (t_object *o, t_symbol *name, t_rect *rect) |
Sets the value of a t_rect attribute, given its parent object and name. More... | |
void | object_attr_set_xywh (t_object *o, t_symbol *attr, double x, double y, double w, double h) |
Sets the value of a t_rect attribute, given its parent object and name. More... | |
t_max_err | object_attr_getpt (t_object *o, t_symbol *name, t_pt *pt) |
Gets the value of a t_pt attribute, given its parent object and name. More... | |
t_max_err | object_attr_setpt (t_object *o, t_symbol *name, t_pt *pt) |
Sets the value of a t_pt attribute, given its parent object and name. More... | |
t_max_err | object_attr_getsize (t_object *o, t_symbol *name, t_size *size) |
Gets the value of a t_size attribute, given its parent object and name. More... | |
t_max_err | object_attr_setsize (t_object *o, t_symbol *name, t_size *size) |
Sets the value of a t_size attribute, given its parent object and name. More... | |
t_max_err | object_attr_getcolor (t_object *b, t_symbol *attrname, t_jrgba *prgba) |
Gets the value of a t_jrgba attribute, given its parent object and name. More... | |
t_max_err | object_attr_setcolor (t_object *b, t_symbol *attrname, t_jrgba *prgba) |
Sets the value of a t_jrgba attribute, given its parent object and name. More... | |
An attribute of an object is a setting or property that tells the object how to do its job.
For example, the metro object has an interval attribute that tells it how fast to run.
Attributes are similar to methods, except that the attributes have a state. Attributes are themselves objects, and they share a common interface for getting and setting values.
An attribute is most typically added to the class definition of another object during it's class initialization or ext_main() function. Most typically, this attribute's value will be stored in an instance's struct, and thus it will serve as a property of that instance of the object.
Attributes can, however, be declared as 'class static'. This means that the property is shared by all instances of the class, and the value is stored as a shared (static) variable.
Additionally, Max 5 has introduced the notion of 'instance attributes' (also called 'object attributes'). Instance attributes are the creation of an attribute object, and then adding it to one specific instance of another class.
Finally, because attributes themselves are Max objects they too can possess attributes. These 'attributes of attributes' are used in Max to do things like specify a range of values for an attribute, give an attribute human friendly caption, or determine to what category an attribute should belong in the inspector.
The easiest and most common way of working with attributes is to use the provided macros. These macros simplify the process of creating a new attribute object, setting any attributes of the attribute, and binding it to an object class or an object instance.
By default, Max provides standard attribute accessors. These are the functions the get or set the attribute value in the object's struct. If you need to define a custom accessor, you can specify this information using the CLASS_ATTR_ACCESSORS macro.
If you need to define a custom accessor, it should have a prototype and form comparable to the following custom getter:
Note that getters require memory to be allocated, if there is not memory passed into the getter. Also the attr argument is the class' attribute object and can be queried using object_method for things like the attribute flags, names, filters, etc..
If you need to define a custom accessor, it should have a prototype and form comparable to the following custom setter:
Although the subject of object registration and notification is covered elsewhere, it bears noting that attributes of all types will, if registered, automatically send notifications to all attached client objects each time the attribute's value is set.
#define CLASS_ATTR_ACCESSORS | ( | c, | |
attrname, | |||
getter, | |||
setter | |||
) |
Specify custom accessor methods for an attribute.
If you specify a non-NULL value for the setter or getter, then the function you specify will be called to set or get the attribute's value rather than using the built-in accessor.
c | The class pointer. |
attrname | The name of the attribute as a C-string. |
getter | An appropriate getter method as discussed in Setting and Getting Attribute Values, or NULL to use the default getter. |
setter | An appropriate setter method as discussed in Setting and Getting Attribute Values, or NULL to use the default setter. |
#define CLASS_ATTR_ADD_FLAGS | ( | c, | |
attrname, | |||
flags | |||
) |
Add flags to an attribute.
c | The class pointer. |
attrname | The name of the attribute as a C-string. |
flags | Any flags you wish to add to this attribute, as defined in e_max_attrflags. |
#define CLASS_ATTR_ALIAS | ( | c, | |
attrname, | |||
aliasname | |||
) |
Create a new attribute that is an alias of an existing attribute.
c | The class pointer. |
attrname | The name of the actual attribute as a C-string. |
aliasname | The name of the new alias attribute. |
#define CLASS_ATTR_ATOM | ( | c, | |
attrname, | |||
flags, | |||
structname, | |||
structmember | |||
) |
Create a t_atom attribute and add it to a Max class.
c | The class pointer. |
attrname | The name of this attribute as a C-string. |
flags | Any flags you wish to declare for this attribute, as defined in e_max_attrflags. |
structname | The C identifier for the struct (containing a valid t_object header) representing an instance of this class. |
structmember | The C identifier of the member in the struct that holds the value of this attribute. |
#define CLASS_ATTR_ATOM_ARRAY | ( | c, | |
attrname, | |||
flags, | |||
structname, | |||
structmember, | |||
size | |||
) |
Create an array-of-atoms attribute of fixed length, and add it to a Max class.
c | The class pointer. |
attrname | The name of this attribute as a C-string. |
flags | Any flags you wish to declare for this attribute, as defined in e_max_attrflags. |
structname | The C identifier for the struct (containing a valid t_object header) representing an instance of this class. |
structmember | The C identifier of the member in the struct that holds the value of this attribute. |
size | The number of items in the t_atom array. |
#define CLASS_ATTR_ATOM_LONG | ( | c, | |
attrname, | |||
flags, | |||
structname, | |||
structmember | |||
) |
Create a t_atom_long integer attribute and add it to a Max class.
c | The class pointer. |
attrname | The name of this attribute as a C-string. |
flags | Any flags you wish to declare for this attribute, as defined in e_max_attrflags. |
structname | The C identifier for the struct (containing a valid t_object header) representing an instance of this class. |
structmember | The C identifier of the member in the struct that holds the value of this attribute. |
#define CLASS_ATTR_ATOM_LONG_ARRAY | ( | c, | |
attrname, | |||
flags, | |||
structname, | |||
structmember, | |||
size | |||
) |
Create an array-of-t_atom_long-integers attribute of fixed length, and add it to a Max class.
c | The class pointer. |
attrname | The name of this attribute as a C-string. |
flags | Any flags you wish to declare for this attribute, as defined in e_max_attrflags. |
structname | The C identifier for the struct (containing a valid t_object header) representing an instance of this class. |
structmember | The C identifier of the member in the struct that holds the value of this attribute. |
size | The number of longs in the array. |
#define CLASS_ATTR_ATOM_VARSIZE | ( | c, | |
attrname, | |||
flags, | |||
structname, | |||
structmember, | |||
sizemember, | |||
maxsize | |||
) |
Create an array-of-atoms attribute of variable length, and add it to a Max class.
c | The class pointer. |
attrname | The name of this attribute as a C-string. |
flags | Any flags you wish to declare for this attribute, as defined in e_max_attrflags. |
structname | The C identifier for the struct (containing a valid t_object header) representing an instance of this class. |
structmember | The C identifier of the member in the struct that holds the value of this attribute. |
sizemember | The actual number of items in the t_atom array at any given moment. |
maxsize | The maximum number of items in the t_atom array, i.e. the number of members allocated for the array in the struct. |
#define CLASS_ATTR_BASIC | ( | c, | |
attrname, | |||
flags | |||
) |
Add a new attribute to the specified attribute to specify that it should appear in the inspector's Basic tab.
c | The class pointer. |
attrname | The name of the attribute as a C-string. |
flags | Any flags you wish to declare for this new attribute, as defined in e_max_attrflags. |
#define CLASS_ATTR_CATEGORY | ( | c, | |
attrname, | |||
flags, | |||
parsestr | |||
) |
Add a new attribute to the specified attribute to specify a category to which the attribute is assigned in the Max inspector.
Categories are represented in the inspector as tabs. If the specified category does not exist then it will be created.
c | The class pointer. |
attrname | The name of the attribute as a C-string. |
flags | Any flags you wish to declare for this new attribute, as defined in e_max_attrflags. |
parsestr | A C-string, which will be parsed into an array of atoms to set the initial value. |
#define CLASS_ATTR_CHAR | ( | c, | |
attrname, | |||
flags, | |||
structname, | |||
structmember | |||
) |
Create a char attribute and add it to a Max class.
c | The class pointer. |
attrname | The name of this attribute as a C-string. |
flags | Any flags you wish to declare for this attribute, as defined in e_max_attrflags. |
structname | The C identifier for the struct (containing a valid t_object header) representing an instance of this class. |
structmember | The C identifier of the member in the struct that holds the value of this attribute. |
#define CLASS_ATTR_CHAR_ARRAY | ( | c, | |
attrname, | |||
flags, | |||
structname, | |||
structmember, | |||
size | |||
) |
Create an array-of-chars attribute of fixed length, and add it to a Max class.
c | The class pointer. |
attrname | The name of this attribute as a C-string. |
flags | Any flags you wish to declare for this attribute, as defined in e_max_attrflags. |
structname | The C identifier for the struct (containing a valid t_object header) representing an instance of this class. |
structmember | The C identifier of the member in the struct that holds the value of this attribute. |
size | The number of chars in the array. |
#define CLASS_ATTR_CHAR_VARSIZE | ( | c, | |
attrname, | |||
flags, | |||
structname, | |||
structmember, | |||
sizemember, | |||
maxsize | |||
) |
Create an array-of-chars attribute of variable length, and add it to a Max class.
c | The class pointer. |
attrname | The name of this attribute as a C-string. |
flags | Any flags you wish to declare for this attribute, as defined in e_max_attrflags. |
structname | The C identifier for the struct (containing a valid t_object header) representing an instance of this class. |
structmember | The C identifier of the member in the struct that holds the value of this attribute. |
sizemember | The actual number of items in the char array at any given moment. |
maxsize | The maximum number of items in the char array, i.e. the number of members allocated for the array in the struct. |
#define CLASS_ATTR_DEFAULT | ( | c, | |
attrname, | |||
flags, | |||
parsestr | |||
) |
Add a new attribute to the specified attribute to specify a default value.
The default value will be automatically set when the object is created only if your object uses a dictionary constructor with the CLASS_FLAG_NEWDICTIONARY flag.
c | The class pointer. |
attrname | The name of the attribute as a C-string. |
flags | Any flags you wish to declare for this new attribute, as defined in e_max_attrflags. |
parsestr | A C-string, which will be parsed into an array of atoms to set the initial value. |
#define CLASS_ATTR_DEFAULT_PAINT | ( | c, | |
attrname, | |||
flags, | |||
parsestr | |||
) |
A convenience wrapper for both CLASS_ATTR_DEFAULT and CLASS_ATTR_PAINT.
c | The class pointer. |
attrname | The name of the attribute as a C-string. |
flags | Any flags you wish to declare for this new attribute, as defined in e_max_attrflags. |
parsestr | A C-string, which will be parsed into an array of atoms to set the initial value. |
#define CLASS_ATTR_DEFAULT_SAVE | ( | c, | |
attrname, | |||
flags, | |||
parsestr | |||
) |
A convenience wrapper for both CLASS_ATTR_DEFAULT and CLASS_ATTR_SAVE.
c | The class pointer. |
attrname | The name of the attribute as a C-string. |
flags | Any flags you wish to declare for this new attribute, as defined in e_max_attrflags. |
parsestr | A C-string, which will be parsed into an array of atoms to set the initial value. |
#define CLASS_ATTR_DEFAULT_SAVE_PAINT | ( | c, | |
attrname, | |||
flags, | |||
parsestr | |||
) |
A convenience wrapper for CLASS_ATTR_DEFAULT, CLASS_ATTR_SAVE, and CLASS_ATTR_PAINT.
c | The class pointer. |
attrname | The name of the attribute as a C-string. |
flags | Any flags you wish to declare for this new attribute, as defined in e_max_attrflags. |
parsestr | A C-string, which will be parsed into an array of atoms to set the initial value. |
#define CLASS_ATTR_DEFAULTNAME | ( | c, | |
attrname, | |||
flags, | |||
parsestr | |||
) |
Add a new attribute to the specified attribute to specify a default value, based on Max's Object Defaults.
If a value is present in Max's Object Defaults, then that value will be used as the default value. Otherwise, use the default value specified here. The default value will be automatically set when the object is created only if your object uses a dictionary constructor with the CLASS_FLAG_NEWDICTIONARY flag.
c | The class pointer. |
attrname | The name of the attribute as a C-string. |
flags | Any flags you wish to declare for this new attribute, as defined in e_max_attrflags. |
parsestr | A C-string, which will be parsed into an array of atoms to set the initial value. |
#define CLASS_ATTR_DEFAULTNAME_PAINT | ( | c, | |
attrname, | |||
flags, | |||
parsestr | |||
) |
A convenience wrapper for CLASS_ATTR_DEFAULTNAME, CLASS_ATTR_SAVE, and CLASS_ATTR_PAINT.
c | The class pointer. |
attrname | The name of the attribute as a C-string. |
flags | Any flags you wish to declare for this new attribute, as defined in e_max_attrflags. |
parsestr | A C-string, which will be parsed into an array of atoms to set the initial value. |
#define CLASS_ATTR_DEFAULTNAME_SAVE | ( | c, | |
attrname, | |||
flags, | |||
parsestr | |||
) |
A convenience wrapper for both CLASS_ATTR_DEFAULTNAME and CLASS_ATTR_SAVE.
c | The class pointer. |
attrname | The name of the attribute as a C-string. |
flags | Any flags you wish to declare for this new attribute, as defined in e_max_attrflags. |
parsestr | A C-string, which will be parsed into an array of atoms to set the initial value. |
#define CLASS_ATTR_DEFAULTNAME_SAVE_PAINT | ( | c, | |
attrname, | |||
flags, | |||
parsestr | |||
) |
A convenience wrapper for CLASS_ATTR_DEFAULTNAME, CLASS_ATTR_SAVE, and CLASS_ATTR_PAINT.
c | The class pointer. |
attrname | The name of the attribute as a C-string. |
flags | Any flags you wish to declare for this new attribute, as defined in e_max_attrflags. |
parsestr | A C-string, which will be parsed into an array of atoms to set the initial value. |
#define CLASS_ATTR_DOUBLE | ( | c, | |
attrname, | |||
flags, | |||
structname, | |||
structmember | |||
) |
Create a 64-bit float attribute and add it to a Max class.
c | The class pointer. |
attrname | The name of this attribute as a C-string. |
flags | Any flags you wish to declare for this attribute, as defined in e_max_attrflags. |
structname | The C identifier for the struct (containing a valid t_object header) representing an instance of this class. |
structmember | The C identifier of the member in the struct that holds the value of this attribute. |
#define CLASS_ATTR_DOUBLE_ARRAY | ( | c, | |
attrname, | |||
flags, | |||
structname, | |||
structmember, | |||
size | |||
) |
Create an array-of-64bit-floats attribute of fixed length, and add it to a Max class.
c | The class pointer. |
attrname | The name of this attribute as a C-string. |
flags | Any flags you wish to declare for this attribute, as defined in e_max_attrflags. |
structname | The C identifier for the struct (containing a valid t_object header) representing an instance of this class. |
structmember | The C identifier of the member in the struct that holds the value of this attribute. |
size | The number of doubles in the array. |
#define CLASS_ATTR_DOUBLE_VARSIZE | ( | c, | |
attrname, | |||
flags, | |||
structname, | |||
structmember, | |||
sizemember, | |||
maxsize | |||
) |
Create an array-of-64bit-floats attribute of variable length, and add it to a Max class.
c | The class pointer. |
attrname | The name of this attribute as a C-string. |
flags | Any flags you wish to declare for this attribute, as defined in e_max_attrflags. |
structname | The C identifier for the struct (containing a valid t_object header) representing an instance of this class. |
structmember | The C identifier of the member in the struct that holds the value of this attribute. |
sizemember | The actual number of items in the double array at any given moment. |
maxsize | The maximum number of items in the double array, i.e. the number of members allocated for the array in the struct. |
#define CLASS_ATTR_ENUM | ( | c, | |
attrname, | |||
flags, | |||
parsestr | |||
) |
Add a new attribute to the specified attribute to specify a list of choices to display in a menu for the Max inspector.
c | The class pointer. |
attrname | The name of the attribute as a C-string. |
flags | Any flags you wish to declare for this new attribute, as defined in e_max_attrflags. |
parsestr | A C-string, which will be parsed into an array of atoms to set the initial value. |
#define CLASS_ATTR_ENUMINDEX | ( | c, | |
attrname, | |||
flags, | |||
parsestr | |||
) |
Add a new attribute to the specified attribute to specify a list of choices to display in a menu for the Max inspector.
c | The class pointer. |
attrname | The name of the attribute as a C-string. |
flags | Any flags you wish to declare for this new attribute, as defined in e_max_attrflags. |
parsestr | A C-string, which will be parsed into an array of atoms to set the initial value. |
#define CLASS_ATTR_FILTER_CLIP | ( | c, | |
attrname, | |||
minval, | |||
maxval | |||
) |
Add a filter to the attribute to limit both the lower and upper bounds of a value.
The limiting will be performed by the default attribute accessor.
c | The class pointer. |
attrname | The name of the attribute as a C-string. |
minval | The maximum acceptable value to which the attribute will be limited. |
maxval | The maximum acceptable value to which the attribute will be limited. |
#define CLASS_ATTR_FILTER_MAX | ( | c, | |
attrname, | |||
maxval | |||
) |
Add a filter to the attribute to limit the upper bound of a value.
The limiting will be performed by the default attribute accessor.
c | The class pointer. |
attrname | The name of the attribute as a C-string. |
maxval | The maximum acceptable value to which the attribute will be limited. |
#define CLASS_ATTR_FILTER_MIN | ( | c, | |
attrname, | |||
minval | |||
) |
Add a filter to the attribute to limit the lower bound of a value.
The limiting will be performed by the default attribute accessor.
c | The class pointer. |
attrname | The name of the attribute as a C-string. |
minval | The minimum acceptable value to which the attribute will be limited. |
#define CLASS_ATTR_FLOAT | ( | c, | |
attrname, | |||
flags, | |||
structname, | |||
structmember | |||
) |
Create a 32-bit float attribute and add it to a Max class.
c | The class pointer. |
attrname | The name of this attribute as a C-string. |
flags | Any flags you wish to declare for this attribute, as defined in e_max_attrflags. |
structname | The C identifier for the struct (containing a valid t_object header) representing an instance of this class. |
structmember | The C identifier of the member in the struct that holds the value of this attribute. |
#define CLASS_ATTR_FLOAT_ARRAY | ( | c, | |
attrname, | |||
flags, | |||
structname, | |||
structmember, | |||
size | |||
) |
Create an array-of-32bit-floats attribute of fixed length, and add it to a Max class.
c | The class pointer. |
attrname | The name of this attribute as a C-string. |
flags | Any flags you wish to declare for this attribute, as defined in e_max_attrflags. |
structname | The C identifier for the struct (containing a valid t_object header) representing an instance of this class. |
structmember | The C identifier of the member in the struct that holds the value of this attribute. |
size | The number of floats in the array. |
#define CLASS_ATTR_FLOAT_VARSIZE | ( | c, | |
attrname, | |||
flags, | |||
structname, | |||
structmember, | |||
sizemember, | |||
maxsize | |||
) |
Create an array-of-32bit-floats attribute of variable length, and add it to a Max class.
c | The class pointer. |
attrname | The name of this attribute as a C-string. |
flags | Any flags you wish to declare for this attribute, as defined in e_max_attrflags. |
structname | The C identifier for the struct (containing a valid t_object header) representing an instance of this class. |
structmember | The C identifier of the member in the struct that holds the value of this attribute. |
sizemember | The actual number of items in the float array at any given moment. |
maxsize | The maximum number of items in the float array, i.e. the number of members allocated for the array in the struct. |
#define CLASS_ATTR_INT32 | ( | c, | |
attrname, | |||
flags, | |||
structname, | |||
structmember | |||
) |
Create a t_int32 integer attribute and add it to a Max class.
c | The class pointer. |
attrname | The name of this attribute as a C-string. |
flags | Any flags you wish to declare for this attribute, as defined in e_max_attrflags. |
structname | The C identifier for the struct (containing a valid t_object header) representing an instance of this class. |
structmember | The C identifier of the member in the struct that holds the value of this attribute. |
#define CLASS_ATTR_INTRODUCED | ( | c, | |
attrname, | |||
flags, | |||
versionstr | |||
) |
Add a new attribute to the specified attribute to indicate in which version the attribute was introduced.
c | The class pointer. |
attrname | The name of the attribute as a C-string. |
flags | Any flags you wish to declare for this new attribute, as defined in e_max_attrflags. |
versionstr | A C-string, which will be parsed set the version number (e.g. "7.0.0"). |
#define CLASS_ATTR_INVISIBLE | ( | c, | |
attrname, | |||
flags | |||
) |
Add a new attribute to the specified attribute to flag an attribute as invisible to the Max inspector.
c | The class pointer. |
attrname | The name of the attribute as a C-string. |
flags | Any flags you wish to declare for this new attribute, as defined in e_max_attrflags. |
#define CLASS_ATTR_LABEL | ( | c, | |
attrname, | |||
flags, | |||
labelstr | |||
) |
Add a new attribute to the specified attribute to specify an a human-friendly label for the Max inspector.
c | The class pointer. |
attrname | The name of the attribute as a C-string. |
flags | Any flags you wish to declare for this new attribute, as defined in e_max_attrflags. |
labelstr | A C-string, which will be parsed into an array of atoms to set the initial value. |
#define CLASS_ATTR_LEGACYDEFAULT | ( | c, | |
legacyattrname, | |||
newattrname, | |||
flags, | |||
parsestr | |||
) |
Add a new attribute to the specified attribute to specify a legacy default value.
The default value will be automatically set when the object is created only if your object uses a dictionary constructor with the CLASS_FLAG_NEWDICTIONARY flag.
c | The class pointer. |
legacyattrname | The name of the attribute. |
newattrname | The name of the attribute. |
flags | Any flags you wish to declare for this new attribute, as defined in e_max_attrflags. |
parsestr | A C-string, which will be parsed into an array of atoms to set the legacy value, used by jbox_processlegacydefaults() |
#define CLASS_ATTR_LONG | ( | c, | |
attrname, | |||
flags, | |||
structname, | |||
structmember | |||
) |
Create a long integer attribute and add it to a Max class.
c | The class pointer. |
attrname | The name of this attribute as a C-string. |
flags | Any flags you wish to declare for this attribute, as defined in e_max_attrflags. |
structname | The C identifier for the struct (containing a valid t_object header) representing an instance of this class. |
structmember | The C identifier of the member in the struct that holds the value of this attribute. |
#define CLASS_ATTR_LONG_ARRAY | ( | c, | |
attrname, | |||
flags, | |||
structname, | |||
structmember, | |||
size | |||
) |
Create an array-of-long-integers attribute of fixed length, and add it to a Max class.
c | The class pointer. |
attrname | The name of this attribute as a C-string. |
flags | Any flags you wish to declare for this attribute, as defined in e_max_attrflags. |
structname | The C identifier for the struct (containing a valid t_object header) representing an instance of this class. |
structmember | The C identifier of the member in the struct that holds the value of this attribute. |
size | The number of longs in the array. |
#define CLASS_ATTR_LONG_VARSIZE | ( | c, | |
attrname, | |||
flags, | |||
structname, | |||
structmember, | |||
sizemember, | |||
maxsize | |||
) |
Create an array-of-long-integers attribute of variable length, and add it to a Max class.
c | The class pointer. |
attrname | The name of this attribute as a C-string. |
flags | Any flags you wish to declare for this attribute, as defined in e_max_attrflags. |
structname | The C identifier for the struct (containing a valid t_object header) representing an instance of this class. |
structmember | The C identifier of the member in the struct that holds the value of this attribute. |
sizemember | The actual number of items in the long array at any given moment. |
maxsize | The maximum number of items in the long array, i.e. the number of members allocated for the array in the struct. |
#define CLASS_ATTR_MAX | ( | c, | |
attrname, | |||
flags, | |||
parsestr | |||
) |
Add a new attribute to the specified attribute to specify an upper range.
The values will not be automatically limited.
c | The class pointer. |
attrname | The name of the attribute as a C-string. |
flags | Any flags you wish to declare for this new attribute, as defined in e_max_attrflags. |
parsestr | A C-string, which will be parsed into an array of atoms to set the initial value. |
#define CLASS_ATTR_MIN | ( | c, | |
attrname, | |||
flags, | |||
parsestr | |||
) |
Add a new attribute to the specified attribute to specify a lower range.
The values will not be automatically limited.
c | The class pointer. |
attrname | The name of the attribute as a C-string. |
flags | Any flags you wish to declare for this new attribute, as defined in e_max_attrflags. |
parsestr | A C-string, which will be parsed into an array of atoms to set the initial value. |
#define CLASS_ATTR_OBJ | ( | c, | |
attrname, | |||
flags, | |||
structname, | |||
structmember | |||
) |
Create a t_object* attribute and add it to a Max class.
c | The class pointer. |
attrname | The name of this attribute as a C-string. |
flags | Any flags you wish to declare for this attribute, as defined in e_max_attrflags. |
structname | The C identifier for the struct (containing a valid t_object header) representing an instance of this class. |
structmember | The C identifier of the member in the struct that holds the value of this attribute. |
#define CLASS_ATTR_OBJ_ARRAY | ( | c, | |
attrname, | |||
flags, | |||
structname, | |||
structmember, | |||
size | |||
) |
Create an array-of-objects attribute of fixed length, and add it to a Max class.
c | The class pointer. |
attrname | The name of this attribute as a C-string. |
flags | Any flags you wish to declare for this attribute, as defined in e_max_attrflags. |
structname | The C identifier for the struct (containing a valid t_object header) representing an instance of this class. |
structmember | The C identifier of the member in the struct that holds the value of this attribute. |
size | The number of items in the t_object* array. |
#define CLASS_ATTR_OBJ_VARSIZE | ( | c, | |
attrname, | |||
flags, | |||
structname, | |||
structmember, | |||
sizemember, | |||
maxsize | |||
) |
Create an array-of-objects attribute of variable length, and add it to a Max class.
c | The class pointer. |
attrname | The name of this attribute as a C-string. |
flags | Any flags you wish to declare for this attribute, as defined in e_max_attrflags. |
structname | The C identifier for the struct (containing a valid t_object header) representing an instance of this class. |
structmember | The C identifier of the member in the struct that holds the value of this attribute. |
sizemember | The actual number of items in the t_object* array at any given moment. |
maxsize | The maximum number of items in the t_object* array, i.e. the number of members allocated for the array in the struct. |
#define CLASS_ATTR_OBSOLETE | ( | c, | |
attrname, | |||
flags | |||
) |
Add a new attribute to the specified attribute to flag it as obsolete.
c | The class pointer. |
attrname | The name of the attribute as a C-string. |
flags | Any flags you wish to declare for this new attribute, as defined in e_max_attrflags. |
#define CLASS_ATTR_OFFSET_DUMMY | ( | c, | |
attrname, | |||
flags, | |||
typesym | |||
) |
Create an attribute that does not store its data in the object struct.
NB: if you use this you must have a custom getter/setter or not ever get/set. Perhaps we should rewrite this using a generic attribute_new rather than attr_offset_new?
c | The class pointer. |
attrname | The name of this attribute as a C-string. |
flags | Any flags you wish to declare for this attribute, as defined in e_max_attrflags. |
typesym | The type the getter and setter would expect: _sym_char, _sym_long, _sym_atom_long, _sym_float32, _sym_float64, _sym_symbol, _sym_atom, etc |
#define CLASS_ATTR_ORDER | ( | c, | |
attrname, | |||
flags, | |||
parsestr | |||
) |
Add a new attribute to the specified attribute to specify a default order in which to list attributes.
c | The class pointer. |
attrname | The name of the attribute as a C-string. |
flags | Any flags you wish to declare for this new attribute, as defined in e_max_attrflags. |
parsestr | A C-string, which will be parsed into an array of atoms to set the initial value. |
#define CLASS_ATTR_PAINT | ( | c, | |
attrname, | |||
flags | |||
) |
Add a new attribute indicating that any changes to the specified attribute will trigger a call to the object's paint method.
c | The class pointer. |
attrname | The name of the attribute as a C-string. |
flags | Any flags you wish to declare for this new attribute, as defined in e_max_attrflags. |
#define CLASS_ATTR_REMOVE_FLAGS | ( | c, | |
attrname, | |||
flags | |||
) |
Remove flags from an attribute.
c | The class pointer. |
attrname | The name of the attribute as a C-string. |
flags | Any flags you wish to remove from this attribute, as defined in e_max_attrflags. |
#define CLASS_ATTR_RENAMED | ( | c, | |
oldname, | |||
newname, | |||
flags | |||
) |
Add a new attribute to the specified attribute to flag it as renamed.
c | The class pointer. |
oldname | The name of the old attribute as a C-string. |
newname | The name of the new attribute as a C-string. |
flags | Any flags you wish to declare for this new attribute, as defined in e_max_attrflags. |
#define CLASS_ATTR_RGBA | ( | c, | |
attrname, | |||
flags, | |||
structname, | |||
structmember | |||
) |
Create a color (t_jrgba) attribute and add it to a Max class.
c | The class pointer. |
attrname | The name of this attribute as a C-string. |
flags | Any flags you wish to declare for this attribute, as defined in e_max_attrflags. |
structname | The C identifier for the struct (containing a valid t_object header) representing an instance of this class. |
structmember | The C identifier of the member in the struct that holds the value of this attribute. |
#define CLASS_ATTR_SAVE | ( | c, | |
attrname, | |||
flags | |||
) |
Add a new attribute to the specified attribute to indicate that the specified attribute should be saved with the patcher.
c | The class pointer. |
attrname | The name of the attribute as a C-string. |
flags | Any flags you wish to declare for this new attribute, as defined in e_max_attrflags. |
#define CLASS_ATTR_SELFSAVE | ( | c, | |
attrname, | |||
flags | |||
) |
Add a new attribute to the specified attribute to indicate that it is saved by the object (so it does not appear in italics in the inspector).
c | The class pointer. |
attrname | The name of the attribute as a C-string. |
flags | Any flags you wish to declare for this new attribute, as defined in e_max_attrflags. |
#define CLASS_ATTR_STYLE | ( | c, | |
attrname, | |||
flags, | |||
parsestr | |||
) |
Add a new attribute to the specified attribute to specify an editor style for the Max inspector.
Available styles include
c | The class pointer. |
attrname | The name of the attribute as a C-string. |
flags | Any flags you wish to declare for this new attribute, as defined in e_max_attrflags. |
parsestr | A C-string, which will be parsed into an array of atoms to set the initial value. |
#define CLASS_ATTR_STYLE_LABEL | ( | c, | |
attrname, | |||
flags, | |||
stylestr, | |||
labelstr | |||
) |
A convenience wrapper for CLASS_ATTR_STYLE, and CLASS_ATTR_LABEL.
c | The class pointer. |
attrname | The name of the attribute as a C-string. |
flags | Any flags you wish to declare for this new attribute, as defined in e_max_attrflags. |
stylestr | A C-string that names the style for the attribute. See CLASS_ATTR_STYLE for the available styles. |
labelstr | A C-string that names the category to which the attribute is assigned in the inspector. |
#define CLASS_ATTR_SYM | ( | c, | |
attrname, | |||
flags, | |||
structname, | |||
structmember | |||
) |
Create a t_symbol* attribute and add it to a Max class.
c | The class pointer. |
attrname | The name of this attribute as a C-string. |
flags | Any flags you wish to declare for this attribute, as defined in e_max_attrflags. |
structname | The C identifier for the struct (containing a valid t_object header) representing an instance of this class. |
structmember | The C identifier of the member in the struct that holds the value of this attribute. |
#define CLASS_ATTR_SYM_ARRAY | ( | c, | |
attrname, | |||
flags, | |||
structname, | |||
structmember, | |||
size | |||
) |
Create an array-of-symbols attribute of fixed length, and add it to a Max class.
c | The class pointer. |
attrname | The name of this attribute as a C-string. |
flags | Any flags you wish to declare for this attribute, as defined in e_max_attrflags. |
structname | The C identifier for the struct (containing a valid t_object header) representing an instance of this class. |
structmember | The C identifier of the member in the struct that holds the value of this attribute. |
size | The number of items in the t_symbol* array. |
#define CLASS_ATTR_SYM_VARSIZE | ( | c, | |
attrname, | |||
flags, | |||
structname, | |||
structmember, | |||
sizemember, | |||
maxsize | |||
) |
Create an array-of-symbols attribute of variable length, and add it to a Max class.
c | The class pointer. |
attrname | The name of this attribute as a C-string. |
flags | Any flags you wish to declare for this attribute, as defined in e_max_attrflags. |
structname | The C identifier for the struct (containing a valid t_object header) representing an instance of this class. |
structmember | The C identifier of the member in the struct that holds the value of this attribute. |
sizemember | The actual number of items in the t_symbol* array at any given moment. |
maxsize | The maximum number of items in the t_symbol* array, i.e. the number of members allocated for the array in the struct. |
#define CLASS_METHOD_ATTR_PARSE | ( | c, | |
methodname, | |||
attrname, | |||
type, | |||
flags, | |||
parsestring | |||
) |
Define and add attributes to class methods.
c | The class pointer. |
methodname | The name of the existing method as a C-string. |
attrname | The name of the attribute to add as a C-string. |
type | The datatype of the attribute to be added. |
flags | Any flags you wish to declare for this new attribute, as defined in e_max_attrflags. |
parsestring | A C-string, which will be parsed into an array of atoms to set the initial value. |
#define CLASS_METHOD_INTRODUCED | ( | c, | |
methodname, | |||
flags, | |||
versionstr | |||
) |
Add a new attribute to the specified method to indicate in which version the method was introduced.
c | The class pointer. |
methodname | The name of the method as a C-string. |
flags | Any flags you wish to declare for this new attribute, as defined in e_max_attrflags. |
versionstr | A C-string, which will be parsed set the version number (e.g. "7.0.0"). |
#define CLASS_METHOD_OBSOLETE | ( | c, | |
methodname, | |||
flags | |||
) |
Add a new attribute to the specified method to flag it as obsolete.
c | The class pointer. |
methodname | The name of the method as a C-string. |
flags | Any flags you wish to declare for this new attribute, as defined in e_max_attrflags. |
#define CLASS_METHOD_RENAMED | ( | c, | |
oldname, | |||
newname, | |||
flags | |||
) |
Add a new attribute to the specified method to flag a method as renamed.
c | The class pointer. |
oldname | The name of the old method as a C-string. |
newname | The name of the new method as a C-string. |
flags | Any flags you wish to declare for this new attribute, as defined in e_max_attrflags. |
#define CLASS_STICKY_ATTR | ( | c, | |
name, | |||
flags, | |||
parsestr | |||
) |
Create an attribute, and add it to all following attribute declarations.
The block is closed by a call to CLASS_STICKY_ATTR_CLEAR.
c | The class pointer. |
name | The name of the new attribute to create as a C-string. |
flags | Any flags you wish to declare for this new attribute, as defined in e_max_attrflags. |
parsestr | A C-string, which will be parsed into an array of atoms to set the initial value. |
#define CLASS_STICKY_ATTR_CLEAR | ( | c, | |
name | |||
) |
Close a CLASS_STICKY_ATTR block.
c | The class pointer. |
name | The name of the sticky attribute as a C-string. |
#define CLASS_STICKY_METHOD | ( | c, | |
name, | |||
flags, | |||
parsestr | |||
) |
Create an attribute, and add it to all following method declarations.
The block is closed by a call to CLASS_STICKY_METHOD_CLEAR.
c | The class pointer. |
name | The name of the new attribute to create as a C-string. |
flags | Any flags you wish to declare for this new attribute, as defined in e_max_attrflags. |
parsestr | A C-string, which will be parsed into an array of atoms to set the initial value. |
#define CLASS_STICKY_METHOD_CLEAR | ( | c, | |
name | |||
) |
Close a CLASS_STICKY_METHOD block.
c | The class pointer. |
name | The name of the sticky attribute as a C-string. |
#define OBJ_ATTR_ATOM | ( | x, | |
attrname, | |||
flags, | |||
val | |||
) |
Create an instance-local t_atom attribute and add it to a Max class.
x | The object pointer. |
attrname | The name of this attribute as a C-string. |
flags | Any flags you wish to declare for this attribute, as defined in e_max_attrflags. |
val | Pointer to the value. |
#define OBJ_ATTR_ATOM_ARRAY |
Create an instance-local array-of-atoms attribute of fixed length, and add it to the object.
x | The object pointer. |
attrname | The name of this attribute as a C-string. |
flags | Any flags you wish to declare for this attribute, as defined in e_max_attrflags. |
count | The number of items in the t_atom array. |
vals | Pointer to the values. |
#define OBJ_ATTR_CHAR | ( | x, | |
attrname, | |||
flags, | |||
val | |||
) |
Create an instance-local char attribute and add it to a Max class.
x | The object pointer. |
attrname | The name of this attribute as a C-string. |
flags | Any flags you wish to declare for this attribute, as defined in e_max_attrflags. |
val | Pointer to the value. |
#define OBJ_ATTR_CHAR_ARRAY | ( | x, | |
attrname, | |||
flags, | |||
count, | |||
vals | |||
) |
Create an instance-local array-of-chars attribute of fixed length, and add it to the object.
x | The object pointer. |
attrname | The name of this attribute as a C-string. |
flags | Any flags you wish to declare for this attribute, as defined in e_max_attrflags. |
count | The number of items in the char array. |
vals | Pointer to the values. |
#define OBJ_ATTR_DEFAULT | ( | x, | |
attrname, | |||
flags, | |||
parsestr | |||
) |
An instance-attribute version of CLASS_ATTR_DEFAULT.
x | The t_object instance pointer. |
attrname | The name of the attribute as a C-string. |
flags | Any flags you wish to declare for this new attribute, as defined in e_max_attrflags. |
parsestr | A C-string, which will be parsed into an array of atoms to set the initial value. |
#define OBJ_ATTR_DEFAULT_SAVE | ( | x, | |
attrname, | |||
flags, | |||
parsestr | |||
) |
An instance-attribute version of CLASS_ATTR_DEFAULT_SAVE.
x | The t_object instance pointer. |
attrname | The name of the attribute as a C-string. |
flags | Any flags you wish to declare for this new attribute, as defined in e_max_attrflags. |
parsestr | A C-string, which will be parsed into an array of atoms to set the initial value. |
#define OBJ_ATTR_DOUBLE | ( | x, | |
attrname, | |||
flags, | |||
val | |||
) |
Create an instance-local 64bit float attribute and add it to a Max class.
x | The object pointer. |
attrname | The name of this attribute as a C-string. |
flags | Any flags you wish to declare for this attribute, as defined in e_max_attrflags. |
val | Pointer to the value. |
#define OBJ_ATTR_DOUBLE_ARRAY | ( | x, | |
attrname, | |||
flags, | |||
count, | |||
vals | |||
) |
Create an instance-local array-of-64bit-floats attribute of fixed length, and add it to the object.
x | The object pointer. |
attrname | The name of this attribute as a C-string. |
flags | Any flags you wish to declare for this attribute, as defined in e_max_attrflags. |
count | The number of items in the double array. |
vals | Pointer to the values. |
#define OBJ_ATTR_FLOAT | ( | x, | |
attrname, | |||
flags, | |||
val | |||
) |
Create an instance-local 32bit float attribute and add it to a Max class.
x | The object pointer. |
attrname | The name of this attribute as a C-string. |
flags | Any flags you wish to declare for this attribute, as defined in e_max_attrflags. |
val | Pointer to the value. |
#define OBJ_ATTR_FLOAT_ARRAY | ( | x, | |
attrname, | |||
flags, | |||
count, | |||
vals | |||
) |
Create an instance-local array-of-32bit-floats attribute of fixed length, and add it to the object.
x | The object pointer. |
attrname | The name of this attribute as a C-string. |
flags | Any flags you wish to declare for this attribute, as defined in e_max_attrflags. |
count | The number of items in the float array. |
vals | Pointer to the values. |
#define OBJ_ATTR_LONG | ( | x, | |
attrname, | |||
flags, | |||
val | |||
) |
Create an instance-local long integer attribute and add it to a Max class.
x | The object pointer. |
attrname | The name of this attribute as a C-string. |
flags | Any flags you wish to declare for this attribute, as defined in e_max_attrflags. |
val | Pointer to the value. |
#define OBJ_ATTR_LONG_ARRAY | ( | x, | |
attrname, | |||
flags, | |||
count, | |||
vals | |||
) |
Create an instance-local array-of-long-integers attribute of fixed length, and add it to the object.
x | The object pointer. |
attrname | The name of this attribute as a C-string. |
flags | Any flags you wish to declare for this attribute, as defined in e_max_attrflags. |
count | The number of items in the long array. |
vals | Pointer to the values. |
#define OBJ_ATTR_OBJ | ( | x, | |
attrname, | |||
flags, | |||
val | |||
) |
Create an instance-local t_object* attribute and add it to a Max class.
x | The object pointer. |
attrname | The name of this attribute as a C-string. |
flags | Any flags you wish to declare for this attribute, as defined in e_max_attrflags. |
val | Pointer to the value. |
#define OBJ_ATTR_OBJ_ARRAY | ( | x, | |
attrname, | |||
flags, | |||
count, | |||
vals | |||
) |
Create an instance-local array-of-objects attribute of fixed length, and add it to the object.
x | The object pointer. |
attrname | The name of this attribute as a C-string. |
flags | Any flags you wish to declare for this attribute, as defined in e_max_attrflags. |
count | The number of items in the t_object* array. |
vals | Pointer to the values. |
#define OBJ_ATTR_SAVE | ( | x, | |
attrname, | |||
flags | |||
) |
An instance-attribute version of CLASS_ATTR_SAVE.
x | The t_object instance pointer. |
attrname | The name of the attribute as a C-string. |
flags | Any flags you wish to declare for this new attribute, as defined in e_max_attrflags. |
#define OBJ_ATTR_SYM | ( | x, | |
attrname, | |||
flags, | |||
val | |||
) |
Create an instance-local t_symbol* attribute and add it to a Max class.
x | The object pointer. |
attrname | The name of this attribute as a C-string. |
flags | Any flags you wish to declare for this attribute, as defined in e_max_attrflags. |
val | Pointer to the value. |
#define OBJ_ATTR_SYM_ARRAY | ( | x, | |
attrname, | |||
flags, | |||
count, | |||
vals | |||
) |
Create an instance-local array-of-symbols attribute of fixed length, and add it to the object.
x | The object pointer. |
attrname | The name of this attribute as a C-string. |
flags | Any flags you wish to declare for this attribute, as defined in e_max_attrflags. |
count | The number of items in the t_symbol* array. |
vals | Pointer to the values. |
#define STRUCT_ATTR_ATOM | ( | c, | |
flags, | |||
structname, | |||
structmember | |||
) |
Create a t_atom attribute and add it to a Max class.
The name of the attribute is automatically determined by the name of the struct member.
c | The class pointer. |
flags | Any flags you wish to declare for this attribute, as defined in e_max_attrflags. |
structname | The C identifier for the struct (containing a valid t_object header) representing an instance of this class. |
structmember | The C identifier of the member in the struct that holds the value of this attribute. |
#define STRUCT_ATTR_ATOM_ARRAY | ( | c, | |
flags, | |||
structname, | |||
structmember, | |||
size | |||
) |
Create an array-of-atoms attribute of fixed length, and add it to a Max class.
The name of the attribute is automatically determined by the name of the struct member.
c | The class pointer. |
flags | Any flags you wish to declare for this attribute, as defined in e_max_attrflags. |
structname | The C identifier for the struct (containing a valid t_object header) representing an instance of this class. |
structmember | The C identifier of the member in the struct that holds the value of this attribute. |
size | The number of items in the t_atom array. |
#define STRUCT_ATTR_ATOM_LONG | ( | c, | |
flags, | |||
structname, | |||
structmember | |||
) |
Create a t_atom_long integer attribute and add it to a Max class.
The name of the attribute is automatically determined by the name of the struct member.
c | The class pointer. |
flags | Any flags you wish to declare for this attribute, as defined in e_max_attrflags. |
structname | The C identifier for the struct (containing a valid t_object header) representing an instance of this class. |
structmember | The C identifier of the member in the struct that holds the value of this attribute. |
#define STRUCT_ATTR_ATOM_VARSIZE | ( | c, | |
flags, | |||
structname, | |||
structmember, | |||
sizemember, | |||
maxsize | |||
) |
Create an array-of-atoms attribute of variable length, and add it to a Max class.
The name of the attribute is automatically determined by the name of the struct member.
c | The class pointer. |
flags | Any flags you wish to declare for this attribute, as defined in e_max_attrflags. |
structname | The C identifier for the struct (containing a valid t_object header) representing an instance of this class. |
structmember | The C identifier of the member in the struct that holds the value of this attribute. |
sizemember | The actual number of items in the t_atom array at any given moment. |
maxsize | The maximum number of items in the t_atom array, i.e. the number of members allocated for the array in the struct. |
#define STRUCT_ATTR_CHAR | ( | c, | |
flags, | |||
structname, | |||
structmember | |||
) |
Create a char attribute and add it to a Max class.
The name of the attribute is automatically determined by the name of the struct member.
c | The class pointer. |
flags | Any flags you wish to declare for this attribute, as defined in e_max_attrflags. |
structname | The C identifier for the struct (containing a valid t_object header) representing an instance of this class. |
structmember | The C identifier of the member in the struct that holds the value of this attribute. |
#define STRUCT_ATTR_CHAR_ARRAY | ( | c, | |
flags, | |||
structname, | |||
structmember, | |||
size | |||
) |
Create an array-of-chars attribute of fixed length, and add it to a Max class.
The name of the attribute is automatically determined by the name of the struct member.
c | The class pointer. |
flags | Any flags you wish to declare for this attribute, as defined in e_max_attrflags. |
structname | The C identifier for the struct (containing a valid t_object header) representing an instance of this class. |
structmember | The C identifier of the member in the struct that holds the value of this attribute. |
size | The number of items in the char array. |
#define STRUCT_ATTR_CHAR_VARSIZE | ( | c, | |
flags, | |||
structname, | |||
structmember, | |||
sizemember, | |||
maxsize | |||
) |
Create an array-of-chars attribute of variable length, and add it to a Max class.
The name of the attribute is automatically determined by the name of the struct member.
c | The class pointer. |
flags | Any flags you wish to declare for this attribute, as defined in e_max_attrflags. |
structname | The C identifier for the struct (containing a valid t_object header) representing an instance of this class. |
structmember | The C identifier of the member in the struct that holds the value of this attribute. |
sizemember | The actual number of items in the char array at any given moment. |
maxsize | The maximum number of items in the char array, i.e. the number of members allocated for the array in the struct. |
#define STRUCT_ATTR_DOUBLE | ( | c, | |
flags, | |||
structname, | |||
structmember | |||
) |
Create a 64bit float attribute and add it to a Max class.
The name of the attribute is automatically determined by the name of the struct member.
c | The class pointer. |
flags | Any flags you wish to declare for this attribute, as defined in e_max_attrflags. |
structname | The C identifier for the struct (containing a valid t_object header) representing an instance of this class. |
structmember | The C identifier of the member in the struct that holds the value of this attribute. |
#define STRUCT_ATTR_DOUBLE_ARRAY | ( | c, | |
flags, | |||
structname, | |||
structmember, | |||
size | |||
) |
Create an array-of-64bit-floats attribute of fixed length, and add it to a Max class.
The name of the attribute is automatically determined by the name of the struct member.
c | The class pointer. |
flags | Any flags you wish to declare for this attribute, as defined in e_max_attrflags. |
structname | The C identifier for the struct (containing a valid t_object header) representing an instance of this class. |
structmember | The C identifier of the member in the struct that holds the value of this attribute. |
size | The number of items in the double array. |
#define STRUCT_ATTR_DOUBLE_VARSIZE | ( | c, | |
flags, | |||
structname, | |||
structmember, | |||
sizemember, | |||
maxsize | |||
) |
Create an array-of-64bit-floats attribute of variable length, and add it to a Max class.
The name of the attribute is automatically determined by the name of the struct member.
c | The class pointer. |
flags | Any flags you wish to declare for this attribute, as defined in e_max_attrflags. |
structname | The C identifier for the struct (containing a valid t_object header) representing an instance of this class. |
structmember | The C identifier of the member in the struct that holds the value of this attribute. |
sizemember | The actual number of items in the double array at any given moment. |
maxsize | The maximum number of items in the double array, i.e. the number of members allocated for the array in the struct. |
#define STRUCT_ATTR_FLOAT | ( | c, | |
flags, | |||
structname, | |||
structmember | |||
) |
Create a 32bit float attribute and add it to a Max class.
The name of the attribute is automatically determined by the name of the struct member.
c | The class pointer. |
flags | Any flags you wish to declare for this attribute, as defined in e_max_attrflags. |
structname | The C identifier for the struct (containing a valid t_object header) representing an instance of this class. |
structmember | The C identifier of the member in the struct that holds the value of this attribute. |
#define STRUCT_ATTR_FLOAT_ARRAY | ( | c, | |
flags, | |||
structname, | |||
structmember, | |||
size | |||
) |
Create an array-of-32bit-floats attribute of fixed length, and add it to a Max class.
The name of the attribute is automatically determined by the name of the struct member.
c | The class pointer. |
flags | Any flags you wish to declare for this attribute, as defined in e_max_attrflags. |
structname | The C identifier for the struct (containing a valid t_object header) representing an instance of this class. |
structmember | The C identifier of the member in the struct that holds the value of this attribute. |
size | The number of items in the floats array. |
#define STRUCT_ATTR_FLOAT_VARSIZE | ( | c, | |
flags, | |||
structname, | |||
structmember, | |||
sizemember, | |||
maxsize | |||
) |
Create an array-of-32bit-floats attribute of variable length, and add it to a Max class.
The name of the attribute is automatically determined by the name of the struct member.
c | The class pointer. |
flags | Any flags you wish to declare for this attribute, as defined in e_max_attrflags. |
structname | The C identifier for the struct (containing a valid t_object header) representing an instance of this class. |
structmember | The C identifier of the member in the struct that holds the value of this attribute. |
sizemember | The actual number of items in the float array at any given moment. |
maxsize | The maximum number of items in the float array, i.e. the number of members allocated for the array in the struct. |
#define STRUCT_ATTR_LONG | ( | c, | |
flags, | |||
structname, | |||
structmember | |||
) |
Create a long integer attribute and add it to a Max class.
The name of the attribute is automatically determined by the name of the struct member.
c | The class pointer. |
flags | Any flags you wish to declare for this attribute, as defined in e_max_attrflags. |
structname | The C identifier for the struct (containing a valid t_object header) representing an instance of this class. |
structmember | The C identifier of the member in the struct that holds the value of this attribute. |
#define STRUCT_ATTR_LONG_ARRAY | ( | c, | |
flags, | |||
structname, | |||
structmember, | |||
size | |||
) |
Create an array-of-long-integers attribute of fixed length, and add it to a Max class.
The name of the attribute is automatically determined by the name of the struct member.
c | The class pointer. |
flags | Any flags you wish to declare for this attribute, as defined in e_max_attrflags. |
structname | The C identifier for the struct (containing a valid t_object header) representing an instance of this class. |
structmember | The C identifier of the member in the struct that holds the value of this attribute. |
size | The number of items in the long array. |
#define STRUCT_ATTR_LONG_VARSIZE | ( | c, | |
flags, | |||
structname, | |||
structmember, | |||
sizemember, | |||
maxsize | |||
) |
Create an array-of-long-integers attribute of variable length, and add it to a Max class.
The name of the attribute is automatically determined by the name of the struct member.
c | The class pointer. |
flags | Any flags you wish to declare for this attribute, as defined in e_max_attrflags. |
structname | The C identifier for the struct (containing a valid t_object header) representing an instance of this class. |
structmember | The C identifier of the member in the struct that holds the value of this attribute. |
sizemember | The actual number of items in the long array at any given moment. |
maxsize | The maximum number of items in the long array, i.e. the number of members allocated for the array in the struct. |
#define STRUCT_ATTR_OBJ | ( | c, | |
flags, | |||
structname, | |||
structmember | |||
) |
Create a t_object* attribute and add it to a Max class.
The name of the attribute is automatically determined by the name of the struct member.
c | The class pointer. |
flags | Any flags you wish to declare for this attribute, as defined in e_max_attrflags. |
structname | The C identifier for the struct (containing a valid t_object header) representing an instance of this class. |
structmember | The C identifier of the member in the struct that holds the value of this attribute. |
#define STRUCT_ATTR_OBJ_ARRAY | ( | c, | |
flags, | |||
structname, | |||
structmember, | |||
size | |||
) |
Create an array-of-objects attribute of fixed length, and add it to a Max class.
The name of the attribute is automatically determined by the name of the struct member.
c | The class pointer. |
flags | Any flags you wish to declare for this attribute, as defined in e_max_attrflags. |
structname | The C identifier for the struct (containing a valid t_object header) representing an instance of this class. |
structmember | The C identifier of the member in the struct that holds the value of this attribute. |
size | The number of items in the t_object* array. |
#define STRUCT_ATTR_OBJ_VARSIZE | ( | c, | |
flags, | |||
structname, | |||
structmember, | |||
sizemember, | |||
maxsize | |||
) |
Create an array-of-objects attribute of variable length, and add it to a Max class.
The name of the attribute is automatically determined by the name of the struct member.
c | The class pointer. |
flags | Any flags you wish to declare for this attribute, as defined in e_max_attrflags. |
structname | The C identifier for the struct (containing a valid t_object header) representing an instance of this class. |
structmember | The C identifier of the member in the struct that holds the value of this attribute. |
sizemember | The actual number of items in the t_object* array at any given moment. |
maxsize | The maximum number of items in the t_object* array, i.e. the number of members allocated for the array in the struct. |
#define STRUCT_ATTR_SYM | ( | c, | |
flags, | |||
structname, | |||
structmember | |||
) |
Create a t_symbol* attribute and add it to a Max class.
The name of the attribute is automatically determined by the name of the struct member.
c | The class pointer. |
flags | Any flags you wish to declare for this attribute, as defined in e_max_attrflags. |
structname | The C identifier for the struct (containing a valid t_object header) representing an instance of this class. |
structmember | The C identifier of the member in the struct that holds the value of this attribute. |
#define STRUCT_ATTR_SYM_ARRAY | ( | c, | |
flags, | |||
structname, | |||
structmember, | |||
size | |||
) |
Create an array-of-symbols attribute of fixed length, and add it to a Max class.
The name of the attribute is automatically determined by the name of the struct member.
c | The class pointer. |
flags | Any flags you wish to declare for this attribute, as defined in e_max_attrflags. |
structname | The C identifier for the struct (containing a valid t_object header) representing an instance of this class. |
structmember | The C identifier of the member in the struct that holds the value of this attribute. |
size | The number of items in the t_symbol* array. |
#define STRUCT_ATTR_SYM_VARSIZE | ( | c, | |
flags, | |||
structname, | |||
structmember, | |||
sizemember, | |||
maxsize | |||
) |
Create an array-of-symbols attribute of variable length, and add it to a Max class.
The name of the attribute is automatically determined by the name of the struct member.
c | The class pointer. |
flags | Any flags you wish to declare for this attribute, as defined in e_max_attrflags. |
structname | The C identifier for the struct (containing a valid t_object header) representing an instance of this class. |
structmember | The C identifier of the member in the struct that holds the value of this attribute. |
sizemember | The actual number of items in the t_symbol* array at any given moment. |
maxsize | The maximum number of items in the t_symbol* array, i.e. the number of members allocated for the array in the struct. |
enum e_max_attrflags |
Attribute flags.
t_max_err attr_addfilter_clip | ( | void * | x, |
double | min, | ||
double | max, | ||
long | usemin, | ||
long | usemax | ||
) |
Attaches a clip filter to an attribute.
The filter will clip any values sent to or retrieved from the attribute using the attribute's get
and set
functions.
x | Pointer to the attribute to receive the filter |
min | Minimum value for the clip filter |
max | Maximum value for the clip filter |
usemin | Sets this value to 0 if the minimum clip value should not be used. Otherwise, set the value to non-zero. |
usemax | Sets this value to 0 if the minimum clip value should not be used. Otherwise, set the value to non-zero. |
t_max_err attr_addfilter_clip_scale | ( | void * | x, |
double | scale, | ||
double | min, | ||
double | max, | ||
long | usemin, | ||
long | usemax | ||
) |
Attaches a clip/scale filter to an attribute.
The filter will clip and scale any values sent to or retrieved from the attribute using the attribute's get
and set
functions.
x | Pointer to the attribute to receive the filter |
scale | Scale value. Data sent to the attribute will be scaled by this amount. Data retrieved from the attribute will be scaled by its reciprocal. Scaling occurs previous to clipping. |
min | Minimum value for the clip filter |
max | Maximum value for the clip filter |
usemin | Sets this value to 0 if the minimum clip value should not be used. Otherwise, set the value to non-zero. |
usemax | Sets this value to 0 if the minimum clip value should not be used. Otherwise, set the value to non-zero. |
t_max_err attr_addfilterget_clip | ( | void * | x, |
double | min, | ||
double | max, | ||
long | usemin, | ||
long | usemax | ||
) |
Attaches a clip filter to an attribute.
The filter will only clip values retrieved from the attribute using the attribute's get
function.
x | Pointer to the attribute to receive the filter |
min | Minimum value for the clip filter |
max | Maximum value for the clip filter |
usemin | Sets this value to 0 if the minimum clip value should not be used. Otherwise, set the value to non-zero. |
usemax | Sets this value to 0 if the minimum clip value should not be used. Otherwise, set the value to non-zero. |
t_max_err attr_addfilterget_clip_scale | ( | void * | x, |
double | scale, | ||
double | min, | ||
double | max, | ||
long | usemin, | ||
long | usemax | ||
) |
Attaches a clip/scale filter to an attribute.
The filter will only clip and scale values retrieved from the attribute using the attribute's get
function.
x | Pointer to the attribute to receive the filter |
scale | Scale value. Data retrieved from the attribute will be scaled by this amount. Scaling occurs previous to clipping. |
min | Minimum value for the clip filter |
max | Maximum value for the clip filter |
usemin | Sets this value to 0 if the minimum clip value should not be used. Otherwise, set the value to non-zero. |
usemax | Sets this value to 0 if the minimum clip value should not be used. Otherwise, set the value to non-zero. |
Attaches a custom filter method to an attribute.
The filter will only be called for values retrieved from the attribute using the attribute's get
function.
x | Pointer to the attribute to receive the filter |
proc | A filter method |
t_max_err attr_addfilterset_clip | ( | void * | x, |
double | min, | ||
double | max, | ||
long | usemin, | ||
long | usemax | ||
) |
Attaches a clip filter to an attribute.
The filter will only clip values sent to the attribute using the attribute's set
function.
x | Pointer to the attribute to receive the filter |
min | Minimum value for the clip filter |
max | Maximum value for the clip filter |
usemin | Sets this value to 0 if the minimum clip value should not be used. Otherwise, set the value to non-zero. |
usemax | Sets this value to 0 if the minimum clip value should not be used. Otherwise, set the value to non-zero. |
t_max_err attr_addfilterset_clip_scale | ( | void * | x, |
double | scale, | ||
double | min, | ||
double | max, | ||
long | usemin, | ||
long | usemax | ||
) |
Attaches a clip/scale filter to an attribute.
The filter will only clip and scale values sent to the attribute using the attribute's set
function.
x | Pointer to the attribute to receive the filter |
scale | Scale value. Data sent to the attribute will be scaled by this amount. Scaling occurs previous to clipping. |
min | Minimum value for the clip filter |
max | Maximum value for the clip filter |
usemin | Sets this value to 0 if the minimum clip value should not be used. Otherwise, set the value to non-zero. |
usemax | Sets this value to 0 if the minimum clip value should not be used. Otherwise, set the value to non-zero. |
Attaches a custom filter method to an attribute.
The filter will only be called for values retrieved from the attribute using the attribute's set
function.
x | Pointer to the attribute to receive the filter |
proc | A filter method |
void attr_args_dictionary | ( | t_dictionary * | x, |
short | ac, | ||
t_atom * | av | ||
) |
Create a dictionary of attribute-name, attribute-value pairs from an array of atoms containing an attribute definition list.
x | A dictionary instance pointer. |
ac | The number of atoms to parse in av. |
av | A pointer to the first of the array of atoms containing the attribute values. |
long attr_args_offset | ( | short | ac, |
t_atom * | av | ||
) |
Determines the point in an atom list where attribute arguments begin.
Developers can use this function to assist in the manual processing of attribute arguments, when attr_args_process() doesn't provide the correct functionality for a particular purpose.
ac | The count of t_atoms in av |
av | An atom list |
foo bar 3.0 @mode 6
would cause attr_args_offset
to return 3 (the attribute mode
appears at position 3 in the atom list). Referenced by max_jit_attr_args_offset().
void attr_args_process | ( | void * | x, |
short | ac, | ||
t_atom * | av | ||
) |
Takes an atom list and properly set any attributes described within.
This function is typically used in an object's new
method to conveniently process attribute arguments.
x | The object whose attributes will be processed |
ac | The count of t_atoms in av |
av | An atom list |
void attr_dictionary_check | ( | void * | x, |
t_dictionary * | d | ||
) |
Check that a dictionary only contains values for existing attributes of an object.
If a key in the dictionary doesn't correspond an one of the object's attributes, an error will be posted to the Max window.
x | The object instance pointer. |
d | The dictionary containing the attributes. |
void attr_dictionary_process | ( | void * | x, |
t_dictionary * | d | ||
) |
Set attributes for an object that are defined in a dictionary.
Objects with dictionary constructors, such as UI objects, should call this method to set their attributes when an object is created.
x | The object instance pointer. |
d | The dictionary containing the attributes. |
t_object* attr_offset_array_new | ( | C74_CONST char * | name, |
t_symbol * | type, | ||
long | size, | ||
long | flags, | ||
method | mget, | ||
method | mset, | ||
long | offsetcount, | ||
long | offset | ||
) |
Create a new attribute.
The attribute references an array of memory stored outside of itself, in the object's data structure. Attributes created using attr_offset_array_new() can be assigned either to classes (using the class_addattr() function) or to objects (using the object_addattr() function).
name | A name for the attribute, as a C-string |
type | A t_symbol * representing a valid attribute type. At the time of this writing, the valid type-symbols are: _sym_char (char), _sym_long (long), _sym_float32 (32-bit float), _sym_float64 (64-bit float), _sym_atom (Max t_atom pointer), _sym_symbol (Max t_symbol pointer), _sym_pointer (generic pointer) and _sym_object (Max t_object pointer). |
size | Maximum number of items that may be in the array. |
flags | Any attribute flags, expressed as a bitfield. Attribute flags are used to determine if an attribute is accessible for setting or querying. The available accessor flags are defined in e_max_attrflags. |
mget | The method to use for the attribute's get functionality. If mget is NULL, the default method is used. See the discussion under attribute_new(), for more information. |
mset | The method to use for the attribute's set functionality. If mset is NULL, the default method is used. See the discussion under attribute_new(), for more information. |
offsetcount | Byte offset into the object class's data structure of a long variable describing how many array elements (up to size ) comprise the data to be referenced by the attribute. Typically, the calcoffset macro is used to calculate this offset. |
offset | Byte offset into the class data structure of the object which will "own" the attribute. The offset should point to the data to be referenced by the attribute. Typically, the calcoffset macro is used to calculate this offset. |
atm
; the current number of "active" elements in the array is held in the variable atmcount
) in an object class's data structure: Referenced by ext_main().
t_object* attr_offset_new | ( | C74_CONST char * | name, |
C74_CONST t_symbol * | type, | ||
long | flags, | ||
C74_CONST method | mget, | ||
C74_CONST method | mset, | ||
long | offset | ||
) |
Create a new attribute.
The attribute references memory stored outside of itself, in the object's data structure. Attributes created using attr_offset_new() can be assigned either to classes (using the class_addattr() function) or to objects (using the object_addattr() function).
name | A name for the attribute, as a C-string |
type | A t_symbol * representing a valid attribute type. At the time of this writing, the valid type-symbols are: _sym_char (char), _sym_long (long), _sym_float32 (32-bit float), _sym_float64 (64-bit float), _sym_atom (Max t_atom pointer), _sym_symbol (Max t_symbol pointer), _sym_pointer (generic pointer) and _sym_object (Max t_object pointer). |
flags | Any attribute flags, expressed as a bitfield. Attribute flags are used to determine if an attribute is accessible for setting or querying. The available accessor flags are defined in e_max_attrflags. |
mget | The method to use for the attribute's get functionality. If mget is NULL, the default method is used. See the discussion under attribute_new(), for more information. |
mset | The method to use for the attribute's set functionality. If mset is NULL, the default method is used. See the discussion under attribute_new(), for more information. |
offset | Byte offset into the class data structure of the object which will "own" the attribute. The offset should point to the data to be referenced by the attribute. Typically, the calcoffset macro (described above) is used to calculate this offset. |
val
) in an object class's data structure: Referenced by ext_main().
t_object* attribute_new | ( | C74_CONST char * | name, |
t_symbol * | type, | ||
long | flags, | ||
method | mget, | ||
method | mset | ||
) |
Create a new attribute.
The attribute will allocate memory and store its own data. Attributes created using attribute_new() can be assigned either to classes (using the class_addattr() function) or to objects (using the object_addattr() function).
name | A name for the attribute, as a C-string |
type | A t_symbol * representing a valid attribute type. At the time of this writing, the valid type-symbols are: _sym_char (char), _sym_long (long), _sym_float32 (32-bit float), _sym_float64 (64-bit float), _sym_atom (Max t_atom pointer), _sym_symbol (Max t_symbol pointer), _sym_pointer (generic pointer) and _sym_object (Max t_object pointer). |
flags | Any attribute flags, expressed as a bitfield. Attribute flags are used to determine if an attribute is accessible for setting or querying. The available accessor flags are defined in e_max_attrflags. |
mget | The method to use for the attribute's get functionality. If mget is NULL, the default method is used. |
mset | The method to use for the attribute's set functionality. If mset is NULL, the default method is used. |
get
or set
functionality need to prototype them as: getvalueof
and setvalueof
methods for the object, assumptions are made throughout Max that getbytes() has been used for memory allocation. Developers are strongly urged to do the same: Attaches an attribute directly to an object.
x | An object to which the attribute should be attached |
attr | The attribute's pointer—this should be a pointer returned from attribute_new(), attr_offset_new() or attr_offset_array_new(). |
void* object_attr_get | ( | void * | x, |
t_symbol * | attrname | ||
) |
Returns the pointer to an attribute, given its name.
x | Pointer to the object whose attribute is of interest |
attrname | The attribute's name |
Referenced by jit_attr_getchar_array(), jit_attr_getdouble_array(), jit_attr_getfloat(), jit_attr_getfloat_array(), jit_attr_getlong(), jit_attr_getlong_array(), jit_attr_getsym(), jit_attr_getsym_array(), jit_attr_setchar_array(), jit_attr_setdouble_array(), jit_attr_setfloat(), jit_attr_setfloat_array(), jit_attr_setlong(), jit_attr_setlong_array(), jit_attr_setsym(), jit_attr_setsym_array(), jit_object_attr_get(), jit_object_exportattrs(), and max_jit_attr_set().
Gets the value of a t_rect attribute, given its parent object and name.
Do not use this on a jbox object – use jbox_get_rect_for_view() instead!
o | The attribute's parent object |
name | The attribute's name |
rect | The address of a valid t_rect whose values will be filled-in from the attribute. |
Retrieves the value of an attribute, given its parent object and name.
This function uses a developer-allocated array to copy data to. Developers wishing to retrieve the value of an attribute without pre-allocating memory should refer to the object_attr_getvalueof() function.
x | The attribute's parent object |
s | The attribute's name |
max | The number of array elements in vals . The function will take care not to overwrite the bounds of the array. |
vals | Pointer to the first element of a pre-allocated array of unsigned char data. |
vals
.Referenced by jit_attr_getchar_array().
Gets the value of a t_jrgba attribute, given its parent object and name.
b | The attribute's parent object |
attrname | The attribute's name |
prgba | The address of a valid t_jrgba whose values will be filled-in from the attribute. |
long object_attr_getdouble_array | ( | void * | x, |
t_symbol * | s, | ||
long | max, | ||
double * | vals | ||
) |
Retrieves the value of an attribute, given its parent object and name.
This function uses a developer-allocated array to copy data to. Developers wishing to retrieve the value of an attribute without pre-allocating memory should refer to the object_attr_getvalueof() function.
x | The attribute's parent object |
s | The attribute's name |
max | The number of array elements in vals . The function will take care not to overwrite the bounds of the array. |
vals | Pointer to the first element of a pre-allocated array of double data. |
vals
.Referenced by jit_attr_getdouble_array().
Forces a specified object's attribute to send its value from the object's dumpout outlet in the Max interface.
x | Pointer to the object whose attribute is of interest |
s | The attribute's name |
argc | Unused |
argv | Unused |
t_atom_float object_attr_getfloat | ( | void * | x, |
t_symbol * | s | ||
) |
Retrieves the value of an attribute, given its parent object and name.
x | The attribute's parent object |
s | The attribute's name |
Referenced by jit_attr_getfloat().
long object_attr_getfloat_array | ( | void * | x, |
t_symbol * | s, | ||
long | max, | ||
float * | vals | ||
) |
Retrieves the value of an attribute, given its parent object and name.
This function uses a developer-allocated array to copy data to. Developers wishing to retrieve the value of an attribute without pre-allocating memory should refer to the object_attr_getvalueof() function.
x | The attribute's parent object |
s | The attribute's name |
max | The number of array elements in vals . The function will take care not to overwrite the bounds of the array. |
vals | Pointer to the first element of a pre-allocated array of float data. |
vals
.Referenced by jit_attr_getfloat_array().
Retrieves the value of a color attribute, given its parent object and name.
ob | The attribute's parent object |
s | The attribute's name |
c | The address of a t_jrgba struct that will be filled with the attribute's color component values. |
t_atom_long object_attr_getlong | ( | void * | x, |
t_symbol * | s | ||
) |
Retrieves the value of an attribute, given its parent object and name.
x | The attribute's parent object |
s | The attribute's name |
Referenced by jit_attr_getlong().
long object_attr_getlong_array | ( | void * | x, |
t_symbol * | s, | ||
long | max, | ||
t_atom_long * | vals | ||
) |
Retrieves the value of an attribute, given its parent object and name.
This function uses a developer-allocated array to copy data to. Developers wishing to retrieve the value of an attribute without pre-allocating memory should refer to the object_attr_getvalueof() function.
x | The attribute's parent object |
s | The attribute's name |
max | The number of array elements in vals . The function will take care not to overwrite the bounds of the array. |
vals | Pointer to the first element of a pre-allocated array of long data. |
vals
.Referenced by jit_attr_getlong_array().
Gets the value of a t_pt attribute, given its parent object and name.
o | The attribute's parent object |
name | The attribute's name |
pt | The address of a valid t_pt whose values will be filled-in from the attribute. |
Gets the value of a t_size attribute, given its parent object and name.
o | The attribute's parent object |
name | The attribute's name |
size | The address of a valid t_size whose values will be filled-in from the attribute. |
Retrieves the value of an attribute, given its parent object and name.
x | The attribute's parent object |
s | The attribute's name |
gensym("")
or _sym_nothing
), if unsuccessful. Referenced by jit_attr_getsym().
Retrieves the value of an attribute, given its parent object and name.
This function uses a developer-allocated array to copy data to. Developers wishing to retrieve the value of an attribute without pre-allocating memory should refer to the object_attr_getvalueof() function.
x | The attribute's parent object |
s | The attribute's name |
max | The number of array elements in vals . The function will take care not to overwrite the bounds of the array. |
vals | Pointer to the first element of a pre-allocated array of t_symbol *s. |
vals
. Referenced by jit_attr_getsym_array().
Returns the method of an attribute's get
or set
function, as well as a pointer to the attribute itself, from a message name.
x | Pointer to the object whose attribute is of interest |
methodname | The Max message used to call the attribute's get or set function. For example, gensym("mode") or gensym("getthresh") . |
attr | A pointer to a void *, which will be set to the attribute pointer upon successful completion of the function |
get | A pointer to a long variable, which will be set to 1 upon successful completion of the function, if the queried method corresponds to the get function of the attribute. |
Sets the value of a t_rect attribute, given its parent object and name.
Do not use this on a jbox object – use jbox_get_rect_for_view() instead!
o | The attribute's parent object |
name | The attribute's name |
rect | The address of a valid t_rect whose values will be used to set the attribute. |
Sets the value of a t_rect attribute, given its parent object and name.
Do not use this on a jbox object – use jbox_get_rect_for_view() instead!
o | The attribute's parent object |
attr | The attribute's name |
x | A double containing the new x position. |
y | A double containing the new y position. |
w | A double containing the new width. |
h | A double containing the new height. |
t_max_err object_attr_setchar_array | ( | void * | x, |
t_symbol * | s, | ||
long | count, | ||
C74_CONST t_uint8 * | vals | ||
) |
Sets the value of an attribute, given its parent object and name.
The function will call the attribute's set
method, using the data provided.
x | The attribute's parent object |
s | The attribute's name |
count | The number of array elements in vals |
vals | Pointer to the first element of an array of unsigned char data |
Referenced by jit_attr_setchar_array().
Sets the value of a t_jrgba attribute, given its parent object and name.
b | The attribute's parent object |
attrname | The attribute's name |
prgba | The address of a valid t_jrgba whose values will be used to set the attribute. |
Sets the value of an attribute, given its parent object and name.
The function will call the attribute's set
method, using the data provided.
x | The attribute's parent object |
s | The attribute's name |
count | The number of array elements in vals |
vals | Pointer to the first element of an array of double data |
Referenced by jit_attr_setdouble_array().
t_max_err object_attr_setfloat | ( | void * | x, |
t_symbol * | s, | ||
t_atom_float | c | ||
) |
Sets the value of an attribute, given its parent object and name.
The function will call the attribute's set
method, using the data provided.
x | The attribute's parent object |
s | The attribute's name |
c | An floating point value; the new value for the attribute |
Referenced by jit_attr_setfloat().
Sets the value of an attribute, given its parent object and name.
The function will call the attribute's set
method, using the data provided.
x | The attribute's parent object |
s | The attribute's name |
count | The number of array elements in vals |
vals | Pointer to the first element of an array of float data |
Referenced by jit_attr_setfloat_array().
Sets the value of a color attribute, given its parent object and name.
The function will call the attribute's set
method, using the data provided.
ob | The attribute's parent object |
s | The attribute's name |
c | The address of a t_jrgba struct that contains the new color. |
t_max_err object_attr_setlong | ( | void * | x, |
t_symbol * | s, | ||
t_atom_long | c | ||
) |
Sets the value of an attribute, given its parent object and name.
The function will call the attribute's set
method, using the data provided.
x | The attribute's parent object |
s | The attribute's name |
c | An integer value; the new value for the attribute |
Referenced by jit_attr_setlong().
t_max_err object_attr_setlong_array | ( | void * | x, |
t_symbol * | s, | ||
long | count, | ||
t_atom_long * | vals | ||
) |
Sets the value of an attribute, given its parent object and name.
The function will call the attribute's set
method, using the data provided.
x | The attribute's parent object |
s | The attribute's name |
count | The number of array elements in vals |
vals | Pointer to the first element of an array of long data |
Referenced by jit_attr_setlong_array().
Set an attribute value with one or more atoms parsed from a C-string.
x | The object whose attribute will be set. |
s | The name of the attribute to set. |
parsestr | A C-string to parse into an array of atoms to set the attribute value. |
Sets the value of a t_pt attribute, given its parent object and name.
o | The attribute's parent object |
name | The attribute's name |
pt | The address of a valid t_pt whose values will be used to set the attribute. |
Sets the value of a t_size attribute, given its parent object and name.
o | The attribute's parent object |
name | The attribute's name |
size | The address of a valid t_size whose values will be used to set the attribute. |
Sets the value of an attribute, given its parent object and name.
The function will call the attribute's set
method, using the data provided.
x | The attribute's parent object |
s | The attribute's name |
c | A t_symbol *; the new value for the attribute |
Referenced by jit_attr_setsym().
Sets the value of an attribute, given its parent object and name.
The function will call the attribute's set
method, using the data provided.
x | The attribute's parent object |
s | The attribute's name |
count | The number of array elements in vals |
vals | Pointer to the first element of an array of t_symbol *s |
Referenced by jit_attr_setsym_array().
Sets the value of an object's attribute.
x | Pointer to the object whose attribute is of interest |
s | The attribute's name |
argc | The count of arguments in argv |
argv | Array of t_atoms; the new desired data for the attribute |
Referenced by jit_object_importattrs().
long object_attr_usercanget | ( | void * | x, |
t_symbol * | s | ||
) |
Determines if the value of an object's attribute can be queried from the Max interface (i.e.
if its ATTR_GET_OPAQUE_USER flag is set).
x | Pointer to the object whose attribute is of interest |
s | The attribute's name |
Referenced by jit_object_attr_usercanget().
long object_attr_usercanset | ( | void * | x, |
t_symbol * | s | ||
) |
Determines if an object's attribute can be set from the Max interface (i.e.
if its ATTR_SET_OPAQUE_USER flag is set).
x | Pointer to the object whose attribute is of interest |
s | The attribute's name |
Referenced by jit_object_attr_usercanset().
Detach an attribute from an object that was previously attached with object_addattr().
This function will not free the attribute (use object_free() to do this manually).
x | The object to which the attribute is attached |
attrsym | The attribute's name |
Detach an attribute from an object that was previously attached with object_addattr().
The function will also free all memory associated with the attribute. If you only wish to detach the attribute, without freeing it, see the object_chuckattr() function.
x | The object to which the attribute is attached |
attrsym | The attribute's name |
Create a new object with one or more atoms parsed from a C-string.
The object's new method must have an A_GIMME signature.
name_space | The namespace in which to create the instance. Typically this is either CLASS_BOX or CLASS_NOBOX. |
classname | The name of the class to instantiate. |
parsestr | A C-string to parse into an array of atoms to set the attribute value. |