eliminate GCC warning about initialization order
[reactos.git] / reactos / include / win32k / 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 /* Structures for reading icon/cursor files and resources */
25 #pragma pack(push,1)
26 typedef struct _ICONIMAGE
27 {
28 BITMAPINFOHEADER icHeader; // DIB header
29 RGBQUAD icColors[1]; // Color table
30 BYTE icXOR[1]; // DIB bits for XOR mask
31 BYTE icAND[1]; // DIB bits for AND mask
32 } ICONIMAGE, *LPICONIMAGE;
33
34 typedef struct _CURSORIMAGE
35 {
36 BITMAPINFOHEADER icHeader; // DIB header
37 RGBQUAD icColors[1]; // Color table
38 BYTE icXOR[1]; // DIB bits for XOR mask
39 BYTE icAND[1]; // DIB bits for AND mask
40 } CURSORIMAGE, *LPCURSORIMAGE;
41
42 typedef struct
43 {
44 BYTE bWidth;
45 BYTE bHeight;
46 BYTE bColorCount;
47 BYTE bReserved;
48 } ICONRESDIR;
49
50 typedef struct
51 {
52 WORD wWidth;
53 WORD wHeight;
54 } CURSORRESDIR;
55
56 typedef struct
57 {
58 WORD wPlanes; // Number of Color Planes in the XOR image
59 WORD wBitCount; // Bits per pixel in the XOR image
60 } ICONDIR;
61
62 typedef struct
63 {
64 WORD wXHotspot; // Number of Color Planes in the XOR image
65 WORD wYHotspot; // Bits per pixel in the XOR image
66 } CURSORDIR;
67
68 typedef struct
69 {
70 BYTE bWidth; // Width, in pixels, of the icon image
71 BYTE bHeight; // Height, in pixels, of the icon image
72 BYTE bColorCount; // Number of colors in image (0 if >=8bpp)
73 BYTE bReserved; // Reserved ( must be 0)
74 union
75 {
76 ICONDIR icon;
77 CURSORDIR cursor;
78 } Info;
79 DWORD dwBytesInRes; // How many bytes in this resource?
80 DWORD dwImageOffset; // Where in the file is this image?
81 } CURSORICONDIRENTRY;
82
83 typedef struct
84 {
85 WORD idReserved; // Reserved (must be 0)
86 WORD idType; // Resource Type (1 for icons, 0 for cursors)
87 WORD idCount; // How many images?
88 CURSORICONDIRENTRY idEntries[1];// An entry for idCount number of images
89 } CURSORICONDIR;
90
91 typedef struct
92 {
93 union
94 {
95 ICONRESDIR icon;
96 CURSORRESDIR cursor;
97 } ResInfo;
98 WORD wPlanes; // Color Planes
99 WORD wBitCount; // Bits per pixel
100 DWORD dwBytesInRes; // how many bytes in this resource?
101 WORD nID; // the ID
102 } GRPCURSORICONDIRENTRY;
103
104 typedef struct
105 {
106 WORD idReserved; // Reserved (must be 0)
107 WORD idType; // Resource type (1 for icons)
108 WORD idCount; // How many images?
109 GRPCURSORICONDIRENTRY idEntries[1]; // The entries for each image
110 } GRPCURSORICONDIR;
111 #pragma pack(pop)
112
113 typedef struct _THRDCARETINFO
114 {
115 HWND hWnd;
116 HBITMAP Bitmap;
117 POINT Pos;
118 SIZE Size;
119 BYTE Visible;
120 BYTE Showing;
121 } THRDCARETINFO, *PTHRDCARETINFO;
122
123 typedef struct tagROSMENUINFO
124 {
125 /* ----------- MENUINFO ----------- */
126 DWORD cbSize;
127 DWORD fMask;
128 DWORD dwStyle;
129 UINT cyMax;
130 HBRUSH hbrBack;
131 DWORD dwContextHelpID;
132 ULONG_PTR dwMenuData;
133 /* ----------- Extra ----------- */
134 HMENU Self; /* Handle of this menu */
135 WORD Flags; /* Menu flags (MF_POPUP, MF_SYSMENU) */
136 UINT FocusedItem; /* Currently focused item */
137 UINT MenuItemCount; /* Number of items in the menu */
138 HWND Wnd; /* Window containing the menu */
139 WORD Width; /* Width of the whole menu */
140 WORD Height; /* Height of the whole menu */
141 HWND WndOwner; /* window receiving the messages for ownerdraw */
142 BOOL TimeToHide; /* Request hiding when receiving a second click in the top-level menu item */
143 SIZE maxBmpSize; /* Maximum size of the bitmap items in MIIM_BITMAP state */
144 } ROSMENUINFO, *PROSMENUINFO;
145
146 /* (other FocusedItem values give the position of the focused item) */
147 #define NO_SELECTED_ITEM 0xffff
148
149 typedef struct tagROSMENUITEMINFO
150 {
151 /* ----------- MENUITEMINFOW ----------- */
152 UINT cbSize;
153 UINT fMask;
154 UINT fType;
155 UINT fState;
156 UINT wID;
157 HMENU hSubMenu;
158 HBITMAP hbmpChecked;
159 HBITMAP hbmpUnchecked;
160 DWORD dwItemData;
161 LPWSTR dwTypeData;
162 UINT cch;
163 HBITMAP hbmpItem;
164 /* ----------- Extra ----------- */
165 RECT Rect; /* Item area (relative to menu window) */
166 UINT XTab; /* X position of text after Tab */
167 } ROSMENUITEMINFO, *PROSMENUITEMINFO;
168
169 #endif