#ifndef SYSTEM_H
#define SYSTEM_H
-#if !defined(USE_SDL_LIBRARY)
-#define USE_X11_LIBRARY
-#endif
+#include "platform.h"
-#if defined(XPM_INCLUDE_FILE) && !defined(MSDOS)
-#define USE_XPM_LIBRARY
-#include XPM_INCLUDE_FILE
+#if defined(PLATFORM_MSDOS)
+#include "msdos.h"
#endif
-#if defined(MSDOS)
-#include "msdos.h"
+#if defined(TARGET_SDL)
+#include "sdl.h"
+#elif defined(TARGET_X11)
+#include "x11.h"
#endif
+
+/* contant definitions */
+
+#define DEFAULT_DEPTH 0
+
#define FULLSCREEN_NOT_AVAILABLE FALSE
#define FULLSCREEN_AVAILABLE TRUE
-#if defined(USE_SDL_LIBRARY)
-#include "sdl.h"
-#elif defined(USE_X11_LIBRARY)
-#include "x11.h"
-#endif
+/* type definitions */
+
+typedef int (*EventFilter)(const Event *);
+
+
+/* structure definitions */
+
+struct SystemInfo
+{
+ boolean audio_available;
+ boolean audio_loops_available;
+ int audio_process_id;
+ int audio_process_pipe[2];
+ int audio_fd;
+};
+
+
+/* function definitions */
+
+inline void InitBufferedDisplay(DrawBuffer *, DrawWindow *);
+inline int GetDisplayDepth(void);
+inline Bitmap CreateBitmap(int, int, int);
+inline void FreeBitmap(Bitmap);
inline void ClearRectangle(Bitmap, int, int, int, int);
inline void BlitBitmap(Bitmap, Bitmap, int, int, int, int, int, int);
inline void SetClipMask(GC, Pixmap);
inline void SetClipOrigin(GC, int, int);
inline void BlitBitmapMasked(Bitmap, Bitmap, int, int, int, int, int, int);
inline void DrawSimpleWhiteLine(Bitmap, int, int, int, int);
-
inline void FlushDisplay(void);
inline void SyncDisplay(void);
inline void KeyboardAutoRepeatOn(void);
inline void KeyboardAutoRepeatOff(void);
inline boolean PointerInWindow(DrawWindow);
+inline boolean SetVideoMode(void);
+inline void ChangeVideoModeIfNeeded(void);
+
+inline boolean InitAudio(void);
+inline void InitEventFilter(EventFilter);
inline boolean PendingEvent(void);
inline void NextEvent(Event *event);
-
inline Key GetEventKey(KeyEvent *, boolean);
-
-inline boolean SetVideoMode(void);
-inline void ChangeVideoModeIfNeeded(void);
+inline boolean CheckCloseWindowEvent(ClientMessageEvent *);
#endif /* SYSTEM_H */