1 /***********************************************************
2 * Rocks'n'Diamonds -- McDuffin Strikes Back! *
3 *----------------------------------------------------------*
4 * ©1995 Artsoft Development *
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 *----------------------------------------------------------*
13 ***********************************************************/
20 #include <X11/Xutil.h>
21 #include <X11/Xatom.h>
23 #include <X11/Intrinsic.h>
24 #include <X11/keysymdef.h>
27 #ifdef USE_SDL_LIBRARY
31 #ifdef USE_SDL_LIBRARY
32 typedef SDL_Surface *Bitmap;
33 typedef SDL_Surface *DrawWindow;
34 typedef SDL_Surface *DrawBuffer;
36 typedef Pixmap Bitmap;
37 typedef Window DrawWindow;
38 typedef Drawable DrawBuffer;
41 #ifdef USE_SDL_LIBRARY
43 typedef SDL_Event Event;
44 typedef SDL_MouseButtonEvent ButtonEvent;
45 typedef SDL_MouseMotionEvent MotionEvent;
46 typedef XKeyEvent KeyEvent;
47 typedef XExposeEvent ExposeEvent;
48 typedef XFocusChangeEvent FocusChangeEvent;
49 typedef XClientMessageEvent ClientMessageEvent;
51 #define EVENT_BUTTONPRESS SDL_MOUSEBUTTONDOWN
52 #define EVENT_BUTTONRELEASE SDL_MOUSEBUTTONUP
53 #define EVENT_MOTIONNOTIFY SDL_MOUSEMOTION
54 #define EVENT_KEYPRESS SDL_KEYDOWN
55 #define EVENT_KEYRELEASE SDL_KEYUP
56 #define EVENT_EXPOSE SDL_USEREVENT + 0
57 #define EVENT_FOCUSIN SDL_USEREVENT + 1
58 #define EVENT_FOCUSOUT SDL_USEREVENT + 2
59 #define EVENT_CLIENTMESSAGE SDL_QUIT
60 #define EVENT_MAPNOTIFY SDL_USEREVENT + 4
61 #define EVENT_UNMAPNOTIFY SDL_USEREVENT + 5
66 typedef XButtonEvent ButtonEvent;
67 typedef XMotionEvent MotionEvent;
68 typedef XKeyEvent KeyEvent;
69 typedef XExposeEvent ExposeEvent;
70 typedef XFocusChangeEvent FocusChangeEvent;
71 typedef XClientMessageEvent ClientMessageEvent;
73 #define EVENT_BUTTONPRESS ButtonPress
74 #define EVENT_BUTTONRELEASE ButtonRelease
75 #define EVENT_MOTIONNOTIFY MotionNotify
76 #define EVENT_KEYPRESS KeyPress
77 #define EVENT_KEYRELEASE KeyRelease
78 #define EVENT_EXPOSE Expose
79 #define EVENT_FOCUSIN FocusIn
80 #define EVENT_FOCUSOUT FocusOut
81 #define EVENT_CLIENTMESSAGE ClientMessage
82 #define EVENT_MAPNOTIFY MapNotify
83 #define EVENT_UNMAPNOTIFY UnmapNotify
87 inline void ClearRectangle(Bitmap, int, int, int, int);
88 inline void BlitBitmap(Bitmap, Bitmap, int, int, int, int, int, int);
89 inline void SetClipMask(GC, Pixmap);
90 inline void SetClipOrigin(GC, int, int);
91 inline void BlitBitmapMasked(Bitmap, Bitmap, int, int, int, int, int, int);
92 inline void DrawSimpleWhiteLine(Bitmap, int, int, int, int);
94 inline void FlushDisplay();
95 inline void SyncDisplay();
96 inline void KeyboardAutoRepeatOn();
97 inline void KeyboardAutoRepeatOff();
98 inline boolean QueryPointer(DrawWindow, int *, int *);
100 inline boolean PendingEvent();
101 inline void NextEvent(Event *event);
103 #endif /* SYSTEM_H */