aboutsummaryrefslogtreecommitdiff
path: root/externals/grill/flext/source/flext.h
blob: a55e2b677b2bb96b281f63cde573898aa7a75f8f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
/* 

flext - C++ layer for Max/MSP and pd (pure data) externals

Copyright (c) 2001-2005 Thomas Grill (gr@grrrr.org)
For information on usage and redistribution, and for a DISCLAIMER OF ALL
WARRANTIES, see the file, "license.txt," in this distribution.  

*/

/*! \file flext.h 
    \brief This is the main flext include file.
    
    The basic definitions are set here and the necessary header files are included
*/

#ifndef __FLEXT_H
#define __FLEXT_H


/*!	\defgroup FLEXT_GLOBAL Flext global definitions
	@{
*/

//! \brief flext version number
#define FLEXT_VERSION 500

//! \brief flext version string
#define FLEXT_VERSTR "0.5.0"

//! @}


// determine System/OS/CPU
#include "flprefix.h"

// include headers necessary for multi-threading
#ifdef FLEXT_THREADS
	#if FLEXT_THREADS == FLEXT_THR_POSIX
		extern "C" {
			#include <pthread.h>
			#include <sched.h>
		}
	#elif FLEXT_THREADS == FLEXT_THR_MP
		#include <multiprocessing.h>
	#elif FLEXT_THREADS == FLEXT_THR_WIN32
        #if defined(_WIN32_WINNT) && _WIN32_WINNT >= 0x500
    		#include <windows.h>
            #include <process.h>
        #else
            #error "Win32 threading model only supported for Win2000/XP or newer"
        #endif
	#else
		#error "Thread model not supported"
	#endif
#endif


#if FLEXT_SYS == FLEXT_SYS_MAX && FLEXT_OS == FLEXT_OS_WIN
// for wmax alignment must be 2 bytes!
#pragma pack(2)
#endif


// include all the flext interface definitions
#include "fldefs.h"

// include the basic flext object classes
#include "flclass.h"

// include the flext dsp class
#include "fldsp.h"

/*
#if FLEXT_SYS == FLEXT_SYS_MAX && FLEXT_OS == FLEXT_OS_WIN
#pragma pack(pop)
#endif
*/
#endif // FLEXT_H