X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Flibgame%2Fx11.h;h=4ef96acbd976f5553dcbb751d58375626bb51c7e;hb=caf3da0a0e3af75eb8d10f83e5105581402b387e;hp=80226b6f495b624f409426204f357665ed5615fb;hpb=b8114966908299df586165e00446f21c2ce343bb;p=rocksndiamonds.git diff --git a/src/libgame/x11.h b/src/libgame/x11.h index 80226b6f..4ef96acb 100644 --- a/src/libgame/x11.h +++ b/src/libgame/x11.h @@ -45,13 +45,17 @@ #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; @@ -319,4 +332,8 @@ 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 */