rnd-20030405-1-src
[rocksndiamonds.git] / src / libgame / x11.h
index b0a503653e500652f2e9054401b7fae37c551252..4ef96acbd976f5553dcbb751d58375626bb51c7e 100644 (file)
 
 #define FULLSCREEN_STATUS      FULLSCREEN_NOT_AVAILABLE
 
+#define CURSOR_MAX_WIDTH       32
+#define CURSOR_MAX_HEIGHT      32
+
 
 /* X11 type definitions */
 
 typedef struct X11DrawableInfo Bitmap;
 typedef struct X11DrawableInfo DrawWindow;
 typedef struct X11DrawableInfo DrawBuffer;
-/* "Pixel" is already defined in X11/Intrinsic.h */
+/* "Pixel" is already defined */
+/* "Cursor" is already defined */
 
 typedef KeySym                 Key;
 
@@ -79,6 +83,15 @@ struct X11DrawableInfo
   GC clip_gc;          /* can be 'stored_clip_gc' or one-tile-only clip GC  */
 };
 
+struct MouseCursorInfo
+{
+  int width, height;
+  int hot_x, hot_y;
+
+  char data[CURSOR_MAX_WIDTH * CURSOR_MAX_HEIGHT / 8];
+  char mask[CURSOR_MAX_WIDTH * CURSOR_MAX_HEIGHT / 8];
+};
+
 struct XY
 {
   short x, y;
@@ -87,6 +100,9 @@ struct XY
 
 /* X11 symbol definitions */
 
+#define BLACK_PIXEL            BlackPixel(display, screen)
+#define WHITE_PIXEL            WhitePixel(display, screen)
+
 #define EVENT_BUTTONPRESS      ButtonPress
 #define EVENT_BUTTONRELEASE    ButtonRelease
 #define EVENT_MOTIONNOTIFY     MotionNotify
@@ -308,9 +324,16 @@ inline void X11InitVideoBuffer(DrawBuffer **, DrawWindow **);
 void X11ZoomBitmap(Bitmap *, Bitmap *);
 Bitmap *X11LoadImage(char *);
 
+inline void X11CreateBitmapContent(Bitmap *, int, int, int);
+inline void X11FreeBitmapPointers(Bitmap *);
 inline void X11CopyArea(Bitmap *, Bitmap *, int, int, int, int, int, int, int);
 inline void X11FillRectangle(Bitmap *, int, int, int, int, Pixel);
+inline void X11DrawSimpleLine(Bitmap *, int, int, int, int, Pixel);
 inline Pixel X11GetPixel(Bitmap *, int, int);
 inline Pixel X11GetPixelFromRGB(unsigned int, unsigned int, unsigned int);
 
+#if defined(TARGET_X11_NATIVE)
+void X11SetMouseCursor(struct MouseCursorInfo *);
+#endif
+
 #endif /* X11_H */