rnd-20001130-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 AudioSystemInfo
47 {
48   boolean sound_available;
49   boolean loops_available;
50   int soundserver_pipe[2];
51   int soundserver_pid;
52   int device_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 OpenAudio(struct AudioSystemInfo *);
77 inline void CloseAudio(struct AudioSystemInfo *);
78
79 inline void InitEventFilter(EventFilter);
80 inline boolean PendingEvent(void);
81 inline void NextEvent(Event *event);
82 inline Key GetEventKey(KeyEvent *, boolean);
83 inline boolean CheckCloseWindowEvent(ClientMessageEvent *);
84
85 #endif /* SYSTEM_H */