1 /*  NAME:
2         E3System.h
3 
4     DESCRIPTION:
5         Header file for E3System.c.
6 
7     COPYRIGHT:
8         Copyright (c) 1999-2004, Quesa Developers. All rights reserved.
9 
10         For the current release of Quesa, please see:
11 
12             <http://www.quesa.org/>
13 
14         Redistribution and use in source and binary forms, with or without
15         modification, are permitted provided that the following conditions
16         are met:
17 
18             o Redistributions of source code must retain the above copyright
19               notice, this list of conditions and the following disclaimer.
20 
21             o Redistributions in binary form must reproduce the above
22               copyright notice, this list of conditions and the following
23               disclaimer in the documentation and/or other materials provided
24               with the distribution.
25 
26             o Neither the name of Quesa nor the names of its contributors
27               may be used to endorse or promote products derived from this
28               software without specific prior written permission.
29 
30         THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
31         "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
32         LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
33         A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
34         OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
35         SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
36         TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
37         PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
38         LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
39         NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
40         SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
41     ___________________________________________________________________________
42 */
43 #ifndef E3SYSTEM_HDR
44 #define E3SYSTEM_HDR
45 //=============================================================================
46 //		Include files
47 //-----------------------------------------------------------------------------
48 
49 
50 
51 
52 
53 //=============================================================================
54 //		C++ preamble
55 //-----------------------------------------------------------------------------
56 #ifdef __cplusplus
57 extern "C" {
58 #endif
59 
60 
61 
62 
63 
64 //=============================================================================
65 //      Macros
66 //-----------------------------------------------------------------------------
67 // E3System_Bottleneck
68 //
69 // Invoked on every API entry point to allow us to perform system housekeeping.
70 // To minimise the performance impact, the bottleneck is implemented as a macro
71 // which polls a global then invokes a real function if there is any work to do.
72 #define E3System_Bottleneck()													\
73 				do																\
74 					{															\
75 					if (gE3Globals.systemDoBottleneck)							\
76 						E3System_ClearBottleneck();								\
77 					}															\
78 				while (0)
79 
80 
81 
82 
83 
84 //=============================================================================
85 //      Function prototypes
86 //-----------------------------------------------------------------------------
87 // Cross platform
88 TQ3Status	E3System_Initialise(void);
89 void		E3System_Terminate(void);
90 void		E3System_LoadPlugins(void);
91 void		E3System_UnloadPlugins(void);
92 void		E3System_ClearBottleneck(void);
93 
94 
95 // Mac specific
96 #if QUESA_OS_MACINTOSH
97 TQ3Status	E3MacSystem_Initialise(void);
98 void		E3MacSystem_Terminate(void);
99 void		E3MacSystem_LoadPlugins(void);
100 void		E3MacSystem_UnloadPlugins(void);
101 #endif
102 
103 
104 // Unix specific
105 #if QUESA_OS_UNIX
106 TQ3Status	E3UnixSystem_Initialise(void);
107 void		E3UnixSystem_Terminate(void);
108 void		E3UnixSystem_LoadPlugins(void);
109 void		E3UnixSystem_UnloadPlugins(void);
110 #endif
111 
112 
113 // Windows specific
114 #if QUESA_OS_WIN32
115 TQ3Status	E3WindowsSystem_Initialise(void);
116 void		E3WindowsSystem_Terminate(void);
117 void		E3WindowsSystem_LoadPlugins(void);
118 void		E3WindowsSystem_UnloadPlugins(void);
119 #endif
120 
121 
122 // Be specific
123 #if QUESA_OS_BE
124 TQ3Status	E3BeSystem_Initialise(void);
125 void		E3BeSystem_Terminate(void);
126 void		E3BeSystem_LoadPlugins(void);
127 void		E3BeSystem_UnloadPlugins(void);
128 #endif
129 
130 
131 
132 
133 
134 
135 //=============================================================================
136 //		C++ postamble
137 //-----------------------------------------------------------------------------
138 #ifdef __cplusplus
139 }
140 #endif
141 
142 #endif
143 
144