Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
wine-mirror
GitHub Repository: wine-mirror/wine
Path: blob/master/dlls/comctl32/comctl32.h
8668 views
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
#ifndef RC_INVOKED
28
#include <stdarg.h>
29
#endif
30
31
#include "windef.h"
32
#include "winbase.h"
33
#include "wingdi.h"
34
#include "winuser.h"
35
#include "winnls.h"
36
#include "commctrl.h"
37
#if __WINE_COMCTL32_VERSION == 6
38
#include "uxtheme.h"
39
#include "vsstyle.h"
40
#include "vssym32.h"
41
#endif
42
43
extern HMODULE COMCTL32_hModule;
44
extern HBRUSH COMCTL32_hPattern55AABrush;
45
46
/* Property sheet / Wizard */
47
#define IDD_PROPSHEET 1006
48
#define IDD_WIZARD 1020
49
50
#define IDC_TABCONTROL 12320
51
#define IDC_APPLY_BUTTON 12321
52
#define IDC_BACK_BUTTON 12323
53
#define IDC_NEXT_BUTTON 12324
54
#define IDC_FINISH_BUTTON 12325
55
#define IDC_SUNKEN_LINE 12326
56
#define IDC_SUNKEN_LINEHEADER 12327
57
58
#define IDS_CLOSE 4160
59
60
/* Toolbar customization dialog */
61
#define IDD_TBCUSTOMIZE 200
62
63
#define IDC_AVAILBTN_LBOX 201
64
#define IDC_RESET_BTN 202
65
#define IDC_TOOLBARBTN_LBOX 203
66
#define IDC_REMOVE_BTN 204
67
#define IDC_HELP_BTN 205
68
#define IDC_MOVEUP_BTN 206
69
#define IDC_MOVEDN_BTN 207
70
71
#define IDS_SEPARATOR 1024
72
73
/* Toolbar imagelist bitmaps */
74
#define IDB_STD_SMALL 120
75
#define IDB_STD_LARGE 121
76
#define IDB_VIEW_SMALL 124
77
#define IDB_VIEW_LARGE 125
78
#define IDB_HIST_SMALL 130
79
#define IDB_HIST_LARGE 131
80
81
#define IDM_TODAY 4163
82
#define IDM_GOTODAY 4164
83
84
/* Treeview Checkboxes */
85
86
#define IDT_CHECK 401
87
88
/* Command Link arrow */
89
#define IDB_CMDLINK 402
90
91
92
/* Cursors */
93
#define IDC_MOVEBUTTON 102
94
#define IDC_COPY 104
95
#define IDC_DIVIDER 106
96
#define IDC_DIVIDEROPEN 107
97
98
99
/* DragList resources */
100
#define IDI_DRAGARROW 501
101
102
/* HOTKEY internal strings */
103
#define HKY_NONE 2048
104
105
/* Tooltip icons */
106
#define IDI_TT_INFO_SM 22
107
#define IDI_TT_WARN_SM 25
108
#define IDI_TT_ERROR_SM 28
109
#define IDI_TT_INFO_MD 20
110
#define IDI_TT_WARN_MD 23
111
#define IDI_TT_ERROR_MD 26
112
113
/* Taskdialog strings */
114
#define IDS_BUTTON_YES 3000
115
#define IDS_BUTTON_NO 3001
116
#define IDS_BUTTON_RETRY 3002
117
#define IDS_BUTTON_OK 3003
118
#define IDS_BUTTON_CANCEL 3004
119
#define IDS_BUTTON_CLOSE 3005
120
121
/* Task dialog expando control default text */
122
#define IDS_TD_EXPANDED 3020
123
#define IDS_TD_COLLAPSED 3021
124
125
#define WM_SYSTIMER 0x0118
126
127
enum combobox_state_flags
128
{
129
CBF_DROPPED = 0x0001,
130
CBF_BUTTONDOWN = 0x0002,
131
CBF_NOROLLUP = 0x0004,
132
CBF_MEASUREITEM = 0x0008,
133
CBF_FOCUSED = 0x0010,
134
CBF_CAPTURE = 0x0020,
135
CBF_EDIT = 0x0040,
136
CBF_NORESIZE = 0x0080,
137
CBF_NOTIFY = 0x0100,
138
CBF_NOREDRAW = 0x0200,
139
CBF_SELCHANGE = 0x0400,
140
CBF_HOT = 0x0800,
141
CBF_NOEDITNOTIFY = 0x1000,
142
CBF_NOLBSELECT = 0x2000, /* do not change current selection */
143
CBF_BEENFOCUSED = 0x4000, /* has it ever had focus */
144
CBF_EUI = 0x8000,
145
};
146
147
typedef struct
148
{
149
HWND self;
150
HWND owner;
151
UINT dwStyle;
152
HWND hWndEdit;
153
HWND hWndLBox;
154
UINT wState;
155
HFONT hFont;
156
RECT textRect;
157
RECT buttonRect;
158
RECT droppedRect;
159
INT droppedIndex;
160
INT fixedOwnerDrawHeight;
161
INT droppedWidth; /* not used unless set explicitly */
162
INT item_height;
163
INT visibleItems;
164
} HEADCOMBO, *LPHEADCOMBO;
165
166
extern BOOL COMBO_FlipListbox(HEADCOMBO *lphc, BOOL ok, BOOL bRedrawButton);
167
168
typedef struct
169
{
170
COLORREF clrBtnHighlight; /* COLOR_BTNHIGHLIGHT */
171
COLORREF clrBtnShadow; /* COLOR_BTNSHADOW */
172
COLORREF clrBtnText; /* COLOR_BTNTEXT */
173
COLORREF clrBtnFace; /* COLOR_BTNFACE */
174
COLORREF clrHighlight; /* COLOR_HIGHLIGHT */
175
COLORREF clrHighlightText; /* COLOR_HIGHLIGHTTEXT */
176
COLORREF clrHotTrackingColor; /* COLOR_HOTLIGHT */
177
COLORREF clr3dHilight; /* COLOR_3DHILIGHT */
178
COLORREF clr3dShadow; /* COLOR_3DSHADOW */
179
COLORREF clr3dDkShadow; /* COLOR_3DDKSHADOW */
180
COLORREF clr3dFace; /* COLOR_3DFACE */
181
COLORREF clrWindow; /* COLOR_WINDOW */
182
COLORREF clrWindowText; /* COLOR_WINDOWTEXT */
183
COLORREF clrGrayText; /* COLOR_GREYTEXT */
184
COLORREF clrActiveCaption; /* COLOR_ACTIVECAPTION */
185
COLORREF clrInfoBk; /* COLOR_INFOBK */
186
COLORREF clrInfoText; /* COLOR_INFOTEXT */
187
} COMCTL32_SysColor;
188
189
extern COMCTL32_SysColor comctl32_color;
190
191
/* Internal function */
192
void COMCTL32_CloseThemeForWindow(HWND hwnd);
193
HWND COMCTL32_CreateToolTip(HWND);
194
void COMCTL32_DrawStatusText(HDC hdc, LPCRECT lprc, LPCWSTR text, UINT style, BOOL draw_background);
195
void COMCTL32_OpenThemeForWindow(HWND hwnd, const WCHAR *theme_class);
196
VOID COMCTL32_RefreshSysColors(void);
197
void COMCTL32_DrawInsertMark(HDC hDC, const RECT *lpRect, COLORREF clrInsertMark, BOOL bHorizontal);
198
void COMCTL32_EnsureBitmapSize(HBITMAP *pBitmap, int cxMinWidth, int cyMinHeight, COLORREF crBackground);
199
void COMCTL32_GetFontMetrics(HFONT hFont, TEXTMETRICW *ptm);
200
BOOL COMCTL32_IsReflectedMessage(UINT uMsg);
201
BOOL COMCTL32_IsThemed(HWND hwnd);
202
LRESULT COMCTL32_NCPaint(HWND hwnd, WPARAM wp, LPARAM lp, const WCHAR *theme_class);
203
LRESULT COMCTL32_SetVersion(INT *current_version, INT new_version);
204
LRESULT COMCTL32_ThemeChanged(HWND hwnd, const WCHAR *theme_class, BOOL invalidate, BOOL erase);
205
INT Str_GetPtrWtoA(LPCWSTR lpSrc, LPSTR lpDest, INT nMaxLen);
206
INT Str_GetPtrAtoW(LPCSTR lpSrc, LPWSTR lpDest, INT nMaxLen);
207
BOOL Str_SetPtrAtoW(LPWSTR *lppDest, LPCSTR lpSrc);
208
BOOL Str_SetPtrWtoA(LPSTR *lppDest, LPCWSTR lpSrc);
209
BOOL imagelist_has_alpha(HIMAGELIST, UINT);
210
211
/* Our internal stack structure of the window procedures to subclass */
212
typedef struct _SUBCLASSPROCS {
213
SUBCLASSPROC subproc;
214
UINT_PTR id;
215
DWORD_PTR ref;
216
struct _SUBCLASSPROCS *next;
217
} SUBCLASSPROCS, *LPSUBCLASSPROCS;
218
219
typedef struct
220
{
221
SUBCLASSPROCS *SubclassProcs;
222
SUBCLASSPROCS *stackpos;
223
WNDPROC origproc;
224
int is_unicode;
225
int running;
226
} SUBCLASS_INFO, *LPSUBCLASS_INFO;
227
228
/* WM_NOTIFY unicode to ansi conversion and forwarding stuff */
229
230
LRESULT COMCTL32_forward_notify_to_ansi_window(HWND hwnd_notify, NMHDR *hdr, WCHAR **unicode_buffer, DWORD *unicode_buffer_size);
231
232
/* undocumented functions */
233
234
BOOL WINAPI Free (LPVOID);
235
void * WINAPI Alloc (DWORD) __WINE_ALLOC_SIZE(1) __WINE_DEALLOC(Free) __WINE_MALLOC;
236
void * WINAPI ReAlloc (void *, DWORD) __WINE_ALLOC_SIZE(2) __WINE_DEALLOC(Free);
237
DWORD WINAPI GetSize (LPVOID);
238
239
INT WINAPI Str_GetPtrA (LPCSTR, LPSTR, INT);
240
INT WINAPI Str_GetPtrW (LPCWSTR, LPWSTR, INT);
241
242
LRESULT WINAPI SetPathWordBreakProc(HWND hwnd, BOOL bSet);
243
BOOL WINAPI MirrorIcon(HICON *phicon1, HICON *phicon2);
244
245
HRGN set_control_clipping(HDC hdc, const RECT *rect);
246
247
#if __WINE_COMCTL32_VERSION == 6
248
extern void BUTTON_Register(void);
249
extern void COMBO_Register(void);
250
extern void COMBOLBOX_Register(void);
251
extern void EDIT_Register(void);
252
extern void LISTBOX_Register(void);
253
extern void SYSLINK_Register(void);
254
extern void STATIC_Register(void);
255
#endif
256
extern void ANIMATE_Register(void);
257
extern void COMBOEX_Register(void);
258
extern void DATETIME_Register(void);
259
extern void HEADER_Register(void);
260
extern void HOTKEY_Register(void);
261
extern void IPADDRESS_Register(void);
262
extern void LISTVIEW_Register(void);
263
extern void MONTHCAL_Register(void);
264
extern void NATIVEFONT_Register(void);
265
extern void PAGER_Register(void);
266
extern void PROGRESS_Register(void);
267
extern void REBAR_Register(void);
268
extern void STATUS_Register(void);
269
extern void TAB_Register(void);
270
extern void TOOLBAR_Register(void);
271
extern void TOOLTIPS_Register(void);
272
extern void TRACKBAR_Register(void);
273
extern void TREEVIEW_Register(void);
274
extern void UPDOWN_Register(void);
275
276
277
int MONTHCAL_MonthLength(int month, int year);
278
int MONTHCAL_CalculateDayOfWeek(SYSTEMTIME *date, BOOL inplace);
279
LONG MONTHCAL_CompareSystemTime(const SYSTEMTIME *first, const SYSTEMTIME *second);
280
281
#endif /* __WINE_COMCTL32_H */
282
283