scide: GenericCodeEditor - accept drag/drop of text/plain
[supercollider.git] / include / common / SC_Types.h
blob67bffb419c25f19719dc66776a5f3f349ea18331
1 /*
2 SuperCollider real time audio synthesis system
3 Copyright (c) 2002 James McCartney. All rights reserved.
4 http://www.audiosynth.com
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 #ifndef _SC_Types_
22 #define _SC_Types_
24 #include <sys/types.h>
26 #if !defined(__cplusplus)
27 # include <stdbool.h>
28 #endif // __cplusplus
30 typedef int SCErr;
32 #ifdef _WIN32
33 typedef __int64 int64;
34 typedef unsigned __int64 uint64;
35 #else
36 typedef long long int64;
37 typedef unsigned long long uint64;
38 #endif
40 typedef int int32;
41 typedef unsigned int uint32;
43 typedef short int16;
44 typedef unsigned short uint16;
46 typedef signed char int8;
47 typedef unsigned char uint8;
49 typedef float float32;
50 typedef double float64;
52 typedef union {
53 uint32 u;
54 int32 i;
55 float32 f;
56 } elem32;
58 typedef union {
59 uint64 u;
60 int64 i;
61 float64 f;
62 } elem64;
64 const unsigned int kSCNameLen = 8;
65 const unsigned int kSCNameByteLen = 8 * sizeof(int32);
67 #ifdef __GXX_EXPERIMENTAL_CXX0X__
68 #define sc_typeof_cast(x) (decltype(x))
69 #elif defined(__GNUC__)
70 #define sc_typeof_cast(x) (__typeof__(x))
71 #else
72 #define sc_typeof_cast(x) /* (typeof(x)) */
73 #endif
75 #endif