diff --git a/include/wx/msw/htmlhelp.h b/include/wx/msw/htmlhelp.h new file mode 100644 index 0000000000..1bd4065ba4 --- /dev/null +++ b/include/wx/msw/htmlhelp.h @@ -0,0 +1,465 @@ +/* + * wx/msw/htmlhelp.h + * Copyright 2004 Jacek Caban + * + * Originally written for the Wine project, and issued under + * the wxWindows License by kind permission of the author. + * + * License: wxWindows License + */ + +#ifndef __HTMLHELP_H__ +#define __HTMLHELP_H__ + +#define HH_DISPLAY_TOPIC 0x00 +#define HH_HELP_FINDER 0x00 +#define HH_DISPLAY_TOC 0x01 +#define HH_DISPLAY_INDEX 0x02 +#define HH_DISPLAY_SEARCH 0x03 +#define HH_SET_WIN_TYPE 0x04 +#define HH_GET_WIN_TYPE 0x05 +#define HH_GET_WIN_HANDLE 0x06 +#define HH_ENUM_INFO_TYPE 0x07 +#define HH_SET_INFO_TYPE 0x08 +#define HH_SYNC 0x09 +#define HH_RESERVED1 0x0A +#define HH_RESERVED2 0x0B +#define HH_RESERVED3 0x0C +#define HH_KEYWORD_LOOKUP 0x0D +#define HH_DISPLAY_TEXT_POPUP 0x0E +#define HH_HELP_CONTEXT 0x0F +#define HH_TP_HELP_CONTEXTMENU 0x10 +#define HH_TP_HELP_WM_HELP 0x11 +#define HH_CLOSE_ALL 0x12 +#define HH_ALINK_LOOKUP 0x13 +#define HH_GET_LAST_ERROR 0x14 +#define HH_ENUM_CATEGORY 0x15 +#define HH_ENUM_CATEGORY_IT 0x16 +#define HH_RESET_IT_FILTER 0x17 +#define HH_SET_INCLUSIVE_FILTER 0x18 +#define HH_SET_EXCLUSIVE_FILTER 0x19 +#define HH_INITIALIZE 0x1C +#define HH_UNINITIALIZE 0x1D +#define HH_PRETRANSLATEMESSAGE 0xFD +#define HH_SET_GLOBAL_PROPERTY 0xFC + +#define HHWIN_PROP_TAB_AUTOHIDESHOW 0x00000001 +#define HHWIN_PROP_ONTOP 0x00000002 +#define HHWIN_PROP_NOTITLEBAR 0x00000004 +#define HHWIN_PROP_NODEF_STYLES 0x00000008 +#define HHWIN_PROP_NODEF_EXSTYLES 0x00000010 +#define HHWIN_PROP_TRI_PANE 0x00000020 +#define HHWIN_PROP_NOTB_TEXT 0x00000040 +#define HHWIN_PROP_POST_QUIT 0x00000080 +#define HHWIN_PROP_AUTO_SYNC 0x00000100 +#define HHWIN_PROP_TRACKING 0x00000200 +#define HHWIN_PROP_TAB_SEARCH 0x00000400 +#define HHWIN_PROP_TAB_HISTORY 0x00000800 +#define HHWIN_PROP_TAB_FAVORITES 0x00001000 +#define HHWIN_PROP_CHANGE_TITLE 0x00002000 +#define HHWIN_PROP_NAV_ONLY_WIN 0x00004000 +#define HHWIN_PROP_NO_TOOLBAR 0x00008000 +#define HHWIN_PROP_MENU 0x00010000 +#define HHWIN_PROP_TAB_ADVSEARCH 0x00020000 +#define HHWIN_PROP_USER_POS 0x00040000 +#define HHWIN_PROP_TAB_CUSTOM1 0x00080000 +#define HHWIN_PROP_TAB_CUSTOM2 0x00100000 +#define HHWIN_PROP_TAB_CUSTOM3 0x00200000 +#define HHWIN_PROP_TAB_CUSTOM4 0x00400000 +#define HHWIN_PROP_TAB_CUSTOM5 0x00800000 +#define HHWIN_PROP_TAB_CUSTOM6 0x01000000 +#define HHWIN_PROP_TAB_CUSTOM7 0x02000000 +#define HHWIN_PROP_TAB_CUSTOM8 0x04000000 +#define HHWIN_PROP_TAB_CUSTOM9 0x08000000 +#define HHWIN_TB_MARGIN 0x10000000 + +#define HHWIN_PARAM_PROPERTIES 0x00000002 +#define HHWIN_PARAM_STYLES 0x00000004 +#define HHWIN_PARAM_EXSTYLES 0x00000008 +#define HHWIN_PARAM_RECT 0x00000010 +#define HHWIN_PARAM_NAV_WIDTH 0x00000020 +#define HHWIN_PARAM_SHOWSTATE 0x00000040 +#define HHWIN_PARAM_INFOTYPES 0x00000080 +#define HHWIN_PARAM_TB_FLAGS 0x00000100 +#define HHWIN_PARAM_EXPANSION 0x00000200 +#define HHWIN_PARAM_TABPOS 0x00000400 +#define HHWIN_PARAM_TABORDER 0x00000800 +#define HHWIN_PARAM_HISTORY_COUNT 0x00001000 +#define HHWIN_PARAM_CUR_TAB 0x00002000 + +#define HHWIN_BUTTON_EXPAND 0x00000002 +#define HHWIN_BUTTON_BACK 0x00000004 +#define HHWIN_BUTTON_FORWARD 0x00000008 +#define HHWIN_BUTTON_STOP 0x00000010 +#define HHWIN_BUTTON_REFRESH 0x00000020 +#define HHWIN_BUTTON_HOME 0x00000040 +#define HHWIN_BUTTON_BROWSE_FWD 0x00000080 +#define HHWIN_BUTTON_BROWSE_BCK 0x00000100 +#define HHWIN_BUTTON_NOTES 0x00000200 +#define HHWIN_BUTTON_CONTENTS 0x00000400 +#define HHWIN_BUTTON_SYNC 0x00000800 +#define HHWIN_BUTTON_OPTIONS 0x00001000 +#define HHWIN_BUTTON_PRINT 0x00002000 +#define HHWIN_BUTTON_INDEX 0x00004000 +#define HHWIN_BUTTON_SEARCH 0x00008000 +#define HHWIN_BUTTON_HISTORY 0x00010000 +#define HHWIN_BUTTON_FAVORITES 0x00020000 +#define HHWIN_BUTTON_JUMP1 0x00040000 +#define HHWIN_BUTTON_JUMP2 0x00080000 +#define HHWIN_BUTTON_ZOOM 0x00100000 +#define HHWIN_BUTTON_TOC_NEXT 0x00200000 +#define HHWIN_BUTTON_TOC_PREV 0x00400000 + +#define HHWIN_DEF_BUTTONS \ + (HHWIN_BUTTON_EXPAND | HHWIN_BUTTON_BACK | HHWIN_BUTTON_OPTIONS | HHWIN_BUTTON_PRINT) + +#define IDTB_EXPAND 200 +#define IDTB_CONTRACT 201 +#define IDTB_STOP 202 +#define IDTB_REFRESH 203 +#define IDTB_BACK 204 +#define IDTB_HOME 205 +#define IDTB_SYNC 206 +#define IDTB_PRINT 207 +#define IDTB_OPTIONS 208 +#define IDTB_FORWARD 209 +#define IDTB_NOTES 210 +#define IDTB_BROWSE_FWD 211 +#define IDTB_BROWSE_BACK 212 +#define IDTB_CONTENTS 213 +#define IDTB_INDEX 214 +#define IDTB_SEARCH 215 +#define IDTB_HISTORY 216 +#define IDTB_FAVORITES 217 +#define IDTB_JUMP1 218 +#define IDTB_JUMP2 219 +#define IDTB_CUSTOMIZE 221 +#define IDTB_ZOOM 222 +#define IDTB_TOC_NEXT 223 +#define IDTB_TOC_PREV 224 + +#define HHN_FIRST (0U-860U) +#define HHN_LAST (0U-879U) +#define HHN_NAVCOMPLETE HHN_FIRST +#define HHN_TRACK (HHN_FIRST-1) +#define HHN_WINDOW_CREATE (HHN_FIRST-2) + + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct tagHH_NOTIFY { + NMHDR hdr; + PCSTR pszurl; +} HH_NOTIFY; + +typedef struct tagHH_POPUPA { + int cbStruct; + HINSTANCE hinst; + UINT idString; + LPCSTR pszText; + POINT pt; + COLORREF clrForeground; + COLORREF clrBackground; + RECT rcMargins; + LPCSTR pszFont; +} HH_POPUPA; + +typedef struct tagHH_POPUPW { + int cbStruct; + HINSTANCE hinst; + UINT idString; + LPCWSTR pszText; + POINT pt; + COLORREF clrForeground; + COLORREF clrBackground; + RECT rcMargins; + LPCWSTR pszFont; +} HH_POPUPW; + +#ifdef _UNICODE +typedef HH_POPUPW HH_POPUP; +#else +typedef HH_POPUPA HH_POPUP; +#endif + +typedef struct tagHH_ALINKA { + int cbStruct; + BOOL fReserved; + LPCSTR pszKeywords; + LPCSTR pszUrl; + LPCSTR pszMsgText; + LPCSTR pszMsgTitle; + LPCSTR pszWindow; + BOOL fIndexOnFail; +} HH_ALINKA; + +typedef struct tagHH_ALINKW { + int cbStruct; + BOOL fReserved; + LPCWSTR pszKeywords; + LPCWSTR pszUrl; + LPCWSTR pszMsgText; + LPCWSTR pszMsgTitle; + LPCWSTR pszWindow; + BOOL fIndexOnFail; +} HH_ALINKW; + +#ifdef _UNICODE +typedef HH_ALINKW HH_ALINK; +typedef HH_ALINKW HH_AKLINK; +#else +typedef HH_ALINKA HH_ALINK; +typedef HH_ALINKA HH_AKLINK; +#endif + +enum { + HHWIN_NAVTYPE_TOC, + HHWIN_NAVTYPE_INDEX, + HHWIN_NAVTYPE_SEARCH, + HHWIN_NAVTYPE_FAVORITES, + HHWIN_NAVTYPE_HISTORY, + HHWIN_NAVTYPE_AUTHOR, + HHWIN_NAVTYPE_CUSTOM_FIRST = 11 +}; + +enum { + IT_INCLUSIVE, + IT_EXCLUSIVE, + IT_HIDDEN +}; + +typedef struct tagHH_ENUM_IT { + int cbStruct; + int iType; + LPCSTR pszCatName; + LPCSTR pszITName; + LPCSTR pszITDescription; +} HH_ENUM_IT, *PHH_ENUM_IT; + +typedef struct tagHH_ENUM_CAT { + int cbStruct; + LPCSTR pszCatName; + LPCSTR pszCatDescription; +} HH_ENUM_CAT, *PHH_ENUM_CAT; + +typedef struct tagHH_SET_INFOTYPE { + int cbStruct; + LPCSTR pszCatName; + LPCSTR pszInfoTypeName; +} HH_SET_INFOTYPE; + +typedef DWORD HH_INFOTYPE, *PHH_INFOTYPE; + +enum { + HHWIN_NAVTAB_TOP, + HHWIN_NAVTAB_LEFT, + HHWIN_NAVTAB_BOTTOM +}; + +#define HH_MAX_TABS 19 + +enum { + HH_TAB_CONTENTS, + HH_TAB_INDEX, + HH_TAB_SEARCH, + HH_TAB_FAVORITES, + HH_TAB_HISTORY, + HH_TAB_AUTHOR, + HH_TAB_CUSTOM_FIRST = 11, + HH_TAB_CUSTOM_LAST = HH_MAX_TABS +}; + +#define HH_MAX_TABS_CUSTOM (HH_TAB_CUSTOM_LAST-HH_TAB_CUSTOM_FIRST+1) +#define HH_FTS_DEFAULT_PROXIMITY -1 + +typedef struct tagHH_FTS_QUERYA { + int cbStruct; + BOOL fUniCodeStrings; + LPCSTR pszSearchQuery; + LONG iProximity; + BOOL fStemmedSearch; + BOOL fTitleOnly; + BOOL fExecute; + LPCSTR pszWindow; +} HH_FTS_QUERYA; + +typedef struct tagHH_FTS_QUERYW { + int cbStruct; + BOOL fUniCodeStrings; + LPCWSTR pszSearchQuery; + LONG iProximity; + BOOL fStemmedSearch; + BOOL fTitleOnly; + BOOL fExecute; + LPCWSTR pszWindow; +} HH_FTS_QUERYW; + +#ifdef _UNICODE +typedef HH_FTS_QUERYW HH_FTS_QUERY; +#else +typedef HH_FTS_QUERYA HH_FTS_QUERY; +#endif + +typedef struct tagHH_WINTYPEA { + int cbStruct; + BOOL fUniCodeStrings; + LPCSTR pszType; + DWORD fsValidMembers; + DWORD fsWinProperties; + LPCSTR pszCaption; + DWORD dwStyles; + DWORD dwExStyles; + RECT rcWindowPos; + int nShowState; + HWND hwndHelp; + HWND hwndCaller; + PHH_INFOTYPE paInfoTypes; + HWND hwndToolBar; + HWND hwndNavigation; + HWND hwndHTML; + int iNavWidth; + RECT rcHTML; + LPCSTR pszToc; + LPCSTR pszIndex; + LPCSTR pszFile; + LPCSTR pszHome; + DWORD fsToolBarFlags; + BOOL fNotExpanded; + int curNavType; + int tabpos; + int idNotify; + BYTE tabOrder[HH_MAX_TABS+1]; + int cHistory; + LPCSTR pszJump1; + LPCSTR pszJump2; + LPCSTR pszUrlJump1; + LPCSTR pszUrlJump2; + RECT rcMinSize; + int cbInfoTypes; + LPCSTR pszCustomTabs; +} HH_WINTYPEA, *PHH_WINTYPEA; + +typedef struct tagHH_WINTYPEW { + int cbStruct; + BOOL fUniCodeStrings; + LPCWSTR pszType; + DWORD fsValidMembers; + DWORD fsWinProperties; + LPCWSTR pszCaption; + DWORD dwStyles; + DWORD dwExStyles; + RECT rcWindowPos; + int nShowState; + HWND hwndHelp; + HWND hwndCaller; + PHH_INFOTYPE paInfoTypes; + HWND hwndToolBar; + HWND hwndNavigation; + HWND hwndHTML; + int iNavWidth; + RECT rcHTML; + LPCWSTR pszToc; + LPCWSTR pszIndex; + LPCWSTR pszFile; + LPCWSTR pszHome; + DWORD fsToolBarFlags; + BOOL fNotExpanded; + int curNavType; + int tabpos; + int idNotify; + BYTE tabOrder[HH_MAX_TABS+1]; + int cHistory; + LPCWSTR pszJump1; + LPCWSTR pszJump2; + LPCWSTR pszUrlJump1; + LPCWSTR pszUrlJump2; + RECT rcMinSize; + int cbInfoTypes; + LPCWSTR pszCustomTabs; +} HH_WINTYPEW, *PHH_WINTYPEW; + +#ifdef _UNICODE +typedef HH_WINTYPEW HH_WINTYPE; +#else +typedef HH_WINTYPEA HH_WINTYPE; +#endif + +enum { + HHACT_TAB_CONTENTS, + HHACT_TAB_INDEX, + HHACT_TAB_SEARCH, + HHACT_TAB_HISTORY, + HHACT_TAB_FAVORITES, + HHACT_EXPAND, + HHACT_CONTRACT, + HHACT_BACK, + HHACT_FORWARD, + HHACT_STOP, + HHACT_REFRESH, + HHACT_HOME, + HHACT_SYNC, + HHACT_OPTIONS, + HHACT_PRINT, + HHACT_HIGHLIGHT, + HHACT_CUSTOMIZE, + HHACT_JUMP1, + HHACT_JUMP2, + HHACT_ZOOM, + HHACT_TOC_NEXT, + HHACT_TOC_PREV, + HHACT_NOTES, + HHACT_LAST_ENUM +}; + +typedef struct tagHH_NTRACKA { + NMHDR hdr; + PCSTR pszCurUrl; + int idAction; + PHH_WINTYPEA phhWinType; +} HH_NTRACKA; + +typedef struct tagHH_NTRACKW { + NMHDR hdr; + PCSTR pszCurUrl; + int idAction; + PHH_WINTYPEW phhWinType; +} HH_NTRACKW; + +#ifdef _UNICODE +typedef HH_NTRACKW HH_NTRACK; +#else +typedef HH_NTRACKA HH_NTRACK; +#endif + +HWND WINAPI HtmlHelpA(HWND,LPCSTR,UINT,DWORD); +HWND WINAPI HtmlHelpA(HWND,LPCSTR,UINT,DWORD); +#define HtmlHelp WINELIB_NAME_AW(HtmlHelp) + +#define ATOM_HTMLHELP_API_ANSI (LPTSTR)14 +#define ATOM_HTMLHELP_API_UNICODE (LPTSTR)15 + +typedef enum tagHH_GPROPID { + HH_GPROPID_SINGLETHREAD = 1, + HH_GPROPID_TOOLBAR_MARGIN = 2, + HH_GPROPID_UI_LANGUAGE = 3, + HH_GPROPID_CURRENT_SUBSET = 4, + HH_GPROPID_CONTENT_LANGUAGE = 5 +} HH_GPROPID; + +#ifdef __WIDL_OAIDL_H + +typedef struct tagHH_GLOBAL_PROPERTY +{ + HH_GPROPID id; + VARIANT var; +} HH_GLOBAL_PROPERTY ; + +#endif /* __WIDL_OAIDL_H */ + +#ifdef __cplusplus +} +#endif + +#endif /* __HTMLHELP_H__ */ diff --git a/include/wx/msw/missing.h b/include/wx/msw/missing.h index 2e13f61e78..3297e1bd63 100644 --- a/include/wx/msw/missing.h +++ b/include/wx/msw/missing.h @@ -85,66 +85,6 @@ #define VK_OEM_PERIOD 0xBE #endif -// ---------------------------------------------------------------------------- -// MS HTML Help -// Needed by helpchm.cpp -// ---------------------------------------------------------------------------- - -enum -{ - HH_DISPLAY_TOPIC, - HH_DISPLAY_TOC, - HH_DISPLAY_INDEX, - HH_DISPLAY_SEARCH, - HH_SET_WIN_TYPE, - HH_GET_WIN_TYPE, - HH_GET_WIN_HANDLE, - HH_ENUM_INFO_TYPE, - HH_SET_INFO_TYPE, - HH_SYNC, - HH_RESERVED1, - HH_RESERVED2, - HH_RESERVED3, - HH_KEYWORD_LOOKUP, - HH_DISPLAY_TEXT_POPUP, - HH_HELP_CONTEXT, - HH_TP_HELP_CONTEXTMENU, - HH_TP_HELP_WM_HELP, - HH_CLOSE_ALL, - HH_ALINK_LOOKUP, - HH_GET_LAST_ERROR, - HH_ENUM_CATEGORY, - HH_ENUM_CATEGORY_IT, - HH_RESET_IT_FILTER, - HH_SET_INCLUSIVE_FILTER, - HH_SET_EXCLUSIVE_FILTER -}; - -struct HH_POPUP -{ - int cbStruct; - HINSTANCE hinst; - UINT idString; - LPCTSTR pszText; - POINT pt; - COLORREF clrForeground; - COLORREF clrBackground; - RECT rcMargins; - LPCTSTR pszFont; -}; - -struct HH_AKLINK -{ - int cbStruct; - BOOL fReserved; - LPCTSTR pszKeywords; - LPCTSTR pszUrl; - LPCTSTR pszMsgText; - LPCTSTR pszMsgTitle; - LPCTSTR pszWindow; - BOOL fIndexOnFail; -}; - // ---------------------------------------------------------------------------- // ListView common control // Needed by listctrl.cpp @@ -256,6 +196,15 @@ struct HH_AKLINK #ifndef CFM_BACKCOLOR #define CFM_BACKCOLOR 0x04000000 #endif + +#if !defined(CCS_VERT) +#define CCS_VERT 0x00000080L +#endif + +#if !defined(TB_SETDISABLEDIMAGELIST) + #define TB_SETDISABLEDIMAGELIST (WM_USER + 54) +#endif // !defined(TB_SETDISABLEDIMAGELIST) + #endif /* diff --git a/include/wx/msw/uxtheme.h b/include/wx/msw/uxtheme.h index f462ec9a0a..c21cd3912d 100644 --- a/include/wx/msw/uxtheme.h +++ b/include/wx/msw/uxtheme.h @@ -19,138 +19,55 @@ #include "wx/defs.h" #include "wx/msw/wrapwin.h" +#include "wx/msw/uxthemep.h" -typedef void* WXHTHEME; -typedef long WXUHRESULT; -typedef WXHTHEME (__stdcall *PFNWXUOPENTHEMEDATA)(WXHWND, const wchar_t *); -typedef WXUHRESULT (__stdcall *PFNWXUCLOSETHEMEDATA)(WXHTHEME); -typedef WXUHRESULT (__stdcall *PFNWXUDRAWTHEMEBACKGROUND)(WXHTHEME, WXHDC, - int, int, const RECT *, const RECT *); -#define WXU_DTT_GRAYED 0x1 -typedef WXUHRESULT (__stdcall *PFNWXUDRAWTHEMETEXT)(WXHTHEME, WXHDC, int, - int, const wchar_t *, int, DWORD, - DWORD, const RECT *); -typedef WXUHRESULT (__stdcall *PFNWXUGETTHEMEBACKGROUNDCONTENTRECT)(WXHTHEME, WXHDC, - int, int, const RECT *, RECT *); -typedef WXUHRESULT (__stdcall *PFNWXUGETTHEMEBACKGROUNDEXTENT)(WXHTHEME, WXHDC, int, int, - const RECT *, RECT *); - -enum WXUTHEMESIZE -{ - WXU_TS_MIN, - WXU_TS_TRUE, - WXU_TS_DRAW -}; - -typedef WXUHRESULT (__stdcall *PFNWXUGETTHEMEPARTSIZE)(WXHTHEME, WXHDC, int, int, const RECT *, - enum WXUTHEMESIZE, SIZE *); -typedef WXUHRESULT (__stdcall *PFNWXUGETTHEMETEXTEXTENT)(WXHTHEME, WXHDC, int, int, const wchar_t *, - int, WXDWORD, const RECT *, RECT *); -typedef WXUHRESULT (__stdcall *PFNWXUGETTHEMETEXTMETRICS)(WXHTHEME, WXHDC, - int, int, TEXTMETRIC*); -typedef WXUHRESULT (__stdcall *PFNWXUGETTHEMEBACKGROUNDREGION)(WXHTHEME, WXHDC, - int, int, const RECT *, WXHRGN *); - -#define WXU_HTTB_BACKGROUNDSEG 0x0000 -#define WXU_HTTB_FIXEDBORDER 0x0002 -#define WXU_HTTB_CAPTION 0x0004 -#define WXU_HTTB_RESIZINGBORDER_LEFT 0x0010 -#define WXU_HTTB_RESIZINGBORDER_TOP 0x0020 -#define WXU_HTTB_RESIZINGBORDER_RIGHT 0x0040 -#define WXU_HTTB_RESIZINGBORDER_BOTTOM 0x0080 -#define WXU_HTTB_RESIZINGBORDER 0x00F0 -#define WXU_HTTB_SIZINGTEMPLATE 0x0100 -#define WXU_HTTB_SYSTEMSIZINGMARGINS 0x0200 - -typedef WXUHRESULT (__stdcall *PFNWXUHITTESTTHEMEBACKGROUND)(WXHTHEME, WXHDC, int, - int, WXDWORD, const RECT *, WXHRGN, - POINT, unsigned short *); -typedef WXUHRESULT (__stdcall *PFNWXUDRAWTHEMEEDGE)(WXHTHEME, WXHDC, int, int, - const RECT *, unsigned int, unsigned int, RECT *); -typedef WXUHRESULT (__stdcall *PFNWXUDRAWTHEMEICON)(WXHTHEME, WXHDC, int, int, - const RECT *, WXHIMAGELIST, int); -typedef BOOL (__stdcall *PFNWXUISTHEMEPARTDEFINED)(WXHTHEME, int, int); -typedef BOOL (__stdcall *PFNWXUISTHEMEBACKGROUNDPARTIALLYTRANSPARENT)(WXHTHEME, int, int); -typedef WXUHRESULT (__stdcall *PFNWXUGETTHEMECOLOR)(WXHTHEME, int, int, int, WXCOLORREF*); -typedef WXUHRESULT (__stdcall *PFNWXUGETTHEMEMETRIC)(WXHTHEME, WXHDC, int, - int, int, int *); -typedef WXUHRESULT (__stdcall *PFNWXUGETTHEMESTRING)(WXHTHEME, int, - int, int, wchar_t *, int); -typedef WXUHRESULT (__stdcall *PFNWXUGETTHEMEBOOL)(WXHTHEME, int, int, int, BOOL *); -typedef WXUHRESULT (__stdcall *PFNWXUGETTHEMEINT)(WXHTHEME, int, int, int, int *); -typedef WXUHRESULT (__stdcall *PFNWXUGETTHEMEENUMVALUE)(WXHTHEME, int, int, int, int *); -typedef WXUHRESULT (__stdcall *PFNWXUGETTHEMEPOSITION)(WXHTHEME, int, int, int, POINT *); -typedef WXUHRESULT (__stdcall *PFNWXUGETTHEMEFONT)(WXHTHEME, WXHDC, int, int, int, LOGFONT *); -typedef WXUHRESULT (__stdcall *PFNWXUGETTHEMERECT)(WXHTHEME, int, int, int, RECT *); -typedef struct _WXUMARGINS -{ - int cxLeftWidth; - int cxRightWidth; - int cyTopHeight; - int cyBottomHeight; -} WXUMARGINS, *PWXUMARGINS; -typedef WXUHRESULT (__stdcall *PFNWXUGETTHEMEMARGINS)(WXHTHEME, WXHDC, int, - int, int, RECT *, WXUMARGINS *); - -#define WXU_MAX_INTLIST_COUNT 10 -typedef struct _WXUINTLIST -{ - int iValueCount; - int iValues[WXU_MAX_INTLIST_COUNT]; -} WXUINTLIST, *PWXUINTLIST; -typedef WXUHRESULT (__stdcall *PFNWXUGETTHEMEINTLIST)(WXHTHEME, int, - int, int, WXUINTLIST*); - -enum WXUPROPERTYORIGIN -{ - WXU_PO_STATE, - WXU_PO_PART, - WXU_PO_CLASS, - WXU_PO_GLOBAL, - WXU_PO_NOTFOUND -}; - -typedef WXUHRESULT (__stdcall *PFNWXUGETTHEMEPROPERTYORIGIN)(WXHTHEME, int, - int, int, enum WXUPROPERTYORIGIN *); -typedef WXUHRESULT (__stdcall *PFNWXUSETWINDOWTHEME)(WXHWND, const wchar_t*, const wchar_t *); -typedef WXUHRESULT (__stdcall *PFNWXUGETTHEMEFILENAME)(WXHTHEME, int, int, int, wchar_t *, int); -typedef WXCOLORREF (__stdcall *PFNWXUGETTHEMESYSCOLOR)(WXHTHEME, int); -typedef WXHBRUSH (__stdcall *PFNWXUGETTHEMESYSCOLORBRUSH)(WXHTHEME, int); -typedef BOOL (__stdcall *PFNWXUGETTHEMESYSBOOL)(WXHTHEME, int); -typedef int (__stdcall *PFNWXUGETTHEMESYSSIZE)(WXHTHEME, int); -typedef WXUHRESULT (__stdcall *PFNWXUGETTHEMESYSFONT)(WXHTHEME, int, LOGFONT *); -typedef WXUHRESULT (__stdcall *PFNWXUGETTHEMESYSSTRING)(WXHTHEME, int, wchar_t *, int); -typedef WXUHRESULT (__stdcall *PFNWXUGETTHEMESYSINT)(WXHTHEME, int, int *); -typedef BOOL (__stdcall *PFNWXUISTHEMEACTIVE)(); -typedef BOOL (__stdcall *PFNWXUISAPPTHEMED)(); -typedef WXHTHEME (__stdcall *PFNWXUGETWINDOWTHEME)(WXHWND); - -#define WXU_ETDT_DISABLE 0x00000001 -#define WXU_ETDT_ENABLE 0x00000002 -#define WXU_ETDT_USETABTEXTURE 0x00000004 -#define WXU_ETDT_ENABLETAB 0x00000006 - -typedef WXUHRESULT (__stdcall *PFNWXUENABLETHEMEDIALOGTEXTURE)(WXHWND, WXDWORD); -typedef BOOL (__stdcall *PFNWXUISTHEMEDIALOGTEXTUREENABLED)(WXHWND); - -#define WXU_STAP_ALLOW_NONCLIENT 1 -#define WXU_STAP_ALLOW_CONTROLS 2 -#define WXU_STAP_ALLOW_WEBCONTENT 4 - -typedef WXDWORD (__stdcall *PFNWXUGETTHEMEAPPPROPERTIES)(); -typedef void (__stdcall *PFNWXUSETTHEMEAPPPROPERTIES)(WXDWORD); -typedef WXUHRESULT (__stdcall *PFNWXUGETCURRENTTHEMENAME)(wchar_t *, int, - wchar_t *, int, wchar_t *, int); - -#define WXU_SZ_THDOCPROP_DISPLAYNAME L"DisplayName" -#define WXU_SZ_THDOCPROP_CANONICALNAME L"ThemeName" -#define WXU_SZ_THDOCPROP_TOOLTIP L"ToolTip" -#define WXU_SZ_THDOCPROP_AUTHOR L"author" - -typedef WXUHRESULT (__stdcall *PFNWXUGETTHEMEDOCUMENTATIONPROPERTY)(const wchar_t *, - const wchar_t *, wchar_t *, int); -typedef WXUHRESULT (__stdcall *PFNWXUDRAWTHEMEPARENTBACKGROUND)(WXHWND, WXHDC, RECT *); -typedef WXUHRESULT (__stdcall *PFNWXUENABLETHEMING)(BOOL); +typedef HTHEME (__stdcall *PFNWXUOPENTHEMEDATA)(HWND, const wchar_t *); +typedef HRESULT (__stdcall *PFNWXUCLOSETHEMEDATA)(HTHEME); +typedef HRESULT (__stdcall *PFNWXUDRAWTHEMEBACKGROUND)(HTHEME, HDC, int, int, const RECT *, const RECT *); +typedef HRESULT (__stdcall *PFNWXUDRAWTHEMETEXT)(HTHEME, HDC, int, int, const wchar_t *, int, DWORD, DWORD, const RECT *); +typedef HRESULT (__stdcall *PFNWXUGETTHEMEBACKGROUNDCONTENTRECT)(HTHEME, HDC, int, int, const RECT *, RECT *); +typedef HRESULT (__stdcall *PFNWXUGETTHEMEBACKGROUNDEXTENT)(HTHEME, HDC, int, int, const RECT *, RECT *); +typedef HRESULT (__stdcall *PFNWXUGETTHEMEPARTSIZE)(HTHEME, HDC, int, int, const RECT *, /* enum */ THEMESIZE, SIZE *); +typedef HRESULT (__stdcall *PFNWXUGETTHEMETEXTEXTENT)(HTHEME, HDC, int, int, const wchar_t *, int, DWORD, const RECT *, RECT *); +typedef HRESULT (__stdcall *PFNWXUGETTHEMETEXTMETRICS)(HTHEME, HDC, int, int, TEXTMETRIC*); +typedef HRESULT (__stdcall *PFNWXUGETTHEMEBACKGROUNDREGION)(HTHEME, HDC, int, int, const RECT *, HRGN *); +typedef HRESULT (__stdcall *PFNWXUHITTESTTHEMEBACKGROUND)(HTHEME, HDC, int, int, DWORD, const RECT *, HRGN, POINT, unsigned short *); +typedef HRESULT (__stdcall *PFNWXUDRAWTHEMEEDGE)(HTHEME, HDC, int, int, const RECT *, unsigned int, unsigned int, RECT *); +typedef HRESULT (__stdcall *PFNWXUDRAWTHEMEICON)(HTHEME, HDC, int, int, const RECT *, HIMAGELIST, int); +typedef BOOL (__stdcall *PFNWXUISTHEMEPARTDEFINED)(HTHEME, int, int); +typedef BOOL (__stdcall *PFNWXUISTHEMEBACKGROUNDPARTIALLYTRANSPARENT)(HTHEME, int, int); +typedef HRESULT (__stdcall *PFNWXUGETTHEMECOLOR)(HTHEME, int, int, int, COLORREF*); +typedef HRESULT (__stdcall *PFNWXUGETTHEMEMETRIC)(HTHEME, HDC, int, int, int, int *); +typedef HRESULT (__stdcall *PFNWXUGETTHEMESTRING)(HTHEME, int, int, int, wchar_t *, int); +typedef HRESULT (__stdcall *PFNWXUGETTHEMEBOOL)(HTHEME, int, int, int, BOOL *); +typedef HRESULT (__stdcall *PFNWXUGETTHEMEINT)(HTHEME, int, int, int, int *); +typedef HRESULT (__stdcall *PFNWXUGETTHEMEENUMVALUE)(HTHEME, int, int, int, int *); +typedef HRESULT (__stdcall *PFNWXUGETTHEMEPOSITION)(HTHEME, int, int, int, POINT *); +typedef HRESULT (__stdcall *PFNWXUGETTHEMEFONT)(HTHEME, HDC, int, int, int, LOGFONT *); +typedef HRESULT (__stdcall *PFNWXUGETTHEMERECT)(HTHEME, int, int, int, RECT *); +typedef HRESULT (__stdcall *PFNWXUGETTHEMEMARGINS)(HTHEME, HDC, int, int, int, RECT *, MARGINS *); +typedef HRESULT (__stdcall *PFNWXUGETTHEMEINTLIST)(HTHEME, int, int, int, INTLIST*); +typedef HRESULT (__stdcall *PFNWXUGETTHEMEPROPERTYORIGIN)(HTHEME, int, int, int, /* enum */ PROPERTYORIGIN *); +typedef HRESULT (__stdcall *PFNWXUSETWINDOWTHEME)(HWND, const wchar_t*, const wchar_t *); +typedef HRESULT (__stdcall *PFNWXUGETTHEMEFILENAME)(HTHEME, int, int, int, wchar_t *, int); +typedef COLORREF(__stdcall *PFNWXUGETTHEMESYSCOLOR)(HTHEME, int); +typedef HBRUSH (__stdcall *PFNWXUGETTHEMESYSCOLORBRUSH)(HTHEME, int); +typedef BOOL (__stdcall *PFNWXUGETTHEMESYSBOOL)(HTHEME, int); +typedef int (__stdcall *PFNWXUGETTHEMESYSSIZE)(HTHEME, int); +typedef HRESULT (__stdcall *PFNWXUGETTHEMESYSFONT)(HTHEME, int, LOGFONT *); +typedef HRESULT (__stdcall *PFNWXUGETTHEMESYSSTRING)(HTHEME, int, wchar_t *, int); +typedef HRESULT (__stdcall *PFNWXUGETTHEMESYSINT)(HTHEME, int, int *); +typedef BOOL (__stdcall *PFNWXUISTHEMEACTIVE)(); +typedef BOOL (__stdcall *PFNWXUISAPPTHEMED)(); +typedef HTHEME (__stdcall *PFNWXUGETWINDOWTHEME)(HWND); +typedef HRESULT (__stdcall *PFNWXUENABLETHEMEDIALOGTEXTURE)(HWND, DWORD); +typedef BOOL (__stdcall *PFNWXUISTHEMEDIALOGTEXTUREENABLED)(HWND); +typedef DWORD (__stdcall *PFNWXUGETTHEMEAPPPROPERTIES)(); +typedef void (__stdcall *PFNWXUSETTHEMEAPPPROPERTIES)(DWORD); +typedef HRESULT (__stdcall *PFNWXUGETCURRENTTHEMENAME)(wchar_t *, int, wchar_t *, int, wchar_t *, int); +typedef HRESULT (__stdcall *PFNWXUGETTHEMEDOCUMENTATIONPROPERTY)(const wchar_t *, const wchar_t *, wchar_t *, int); +typedef HRESULT (__stdcall *PFNWXUDRAWTHEMEPARENTBACKGROUND)(HWND, HDC, RECT *); +typedef HRESULT (__stdcall *PFNWXUENABLETHEMING)(BOOL); // ---------------------------------------------------------------------------- // wxUxThemeEngine: provides all theme functions from uxtheme.dll @@ -294,11 +211,11 @@ public: wxUxThemeEngine *engine = wxUxThemeEngine::Get(); m_hTheme = - engine ? (WXHTHEME)engine->OpenThemeData(win->GetHWND(), classes) + engine ? (HTHEME)engine->OpenThemeData((HWND) win->GetHWND(), classes) : NULL; } - operator WXHTHEME() const { return m_hTheme; } + operator HTHEME() const { return m_hTheme; } ~wxUxThemeHandle() { @@ -309,7 +226,7 @@ public: } private: - WXHTHEME m_hTheme; + HTHEME m_hTheme; DECLARE_NO_COPY_CLASS(wxUxThemeHandle) }; diff --git a/include/wx/msw/uxthemep.h b/include/wx/msw/uxthemep.h new file mode 100644 index 0000000000..66b92bd172 --- /dev/null +++ b/include/wx/msw/uxthemep.h @@ -0,0 +1,169 @@ +/* + * Win32 5.1 theme definitions + * + * Copyright (C) 2003 Kevin Koltzau + * + * Originally written for the Wine project, and issued under + * the wxWindows License by kind permission of the author. + * + * License: wxWindows License + */ + +#ifndef __WINE_UXTHEME_H +#define __WINE_UXTHEME_H + +#include + +typedef HANDLE HTHEME; + +HRESULT WINAPI CloseThemeData(HTHEME hTheme); +HRESULT WINAPI DrawThemeBackground(HTHEME,HDC,int,int,const RECT*,const RECT*); + +#define DTBG_CLIPRECT 0x00000001 +#define DTBG_DRAWSOLID 0x00000002 +#define DTBG_OMITBORDER 0x00000004 +#define DTBG_OMITCONTENT 0x00000008 +#define DTBG_COMPUTINGREGION 0x00000010 +#define DTBG_MIRRORDC 0x00000020 + +typedef struct _DTBGOPTS { + DWORD dwSize; + DWORD dwFlags; + RECT rcClip; +} DTBGOPTS, *PDTBGOPTS; + +HRESULT WINAPI DrawThemeBackgroundEx(HTHEME,HDC,int,int,const RECT*, + const DTBGOPTS*); +HRESULT WINAPI DrawThemeEdge(HTHEME,HDC,int,int,const RECT*,UINT,UINT, + RECT*); +HRESULT WINAPI DrawThemeIcon(HTHEME,HDC,int,int,const RECT*,HIMAGELIST,int); +HRESULT WINAPI DrawThemeParentBackground(HWND,HDC,RECT*); + +#define DTT_GRAYED 0x1 + +HRESULT WINAPI DrawThemeText(HTHEME,HDC,int,int,LPCWSTR,int,DWORD,DWORD, + const RECT*); + +#define ETDT_DISABLE 0x00000001 +#define ETDT_ENABLE 0x00000002 +#define ETDT_USETABTEXTURE 0x00000004 +#define ETDT_ENABLETAB (ETDT_ENABLE|ETDT_USETABTEXTURE) + +HRESULT WINAPI EnableThemeDialogTexture(HWND,DWORD); +HRESULT WINAPI EnableTheming(BOOL); +HRESULT WINAPI GetCurrentThemeName(LPWSTR,int,LPWSTR,int,LPWSTR,int); + +#define STAP_ALLOW_NONCLIENT (1<<0) +#define STAP_ALLOW_CONTROLS (1<<1) +#define STAP_ALLOW_WEBCONTENT (1<<2) + +DWORD WINAPI GetThemeAppProperties(void); +HRESULT WINAPI GetThemeBackgroundContentRect(HTHEME,HDC,int,int, + const RECT*,RECT*); +HRESULT WINAPI GetThemeBackgroundExtent(HTHEME,HDC,int,int,const RECT*,RECT*); +HRESULT WINAPI GetThemeBackgroundRegion(HTHEME,HDC,int,int,const RECT*,HRGN*); +HRESULT WINAPI GetThemeBool(HTHEME,int,int,int,BOOL*); +HRESULT WINAPI GetThemeColor(HTHEME,int,int,int,COLORREF*); + +#if defined(__GNUC__) +# define SZ_THDOCPROP_DISPLAYNAME (const WCHAR []){ 'D','i','s','p','l','a','y','N','a','m','e',0 } +# define SZ_THDOCPROP_CANONICALNAME (const WCHAR []){ 'T','h','e','m','e','N','a','m','e',0 } +# define SZ_THDOCPROP_TOOLTIP (const WCHAR []){ 'T','o','o','l','T','i','p',0 } +# define SZ_THDOCPROP_AUTHOR (const WCHAR []){ 'a','u','t','h','o','r',0 } +#else /* lif defined(_MSC_VER) */ +# define SZ_THDOCPROP_DISPLAYNAME L"DisplayName" +# define SZ_THDOCPROP_CANONICALNAME L"ThemeName" +# define SZ_THDOCPROP_TOOLTIP L"ToolTip" +# define SZ_THDOCPROP_AUTHOR L"author" +/* +#else +static const WCHAR SZ_THDOCPROP_DISPLAYNAME[] = { 'D','i','s','p','l','a','y','N','a','m','e',0 }; +static const WCHAR SZ_THDOCPROP_CANONICALNAME[] = { 'T','h','e','m','e','N','a','m','e',0 }; +static const WCHAR SZ_THDOCPROP_TOOLTIP[] = { 'T','o','o','l','T','i','p',0 }; +static const WCHAR SZ_THDOCPROP_AUTHOR[] = { 'a','u','t','h','o','r',0 }; +*/ +#endif + +HRESULT WINAPI GetThemeDocumentationProperty(LPCWSTR,LPCWSTR,LPWSTR,int); +HRESULT WINAPI GetThemeEnumValue(HTHEME,int,int,int,int*); +HRESULT WINAPI GetThemeFilename(HTHEME,int,int,int,LPWSTR,int); +HRESULT WINAPI GetThemeFont(HTHEME,HDC,int,int,int,LOGFONTW*); +HRESULT WINAPI GetThemeInt(HTHEME,int,int,int,int*); + +#define MAX_INTLIST_COUNT 10 +typedef struct _INTLIST { + int iValueCount; + int iValues[MAX_INTLIST_COUNT]; +} INTLIST, *PINTLIST; + +HRESULT WINAPI GetThemeIntList(HTHEME,int,int,int,INTLIST*); + +typedef struct _MARGINS { + int cxLeftWidth; + int cxRightWidth; + int cyTopHeight; + int cyBottomHeight; +} MARGINS, *PMARGINS; + +HRESULT WINAPI GetThemeMargins(HTHEME,HDC,int,int,int,RECT*,MARGINS*); +HRESULT WINAPI GetThemeMetric(HTHEME,HDC,int,int,int,int*); + +typedef enum { + TS_MIN, + TS_TRUE, + TS_DRAW +} THEMESIZE; + +HRESULT WINAPI GetThemePartSize(HTHEME,HDC,int,int,RECT*,THEMESIZE,SIZE*); +HRESULT WINAPI GetThemePosition(HTHEME,int,int,int,POINT*); + +typedef enum { + PO_STATE, + PO_PART, + PO_CLASS, + PO_GLOBAL, + PO_NOTFOUND +} PROPERTYORIGIN; + +HRESULT WINAPI GetThemePropertyOrigin(HTHEME,int,int,int,PROPERTYORIGIN*); +HRESULT WINAPI GetThemeRect(HTHEME,int,int,int,RECT*); +HRESULT WINAPI GetThemeString(HTHEME,int,int,int,LPWSTR,int); +BOOL WINAPI GetThemeSysBool(HTHEME,int); +COLORREF WINAPI GetThemeSysColor(HTHEME,int); +HBRUSH WINAPI GetThemeSysColorBrush(HTHEME,int); +HRESULT WINAPI GetThemeSysFont(HTHEME,int,LOGFONTW*); +HRESULT WINAPI GetThemeSysInt(HTHEME,int,int*); +int WINAPI GetThemeSysSize(HTHEME,int); +HRESULT WINAPI GetThemeSysString(HTHEME,int,LPWSTR,int); +HRESULT WINAPI GetThemeTextExtent(HTHEME,HDC,int,int,LPCWSTR,int,DWORD, + const RECT*,RECT*); +HRESULT WINAPI GetThemeTextMetrics(HTHEME,HDC,int,int,TEXTMETRICW*); +HTHEME WINAPI GetWindowTheme(HWND); + +#define HTTB_BACKGROUNDSEG 0x0000 +#define HTTB_FIXEDBORDER 0x0002 +#define HTTB_CAPTION 0x0004 +#define HTTB_RESIZINGBORDER_LEFT 0x0010 +#define HTTB_RESIZINGBORDER_TOP 0x0020 +#define HTTB_RESIZINGBORDER_RIGHT 0x0040 +#define HTTB_RESIZINGBORDER_BOTTOM 0x0080 +#define HTTB_RESIZINGBORDER \ + (HTTB_RESIZINGBORDER_LEFT|HTTB_RESIZINGBORDER_TOP|\ + HTTB_RESIZINGBORDER_RIGHT|HTTB_RESIZINGBORDER_BOTTOM) +#define HTTB_SIZINGTEMPLATE 0x0100 +#define HTTB_SYSTEMSIZINGMARGINS 0x0200 + +HRESULT WINAPI HitTestThemeBackground(HTHEME,HDC,int,int,DWORD,const RECT*, + HRGN,POINT,WORD*); +BOOL WINAPI IsAppThemed(void); +BOOL WINAPI IsThemeActive(void); +BOOL WINAPI IsThemeBackgroundPartiallyTransparent(HTHEME,int,int); +BOOL WINAPI IsThemeDialogTextureEnabled(void); +BOOL WINAPI IsThemePartDefined(HTHEME,int,int); +HTHEME WINAPI OpenThemeData(HWND,LPCWSTR); +void WINAPI SetThemeAppProperties(DWORD); +HRESULT WINAPI SetWindowTheme(HWND,LPCWSTR,LPCWSTR); + + +#endif + diff --git a/src/msw/helpchm.cpp b/src/msw/helpchm.cpp index 9e8c8846fa..7a5f3cb6f9 100644 --- a/src/msw/helpchm.cpp +++ b/src/msw/helpchm.cpp @@ -33,7 +33,7 @@ #endif #include "wx/msw/private.h" -#include "wx/msw/missing.h" +#include "wx/msw/htmlhelp.h" // ---------------------------------------------------------------------------- // utility functions to manage the loading/unloading diff --git a/src/msw/notebook.cpp b/src/msw/notebook.cpp index c8663ee71d..8eb710fbe4 100644 --- a/src/msw/notebook.cpp +++ b/src/msw/notebook.cpp @@ -1045,7 +1045,7 @@ bool wxNotebook::DoDrawBackground(WXHDC hDC, wxWindow *child) wxUxThemeEngine::Get()->DrawThemeBackground ( theme, - hDC, + (HDC) hDC, 9 /* TABP_PANE */, 0, &rc, diff --git a/src/msw/renderer.cpp b/src/msw/renderer.cpp index 610e58ef1b..3f0c50eb13 100644 --- a/src/msw/renderer.cpp +++ b/src/msw/renderer.cpp @@ -196,7 +196,7 @@ wxRendererXP::DrawComboBoxDropButton(wxWindow * win, wxUxThemeEngine::Get()->DrawThemeBackground ( hTheme, - dc.GetHDC(), + (HDC) dc.GetHDC(), CP_DROPDOWNBUTTON, state, &r, @@ -265,8 +265,8 @@ wxRendererXP::DrawSplitterSash(wxWindow *win, wxUxThemeEngine::Get()->DrawThemeBackground ( - (WXHTHEME)hTheme, - dc.GetHDC(), + hTheme, + (HDC) dc.GetHDC(), 29, // WP_DIALOG: dlg background 0, // no particular state &rect,