rnd-20001128-1-src
[rocksndiamonds.git] / src / system.h
1 /***********************************************************
2 *  Rocks'n'Diamonds -- McDuffin Strikes Back!              *
3 *----------------------------------------------------------*
4 *  ©1995 Artsoft Development                               *
5 *        Holger Schemel                                    *
6 *        33659 Bielefeld-Senne                             *
7 *        Telefon: (0521) 493245                            *
8 *        eMail: aeglos@valinor.owl.de                      *
9 *               aeglos@uni-paderborn.de                    *
10 *               q99492@pbhrzx.uni-paderborn.de             *
11 *----------------------------------------------------------*
12 *  system.h                                                *
13 ***********************************************************/
14
15 #ifndef SYSTEM_H
16 #define SYSTEM_H
17
18 #include "platform.h"
19
20 #if defined(PLATFORM_MSDOS)
21 #include "msdos.h"
22 #endif
23
24 #if defined(TARGET_SDL)
25 #include "sdl.h"
26 #elif defined(TARGET_X11)
27 #include "x11.h"
28 #endif
29
30
31 /* contant definitions */
32
33 #define DEFAULT_DEPTH                   0
34
35 #define FULLSCREEN_NOT_AVAILABLE        FALSE
36 #define FULLSCREEN_AVAILABLE            TRUE
37
38
39 /* type definitions */
40
41 typedef int (*EventFilter)(const Event *);
42
43
44 /* structure definitions */
45
46 struct SystemInfo
47 {
48   boolean audio_available;
49   boolean audio_loops_available;
50   int audio_process_id;
51   int audio_process_pipe[2];
52   int audio_fd;
53 };
54
55
56 /* function definitions */
57
58 inline void InitBufferedDisplay(DrawBuffer *, DrawWindow *);
59 inline int GetDisplayDepth(void);
60 inline Bitmap CreateBitmap(int, int, int);
61 inline void FreeBitmap(Bitmap);
62 inline void ClearRectangle(Bitmap, int, int, int, int);
63 inline void BlitBitmap(Bitmap, Bitmap, int, int, int, int, int, int);
64 inline void SetClipMask(GC, Pixmap);
65 inline void SetClipOrigin(GC, int, int);
66 inline void BlitBitmapMasked(Bitmap, Bitmap, int, int, int, int, int, int);
67 inline void DrawSimpleWhiteLine(Bitmap, int, int, int, int);
68 inline void FlushDisplay(void);
69 inline void SyncDisplay(void);
70 inline void KeyboardAutoRepeatOn(void);
71 inline void KeyboardAutoRepeatOff(void);
72 inline boolean PointerInWindow(DrawWindow);
73 inline boolean SetVideoMode(void);
74 inline void ChangeVideoModeIfNeeded(void);
75
76 inline boolean InitAudio(void);
77
78 inline void InitEventFilter(EventFilter);
79 inline boolean PendingEvent(void);
80 inline void NextEvent(Event *event);
81 inline Key GetEventKey(KeyEvent *, boolean);
82 inline boolean CheckCloseWindowEvent(ClientMessageEvent *);
83
84 #endif /* SYSTEM_H */