From 6e72b2614acea08aad579f38d796d36fa7028638 Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Thu, 22 Feb 2007 22:45:16 +0100 Subject: [PATCH] hhctrl.ocx: Merge chm.h and webbrowser.h to hhctrl.h. --- dlls/hhctrl.ocx/chm.c | 15 +------ dlls/hhctrl.ocx/chm.h | 37 ---------------- dlls/hhctrl.ocx/help.c | 13 +----- dlls/hhctrl.ocx/hhctrl.c | 11 ++--- dlls/hhctrl.ocx/{webbrowser.h => hhctrl.h} | 49 ++++++++++++++++------ dlls/hhctrl.ocx/webbrowser.c | 12 +----- 6 files changed, 43 insertions(+), 94 deletions(-) delete mode 100644 dlls/hhctrl.ocx/chm.h rename dlls/hhctrl.ocx/{webbrowser.h => hhctrl.h} (63%) diff --git a/dlls/hhctrl.ocx/chm.c b/dlls/hhctrl.ocx/chm.c index 2c2f8e7d604..c59fd71f9e7 100644 --- a/dlls/hhctrl.ocx/chm.c +++ b/dlls/hhctrl.ocx/chm.c @@ -18,20 +18,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include - -#define COBJMACROS - -#include "windef.h" -#include "winbase.h" -#include "winuser.h" -#include "winnls.h" -#include "winreg.h" -#include "ole2.h" -#include "htmlhelp.h" - -#include "initguid.h" -#include "chm.h" +#include "hhctrl.h" static LPWSTR CHM_ANSIToUnicode(LPCSTR ansi) { diff --git a/dlls/hhctrl.ocx/chm.h b/dlls/hhctrl.ocx/chm.h deleted file mode 100644 index 72f7e812117..00000000000 --- a/dlls/hhctrl.ocx/chm.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * CHM Utility API - * - * Copyright 2005 James Hawkins - * - * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#ifndef CHM_H -#define CHM_H - -#include "wine/itss.h" - -typedef struct CHMInfo -{ - IITStorage *pITStorage; - IStorage *pStorage; - LPCWSTR szFile; -} CHMInfo; - -BOOL CHM_OpenCHM(CHMInfo *pCHMInfo, LPCWSTR szFile); -BOOL CHM_LoadWinTypeFromCHM(CHMInfo *pCHMInfo, HH_WINTYPEW *pHHWinType); -void CHM_CloseCHM(CHMInfo *pCHMInfo); - -#endif diff --git a/dlls/hhctrl.ocx/help.c b/dlls/hhctrl.ocx/help.c index 15b023dc700..beb62856083 100644 --- a/dlls/hhctrl.ocx/help.c +++ b/dlls/hhctrl.ocx/help.c @@ -18,27 +18,16 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include +#include "hhctrl.h" -#define COBJMACROS - -#include "windef.h" -#include "winbase.h" #include "wingdi.h" -#include "winuser.h" -#include "winnls.h" #include "commctrl.h" -#include "htmlhelp.h" -#include "ole2.h" -#include "exdisp.h" #include "wininet.h" #include "wine/unicode.h" #include "wine/debug.h" #include "resource.h" -#include "chm.h" -#include "webbrowser.h" WINE_DEFAULT_DEBUG_CHANNEL(htmlhelp); diff --git a/dlls/hhctrl.ocx/hhctrl.c b/dlls/hhctrl.ocx/hhctrl.c index be9f597921a..2881da06880 100644 --- a/dlls/hhctrl.ocx/hhctrl.c +++ b/dlls/hhctrl.ocx/hhctrl.c @@ -18,15 +18,10 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include -#include -#include "windef.h" -#include "winbase.h" -#include "wingdi.h" -#include "winnls.h" -#include "winuser.h" #include "wine/debug.h" -#include "htmlhelp.h" + +#define INIT_GUID +#include "hhctrl.h" WINE_DEFAULT_DEBUG_CHANNEL(htmlhelp); diff --git a/dlls/hhctrl.ocx/webbrowser.h b/dlls/hhctrl.ocx/hhctrl.h similarity index 63% rename from dlls/hhctrl.ocx/webbrowser.h rename to dlls/hhctrl.ocx/hhctrl.h index c17274fb0a4..17e5ac8ce5d 100644 --- a/dlls/hhctrl.ocx/webbrowser.h +++ b/dlls/hhctrl.ocx/hhctrl.h @@ -1,6 +1,4 @@ /* - * WebBrowser Include - * * Copyright 2005 James Hawkins * * This library is free software; you can redistribute it and/or @@ -18,19 +16,42 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#ifndef __WINE_WEBBROWSER_H -#define __WINE_WEBBROWSER_H +#ifndef HHCTRL_H +#define HHCTRL_H +#include + +#define COBJMACROS + +#include "windef.h" +#include "winbase.h" +#include "winuser.h" +#include "winnls.h" +#include "htmlhelp.h" +#include "ole2.h" #include "exdisp.h" -#include "mshtml.h" #include "mshtmhst.h" -#define WB_GOBACK 0 -#define WB_GOFORWARD 1 -#define WB_GOHOME 2 -#define WB_SEARCH 3 -#define WB_REFRESH 4 -#define WB_STOP 5 +#ifdef INIT_GUID +#include "initguid.h" +#endif + +#include "wine/itss.h" + +#define WB_GOBACK 0 +#define WB_GOFORWARD 1 +#define WB_GOHOME 2 +#define WB_SEARCH 3 +#define WB_REFRESH 4 +#define WB_STOP 5 + +typedef struct CHMInfo +{ + IITStorage *pITStorage; + IStorage *pStorage; + LPCWSTR szFile; +} CHMInfo; + typedef struct WBInfo { @@ -45,4 +66,8 @@ void WB_UnEmbedBrowser(WBInfo *pWBInfo); void WB_ResizeBrowser(WBInfo *pWBInfo, DWORD dwWidth, DWORD dwHeight); void WB_DoPageAction(WBInfo *pWBInfo, DWORD dwAction); -#endif /* __WINE_WEBBROWSER_H */ +BOOL CHM_OpenCHM(CHMInfo *pCHMInfo, LPCWSTR szFile); +BOOL CHM_LoadWinTypeFromCHM(CHMInfo *pCHMInfo, HH_WINTYPEW *pHHWinType); +void CHM_CloseCHM(CHMInfo *pCHMInfo); + +#endif diff --git a/dlls/hhctrl.ocx/webbrowser.c b/dlls/hhctrl.ocx/webbrowser.c index 20572de8d3e..4babc64b0e7 100644 --- a/dlls/hhctrl.ocx/webbrowser.c +++ b/dlls/hhctrl.ocx/webbrowser.c @@ -18,17 +18,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include - -#define COBJMACROS - -#include "windef.h" -#include "winbase.h" -#include "winuser.h" -#include "winnls.h" -#include "ole2.h" - -#include "webbrowser.h" +#include "hhctrl.h" #define ICOM_THIS_MULTI(impl,field,iface) impl* const This=(impl*)((char*)(iface) - offsetof(impl,field))