KWin
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
xcursor.h
Go to the documentation of this file.
1/*
2 * Copyright © 2002 Keith Packard
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining
5 * a copy of this software and associated documentation files (the
6 * "Software"), to deal in the Software without restriction, including
7 * without limitation the rights to use, copy, modify, merge, publish,
8 * distribute, sublicense, and/or sell copies of the Software, and to
9 * permit persons to whom the Software is furnished to do so, subject to
10 * the following conditions:
11 *
12 * The above copyright notice and this permission notice (including the
13 * next paragraph) shall be included in all copies or substantial
14 * portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
20 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
21 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
22 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23 * SOFTWARE.
24 */
25
26#ifndef XCURSOR_H
27#define XCURSOR_H
28
29#ifdef __cplusplus
30extern "C" {
31#endif
32
33#include <stdint.h>
34
35typedef int XcursorBool;
36typedef uint32_t XcursorUInt;
37
40
41typedef struct _XcursorImage {
42 XcursorUInt version; /* version of the image data */
43 XcursorDim size; /* nominal size for matching */
44 XcursorDim width; /* actual width */
45 XcursorDim height; /* actual height */
46 XcursorDim xhot; /* hot spot x (must be inside image) */
47 XcursorDim yhot; /* hot spot y (must be inside image) */
48 XcursorUInt delay; /* animation delay to next frame (ms) */
49 XcursorPixel *pixels; /* pointer to pixels */
51
52/*
53 * Other data structures exposed by the library API
54 */
55typedef struct _XcursorImages {
56 int nimage; /* number of images */
57 XcursorImage **images; /* array of XcursorImage pointers */
59
61XcursorFileLoadImages (const char *file, int size);
62
63void
65
66#ifdef __cplusplus
67}
68#endif
69
70#endif
XcursorUInt delay
Definition xcursor.h:48
XcursorDim width
Definition xcursor.h:44
XcursorDim yhot
Definition xcursor.h:47
XcursorDim xhot
Definition xcursor.h:46
XcursorUInt version
Definition xcursor.h:42
XcursorPixel * pixels
Definition xcursor.h:49
XcursorDim size
Definition xcursor.h:43
XcursorDim height
Definition xcursor.h:45
XcursorImage ** images
Definition xcursor.h:57
struct _XcursorImages XcursorImages
void XcursorImagesDestroy(XcursorImages *images)
Definition xcursor.c:245
XcursorImages * XcursorFileLoadImages(const char *file, int size)
Definition xcursor.c:580
int XcursorBool
Definition xcursor.h:35
uint32_t XcursorUInt
Definition xcursor.h:36
XcursorUInt XcursorPixel
Definition xcursor.h:39
struct _XcursorImage XcursorImage
XcursorUInt XcursorDim
Definition xcursor.h:38