Synchronize up to trunk's revision r57784.
[reactos.git] / win32ss / include / ntusrtyp.h
1 /*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS Win32 Graphical Subsystem (WIN32K)
4 * FILE: include/win32k/ntusrtyp.h
5 * PURPOSE: Win32 Shared USER Types for NtUser*
6 * PROGRAMMER: Alex Ionescu (alex@relsoft.net)
7 */
8
9 /* INCLUDES ******************************************************************/
10
11 #ifndef _NTUSRTYP_
12 #define _NTUSRTYP_
13
14 /* ENUMERATIONS **************************************************************/
15
16 /* TYPES *********************************************************************/
17
18 typedef struct _PATRECT
19 {
20 RECT r;
21 HBRUSH hBrush;
22 } PATRECT, * PPATRECT;
23
24 /* Bitfields for UserpreferencesMask SPI_ values (with defaults) */
25 /* See also http://technet.microsoft.com/nl-nl/library/cc957204(en-us).aspx */
26 typedef struct {
27 DWORD bActiveWindowTracking:1; //0 SPI_GETACTIVEWINDOWTRACKING
28 DWORD bMenuAnimation:1; //1 SPI_GETMENUANIMATION
29 DWORD bComboBoxAnimation:1; //1 SPI_GETCOMBOBOXANIMATION
30 DWORD bListBoxSmoothScrolling:1; //1 SPI_GETLISTBOXSMOOTHSCROLLING
31 DWORD bGradientCaptions:1; //1 SPI_GETGRADIENTCAPTIONS
32 DWORD bKeyboardCues:1; //0 SPI_GETKEYBOARDCUES
33 DWORD bActiveWndTrkZorder:1; //0 SPI_GETACTIVEWNDTRKZORDER
34 DWORD bHotTracking:1; //1 SPI_GETHOTTRACKING
35 DWORD bReserved1:1; //0 Reserved
36 DWORD bMenuFade:1; //1 SPI_GETMENUFADE
37 DWORD bSelectionFade:1; //1 SPI_GETSELECTIONFADE
38 DWORD bTooltipAnimation:1; //1 SPI_GETTOOLTIPANIMATION
39 DWORD bTooltipFade:1; //1 SPI_GETTOOLTIPFADE
40 DWORD bCursorShadow:1; //1 SPI_GETCURSORSHADOW
41 DWORD bReserved2:17; //0 Reserved
42 DWORD bUiEffects:1; //1 SPI_GETUIEFFECTS
43 } USERPREFERENCESMASK, *PUSERPREFERENCESMASK;
44
45 /* Structures for reading icon/cursor files and resources */
46 #pragma pack(push,1)
47 typedef struct _ICONIMAGE
48 {
49 BITMAPINFOHEADER icHeader; // DIB header
50 RGBQUAD icColors[1]; // Color table
51 BYTE icXOR[1]; // DIB bits for XOR mask
52 BYTE icAND[1]; // DIB bits for AND mask
53 } ICONIMAGE, *LPICONIMAGE;
54
55 typedef struct _CURSORIMAGE
56 {
57 BITMAPINFOHEADER icHeader; // DIB header
58 RGBQUAD icColors[1]; // Color table
59 BYTE icXOR[1]; // DIB bits for XOR mask
60 BYTE icAND[1]; // DIB bits for AND mask
61 } CURSORIMAGE, *LPCURSORIMAGE;
62
63 typedef struct
64 {
65 BYTE bWidth;
66 BYTE bHeight;
67 BYTE bColorCount;
68 BYTE bReserved;
69 } ICONRESDIR;
70
71 typedef struct
72 {
73 WORD wWidth;
74 WORD wHeight;
75 } CURSORRESDIR;
76
77 typedef struct
78 {
79 WORD wPlanes; // Number of Color Planes in the XOR image
80 WORD wBitCount; // Bits per pixel in the XOR image
81 } ICONDIR;
82
83 typedef struct
84 {
85 WORD wWidth;
86 WORD wHeight;
87 } CURSORDIR;
88
89 typedef struct
90 { union
91 {
92 ICONRESDIR icon;
93 CURSORDIR cursor;
94 } ResInfo;
95 WORD wPlanes;
96 WORD wBitCount;
97 DWORD dwBytesInRes;
98 WORD wResId;
99 } CURSORICONDIRENTRY;
100
101 typedef struct
102 {
103 WORD idReserved;
104 WORD idType;
105 WORD idCount;
106 CURSORICONDIRENTRY idEntries[1];
107 } CURSORICONDIR;
108
109 typedef struct
110 {
111 union
112 {
113 ICONRESDIR icon;
114 CURSORRESDIR cursor;
115 } ResInfo;
116 WORD wPlanes; // Color Planes
117 WORD wBitCount; // Bits per pixel
118 DWORD dwBytesInRes; // how many bytes in this resource?
119 WORD nID; // the ID
120 } GRPCURSORICONDIRENTRY;
121
122 typedef struct
123 {
124 WORD idReserved; // Reserved (must be 0)
125 WORD idType; // Resource type (1 for icons)
126 WORD idCount; // How many images?
127 GRPCURSORICONDIRENTRY idEntries[1]; // The entries for each image
128 } GRPCURSORICONDIR;
129 #pragma pack(pop)
130
131 typedef struct _THRDCARETINFO
132 {
133 HWND hWnd;
134 HBITMAP Bitmap;
135 POINT Pos;
136 SIZE Size;
137 BYTE Visible;
138 BYTE Showing;
139 } THRDCARETINFO, *PTHRDCARETINFO;
140
141 #endif