2 #ifndef __WIN32K_CURSORICON_H
3 #define __WIN32K_CURSORICON_H
6 #include <win32k/gdiobj.h>
8 /* Structures for reading icon/cursor files and resources */
9 // Structures for reading icon files and resources
10 typedef struct _ICONIMAGE
12 BITMAPINFOHEADER icHeader; // DIB header
13 RGBQUAD icColors[1]; // Color table
14 BYTE icXOR[1]; // DIB bits for XOR mask
15 BYTE icAND[1]; // DIB bits for AND mask
16 } PACKED ICONIMAGE, *LPICONIMAGE;
18 typedef struct _CURSORIMAGE
20 BITMAPINFOHEADER icHeader; // DIB header
21 RGBQUAD icColors[1]; // Color table
22 BYTE icXOR[1]; // DIB bits for XOR mask
23 BYTE icAND[1]; // DIB bits for AND mask
24 } PACKED CURSORIMAGE, *LPCURSORIMAGE;
38 } PACKED CURSORRESDIR;
42 WORD wPlanes; // Number of Color Planes in the XOR image
43 WORD wBitCount; // Bits per pixel in the XOR image
48 WORD wXHotspot; // Number of Color Planes in the XOR image
49 WORD wYHotspot; // Bits per pixel in the XOR image
54 BYTE bWidth; // Width, in pixels, of the icon image
55 BYTE bHeight; // Height, in pixels, of the icon image
56 BYTE bColorCount; // Number of colors in image (0 if >=8bpp)
57 BYTE bReserved; // Reserved ( must be 0)
62 DWORD dwBytesInRes; // How many bytes in this resource?
63 DWORD dwImageOffset; // Where in the file is this image?
64 } PACKED CURSORICONDIRENTRY;
68 WORD idReserved; // Reserved (must be 0)
69 WORD idType; // Resource Type (1 for icons, 0 for cursors)
70 WORD idCount; // How many images?
71 CURSORICONDIRENTRY idEntries[1] __attribute__((packed)); // An entry for idCount number of images
72 } PACKED CURSORICONDIR;
80 WORD wPlanes; // Color Planes
81 WORD wBitCount; // Bits per pixel
82 DWORD dwBytesInRes; // how many bytes in this resource?
84 } PACKED GRPCURSORICONDIRENTRY;
88 WORD idReserved; // Reserved (must be 0)
89 WORD idType; // Resource type (1 for icons)
90 WORD idCount; // How many images?
91 GRPCURSORICONDIRENTRY idEntries[1] PACKED; // The entries for each image
92 } PACKED GRPCURSORICONDIR;
94 /* GDI logical Icon/Cursor object */
95 typedef struct _ICONCURSOROBJ
102 } ICONCURSOROBJ, *PICONCURSOROBJ;
104 /* Internal interfaces */
105 #define ICONCURSOROBJ_AllocIconCursor() \
106 ((HICON) GDIOBJ_AllocObj (sizeof (ICONCURSOROBJ), GDI_OBJECT_TYPE_ICONCURSOR, (GDICLEANUPPROC) IconCursor_InternalDelete))
108 #define ICONCURSOROBJ_LockIconCursor(hICObj) \
109 ((PICONCURSOROBJ) GDIOBJ_LockObj ((HGDIOBJ) hICObj, GDI_OBJECT_TYPE_ICONCURSOR))
111 #define ICONCURSOROBJ_UnlockIconCursor(hICObj) GDIOBJ_UnlockObj ((HGDIOBJ) hICObj, GDI_OBJECT_TYPE_ICONCURSOR)
114 BOOL FASTCALL IconCursor_InternalDelete( PICONCURSOROBJ pIconCursor );
116 /* User Entry Points */