wusa: Fix double free on error path in read_update_package (scan-build).
[wine.git] / dlls / comctl32 / comctl32.h
blobfaff3f307177e9d45e34805f4d20eac542fa07bb
1 /******************************************************************************
3 * Common definitions (resource ids and global variables)
5 * Copyright 1999 Thuy Nguyen
6 * Copyright 1999 Eric Kohl
7 * Copyright 2002 Dimitrie O. Paun
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.
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.
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
24 #ifndef __WINE_COMCTL32_H
25 #define __WINE_COMCTL32_H
27 #ifndef RC_INVOKED
28 #include <stdarg.h>
29 #endif
31 #include "windef.h"
32 #include "winbase.h"
33 #include "wingdi.h"
34 #include "winuser.h"
35 #include "winnls.h"
36 #include "commctrl.h"
38 extern HMODULE COMCTL32_hModule DECLSPEC_HIDDEN;
39 extern HBRUSH COMCTL32_hPattern55AABrush DECLSPEC_HIDDEN;
41 /* Property sheet / Wizard */
42 #define IDD_PROPSHEET 1006
43 #define IDD_WIZARD 1020
45 #define IDC_TABCONTROL 12320
46 #define IDC_APPLY_BUTTON 12321
47 #define IDC_BACK_BUTTON 12323
48 #define IDC_NEXT_BUTTON 12324
49 #define IDC_FINISH_BUTTON 12325
50 #define IDC_SUNKEN_LINE 12326
51 #define IDC_SUNKEN_LINEHEADER 12327
53 #define IDS_CLOSE 4160
55 /* Toolbar customization dialog */
56 #define IDD_TBCUSTOMIZE 200
58 #define IDC_AVAILBTN_LBOX 201
59 #define IDC_RESET_BTN 202
60 #define IDC_TOOLBARBTN_LBOX 203
61 #define IDC_REMOVE_BTN 204
62 #define IDC_HELP_BTN 205
63 #define IDC_MOVEUP_BTN 206
64 #define IDC_MOVEDN_BTN 207
66 #define IDS_SEPARATOR 1024
68 /* Toolbar imagelist bitmaps */
69 #define IDB_STD_SMALL 120
70 #define IDB_STD_LARGE 121
71 #define IDB_VIEW_SMALL 124
72 #define IDB_VIEW_LARGE 125
73 #define IDB_HIST_SMALL 130
74 #define IDB_HIST_LARGE 131
76 #define IDM_TODAY 4163
77 #define IDM_GOTODAY 4164
79 /* Treeview Checkboxes */
81 #define IDT_CHECK 401
83 /* Command Link arrow */
84 #define IDB_CMDLINK 402
87 /* Cursors */
88 #define IDC_MOVEBUTTON 102
89 #define IDC_COPY 104
90 #define IDC_DIVIDER 106
91 #define IDC_DIVIDEROPEN 107
94 /* DragList resources */
95 #define IDI_DRAGARROW 501
97 /* HOTKEY internal strings */
98 #define HKY_NONE 2048
100 /* Tooltip icons */
101 #define IDI_TT_INFO_SM 22
102 #define IDI_TT_WARN_SM 25
103 #define IDI_TT_ERROR_SM 28
105 /* Taskdialog strings */
106 #define IDS_BUTTON_YES 3000
107 #define IDS_BUTTON_NO 3001
108 #define IDS_BUTTON_RETRY 3002
109 #define IDS_BUTTON_OK 3003
110 #define IDS_BUTTON_CANCEL 3004
111 #define IDS_BUTTON_CLOSE 3005
113 /* Task dialog expando control default text */
114 #define IDS_TD_EXPANDED 3020
115 #define IDS_TD_COLLAPSED 3021
117 #define WM_SYSTIMER 0x0118
119 enum combobox_state_flags
121 CBF_DROPPED = 0x0001,
122 CBF_BUTTONDOWN = 0x0002,
123 CBF_NOROLLUP = 0x0004,
124 CBF_MEASUREITEM = 0x0008,
125 CBF_FOCUSED = 0x0010,
126 CBF_CAPTURE = 0x0020,
127 CBF_EDIT = 0x0040,
128 CBF_NORESIZE = 0x0080,
129 CBF_NOTIFY = 0x0100,
130 CBF_NOREDRAW = 0x0200,
131 CBF_SELCHANGE = 0x0400,
132 CBF_HOT = 0x0800,
133 CBF_NOEDITNOTIFY = 0x1000,
134 CBF_NOLBSELECT = 0x2000, /* do not change current selection */
135 CBF_BEENFOCUSED = 0x4000, /* has it ever had focus */
136 CBF_EUI = 0x8000,
139 typedef struct
141 HWND self;
142 HWND owner;
143 UINT dwStyle;
144 HWND hWndEdit;
145 HWND hWndLBox;
146 UINT wState;
147 HFONT hFont;
148 RECT textRect;
149 RECT buttonRect;
150 RECT droppedRect;
151 INT droppedIndex;
152 INT fixedOwnerDrawHeight;
153 INT droppedWidth; /* not used unless set explicitly */
154 INT item_height;
155 INT visibleItems;
156 } HEADCOMBO, *LPHEADCOMBO;
158 extern BOOL COMBO_FlipListbox(HEADCOMBO *lphc, BOOL ok, BOOL bRedrawButton) DECLSPEC_HIDDEN;
160 typedef struct
162 COLORREF clrBtnHighlight; /* COLOR_BTNHIGHLIGHT */
163 COLORREF clrBtnShadow; /* COLOR_BTNSHADOW */
164 COLORREF clrBtnText; /* COLOR_BTNTEXT */
165 COLORREF clrBtnFace; /* COLOR_BTNFACE */
166 COLORREF clrHighlight; /* COLOR_HIGHLIGHT */
167 COLORREF clrHighlightText; /* COLOR_HIGHLIGHTTEXT */
168 COLORREF clrHotTrackingColor; /* COLOR_HOTLIGHT */
169 COLORREF clr3dHilight; /* COLOR_3DHILIGHT */
170 COLORREF clr3dShadow; /* COLOR_3DSHADOW */
171 COLORREF clr3dDkShadow; /* COLOR_3DDKSHADOW */
172 COLORREF clr3dFace; /* COLOR_3DFACE */
173 COLORREF clrWindow; /* COLOR_WINDOW */
174 COLORREF clrWindowText; /* COLOR_WINDOWTEXT */
175 COLORREF clrGrayText; /* COLOR_GREYTEXT */
176 COLORREF clrActiveCaption; /* COLOR_ACTIVECAPTION */
177 COLORREF clrInfoBk; /* COLOR_INFOBK */
178 COLORREF clrInfoText; /* COLOR_INFOTEXT */
179 } COMCTL32_SysColor;
181 extern COMCTL32_SysColor comctl32_color DECLSPEC_HIDDEN;
183 /* Internal function */
184 HWND COMCTL32_CreateToolTip (HWND) DECLSPEC_HIDDEN;
185 void COMCTL32_DrawStatusText(HDC hdc, LPCRECT lprc, LPCWSTR text, UINT style, BOOL draw_background) DECLSPEC_HIDDEN;
186 VOID COMCTL32_RefreshSysColors(void) DECLSPEC_HIDDEN;
187 void COMCTL32_DrawInsertMark(HDC hDC, const RECT *lpRect, COLORREF clrInsertMark, BOOL bHorizontal) DECLSPEC_HIDDEN;
188 void COMCTL32_EnsureBitmapSize(HBITMAP *pBitmap, int cxMinWidth, int cyMinHeight, COLORREF crBackground) DECLSPEC_HIDDEN;
189 void COMCTL32_GetFontMetrics(HFONT hFont, TEXTMETRICW *ptm) DECLSPEC_HIDDEN;
190 BOOL COMCTL32_IsReflectedMessage(UINT uMsg) DECLSPEC_HIDDEN;
191 INT Str_GetPtrWtoA (LPCWSTR lpSrc, LPSTR lpDest, INT nMaxLen) DECLSPEC_HIDDEN;
192 INT Str_GetPtrAtoW (LPCSTR lpSrc, LPWSTR lpDest, INT nMaxLen) DECLSPEC_HIDDEN;
193 BOOL Str_SetPtrAtoW (LPWSTR *lppDest, LPCSTR lpSrc) DECLSPEC_HIDDEN;
194 BOOL Str_SetPtrWtoA (LPSTR *lppDest, LPCWSTR lpSrc) DECLSPEC_HIDDEN;
195 BOOL imagelist_has_alpha(HIMAGELIST, UINT) DECLSPEC_HIDDEN;
197 #define COMCTL32_VERSION_MINOR 81
199 /* Our internal stack structure of the window procedures to subclass */
200 typedef struct _SUBCLASSPROCS {
201 SUBCLASSPROC subproc;
202 UINT_PTR id;
203 DWORD_PTR ref;
204 struct _SUBCLASSPROCS *next;
205 } SUBCLASSPROCS, *LPSUBCLASSPROCS;
207 typedef struct
209 SUBCLASSPROCS *SubclassProcs;
210 SUBCLASSPROCS *stackpos;
211 WNDPROC origproc;
212 int is_unicode;
213 int running;
214 } SUBCLASS_INFO, *LPSUBCLASS_INFO;
216 /* undocumented functions */
218 BOOL WINAPI Free (LPVOID);
219 void * WINAPI Alloc (DWORD) __WINE_ALLOC_SIZE(1) __WINE_DEALLOC(Free) __WINE_MALLOC;
220 void * WINAPI ReAlloc (void *, DWORD) __WINE_ALLOC_SIZE(2) __WINE_DEALLOC(Free);
221 DWORD WINAPI GetSize (LPVOID);
223 INT WINAPI Str_GetPtrA (LPCSTR, LPSTR, INT);
224 INT WINAPI Str_GetPtrW (LPCWSTR, LPWSTR, INT);
226 LRESULT WINAPI SetPathWordBreakProc(HWND hwnd, BOOL bSet);
227 BOOL WINAPI MirrorIcon(HICON *phicon1, HICON *phicon2);
229 HRGN set_control_clipping(HDC hdc, const RECT *rect) DECLSPEC_HIDDEN;
231 extern void ANIMATE_Register(void) DECLSPEC_HIDDEN;
232 extern void ANIMATE_Unregister(void) DECLSPEC_HIDDEN;
233 extern void BUTTON_Register(void) DECLSPEC_HIDDEN;
234 extern void COMBO_Register(void) DECLSPEC_HIDDEN;
235 extern void COMBOEX_Register(void) DECLSPEC_HIDDEN;
236 extern void COMBOEX_Unregister(void) DECLSPEC_HIDDEN;
237 extern void COMBOLBOX_Register(void) DECLSPEC_HIDDEN;
238 extern void DATETIME_Register(void) DECLSPEC_HIDDEN;
239 extern void DATETIME_Unregister(void) DECLSPEC_HIDDEN;
240 extern void EDIT_Register(void) DECLSPEC_HIDDEN;
241 extern void FLATSB_Register(void) DECLSPEC_HIDDEN;
242 extern void FLATSB_Unregister(void) DECLSPEC_HIDDEN;
243 extern void HEADER_Register(void) DECLSPEC_HIDDEN;
244 extern void HEADER_Unregister(void) DECLSPEC_HIDDEN;
245 extern void HOTKEY_Register(void) DECLSPEC_HIDDEN;
246 extern void HOTKEY_Unregister(void) DECLSPEC_HIDDEN;
247 extern void IPADDRESS_Register(void) DECLSPEC_HIDDEN;
248 extern void IPADDRESS_Unregister(void) DECLSPEC_HIDDEN;
249 extern void LISTBOX_Register(void) DECLSPEC_HIDDEN;
250 extern void LISTVIEW_Register(void) DECLSPEC_HIDDEN;
251 extern void LISTVIEW_Unregister(void) DECLSPEC_HIDDEN;
252 extern void MONTHCAL_Register(void) DECLSPEC_HIDDEN;
253 extern void MONTHCAL_Unregister(void) DECLSPEC_HIDDEN;
254 extern void NATIVEFONT_Register(void) DECLSPEC_HIDDEN;
255 extern void NATIVEFONT_Unregister(void) DECLSPEC_HIDDEN;
256 extern void PAGER_Register(void) DECLSPEC_HIDDEN;
257 extern void PAGER_Unregister(void) DECLSPEC_HIDDEN;
258 extern void PROGRESS_Register(void) DECLSPEC_HIDDEN;
259 extern void PROGRESS_Unregister(void) DECLSPEC_HIDDEN;
260 extern void REBAR_Register(void) DECLSPEC_HIDDEN;
261 extern void REBAR_Unregister(void) DECLSPEC_HIDDEN;
262 extern void STATIC_Register(void) DECLSPEC_HIDDEN;
263 extern void STATUS_Register(void) DECLSPEC_HIDDEN;
264 extern void STATUS_Unregister(void) DECLSPEC_HIDDEN;
265 extern void SYSLINK_Register(void) DECLSPEC_HIDDEN;
266 extern void SYSLINK_Unregister(void) DECLSPEC_HIDDEN;
267 extern void TAB_Register(void) DECLSPEC_HIDDEN;
268 extern void TAB_Unregister(void) DECLSPEC_HIDDEN;
269 extern void TOOLBAR_Register(void) DECLSPEC_HIDDEN;
270 extern void TOOLBAR_Unregister(void) DECLSPEC_HIDDEN;
271 extern void TOOLTIPS_Register(void) DECLSPEC_HIDDEN;
272 extern void TOOLTIPS_Unregister(void) DECLSPEC_HIDDEN;
273 extern void TRACKBAR_Register(void) DECLSPEC_HIDDEN;
274 extern void TRACKBAR_Unregister(void) DECLSPEC_HIDDEN;
275 extern void TREEVIEW_Register(void) DECLSPEC_HIDDEN;
276 extern void TREEVIEW_Unregister(void) DECLSPEC_HIDDEN;
277 extern void UPDOWN_Register(void) DECLSPEC_HIDDEN;
278 extern void UPDOWN_Unregister(void) DECLSPEC_HIDDEN;
281 int MONTHCAL_MonthLength(int month, int year) DECLSPEC_HIDDEN;
282 int MONTHCAL_CalculateDayOfWeek(SYSTEMTIME *date, BOOL inplace) DECLSPEC_HIDDEN;
283 LONG MONTHCAL_CompareSystemTime(const SYSTEMTIME *first, const SYSTEMTIME *second) DECLSPEC_HIDDEN;
285 #endif /* __WINE_COMCTL32_H */