* Slap *some* sense into our header inclusions.
[reactos.git] / reactos / dll / win32 / comctl32 / comctl32.h
1 /******************************************************************************
2 *
3 * Common definitions (resource ids and global variables)
4 *
5 * Copyright 1999 Thuy Nguyen
6 * Copyright 1999 Eric Kohl
7 * Copyright 2002 Dimitrie O. Paun
8 *
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public
11 * License as published by the Free Software Foundation; either
12 * version 2.1 of the License, or (at your option) any later version.
13 *
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
18 *
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with this library; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
22 */
23
24 #ifndef __WINE_COMCTL32_H
25 #define __WINE_COMCTL32_H
26
27 #define WIN32_NO_STATUS
28 #define _INC_WINDOWS
29 #define COM_NO_WINDOWS_H
30
31 #ifndef RC_INVOKED
32 #include <stdarg.h>
33 #endif
34
35 #include <windef.h>
36 #include <winbase.h>
37 #include <wingdi.h>
38 #include <winuser.h>
39 //#include "winnls.h"
40 #include <commctrl.h>
41
42 extern HMODULE COMCTL32_hModule DECLSPEC_HIDDEN;
43 extern HBRUSH COMCTL32_hPattern55AABrush DECLSPEC_HIDDEN;
44
45 /* has a value of: 0, CCS_TOP, CCS_NOMOVEY, CCS_BOTTOM */
46 #define CCS_LAYOUT_MASK 0x3
47
48 /* Property sheet / Wizard */
49 #define IDD_PROPSHEET 1006
50 #define IDD_WIZARD 1020
51
52 #define IDC_TABCONTROL 12320
53 #define IDC_APPLY_BUTTON 12321
54 #define IDC_BACK_BUTTON 12323
55 #define IDC_NEXT_BUTTON 12324
56 #define IDC_FINISH_BUTTON 12325
57 #define IDC_SUNKEN_LINE 12326
58 #define IDC_SUNKEN_LINEHEADER 12327
59
60 #define IDS_CLOSE 4160
61
62 /* Toolbar customization dialog */
63 #define IDD_TBCUSTOMIZE 200
64
65 #define IDC_AVAILBTN_LBOX 201
66 #define IDC_RESET_BTN 202
67 #define IDC_TOOLBARBTN_LBOX 203
68 #define IDC_REMOVE_BTN 204
69 #define IDC_HELP_BTN 205
70 #define IDC_MOVEUP_BTN 206
71 #define IDC_MOVEDN_BTN 207
72
73 #define IDS_SEPARATOR 1024
74
75 /* Toolbar imagelist bitmaps */
76 #define IDB_STD_SMALL 120
77 #define IDB_STD_LARGE 121
78 #define IDB_VIEW_SMALL 124
79 #define IDB_VIEW_LARGE 125
80 #define IDB_HIST_SMALL 130
81 #define IDB_HIST_LARGE 131
82
83
84 /* Month calendar month menu popup */
85 #define IDD_MCMONTHMENU 300
86
87 #define IDM_JAN 301
88 #define IDM_FEB 302
89 #define IDM_MAR 303
90 #define IDM_APR 304
91 #define IDM_MAY 305
92 #define IDM_JUN 306
93 #define IDM_JUL 307
94 #define IDM_AUG 308
95 #define IDM_SEP 309
96 #define IDM_OCT 310
97 #define IDM_NOV 311
98 #define IDM_DEC 312
99
100 #define IDM_TODAY 4163
101 #define IDM_GOTODAY 4164
102
103 /* Treeview Checkboxes */
104
105 #define IDT_CHECK 401
106
107
108 /* Cursors */
109 #define IDC_MOVEBUTTON 102
110 #define IDC_COPY 104
111 #define IDC_DIVIDER 106
112 #define IDC_DIVIDEROPEN 107
113
114
115 /* DragList resources */
116 #define IDI_DRAGARROW 501
117
118 /* HOTKEY internal strings */
119 #define HKY_NONE 2048
120
121 /* Tooltip icons */
122 #define IDI_TT_INFO_SM 22
123 #define IDI_TT_WARN_SM 25
124 #define IDI_TT_ERROR_SM 28
125
126 typedef struct
127 {
128 COLORREF clrBtnHighlight; /* COLOR_BTNHIGHLIGHT */
129 COLORREF clrBtnShadow; /* COLOR_BTNSHADOW */
130 COLORREF clrBtnText; /* COLOR_BTNTEXT */
131 COLORREF clrBtnFace; /* COLOR_BTNFACE */
132 COLORREF clrHighlight; /* COLOR_HIGHLIGHT */
133 COLORREF clrHighlightText; /* COLOR_HIGHLIGHTTEXT */
134 COLORREF clrHotTrackingColor; /* COLOR_HOTLIGHT */
135 COLORREF clr3dHilight; /* COLOR_3DHILIGHT */
136 COLORREF clr3dShadow; /* COLOR_3DSHADOW */
137 COLORREF clr3dDkShadow; /* COLOR_3DDKSHADOW */
138 COLORREF clr3dFace; /* COLOR_3DFACE */
139 COLORREF clrWindow; /* COLOR_WINDOW */
140 COLORREF clrWindowText; /* COLOR_WINDOWTEXT */
141 COLORREF clrGrayText; /* COLOR_GREYTEXT */
142 COLORREF clrActiveCaption; /* COLOR_ACTIVECAPTION */
143 COLORREF clrInfoBk; /* COLOR_INFOBK */
144 COLORREF clrInfoText; /* COLOR_INFOTEXT */
145 } COMCTL32_SysColor;
146
147 extern COMCTL32_SysColor comctl32_color DECLSPEC_HIDDEN;
148
149 /* Internal function */
150 HWND COMCTL32_CreateToolTip (HWND) DECLSPEC_HIDDEN;
151 VOID COMCTL32_RefreshSysColors(void) DECLSPEC_HIDDEN;
152 void COMCTL32_DrawInsertMark(HDC hDC, const RECT *lpRect, COLORREF clrInsertMark, BOOL bHorizontal) DECLSPEC_HIDDEN;
153 void COMCTL32_EnsureBitmapSize(HBITMAP *pBitmap, int cxMinWidth, int cyMinHeight, COLORREF crBackground) DECLSPEC_HIDDEN;
154 void COMCTL32_GetFontMetrics(HFONT hFont, TEXTMETRICW *ptm) DECLSPEC_HIDDEN;
155 BOOL COMCTL32_IsReflectedMessage(UINT uMsg) DECLSPEC_HIDDEN;
156 INT Str_GetPtrWtoA (LPCWSTR lpSrc, LPSTR lpDest, INT nMaxLen) DECLSPEC_HIDDEN;
157 INT Str_GetPtrAtoW (LPCSTR lpSrc, LPWSTR lpDest, INT nMaxLen) DECLSPEC_HIDDEN;
158 BOOL Str_SetPtrAtoW (LPWSTR *lppDest, LPCSTR lpSrc) DECLSPEC_HIDDEN;
159 BOOL Str_SetPtrWtoA (LPSTR *lppDest, LPCWSTR lpSrc) DECLSPEC_HIDDEN;
160
161 #define COMCTL32_VERSION_MINOR 81
162
163 /* Our internal stack structure of the window procedures to subclass */
164 typedef struct _SUBCLASSPROCS {
165 SUBCLASSPROC subproc;
166 UINT_PTR id;
167 DWORD_PTR ref;
168 struct _SUBCLASSPROCS *next;
169 } SUBCLASSPROCS, *LPSUBCLASSPROCS;
170
171 typedef struct
172 {
173 SUBCLASSPROCS *SubclassProcs;
174 SUBCLASSPROCS *stackpos;
175 WNDPROC origproc;
176 int running;
177 } SUBCLASS_INFO, *LPSUBCLASS_INFO;
178
179 /* undocumented functions */
180
181 LPVOID WINAPI Alloc (DWORD) __WINE_ALLOC_SIZE(1);
182 LPVOID WINAPI ReAlloc (LPVOID, DWORD) __WINE_ALLOC_SIZE(2);
183 BOOL WINAPI Free (LPVOID);
184 DWORD WINAPI GetSize (LPVOID);
185
186 INT WINAPI Str_GetPtrA (LPCSTR, LPSTR, INT);
187 INT WINAPI Str_GetPtrW (LPCWSTR, LPWSTR, INT);
188
189 LRESULT WINAPI SetPathWordBreakProc(HWND hwnd, BOOL bSet);
190 BOOL WINAPI MirrorIcon(HICON *phicon1, HICON *phicon2);
191
192 extern void ANIMATE_Register(void) DECLSPEC_HIDDEN;
193 extern void ANIMATE_Unregister(void) DECLSPEC_HIDDEN;
194 extern void COMBOEX_Register(void) DECLSPEC_HIDDEN;
195 extern void COMBOEX_Unregister(void) DECLSPEC_HIDDEN;
196 extern void DATETIME_Register(void) DECLSPEC_HIDDEN;
197 extern void DATETIME_Unregister(void) DECLSPEC_HIDDEN;
198 extern void FLATSB_Register(void) DECLSPEC_HIDDEN;
199 extern void FLATSB_Unregister(void) DECLSPEC_HIDDEN;
200 extern void HEADER_Register(void) DECLSPEC_HIDDEN;
201 extern void HEADER_Unregister(void) DECLSPEC_HIDDEN;
202 extern void HOTKEY_Register(void) DECLSPEC_HIDDEN;
203 extern void HOTKEY_Unregister(void) DECLSPEC_HIDDEN;
204 extern void IPADDRESS_Register(void) DECLSPEC_HIDDEN;
205 extern void IPADDRESS_Unregister(void) DECLSPEC_HIDDEN;
206 extern void LISTVIEW_Register(void) DECLSPEC_HIDDEN;
207 extern void LISTVIEW_Unregister(void) DECLSPEC_HIDDEN;
208 extern void MONTHCAL_Register(void) DECLSPEC_HIDDEN;
209 extern void MONTHCAL_Unregister(void) DECLSPEC_HIDDEN;
210 extern void NATIVEFONT_Register(void) DECLSPEC_HIDDEN;
211 extern void NATIVEFONT_Unregister(void) DECLSPEC_HIDDEN;
212 extern void PAGER_Register(void) DECLSPEC_HIDDEN;
213 extern void PAGER_Unregister(void) DECLSPEC_HIDDEN;
214 extern void PROGRESS_Register(void) DECLSPEC_HIDDEN;
215 extern void PROGRESS_Unregister(void) DECLSPEC_HIDDEN;
216 extern void REBAR_Register(void) DECLSPEC_HIDDEN;
217 extern void REBAR_Unregister(void) DECLSPEC_HIDDEN;
218 extern void STATUS_Register(void) DECLSPEC_HIDDEN;
219 extern void STATUS_Unregister(void) DECLSPEC_HIDDEN;
220 extern void SYSLINK_Register(void) DECLSPEC_HIDDEN;
221 extern void SYSLINK_Unregister(void) DECLSPEC_HIDDEN;
222 extern void TAB_Register(void) DECLSPEC_HIDDEN;
223 extern void TAB_Unregister(void) DECLSPEC_HIDDEN;
224 extern void TOOLBAR_Register(void) DECLSPEC_HIDDEN;
225 extern void TOOLBAR_Unregister(void) DECLSPEC_HIDDEN;
226 extern void TOOLTIPS_Register(void) DECLSPEC_HIDDEN;
227 extern void TOOLTIPS_Unregister(void) DECLSPEC_HIDDEN;
228 extern void TRACKBAR_Register(void) DECLSPEC_HIDDEN;
229 extern void TRACKBAR_Unregister(void) DECLSPEC_HIDDEN;
230 extern void TREEVIEW_Register(void) DECLSPEC_HIDDEN;
231 extern void TREEVIEW_Unregister(void) DECLSPEC_HIDDEN;
232 extern void UPDOWN_Register(void) DECLSPEC_HIDDEN;
233 extern void UPDOWN_Unregister(void) DECLSPEC_HIDDEN;
234
235
236 int MONTHCAL_MonthLength(int month, int year) DECLSPEC_HIDDEN;
237 int MONTHCAL_CalculateDayOfWeek(SYSTEMTIME *date, BOOL inplace) DECLSPEC_HIDDEN;
238 LONG MONTHCAL_CompareSystemTime(const SYSTEMTIME *first, const SYSTEMTIME *second) DECLSPEC_HIDDEN;
239
240 extern void THEMING_Initialize(void) DECLSPEC_HIDDEN;
241 extern void THEMING_Uninitialize(void) DECLSPEC_HIDDEN;
242 extern LRESULT THEMING_CallOriginalClass(HWND, UINT, WPARAM, LPARAM) DECLSPEC_HIDDEN;
243 extern void THEMING_SetSubclassData(HWND, ULONG_PTR) DECLSPEC_HIDDEN;
244
245 #endif /* __WINE_COMCTL32_H */