aboutsummaryrefslogtreecommitdiff
path: root/include/xcursor
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2023-04-14 16:13:33 +0200
committerAlexander Orzechowski <alex@ozal.ski>2023-04-18 14:54:25 +0000
commit25d9055281a744944fab3016afcb3460610fec89 (patch)
tree69490ad50a742116eba6364d9a76deef20b67ecc /include/xcursor
parent00489b11a0d926058d23584e2ad0e2b64f5b7406 (diff)
xcursor: sync with libwayland
xcursor.c was copied over from libwayland-cursor. A lot of cosmetic imporvements have been merged upstream. Copy-paste the new version.
Diffstat (limited to 'include/xcursor')
-rw-r--r--include/xcursor/xcursor.h42
1 files changed, 18 insertions, 24 deletions
diff --git a/include/xcursor/xcursor.h b/include/xcursor/xcursor.h
index c21707b4..459f8166 100644
--- a/include/xcursor/xcursor.h
+++ b/include/xcursor/xcursor.h
@@ -28,37 +28,31 @@
#include <stdint.h>
-typedef int XcursorBool;
-typedef uint32_t XcursorUInt;
-
-typedef XcursorUInt XcursorDim;
-typedef XcursorUInt XcursorPixel;
-
-typedef struct _XcursorImage {
- XcursorUInt version; /* version of the image data */
- XcursorDim size; /* nominal size for matching */
- XcursorDim width; /* actual width */
- XcursorDim height; /* actual height */
- XcursorDim xhot; /* hot spot x (must be inside image) */
- XcursorDim yhot; /* hot spot y (must be inside image) */
- XcursorUInt delay; /* animation delay to next frame (ms) */
- XcursorPixel *pixels; /* pointer to pixels */
-} XcursorImage;
+struct xcursor_image {
+ uint32_t version; /* version of the image data */
+ uint32_t size; /* nominal size for matching */
+ uint32_t width; /* actual width */
+ uint32_t height; /* actual height */
+ uint32_t xhot; /* hot spot x (must be inside image) */
+ uint32_t yhot; /* hot spot y (must be inside image) */
+ uint32_t delay; /* animation delay to next frame (ms) */
+ uint32_t *pixels; /* pointer to pixels */
+};
/*
* Other data structures exposed by the library API
*/
-typedef struct _XcursorImages {
- int nimage; /* number of images */
- XcursorImage **images; /* array of XcursorImage pointers */
- char *name; /* name used to load images */
-} XcursorImages;
+struct xcursor_images {
+ int nimage; /* number of images */
+ struct xcursor_image **images; /* array of XcursorImage pointers */
+ char *name; /* name used to load images */
+};
void
-XcursorImagesDestroy (XcursorImages *images);
+xcursor_images_destroy(struct xcursor_images *images);
void
xcursor_load_theme(const char *theme, int size,
- void (*load_callback)(XcursorImages *, void *),
- void *user_data);
+ void (*load_callback)(struct xcursor_images *, void *),
+ void *user_data);
#endif