Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
97bcef99
Commit
97bcef99
authored
Jul 12, 2012
by
Erich Hoover
Committed by
Alexandre Julliard
Jul 16, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hhctrl.ocx: Implement HH_CLOSE_ALL.
parent
5a45e347
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
37 additions
and
8 deletions
+37
-8
chm.c
dlls/hhctrl.ocx/chm.c
+4
-2
help.c
dlls/hhctrl.ocx/help.c
+5
-0
hhctrl.c
dlls/hhctrl.ocx/hhctrl.c
+25
-6
hhctrl.h
dlls/hhctrl.ocx/hhctrl.h
+3
-0
No files found.
dlls/hhctrl.ocx/chm.c
View file @
97bcef99
...
...
@@ -138,7 +138,8 @@ static BOOL ReadChmSystem(CHMInfo *chm)
chm
->
codePage
=
CP_ACP
;
break
;
case
0x5
:
TRACE
(
"Default window is %s
\n
"
,
debugstr_an
(
buf
,
entry
.
len
));
TRACE
(
"Window name is %s
\n
"
,
debugstr_an
(
buf
,
entry
.
len
));
chm
->
defWindow
=
strdupnAtoW
(
buf
,
entry
.
len
);
break
;
case
0x6
:
TRACE
(
"Compiled file is %s
\n
"
,
debugstr_an
(
buf
,
entry
.
len
));
...
...
@@ -268,7 +269,7 @@ BOOL LoadWinTypeFromCHM(HHInfo *info)
memset
((
void
*
)
&
(
info
->
WinType
),
0
,
sizeof
(
info
->
WinType
));
info
->
WinType
.
cbStruct
=
sizeof
(
info
->
WinType
);
info
->
WinType
.
fUniCodeStrings
=
TRUE
;
info
->
WinType
.
pszType
=
strdupW
(
defaultwinW
);
info
->
WinType
.
pszType
=
strdupW
(
info
->
pCHMInfo
->
defWindow
?
info
->
pCHMInfo
->
defWindow
:
defaultwinW
);
info
->
WinType
.
pszToc
=
strdupW
(
info
->
pCHMInfo
->
defToc
?
info
->
pCHMInfo
->
defToc
:
null
);
info
->
WinType
.
pszIndex
=
strdupW
(
null
);
info
->
WinType
.
fsValidMembers
=
0
;
...
...
@@ -530,6 +531,7 @@ CHMInfo *CloseCHM(CHMInfo *chm)
}
heap_free
(
chm
->
strings
);
heap_free
(
chm
->
defWindow
);
heap_free
(
chm
->
defTitle
);
heap_free
(
chm
->
defTopic
);
heap_free
(
chm
->
defToc
);
...
...
dlls/hhctrl.ocx/help.c
View file @
97bcef99
...
...
@@ -48,6 +48,8 @@ static void ExpandContract(HHInfo *pHHInfo);
#define TAB_MARGIN 8
#define EDIT_HEIGHT 20
struct
list
window_list
=
LIST_INIT
(
window_list
);
static
const
WCHAR
szEmpty
[]
=
{
0
};
struct
html_encoded_symbol
{
...
...
@@ -1740,6 +1742,8 @@ void ReleaseHelpViewer(HHInfo *info)
if
(
!
info
)
return
;
list_remove
(
&
info
->
entry
);
/* Free allocated strings */
heap_free
(
info
->
pszType
);
heap_free
(
info
->
pszCaption
);
...
...
@@ -1798,6 +1802,7 @@ HHInfo *CreateHelpViewer(LPCWSTR filename)
return
NULL
;
}
list_add_tail
(
&
window_list
,
&
info
->
entry
);
return
info
;
}
...
...
dlls/hhctrl.ocx/hhctrl.c
View file @
97bcef99
...
...
@@ -41,6 +41,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(htmlhelp);
HINSTANCE
hhctrl_hinstance
;
BOOL
hh_process
=
FALSE
;
extern
struct
list
window_list
;
BOOL
WINAPI
DllMain
(
HINSTANCE
hInstance
,
DWORD
fdwReason
,
LPVOID
lpvReserved
)
{
TRACE
(
"(%p,%d,%p)
\n
"
,
hInstance
,
fdwReason
,
lpvReserved
);
...
...
@@ -98,7 +100,7 @@ static const char *command_to_string(UINT command)
#undef X
}
static
BOOL
resolve_filename
(
const
WCHAR
*
filename
,
WCHAR
*
fullname
,
DWORD
buflen
,
const
WCHAR
**
index
,
const
WCHAR
**
window
)
static
BOOL
resolve_filename
(
const
WCHAR
*
filename
,
WCHAR
*
fullname
,
DWORD
buflen
,
WCHAR
**
index
,
WCHAR
**
window
)
{
const
WCHAR
*
extra
;
WCHAR
chm_file
[
MAX_PATH
];
...
...
@@ -164,14 +166,15 @@ HWND WINAPI HtmlHelpW(HWND caller, LPCWSTR filename, UINT command, DWORD_PTR dat
HHInfo
*
info
;
BOOL
res
;
NMHDR
nmhdr
;
WCHAR
*
window
=
NULL
;
const
WCHAR
*
index
=
NULL
;
WCHAR
*
default_index
=
NULL
;
int
tab_index
=
TAB_CONTENTS
;
const
WCHAR
*
default_index
=
NULL
;
if
(
!
filename
)
return
NULL
;
if
(
!
resolve_filename
(
filename
,
fullname
,
MAX_PATH
,
&
default_index
,
NULL
))
if
(
!
resolve_filename
(
filename
,
fullname
,
MAX_PATH
,
&
default_index
,
&
window
))
{
WARN
(
"can't find %s
\n
"
,
debugstr_w
(
filename
));
return
0
;
...
...
@@ -180,10 +183,18 @@ HWND WINAPI HtmlHelpW(HWND caller, LPCWSTR filename, UINT command, DWORD_PTR dat
info
=
CreateHelpViewer
(
fullname
);
if
(
!
info
)
{
heap_free
(
default_index
);
heap_free
(
window
);
return
NULL
;
}
if
(
!
index
)
index
=
info
->
WinType
.
pszFile
;
if
(
!
info
->
pszType
)
info
->
WinType
.
pszType
=
info
->
pszType
=
window
;
else
heap_free
(
window
);
/* called to load a specified topic */
switch
(
command
)
...
...
@@ -196,9 +207,7 @@ HWND WINAPI HtmlHelpW(HWND caller, LPCWSTR filename, UINT command, DWORD_PTR dat
}
res
=
NavigateToChm
(
info
,
info
->
pCHMInfo
->
szFile
,
index
);
if
(
default_index
)
heap_free
((
WCHAR
*
)
default_index
);
heap_free
(
default_index
);
if
(
!
res
)
{
...
...
@@ -269,6 +278,16 @@ HWND WINAPI HtmlHelpW(HWND caller, LPCWSTR filename, UINT command, DWORD_PTR dat
}
return
0
;
}
case
HH_CLOSE_ALL
:
{
HHInfo
*
info
,
*
next
;
LIST_FOR_EACH_ENTRY_SAFE
(
info
,
next
,
&
window_list
,
HHInfo
,
entry
)
{
TRACE
(
"Destroying window %s.
\n
"
,
debugstr_w
(
info
->
WinType
.
pszType
));
ReleaseHelpViewer
(
info
);
}
return
0
;
}
default:
FIXME
(
"HH case %s not handled.
\n
"
,
command_to_string
(
command
));
}
...
...
dlls/hhctrl.ocx/hhctrl.h
View file @
97bcef99
...
...
@@ -40,6 +40,7 @@
#include "wine/itss.h"
#include "wine/unicode.h"
#include "wine/list.h"
#define WB_GOBACK 0
#define WB_GOFORWARD 1
...
...
@@ -103,6 +104,7 @@ typedef struct CHMInfo
DWORD
strings_size
;
WCHAR
*
compiledFile
;
WCHAR
*
defWindow
;
WCHAR
*
defTopic
;
WCHAR
*
defTitle
;
WCHAR
*
defToc
;
...
...
@@ -157,6 +159,7 @@ typedef struct {
LPWSTR
pszUrlJump2
;
LPWSTR
pszCustomTabs
;
struct
list
entry
;
CHMInfo
*
pCHMInfo
;
ContentItem
*
content
;
IndexItem
*
index
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment