set svn:eol-style to native
[reactos.git] / reactos / lib / comctl32 / comctl32.h
index a73911f..1f7e0ad 100644 (file)
-/******************************************************************************\r
- *\r
- * Common definitions (resource ids and global variables)\r
- *\r
- * Copyright 1999 Thuy Nguyen\r
- * Copyright 1999 Eric Kohl\r
- * Copyright 2002 Dimitrie O. Paun\r
- *\r
- * This library is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Lesser General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 2.1 of the License, or (at your option) any later version.\r
- *\r
- * This library is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- * Lesser General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with this library; if not, write to the Free Software\r
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
- */\r
-\r
-#ifndef __WINE_COMCTL32_H\r
-#define __WINE_COMCTL32_H\r
-\r
-#ifndef RC_INVOKED\r
-#include <stdarg.h>\r
-#endif\r
-\r
-#include "windef.h"\r
-#include "winbase.h"\r
-#include "wingdi.h"\r
-#include "winuser.h"\r
-#include "winnls.h"\r
-#include "commctrl.h"\r
-\r
-extern HMODULE COMCTL32_hModule;\r
-extern HBRUSH  COMCTL32_hPattern55AABrush;\r
-\r
-/* Property sheet / Wizard */\r
-#define IDD_PROPSHEET 1006\r
-#define IDD_WIZARD    1020\r
-\r
-#define IDC_TABCONTROL   12320\r
-#define IDC_APPLY_BUTTON 12321\r
-#define IDC_BACK_BUTTON  12323\r
-#define IDC_NEXT_BUTTON  12324\r
-#define IDC_FINISH_BUTTON 12325\r
-#define IDC_SUNKEN_LINE   12326\r
-#define IDC_SUNKEN_LINEHEADER 12327\r
-\r
-#define IDS_CLOSE        4160\r
-\r
-/* Toolbar customization dialog */\r
-#define IDD_TBCUSTOMIZE     200\r
-\r
-#define IDC_AVAILBTN_LBOX   201\r
-#define IDC_RESET_BTN       202\r
-#define IDC_TOOLBARBTN_LBOX 203\r
-#define IDC_REMOVE_BTN      204\r
-#define IDC_HELP_BTN        205\r
-#define IDC_MOVEUP_BTN      206\r
-#define IDC_MOVEDN_BTN      207\r
-\r
-#define IDS_SEPARATOR      1024\r
-\r
-/* Toolbar imagelist bitmaps */\r
-#define IDB_STD_SMALL       120\r
-#define IDB_STD_LARGE       121\r
-#define IDB_VIEW_SMALL      124\r
-#define IDB_VIEW_LARGE      125\r
-#define IDB_HIST_SMALL      130\r
-#define IDB_HIST_LARGE      131\r
-\r
-\r
-/* Month calendar month menu popup */\r
-#define IDD_MCMONTHMENU     300\r
-\r
-#define IDM_JAN                                301\r
-#define IDM_FEB                                302\r
-#define IDM_MAR                                303\r
-#define IDM_APR                                304\r
-#define IDM_MAY                                305\r
-#define IDM_JUN                                306\r
-#define IDM_JUL                                307\r
-#define IDM_AUG                                308\r
-#define IDM_SEP                                309\r
-#define IDM_OCT                                310\r
-#define IDM_NOV                                311\r
-#define IDM_DEC                                312\r
-\r
-#define IDM_TODAY                      4163\r
-#define IDM_GOTODAY                    4164\r
-\r
-/* Treeview Checkboxes */\r
-\r
-#define IDT_CHECK        401\r
-\r
-\r
-/* Header cursors */\r
-#define IDC_DIVIDER                     106\r
-#define IDC_DIVIDEROPEN                 107\r
-\r
-\r
-/* DragList resources */\r
-#define IDI_DRAGARROW                   501\r
-#define IDC_COPY                        502\r
-\r
-#define IDC_MOVEBUTTON                    1\r
-\r
-/* HOTKEY internal strings */\r
-#define HKY_NONE                        2048\r
-\r
-/* Tooltip icons */\r
-#define IDI_TT_INFO_SM                   22\r
-#define IDI_TT_WARN_SM                   25\r
-#define IDI_TT_ERROR_SM                  28\r
-\r
-typedef struct\r
-{\r
-    COLORREF clrBtnHighlight;       /* COLOR_BTNHIGHLIGHT                  */\r
-    COLORREF clrBtnShadow;          /* COLOR_BTNSHADOW                     */\r
-    COLORREF clrBtnText;            /* COLOR_BTNTEXT                       */\r
-    COLORREF clrBtnFace;            /* COLOR_BTNFACE                       */\r
-    COLORREF clrHighlight;          /* COLOR_HIGHLIGHT                     */\r
-    COLORREF clrHighlightText;      /* COLOR_HIGHLIGHTTEXT                 */\r
-    COLORREF clr3dHilight;          /* COLOR_3DHILIGHT                     */\r
-    COLORREF clr3dShadow;           /* COLOR_3DSHADOW                      */\r
-    COLORREF clr3dDkShadow;         /* COLOR_3DDKSHADOW                    */\r
-    COLORREF clr3dFace;             /* COLOR_3DFACE                        */\r
-    COLORREF clrWindow;             /* COLOR_WINDOW                        */\r
-    COLORREF clrWindowText;         /* COLOR_WINDOWTEXT                    */\r
-    COLORREF clrGrayText;           /* COLOR_GREYTEXT                      */\r
-    COLORREF clrActiveCaption;      /* COLOR_ACTIVECAPTION                 */\r
-    COLORREF clrInfoBk;             /* COLOR_INFOBK                        */\r
-    COLORREF clrInfoText;           /* COLOR_INFOTEXT                      */\r
-} COMCTL32_SysColor;\r
-\r
-extern COMCTL32_SysColor  comctl32_color;\r
-\r
-/* Internal function */\r
-HWND COMCTL32_CreateToolTip (HWND);\r
-VOID COMCTL32_RefreshSysColors(void);\r
-void COMCTL32_DrawInsertMark(HDC hDC, const RECT *lpRect, COLORREF clrInsertMark, BOOL bHorizontal);\r
-INT  Str_GetPtrWtoA (LPCWSTR lpSrc, LPSTR lpDest, INT nMaxLen);\r
-BOOL Str_SetPtrAtoW (LPWSTR *lppDest, LPCSTR lpSrc);\r
-\r
-#define COMCTL32_VERSION_MINOR 80\r
-#define WINE_FILEVERSION 5, COMCTL32_VERSION_MINOR, 0, 0\r
-#define WINE_FILEVERSIONSTR "5.80"\r
-\r
-/* Our internal stack structure of the window procedures to subclass */\r
-typedef struct _SUBCLASSPROCS {\r
-    SUBCLASSPROC subproc;\r
-    UINT_PTR id;\r
-    DWORD_PTR ref;\r
-    struct _SUBCLASSPROCS *next;\r
-} SUBCLASSPROCS, *LPSUBCLASSPROCS;\r
-\r
-typedef struct\r
-{\r
-   SUBCLASSPROCS *SubclassProcs;\r
-   SUBCLASSPROCS *stackpos;\r
-   WNDPROC origproc;\r
-   int running;\r
-} SUBCLASS_INFO, *LPSUBCLASS_INFO;\r
-\r
-/* undocumented functions */\r
-\r
-LPVOID WINAPI Alloc (DWORD);\r
-LPVOID WINAPI ReAlloc (LPVOID, DWORD);\r
-BOOL   WINAPI Free (LPVOID);\r
-DWORD  WINAPI GetSize (LPVOID);\r
-\r
-INT  WINAPI Str_GetPtrA (LPCSTR, LPSTR, INT);\r
-INT  WINAPI Str_GetPtrW (LPCWSTR, LPWSTR, INT);\r
-\r
-INT  WINAPI DPA_GetPtrIndex (const HDPA, LPVOID);\r
-BOOL WINAPI DPA_Grow (const HDPA, INT);\r
-\r
-#define DPAM_NOSORT             0x0001\r
-#define DPAM_INSERT             0x0004\r
-#define DPAM_DELETE             0x0008\r
-\r
-typedef PVOID (CALLBACK *PFNDPAMERGE)(DWORD,PVOID,PVOID,LPARAM);\r
-BOOL WINAPI DPA_Merge (const HDPA, const HDPA, DWORD, PFNDPACOMPARE, PFNDPAMERGE, LPARAM);\r
-\r
-#define DPA_GetPtrCount(hdpa)  (*(INT*)(hdpa))\r
-\r
-LRESULT WINAPI SetPathWordBreakProc(HWND hwnd, BOOL bSet);\r
-BOOL WINAPI MirrorIcon(HICON *phicon1, HICON *phicon2);\r
-\r
-extern void ANIMATE_Register(void);\r
-extern void ANIMATE_Unregister(void);\r
-extern void COMBOEX_Register(void);\r
-extern void COMBOEX_Unregister(void);\r
-extern void DATETIME_Register(void);\r
-extern void DATETIME_Unregister(void);\r
-extern void FLATSB_Register(void);\r
-extern void FLATSB_Unregister(void);\r
-extern void HEADER_Register(void);\r
-extern void HEADER_Unregister(void);\r
-extern void HOTKEY_Register(void);\r
-extern void HOTKEY_Unregister(void);\r
-extern void IPADDRESS_Register(void);\r
-extern void IPADDRESS_Unregister(void);\r
-extern void LISTVIEW_Register(void);\r
-extern void LISTVIEW_Unregister(void);\r
-extern void MONTHCAL_Register(void);\r
-extern void MONTHCAL_Unregister(void);\r
-extern void NATIVEFONT_Register(void);\r
-extern void NATIVEFONT_Unregister(void);\r
-extern void PAGER_Register(void);\r
-extern void PAGER_Unregister(void);\r
-extern void PROGRESS_Register(void);\r
-extern void PROGRESS_Unregister(void);\r
-extern void REBAR_Register(void);\r
-extern void REBAR_Unregister(void);\r
-extern void STATUS_Register(void);\r
-extern void STATUS_Unregister(void);\r
-extern void SYSLINK_Register(void);\r
-extern void SYSLINK_Unregister(void);\r
-extern void TAB_Register(void);\r
-extern void TAB_Unregister(void);\r
-extern void TOOLBAR_Register(void);\r
-extern void TOOLBAR_Unregister(void);\r
-extern void TOOLTIPS_Register(void);\r
-extern void TOOLTIPS_Unregister(void);\r
-extern void TRACKBAR_Register(void);\r
-extern void TRACKBAR_Unregister(void);\r
-extern void TREEVIEW_Register(void);\r
-extern void TREEVIEW_Unregister(void);\r
-extern void UPDOWN_Register(void);\r
-extern void UPDOWN_Unregister(void);\r
-\r
-\r
-int MONTHCAL_MonthLength(int month, int year);\r
-\r
-static inline void MONTHCAL_CopyTime(const SYSTEMTIME *from, SYSTEMTIME *to)\r
-{\r
-  to->wYear = from->wYear;\r
-  to->wMonth = from->wMonth;\r
-  to->wDayOfWeek = from->wDayOfWeek;\r
-  to->wDay = from->wDay;\r
-  to->wHour = from->wHour;\r
-  to->wMinute = from->wMinute;\r
-  to->wSecond = from->wSecond;\r
-  to->wMilliseconds = from->wMilliseconds;\r
-}\r
-\r
-#endif  /* __WINE_COMCTL32_H */\r
+/******************************************************************************
+ *
+ * Common definitions (resource ids and global variables)
+ *
+ * Copyright 1999 Thuy Nguyen
+ * Copyright 1999 Eric Kohl
+ * Copyright 2002 Dimitrie O. Paun
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#ifndef __WINE_COMCTL32_H
+#define __WINE_COMCTL32_H
+
+#ifndef RC_INVOKED
+#include <stdarg.h>
+#endif
+
+#include "windef.h"
+#include "winbase.h"
+#include "wingdi.h"
+#include "winuser.h"
+#include "winnls.h"
+#include "commctrl.h"
+
+extern HMODULE COMCTL32_hModule;
+extern HBRUSH  COMCTL32_hPattern55AABrush;
+
+/* Property sheet / Wizard */
+#define IDD_PROPSHEET 1006
+#define IDD_WIZARD    1020
+
+#define IDC_TABCONTROL   12320
+#define IDC_APPLY_BUTTON 12321
+#define IDC_BACK_BUTTON  12323
+#define IDC_NEXT_BUTTON  12324
+#define IDC_FINISH_BUTTON 12325
+#define IDC_SUNKEN_LINE   12326
+#define IDC_SUNKEN_LINEHEADER 12327
+
+#define IDS_CLOSE        4160
+
+/* Toolbar customization dialog */
+#define IDD_TBCUSTOMIZE     200
+
+#define IDC_AVAILBTN_LBOX   201
+#define IDC_RESET_BTN       202
+#define IDC_TOOLBARBTN_LBOX 203
+#define IDC_REMOVE_BTN      204
+#define IDC_HELP_BTN        205
+#define IDC_MOVEUP_BTN      206
+#define IDC_MOVEDN_BTN      207
+
+#define IDS_SEPARATOR      1024
+
+/* Toolbar imagelist bitmaps */
+#define IDB_STD_SMALL       120
+#define IDB_STD_LARGE       121
+#define IDB_VIEW_SMALL      124
+#define IDB_VIEW_LARGE      125
+#define IDB_HIST_SMALL      130
+#define IDB_HIST_LARGE      131
+
+
+/* Month calendar month menu popup */
+#define IDD_MCMONTHMENU     300
+
+#define IDM_JAN                                301
+#define IDM_FEB                                302
+#define IDM_MAR                                303
+#define IDM_APR                                304
+#define IDM_MAY                                305
+#define IDM_JUN                                306
+#define IDM_JUL                                307
+#define IDM_AUG                                308
+#define IDM_SEP                                309
+#define IDM_OCT                                310
+#define IDM_NOV                                311
+#define IDM_DEC                                312
+
+#define IDM_TODAY                      4163
+#define IDM_GOTODAY                    4164
+
+/* Treeview Checkboxes */
+
+#define IDT_CHECK        401
+
+
+/* Header cursors */
+#define IDC_DIVIDER                     106
+#define IDC_DIVIDEROPEN                 107
+
+
+/* DragList resources */
+#define IDI_DRAGARROW                   501
+#define IDC_COPY                        502
+
+#define IDC_MOVEBUTTON                    1
+
+/* HOTKEY internal strings */
+#define HKY_NONE                        2048
+
+/* Tooltip icons */
+#define IDI_TT_INFO_SM                   22
+#define IDI_TT_WARN_SM                   25
+#define IDI_TT_ERROR_SM                  28
+
+typedef struct
+{
+    COLORREF clrBtnHighlight;       /* COLOR_BTNHIGHLIGHT                  */
+    COLORREF clrBtnShadow;          /* COLOR_BTNSHADOW                     */
+    COLORREF clrBtnText;            /* COLOR_BTNTEXT                       */
+    COLORREF clrBtnFace;            /* COLOR_BTNFACE                       */
+    COLORREF clrHighlight;          /* COLOR_HIGHLIGHT                     */
+    COLORREF clrHighlightText;      /* COLOR_HIGHLIGHTTEXT                 */
+    COLORREF clr3dHilight;          /* COLOR_3DHILIGHT                     */
+    COLORREF clr3dShadow;           /* COLOR_3DSHADOW                      */
+    COLORREF clr3dDkShadow;         /* COLOR_3DDKSHADOW                    */
+    COLORREF clr3dFace;             /* COLOR_3DFACE                        */
+    COLORREF clrWindow;             /* COLOR_WINDOW                        */
+    COLORREF clrWindowText;         /* COLOR_WINDOWTEXT                    */
+    COLORREF clrGrayText;           /* COLOR_GREYTEXT                      */
+    COLORREF clrActiveCaption;      /* COLOR_ACTIVECAPTION                 */
+    COLORREF clrInfoBk;             /* COLOR_INFOBK                        */
+    COLORREF clrInfoText;           /* COLOR_INFOTEXT                      */
+} COMCTL32_SysColor;
+
+extern COMCTL32_SysColor  comctl32_color;
+
+/* Internal function */
+HWND COMCTL32_CreateToolTip (HWND);
+VOID COMCTL32_RefreshSysColors(void);
+void COMCTL32_DrawInsertMark(HDC hDC, const RECT *lpRect, COLORREF clrInsertMark, BOOL bHorizontal);
+INT  Str_GetPtrWtoA (LPCWSTR lpSrc, LPSTR lpDest, INT nMaxLen);
+BOOL Str_SetPtrAtoW (LPWSTR *lppDest, LPCSTR lpSrc);
+
+#define COMCTL32_VERSION_MINOR 80
+#define WINE_FILEVERSION 5, COMCTL32_VERSION_MINOR, 0, 0
+#define WINE_FILEVERSIONSTR "5.80"
+
+/* Our internal stack structure of the window procedures to subclass */
+typedef struct _SUBCLASSPROCS {
+    SUBCLASSPROC subproc;
+    UINT_PTR id;
+    DWORD_PTR ref;
+    struct _SUBCLASSPROCS *next;
+} SUBCLASSPROCS, *LPSUBCLASSPROCS;
+
+typedef struct
+{
+   SUBCLASSPROCS *SubclassProcs;
+   SUBCLASSPROCS *stackpos;
+   WNDPROC origproc;
+   int running;
+} SUBCLASS_INFO, *LPSUBCLASS_INFO;
+
+/* undocumented functions */
+
+LPVOID WINAPI Alloc (DWORD);
+LPVOID WINAPI ReAlloc (LPVOID, DWORD);
+BOOL   WINAPI Free (LPVOID);
+DWORD  WINAPI GetSize (LPVOID);
+
+INT  WINAPI Str_GetPtrA (LPCSTR, LPSTR, INT);
+INT  WINAPI Str_GetPtrW (LPCWSTR, LPWSTR, INT);
+
+INT  WINAPI DPA_GetPtrIndex (const HDPA, LPVOID);
+BOOL WINAPI DPA_Grow (const HDPA, INT);
+
+#define DPAM_NOSORT             0x0001
+#define DPAM_INSERT             0x0004
+#define DPAM_DELETE             0x0008
+
+typedef PVOID (CALLBACK *PFNDPAMERGE)(DWORD,PVOID,PVOID,LPARAM);
+BOOL WINAPI DPA_Merge (const HDPA, const HDPA, DWORD, PFNDPACOMPARE, PFNDPAMERGE, LPARAM);
+
+#define DPA_GetPtrCount(hdpa)  (*(INT*)(hdpa))
+
+LRESULT WINAPI SetPathWordBreakProc(HWND hwnd, BOOL bSet);
+BOOL WINAPI MirrorIcon(HICON *phicon1, HICON *phicon2);
+
+extern void ANIMATE_Register(void);
+extern void ANIMATE_Unregister(void);
+extern void COMBOEX_Register(void);
+extern void COMBOEX_Unregister(void);
+extern void DATETIME_Register(void);
+extern void DATETIME_Unregister(void);
+extern void FLATSB_Register(void);
+extern void FLATSB_Unregister(void);
+extern void HEADER_Register(void);
+extern void HEADER_Unregister(void);
+extern void HOTKEY_Register(void);
+extern void HOTKEY_Unregister(void);
+extern void IPADDRESS_Register(void);
+extern void IPADDRESS_Unregister(void);
+extern void LISTVIEW_Register(void);
+extern void LISTVIEW_Unregister(void);
+extern void MONTHCAL_Register(void);
+extern void MONTHCAL_Unregister(void);
+extern void NATIVEFONT_Register(void);
+extern void NATIVEFONT_Unregister(void);
+extern void PAGER_Register(void);
+extern void PAGER_Unregister(void);
+extern void PROGRESS_Register(void);
+extern void PROGRESS_Unregister(void);
+extern void REBAR_Register(void);
+extern void REBAR_Unregister(void);
+extern void STATUS_Register(void);
+extern void STATUS_Unregister(void);
+extern void SYSLINK_Register(void);
+extern void SYSLINK_Unregister(void);
+extern void TAB_Register(void);
+extern void TAB_Unregister(void);
+extern void TOOLBAR_Register(void);
+extern void TOOLBAR_Unregister(void);
+extern void TOOLTIPS_Register(void);
+extern void TOOLTIPS_Unregister(void);
+extern void TRACKBAR_Register(void);
+extern void TRACKBAR_Unregister(void);
+extern void TREEVIEW_Register(void);
+extern void TREEVIEW_Unregister(void);
+extern void UPDOWN_Register(void);
+extern void UPDOWN_Unregister(void);
+
+
+int MONTHCAL_MonthLength(int month, int year);
+
+static inline void MONTHCAL_CopyTime(const SYSTEMTIME *from, SYSTEMTIME *to)
+{
+  to->wYear = from->wYear;
+  to->wMonth = from->wMonth;
+  to->wDayOfWeek = from->wDayOfWeek;
+  to->wDay = from->wDay;
+  to->wHour = from->wHour;
+  to->wMinute = from->wMinute;
+  to->wSecond = from->wSecond;
+  to->wMilliseconds = from->wMilliseconds;
+}
+
+#endif  /* __WINE_COMCTL32_H */