github.com/256dpi/max-go@v0.7.0/lib/max/ext_maxtypes.h (about) 1 // ext_maxtypes.h: Max data types and structure definitions for external objects 2 // Copyright 1990-2004 IRCAM/Cycling '74 -- All rights reserved 3 4 #ifndef _EXT_MAXTYPES_H_ 5 #define _EXT_MAXTYPES_H_ 6 7 #include "ext_prefix.h" 8 #include "ext_mess.h" 9 10 BEGIN_USING_C_LINKAGE 11 12 #if C74_PRAGMA_STRUCT_PACKPUSH 13 #pragma pack(push, 2) 14 #elif C74_PRAGMA_STRUCT_PACK 15 #pragma pack(2) 16 #endif 17 18 19 /** A patcher. As of Max 5, the patcher struct is opaque. 20 Messages can be sent to a patcher using object_method() or object_method_typed(), or by using @ref attr accessors. 21 @ingroup patcher 22 */ 23 typedef t_object t_patcher; 24 25 26 /** A box. As of Max 5, the box struct is opaque. 27 Messages can be sent to a box using object_method() or object_method_typed(), or by using @ref attr accessors. 28 @ingroup patcher 29 */ 30 typedef t_object t_box; 31 32 33 /** patcher iteration flags 34 @ingroup patcher 35 */ 36 enum { 37 PI_DEEP = 1, ///< descend into subpatchers (not used by audio library) 38 PI_REQUIREFIRSTIN = 2, ///< if b->b_firstin is NULL, do not call function 39 PI_WANTBOX = 4, ///< instead, of b->b_firstin, pass b to function, whether or not b->b_firstin is NULL 40 PI_SKIPGEN = 8, 41 PI_WANTPATCHER = 16 42 }; 43 44 /** A simple doubly-linked list used by the #t_funbuff object. 45 @ingroup funbuff 46 */ 47 typedef struct zll 48 { /* note: no obj header */ 49 long z_x; 50 long z_y; 51 struct zll *z_next; 52 struct zll *z_prev; 53 } Zll, t_zll; 54 55 56 /** The structure of a funbuff object 57 @ingroup funbuff 58 */ 59 typedef struct funbuff 60 { 61 t_object f_obj; 62 void *f_outlet; 63 void *f_outlet1; 64 void *f_outlet2; 65 t_zll f_head; ///< head of double linked list of function elements 66 t_zll *f_foot; ///< foot in the door pointer for list 67 long f_gotoDelta; ///< used by goto and next 68 long f_selectX; ///< selected region start 69 long f_selectW; ///< selected region width 70 t_symbol *f_sym; ///< filename 71 long f_y; ///< y-value from inlet 72 char f_yvalid; ///< flag that y has been set since x has 73 char f_embed; ///< flag for embedding funbuff values in patcher 74 } Funbuff, t_funbuff; 75 76 77 #if C74_PRAGMA_STRUCT_PACKPUSH 78 #pragma pack(pop) 79 #elif C74_PRAGMA_STRUCT_PACK 80 #pragma pack() 81 #endif 82 83 END_USING_C_LINKAGE 84 85 #endif // _EXT_MAXTYPES_H_