Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lorenzo Ferrillo
wine
Commits
97bcef99
Commit
97bcef99
authored
12 years ago
by
Erich Hoover
Committed by
Alexandre Julliard
12 years ago
Browse files
Options
Downloads
Patches
Plain Diff
hhctrl.ocx: Implement HH_CLOSE_ALL.
parent
5a45e347
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
dlls/hhctrl.ocx/chm.c
+4
-2
4 additions, 2 deletions
dlls/hhctrl.ocx/chm.c
dlls/hhctrl.ocx/help.c
+5
-0
5 additions, 0 deletions
dlls/hhctrl.ocx/help.c
dlls/hhctrl.ocx/hhctrl.c
+25
-6
25 additions, 6 deletions
dlls/hhctrl.ocx/hhctrl.c
dlls/hhctrl.ocx/hhctrl.h
+3
-0
3 additions, 0 deletions
dlls/hhctrl.ocx/hhctrl.h
with
37 additions
and
8 deletions
dlls/hhctrl.ocx/chm.c
+
4
−
2
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
);
...
...
This diff is collapsed.
Click to expand it.
dlls/hhctrl.ocx/help.c
+
5
−
0
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
;
}
...
...
This diff is collapsed.
Click to expand it.
dlls/hhctrl.ocx/hhctrl.c
+
25
−
6
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
));
}
...
...
This diff is collapsed.
Click to expand it.
dlls/hhctrl.ocx/hhctrl.h
+
3
−
0
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
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment