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

     1  #ifndef _EXT_H_
     2  #define _EXT_H_
     3  
     4  #define C74_MAX_SDK_VERSION 0x0820
     5  
     6  #include "ext_infer_system.h"
     7  
     8  #include "ext_common.h"
     9  
    10  // include max_types before ext_prefix to get C74_X64 definition
    11  #include "max_types.h"		// core type definitions
    12  #include "ext_prefix.h"	
    13  
    14  #include "ext_mess.h"
    15  #include "ext_assist.h"
    16  
    17  #define clock_free freeobject
    18  #define binbuf_free freeobject
    19  #define wind_free freeobject
    20  
    21  /**
    22  	This macro being defined means that getbytes and sysmem APIs for memory management are unified.
    23  	This is correct for Max 5, but should be commented out when compiling for older max targets.
    24  	@ingroup memory
    25  */
    26  #define MM_UNIFIED
    27  
    28  #include "ext_maxtypes.h"
    29  #include "ext_byteorder.h"
    30  
    31  #include "ext_sysmem.h"
    32  #include "ext_sysfile.h"
    33  #include "ext_systime.h"
    34  #include "ext_expr.h"
    35  #include "ext_path.h"
    36  
    37  #include "ext_wind.h"
    38  
    39  #include "ext_proto.h"
    40  
    41  #include "ext_atomarray.h"
    42  #include "ext_atombuf.h"
    43  #include "ext_obstring.h"
    44  #include "ext_hashtab.h"
    45  #include "ext_dictionary.h"
    46  #include "ext_obex_util.h"
    47  #include "commonsyms.h"
    48  #include "ext_strings.h"
    49  #include "ext_obex.h"
    50  #include "ext_systhread.h"
    51  #include "ext_drag.h"
    52  #include "jpatcher_api.h"
    53  #include "ext_charset.h"
    54  #include "ext_typelist.h"
    55  #include "ext_post.h"
    56  
    57  #ifdef C74_LEGACY_DEFINES
    58  // the old post() and error() functions should be avoided since their names are generic and
    59  // could be overloaded by earlier-loading frameworks/dlls in the plugin context.
    60  // for now, we simply redefine post() and error() usage to the object_ variation. See #4779.
    61  #define post(...)	object_post(NULL, __VA_ARGS__)
    62  #define error(...)	object_error(NULL, __VA_ARGS__)
    63  #endif
    64  
    65  BEGIN_USING_C_LINKAGE
    66  /**	ext_main() is the entry point for an extern to be loaded, which all externs must implement
    67  	this shared/common prototype ensures that it will be exported correctly on all platforms.
    68  	
    69  	@ingroup	class
    70  	@param		r	Pointer to resources for the external, if applicable.
    71  	@see		@ref chapter_anatomy
    72  	@version Introduced in Max 6.1.9
    73  */
    74  void C74_EXPORT ext_main(void *r);
    75  END_USING_C_LINKAGE
    76  
    77  #endif /* _EXT_H_ */