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 #include <wine/config.h> 28 29 #include <stdarg.h> 30 #include <assert.h> 31 32 #define _INC_WINDOWS 33 #define COM_NO_WINDOWS_H 34 35 #define COBJMACROS 36 #define NONAMELESSUNION 37 #define NONAMELESSSTRUCT 38 39 #include <windef.h> 40 #include <winbase.h> 41 #include <wingdi.h> 42 #include <winuser.h> 43 #include <winreg.h> 44 #include <objbase.h> 45 #include <uxtheme.h> 46 #include <vssym32.h> 47 48 #include <wine/debug.h> 49 #include <wine/list.h> 50 #include <wine/unicode.h> 51 52 #include "resource.h" 53 54 extern HMODULE COMCTL32_hModule DECLSPEC_HIDDEN; 55 extern HBRUSH COMCTL32_hPattern55AABrush DECLSPEC_HIDDEN; 56 57 typedef struct 58 { 59 COLORREF clrBtnHighlight; /* COLOR_BTNHIGHLIGHT */ 60 COLORREF clrBtnShadow; /* COLOR_BTNSHADOW */ 61 COLORREF clrBtnText; /* COLOR_BTNTEXT */ 62 COLORREF clrBtnFace; /* COLOR_BTNFACE */ 63 COLORREF clrHighlight; /* COLOR_HIGHLIGHT */ 64 COLORREF clrHighlightText; /* COLOR_HIGHLIGHTTEXT */ 65 COLORREF clrHotTrackingColor; /* COLOR_HOTLIGHT */ 66 COLORREF clr3dHilight; /* COLOR_3DHILIGHT */ 67 COLORREF clr3dShadow; /* COLOR_3DSHADOW */ 68 COLORREF clr3dDkShadow; /* COLOR_3DDKSHADOW */ 69 COLORREF clr3dFace; /* COLOR_3DFACE */ 70 COLORREF clrWindow; /* COLOR_WINDOW */ 71 COLORREF clrWindowText; /* COLOR_WINDOWTEXT */ 72 COLORREF clrGrayText; /* COLOR_GREYTEXT */ 73 COLORREF clrActiveCaption; /* COLOR_ACTIVECAPTION */ 74 COLORREF clrInfoBk; /* COLOR_INFOBK */ 75 COLORREF clrInfoText; /* COLOR_INFOTEXT */ 76 } COMCTL32_SysColor; 77 78 extern COMCTL32_SysColor comctl32_color DECLSPEC_HIDDEN; 79 80 #ifdef __REACTOS__ 81 82 typedef struct _BUTTON_DATA { 83 LONG state; 84 HFONT font; 85 LONG_PTR image; 86 DWORD ui_state; 87 88 RECT rcTextMargin; 89 BUTTON_IMAGELIST imlData; 90 } BUTTON_DATA, *PBUTTON_DATA; 91 92 static inline PBUTTON_DATA _GetButtonData(HWND hwnd) 93 { 94 return (PBUTTON_DATA)GetWindowLongPtrW( hwnd, 0 ); 95 } 96 97 #endif /* __REACTOS__ */ 98 99 /* Internal function */ 100 HWND COMCTL32_CreateToolTip (HWND) DECLSPEC_HIDDEN; 101 VOID COMCTL32_RefreshSysColors(void) DECLSPEC_HIDDEN; 102 void COMCTL32_DrawInsertMark(HDC hDC, const RECT *lpRect, COLORREF clrInsertMark, BOOL bHorizontal) DECLSPEC_HIDDEN; 103 void COMCTL32_EnsureBitmapSize(HBITMAP *pBitmap, int cxMinWidth, int cyMinHeight, COLORREF crBackground) DECLSPEC_HIDDEN; 104 void COMCTL32_GetFontMetrics(HFONT hFont, TEXTMETRICW *ptm) DECLSPEC_HIDDEN; 105 BOOL COMCTL32_IsReflectedMessage(UINT uMsg) DECLSPEC_HIDDEN; 106 INT Str_GetPtrWtoA (LPCWSTR lpSrc, LPSTR lpDest, INT nMaxLen) DECLSPEC_HIDDEN; 107 INT Str_GetPtrAtoW (LPCSTR lpSrc, LPWSTR lpDest, INT nMaxLen) DECLSPEC_HIDDEN; 108 BOOL Str_SetPtrAtoW (LPWSTR *lppDest, LPCSTR lpSrc) DECLSPEC_HIDDEN; 109 BOOL Str_SetPtrWtoA (LPSTR *lppDest, LPCWSTR lpSrc) DECLSPEC_HIDDEN; 110 111 #ifndef __REACTOS__ 112 #define COMCTL32_VERSION_MINOR 81 113 #endif 114 115 /* Our internal stack structure of the window procedures to subclass */ 116 typedef struct _SUBCLASSPROCS { 117 SUBCLASSPROC subproc; 118 UINT_PTR id; 119 DWORD_PTR ref; 120 struct _SUBCLASSPROCS *next; 121 } SUBCLASSPROCS, *LPSUBCLASSPROCS; 122 123 typedef struct 124 { 125 SUBCLASSPROCS *SubclassProcs; 126 SUBCLASSPROCS *stackpos; 127 WNDPROC origproc; 128 int running; 129 } SUBCLASS_INFO, *LPSUBCLASS_INFO; 130 131 /* undocumented functions */ 132 133 LPVOID WINAPI Alloc (DWORD) __WINE_ALLOC_SIZE(1); 134 LPVOID WINAPI ReAlloc (LPVOID, DWORD) __WINE_ALLOC_SIZE(2); 135 BOOL WINAPI Free (LPVOID); 136 DWORD WINAPI GetSize (LPVOID); 137 138 INT WINAPI Str_GetPtrA (LPCSTR, LPSTR, INT); 139 INT WINAPI Str_GetPtrW (LPCWSTR, LPWSTR, INT); 140 141 LRESULT WINAPI SetPathWordBreakProc(HWND hwnd, BOOL bSet); 142 BOOL WINAPI MirrorIcon(HICON *phicon1, HICON *phicon2); 143 144 extern void ANIMATE_Register(void) DECLSPEC_HIDDEN; 145 extern void ANIMATE_Unregister(void) DECLSPEC_HIDDEN; 146 extern void COMBOEX_Register(void) DECLSPEC_HIDDEN; 147 extern void COMBOEX_Unregister(void) DECLSPEC_HIDDEN; 148 extern void DATETIME_Register(void) DECLSPEC_HIDDEN; 149 extern void DATETIME_Unregister(void) DECLSPEC_HIDDEN; 150 extern void FLATSB_Register(void) DECLSPEC_HIDDEN; 151 extern void FLATSB_Unregister(void) DECLSPEC_HIDDEN; 152 extern void HEADER_Register(void) DECLSPEC_HIDDEN; 153 extern void HEADER_Unregister(void) DECLSPEC_HIDDEN; 154 extern void HOTKEY_Register(void) DECLSPEC_HIDDEN; 155 extern void HOTKEY_Unregister(void) DECLSPEC_HIDDEN; 156 extern void IPADDRESS_Register(void) DECLSPEC_HIDDEN; 157 extern void IPADDRESS_Unregister(void) DECLSPEC_HIDDEN; 158 extern void LISTVIEW_Register(void) DECLSPEC_HIDDEN; 159 extern void LISTVIEW_Unregister(void) DECLSPEC_HIDDEN; 160 extern void MONTHCAL_Register(void) DECLSPEC_HIDDEN; 161 extern void MONTHCAL_Unregister(void) DECLSPEC_HIDDEN; 162 extern void NATIVEFONT_Register(void) DECLSPEC_HIDDEN; 163 extern void NATIVEFONT_Unregister(void) DECLSPEC_HIDDEN; 164 extern void PAGER_Register(void) DECLSPEC_HIDDEN; 165 extern void PAGER_Unregister(void) DECLSPEC_HIDDEN; 166 extern void PROGRESS_Register(void) DECLSPEC_HIDDEN; 167 extern void PROGRESS_Unregister(void) DECLSPEC_HIDDEN; 168 extern void REBAR_Register(void) DECLSPEC_HIDDEN; 169 extern void REBAR_Unregister(void) DECLSPEC_HIDDEN; 170 extern void STATUS_Register(void) DECLSPEC_HIDDEN; 171 extern void STATUS_Unregister(void) DECLSPEC_HIDDEN; 172 extern void SYSLINK_Register(void) DECLSPEC_HIDDEN; 173 extern void SYSLINK_Unregister(void) DECLSPEC_HIDDEN; 174 extern void TAB_Register(void) DECLSPEC_HIDDEN; 175 extern void TAB_Unregister(void) DECLSPEC_HIDDEN; 176 extern void TOOLBAR_Register(void) DECLSPEC_HIDDEN; 177 extern void TOOLBAR_Unregister(void) DECLSPEC_HIDDEN; 178 extern void TOOLTIPS_Register(void) DECLSPEC_HIDDEN; 179 extern void TOOLTIPS_Unregister(void) DECLSPEC_HIDDEN; 180 extern void TRACKBAR_Register(void) DECLSPEC_HIDDEN; 181 extern void TRACKBAR_Unregister(void) DECLSPEC_HIDDEN; 182 extern void TREEVIEW_Register(void) DECLSPEC_HIDDEN; 183 extern void TREEVIEW_Unregister(void) DECLSPEC_HIDDEN; 184 extern void UPDOWN_Register(void) DECLSPEC_HIDDEN; 185 extern void UPDOWN_Unregister(void) DECLSPEC_HIDDEN; 186 #ifdef __REACTOS__ 187 extern void BUTTON_Register(); 188 extern void BUTTON_Unregister(); 189 extern void TOOLBARv6_Register(void) DECLSPEC_HIDDEN; 190 extern void TOOLBARv6_Unregister(void) DECLSPEC_HIDDEN; 191 #endif /* __REACTOS__ */ 192 193 int MONTHCAL_MonthLength(int month, int year) DECLSPEC_HIDDEN; 194 int MONTHCAL_CalculateDayOfWeek(SYSTEMTIME *date, BOOL inplace) DECLSPEC_HIDDEN; 195 LONG MONTHCAL_CompareSystemTime(const SYSTEMTIME *first, const SYSTEMTIME *second) DECLSPEC_HIDDEN; 196 #ifdef __REACTOS__ 197 extern void THEMING_Initialize(HANDLE hActCtx5, HANDLE hActCtx6) DECLSPEC_HIDDEN; 198 #else 199 extern void THEMING_Initialize(void) DECLSPEC_HIDDEN; 200 #endif 201 extern void THEMING_Uninitialize(void) DECLSPEC_HIDDEN; 202 extern LRESULT THEMING_CallOriginalClass(HWND, UINT, WPARAM, LPARAM) DECLSPEC_HIDDEN; 203 extern void THEMING_SetSubclassData(HWND, ULONG_PTR) DECLSPEC_HIDDEN; 204 205 #endif /* __WINE_COMCTL32_H */ 206