github.com/256dpi/max-go@v0.7.0/lib/max/jpatcher_utils.h (about)

     1  #ifndef _JPATCHER_UTILS_H_
     2  #define _JPATCHER_UTILS_H_
     3  
     4  #include "ext_prefix.h"
     5  #include "ext_mess.h"
     6  
     7  BEGIN_USING_C_LINKAGE
     8  
     9  /**	Copy an array of atoms.
    10  	@ingroup		atom
    11  	@param	argc1	The count of atoms in argv1.
    12  	@param	argv1	The address to the first of an array of atoms that is the source for the copy.
    13  	@param	argv2	The address to the first of an array of atoms that is the destination for the copy.
    14  					Note that this array must already by allocated using sysmem_newptr() or atom_alloc(). */
    15  void atom_copy(long argc1, t_atom *argv1, t_atom *argv2);
    16  
    17  /**	Print the contents of an array of atoms to the Max window.
    18  	@ingroup		atom
    19  	@param	argc	The count of atoms in argv.
    20  	@param	argv	The address to the first of an array of atoms.	*/
    21  void postargs(long argc, t_atom *argv);
    22  
    23  /**	Print the contents of a dictionary to the Max window.
    24  	@ingroup		dictionary
    25  	@param	d		A pointer to a dictionary object.	*/
    26  void postdictionary(t_object *d);
    27  
    28  
    29  /**	Return a pointer to an object contained in an atom if it is of the specified class.
    30  	@ingroup		atom
    31  	@param	x		The address of a pointer to the object contained in av if it is of the specified class upon return. 
    32  					Otherwise NULL upon return.
    33  	@param	idx		The index of the atom in the array from which to get the object pointer.
    34  	@param	argc	The count of atoms in argv.
    35  	@param	argv	The address to the first of an array of atoms.
    36  	@param	cls		A symbol containing the class name of which the object should be an instance.
    37  	@return			A Max error code.	*/
    38  t_max_err atom_arg_getobjclass(t_object **x, long idx, long argc, t_atom *argv, t_symbol *cls);
    39  
    40  /**	Return a pointer to an object contained in an atom if it is of the specified class.
    41  	@ingroup		atom
    42  	@param	av		A pointer to the atom from which to get the #t_object.
    43  	@param	cls		A symbol containing the class name of which the object should be an instance.
    44  	@return			A pointer to the object contained in av if it is of the specified class, otherwise NULL.	*/
    45  void *atom_getobjclass(t_atom *av, t_symbol *cls);
    46  
    47  
    48  method my_object_getmethod(void *obj, t_symbol *s);
    49  
    50  
    51  END_USING_C_LINKAGE
    52  
    53  #endif // #ifndef _JPATCHER_UTILS_H_