mirror of
https://github.com/reactos/reactos.git
synced 2025-04-27 09:00:27 +00:00
Autosyncing with Wine HEAD
svn path=/trunk/; revision=27906
This commit is contained in:
parent
cdcd38e9ae
commit
0f86de1a3a
6 changed files with 139 additions and 69 deletions
|
@ -20,7 +20,7 @@
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
LANGUAGE LANG_KOREAN, SUBLANG_DEFAULT
|
LANGUAGE LANG_KOREAN, SUBLANG_NEUTRAL
|
||||||
|
|
||||||
STRINGTABLE
|
STRINGTABLE
|
||||||
BEGIN
|
BEGIN
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
LANGUAGE LANG_NORWEGIAN, SUBLANG_NEUTRAL
|
LANGUAGE LANG_NORWEGIAN, SUBLANG_NORWEGIAN_BOKMAL
|
||||||
|
|
||||||
STRINGTABLE
|
STRINGTABLE
|
||||||
BEGIN
|
BEGIN
|
||||||
|
|
|
@ -32,6 +32,24 @@ typedef enum {
|
||||||
INSERT_CHILD
|
INSERT_CHILD
|
||||||
} insert_type_t;
|
} insert_type_t;
|
||||||
|
|
||||||
|
static void free_content_item(ContentItem *item)
|
||||||
|
{
|
||||||
|
ContentItem *next;
|
||||||
|
|
||||||
|
while(item) {
|
||||||
|
next = item->next;
|
||||||
|
|
||||||
|
free_content_item(item->child);
|
||||||
|
|
||||||
|
hhctrl_free(item->name);
|
||||||
|
hhctrl_free(item->local);
|
||||||
|
hhctrl_free(item->merge.chm_file);
|
||||||
|
hhctrl_free(item->merge.chm_index);
|
||||||
|
|
||||||
|
item = next;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
char *buf;
|
char *buf;
|
||||||
int size;
|
int size;
|
||||||
|
@ -207,6 +225,9 @@ static ContentItem *insert_item(ContentItem *item, ContentItem *new_item, insert
|
||||||
if(!item)
|
if(!item)
|
||||||
return new_item;
|
return new_item;
|
||||||
|
|
||||||
|
if(!new_item)
|
||||||
|
return item;
|
||||||
|
|
||||||
switch(insert_type) {
|
switch(insert_type) {
|
||||||
case INSERT_NEXT:
|
case INSERT_NEXT:
|
||||||
item->next = new_item;
|
item->next = new_item;
|
||||||
|
@ -265,6 +286,11 @@ static ContentItem *parse_sitemap_object(HHInfo *info, stream_t *stream, Content
|
||||||
}else {
|
}else {
|
||||||
WARN("Could not get %s::%s stream\n", debugstr_w(item->merge.chm_file),
|
WARN("Could not get %s::%s stream\n", debugstr_w(item->merge.chm_file),
|
||||||
debugstr_w(item->merge.chm_file));
|
debugstr_w(item->merge.chm_file));
|
||||||
|
|
||||||
|
if(!item->name) {
|
||||||
|
free_content_item(item);
|
||||||
|
item = NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -411,24 +437,6 @@ void InitContent(HHInfo *info)
|
||||||
fill_content_tree(info->tabs[TAB_CONTENTS].hwnd, NULL, info->content);
|
fill_content_tree(info->tabs[TAB_CONTENTS].hwnd, NULL, info->content);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void free_content_item(ContentItem *item)
|
|
||||||
{
|
|
||||||
ContentItem *next;
|
|
||||||
|
|
||||||
while(item) {
|
|
||||||
next = item->next;
|
|
||||||
|
|
||||||
free_content_item(item->child);
|
|
||||||
|
|
||||||
hhctrl_free(item->name);
|
|
||||||
hhctrl_free(item->local);
|
|
||||||
hhctrl_free(item->merge.chm_file);
|
|
||||||
hhctrl_free(item->merge.chm_index);
|
|
||||||
|
|
||||||
item = next;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void ReleaseContent(HHInfo *info)
|
void ReleaseContent(HHInfo *info)
|
||||||
{
|
{
|
||||||
free_content_item(info->content);
|
free_content_item(info->content);
|
||||||
|
|
|
@ -78,6 +78,7 @@ static const char *command_to_string(UINT command)
|
||||||
X( HH_SET_EXCLUSIVE_FILTER );
|
X( HH_SET_EXCLUSIVE_FILTER );
|
||||||
X( HH_INITIALIZE );
|
X( HH_INITIALIZE );
|
||||||
X( HH_UNINITIALIZE );
|
X( HH_UNINITIALIZE );
|
||||||
|
X( HH_SAFE_DISPLAY_TOPIC );
|
||||||
X( HH_PRETRANSLATEMESSAGE );
|
X( HH_PRETRANSLATEMESSAGE );
|
||||||
X( HH_SET_GLOBAL_PROPERTY );
|
X( HH_SET_GLOBAL_PROPERTY );
|
||||||
default: return "???";
|
default: return "???";
|
||||||
|
@ -86,11 +87,11 @@ static const char *command_to_string(UINT command)
|
||||||
}
|
}
|
||||||
|
|
||||||
/******************************************************************
|
/******************************************************************
|
||||||
* HtmlHelpW (hhctrl.ocx.15)
|
* HtmlHelpW (HHCTRL.OCX.15)
|
||||||
*/
|
*/
|
||||||
HWND WINAPI HtmlHelpW(HWND caller, LPCWSTR filename, UINT command, DWORD data)
|
HWND WINAPI HtmlHelpW(HWND caller, LPCWSTR filename, UINT command, DWORD_PTR data)
|
||||||
{
|
{
|
||||||
TRACE("(%p, %s, command=%s, data=%d)\n",
|
TRACE("(%p, %s, command=%s, data=%lx)\n",
|
||||||
caller, debugstr_w( filename ),
|
caller, debugstr_w( filename ),
|
||||||
command_to_string( command ), data);
|
command_to_string( command ), data);
|
||||||
|
|
||||||
|
@ -99,16 +100,37 @@ HWND WINAPI HtmlHelpW(HWND caller, LPCWSTR filename, UINT command, DWORD data)
|
||||||
case HH_DISPLAY_TOPIC:
|
case HH_DISPLAY_TOPIC:
|
||||||
case HH_DISPLAY_TOC:
|
case HH_DISPLAY_TOC:
|
||||||
case HH_DISPLAY_SEARCH:{
|
case HH_DISPLAY_SEARCH:{
|
||||||
|
static const WCHAR delimW[] = {':',':',0};
|
||||||
HHInfo *info;
|
HHInfo *info;
|
||||||
BOOL res;
|
BOOL res;
|
||||||
|
WCHAR chm_file[MAX_PATH];
|
||||||
|
const WCHAR *index;
|
||||||
|
|
||||||
FIXME("Not all HH cases handled correctly\n");
|
FIXME("Not all HH cases handled correctly\n");
|
||||||
|
|
||||||
|
index = strstrW(filename, delimW);
|
||||||
|
if (index)
|
||||||
|
{
|
||||||
|
memcpy(chm_file, filename, (index-filename)*sizeof(WCHAR));
|
||||||
|
chm_file[index-filename] = 0;
|
||||||
|
filename = chm_file;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (command!=HH_DISPLAY_SEARCH) /* FIXME - use HH_FTS_QUERYW structure in data */
|
||||||
|
index = (const WCHAR*)data;
|
||||||
|
}
|
||||||
|
|
||||||
info = CreateHelpViewer(filename);
|
info = CreateHelpViewer(filename);
|
||||||
|
|
||||||
res = NavigateToChm(info, info->pCHMInfo->szFile, info->WinType.pszFile);
|
if (info)
|
||||||
if(!res)
|
{
|
||||||
ReleaseHelpViewer(info);
|
if (!index)
|
||||||
|
index = info->WinType.pszFile;
|
||||||
|
res = NavigateToChm(info, info->pCHMInfo->szFile, index);
|
||||||
|
if(!res)
|
||||||
|
ReleaseHelpViewer(info);
|
||||||
|
}
|
||||||
|
|
||||||
return NULL; /* FIXME */
|
return NULL; /* FIXME */
|
||||||
}
|
}
|
||||||
|
@ -137,29 +159,71 @@ HWND WINAPI HtmlHelpW(HWND caller, LPCWSTR filename, UINT command, DWORD data)
|
||||||
}
|
}
|
||||||
|
|
||||||
/******************************************************************
|
/******************************************************************
|
||||||
* HtmlHelpA (hhctrl.ocx.14)
|
* HtmlHelpA (HHCTRL.OCX.14)
|
||||||
*/
|
*/
|
||||||
HWND WINAPI HtmlHelpA(HWND caller, LPCSTR filename, UINT command, DWORD data)
|
HWND WINAPI HtmlHelpA(HWND caller, LPCSTR filename, UINT command, DWORD_PTR data)
|
||||||
{
|
{
|
||||||
WCHAR *wfile = NULL;
|
WCHAR *wfile = NULL, *wdata = NULL;
|
||||||
|
DWORD len;
|
||||||
HWND result;
|
HWND result;
|
||||||
|
|
||||||
if (filename)
|
if (filename)
|
||||||
{
|
{
|
||||||
DWORD len = MultiByteToWideChar( CP_ACP, 0, filename, -1, NULL, 0 );
|
len = MultiByteToWideChar( CP_ACP, 0, filename, -1, NULL, 0 );
|
||||||
|
|
||||||
wfile = hhctrl_alloc(len*sizeof(WCHAR));
|
wfile = hhctrl_alloc(len*sizeof(WCHAR));
|
||||||
MultiByteToWideChar( CP_ACP, 0, filename, -1, wfile, len );
|
MultiByteToWideChar( CP_ACP, 0, filename, -1, wfile, len );
|
||||||
}
|
}
|
||||||
|
|
||||||
result = HtmlHelpW( caller, wfile, command, data );
|
if (data)
|
||||||
|
{
|
||||||
|
switch(command)
|
||||||
|
{
|
||||||
|
case HH_ALINK_LOOKUP:
|
||||||
|
case HH_DISPLAY_SEARCH:
|
||||||
|
case HH_DISPLAY_TEXT_POPUP:
|
||||||
|
case HH_GET_LAST_ERROR:
|
||||||
|
case HH_GET_WIN_TYPE:
|
||||||
|
case HH_KEYWORD_LOOKUP:
|
||||||
|
case HH_SET_WIN_TYPE:
|
||||||
|
case HH_SYNC:
|
||||||
|
FIXME("structures not handled yet\n");
|
||||||
|
break;
|
||||||
|
|
||||||
|
case HH_DISPLAY_INDEX:
|
||||||
|
case HH_DISPLAY_TOPIC:
|
||||||
|
case HH_DISPLAY_TOC:
|
||||||
|
case HH_GET_WIN_HANDLE:
|
||||||
|
case HH_SAFE_DISPLAY_TOPIC:
|
||||||
|
len = MultiByteToWideChar( CP_ACP, 0, (const char*)data, -1, NULL, 0 );
|
||||||
|
wdata = hhctrl_alloc(len*sizeof(WCHAR));
|
||||||
|
MultiByteToWideChar( CP_ACP, 0, (const char*)data, -1, wdata, len );
|
||||||
|
break;
|
||||||
|
|
||||||
|
case HH_CLOSE_ALL:
|
||||||
|
case HH_HELP_CONTEXT:
|
||||||
|
case HH_INITIALIZE:
|
||||||
|
case HH_PRETRANSLATEMESSAGE:
|
||||||
|
case HH_TP_HELP_CONTEXTMENU:
|
||||||
|
case HH_TP_HELP_WM_HELP:
|
||||||
|
case HH_UNINITIALIZE:
|
||||||
|
/* either scalar or pointer to scalar - do nothing */
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
FIXME("Unknown command: %s (%d)\n", command_to_string(command), command);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
result = HtmlHelpW( caller, wfile, command, wdata ? (DWORD_PTR)wdata : data );
|
||||||
|
|
||||||
hhctrl_free(wfile);
|
hhctrl_free(wfile);
|
||||||
|
hhctrl_free(wdata);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/******************************************************************
|
/******************************************************************
|
||||||
* doWinMain (hhctrl.ocx.13)
|
* doWinMain (HHCTRL.OCX.13)
|
||||||
*/
|
*/
|
||||||
int WINAPI doWinMain(HINSTANCE hInstance, LPSTR szCmdLine)
|
int WINAPI doWinMain(HINSTANCE hInstance, LPSTR szCmdLine)
|
||||||
{
|
{
|
||||||
|
@ -180,7 +244,7 @@ int WINAPI doWinMain(HINSTANCE hInstance, LPSTR szCmdLine)
|
||||||
}
|
}
|
||||||
|
|
||||||
/******************************************************************
|
/******************************************************************
|
||||||
* DllGetClassObject (hhctrl.ocx.@)
|
* DllGetClassObject (HHCTRL.OCX.@)
|
||||||
*/
|
*/
|
||||||
HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
|
HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
|
||||||
{
|
{
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
#include "initguid.h"
|
#include "initguid.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "itss.h"
|
#include "wine/itss.h"
|
||||||
#include "wine/unicode.h"
|
#include "wine/unicode.h"
|
||||||
|
|
||||||
#define WB_GOBACK 0
|
#define WB_GOBACK 0
|
||||||
|
|
|
@ -1,34 +1,32 @@
|
||||||
<module name="hhctrl" type="win32ocx" baseaddress="${BASEADDRESS_HHCTRL}" installbase="system32" installname="hhctrl.ocx" usewrc="false" allowwarnings="true">
|
<module name="hhctrl" type="win32ocx" baseaddress="${BASEADDRESS_HHCTRL}" installbase="system32" installname="hhctrl.ocx" allowwarnings="true">
|
||||||
<importlibrary definition="hhctrl.ocx.spec.def" />
|
<autoregister infsection="OleControlDlls" type="DllRegisterServer" />
|
||||||
<include base="hhctrl">.</include>
|
<importlibrary definition="hhctrl.ocx.spec.def" />
|
||||||
<include base="ReactOS">include/reactos/wine</include>
|
<include base="hhctrl">.</include>
|
||||||
<include base="ReactOS" root="intermediate">include/reactos/wine</include>
|
<include base="ReactOS">include/reactos/wine</include>
|
||||||
<define name="__REACTOS__" />
|
<define name="__REACTOS__" />
|
||||||
<define name="__WINESRC__" />
|
<define name="__WINESRC__" />
|
||||||
<define name="__USE_W32API" />
|
<define name="__USE_W32API" />
|
||||||
<define name="_WIN32_IE">0x600</define>
|
<define name="_WIN32_IE">0x600</define>
|
||||||
<define name="_WIN32_WINNT">0x501</define>
|
<define name="_WIN32_WINNT">0x501</define>
|
||||||
<define name="WINVER">0x501</define>
|
<define name="WINVER">0x501</define>
|
||||||
<dependency>wineheaders</dependency>
|
<library>wine</library>
|
||||||
<library>wine</library>
|
<library>advapi32</library>
|
||||||
<library>uuid</library>
|
<library>comctl32</library>
|
||||||
<library>kernel32</library>
|
<library>shell32</library>
|
||||||
<library>user32</library>
|
<library>shlwapi</library>
|
||||||
<library>gdi32</library>
|
<library>ole32</library>
|
||||||
<library>shell32</library>
|
<library>oleaut32</library>
|
||||||
<library>comctl32</library>
|
<library>user32</library>
|
||||||
<library>advapi32</library>
|
<library>gdi32</library>
|
||||||
<library>gdi32</library>
|
<library>kernel32</library>
|
||||||
<library>ntdll</library>
|
<library>uuid</library>
|
||||||
<library>ole32</library>
|
<library>ntdll</library>
|
||||||
<library>oleaut32</library>
|
<file>chm.c</file>
|
||||||
<library>shlwapi</library>
|
<file>content.c</file>
|
||||||
<file>chm.c</file>
|
<file>help.c</file>
|
||||||
<file>content.c</file>
|
<file>hhctrl.c</file>
|
||||||
<file>help.c</file>
|
<file>regsvr.c</file>
|
||||||
<file>hhctrl.c</file>
|
<file>webbrowser.c</file>
|
||||||
<file>regsvr.c</file>
|
<file>hhctrl.rc</file>
|
||||||
<file>webbrowser.c</file>
|
<file>hhctrl.ocx.spec</file>
|
||||||
<file>hhctrl.rc</file>
|
</module>
|
||||||
<file>hhctrl.ocx.spec</file>
|
|
||||||
</module>
|
|
||||||
|
|
Loading…
Reference in a new issue