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
e13cf82e
Commit
e13cf82e
authored
Apr 15, 2013
by
Jacek Caban
Committed by
Alexandre Julliard
Apr 15, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IHTMLWindow2::close partial implementation.
parent
8f323e9b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
71 additions
and
1 deletion
+71
-1
htmlwindow.c
dlls/mshtml/htmlwindow.c
+71
-1
No files found.
dlls/mshtml/htmlwindow.c
View file @
e13cf82e
...
...
@@ -28,6 +28,7 @@
#include "mshtmdid.h"
#include "shlguid.h"
#include "shobjidl.h"
#include "exdispid.h"
#define NO_SHLWAPI_REG
#include "shlwapi.h"
...
...
@@ -772,10 +773,79 @@ static HRESULT WINAPI HTMLWindow2_get_history(IHTMLWindow2 *iface, IOmHistory **
return
S_OK
;
}
static
BOOL
notify_webbrowser_close
(
HTMLOuterWindow
*
window
,
HTMLDocumentObj
*
doc
)
{
IConnectionPointContainer
*
cp_container
;
VARIANT_BOOL
cancel
=
VARIANT_FALSE
;
IEnumConnections
*
enum_conn
;
VARIANT
args
[
2
];
DISPPARAMS
dp
=
{
args
,
NULL
,
2
,
0
};
CONNECTDATA
conn_data
;
IConnectionPoint
*
cp
;
IDispatch
*
disp
;
ULONG
fetched
;
HRESULT
hres
;
if
(
!
doc
->
webbrowser
)
return
TRUE
;
hres
=
IUnknown_QueryInterface
(
doc
->
webbrowser
,
&
IID_IConnectionPointContainer
,
(
void
**
)
&
cp_container
);
if
(
FAILED
(
hres
))
return
TRUE
;
hres
=
IConnectionPointContainer_FindConnectionPoint
(
cp_container
,
&
DIID_DWebBrowserEvents2
,
&
cp
);
IConnectionPointContainer_Release
(
cp_container
);
if
(
FAILED
(
hres
))
return
TRUE
;
hres
=
IConnectionPoint_EnumConnections
(
cp
,
&
enum_conn
);
IConnectionPoint_Release
(
cp
);
if
(
FAILED
(
hres
))
return
TRUE
;
while
(
!
cancel
)
{
conn_data
.
pUnk
=
NULL
;
conn_data
.
dwCookie
=
0
;
fetched
=
0
;
hres
=
IEnumConnections_Next
(
enum_conn
,
1
,
&
conn_data
,
&
fetched
);
if
(
hres
!=
S_OK
)
break
;
hres
=
IUnknown_QueryInterface
(
conn_data
.
pUnk
,
&
IID_IDispatch
,
(
void
**
)
&
disp
);
IUnknown_Release
(
conn_data
.
pUnk
);
if
(
FAILED
(
hres
))
continue
;
V_VT
(
args
)
=
VT_BYREF
|
VT_BOOL
;
V_BOOLREF
(
args
)
=
&
cancel
;
V_VT
(
args
+
1
)
=
VT_BOOL
;
V_BOOL
(
args
+
1
)
=
window
->
parent
?
VARIANT_TRUE
:
VARIANT_FALSE
;
hres
=
IDispatch_Invoke
(
disp
,
DISPID_WINDOWCLOSING
,
&
IID_NULL
,
0
,
DISPATCH_METHOD
,
&
dp
,
NULL
,
NULL
,
NULL
);
IDispatch_Release
(
disp
);
if
(
FAILED
(
hres
))
cancel
=
VARIANT_FALSE
;
}
IEnumConnections_Release
(
enum_conn
);
return
!
cancel
;
}
static
HRESULT
WINAPI
HTMLWindow2_close
(
IHTMLWindow2
*
iface
)
{
HTMLWindow
*
This
=
impl_from_IHTMLWindow2
(
iface
);
FIXME
(
"(%p)->()
\n
"
,
This
);
HTMLOuterWindow
*
window
=
This
->
outer_window
;
TRACE
(
"(%p)
\n
"
,
This
);
if
(
!
window
->
doc_obj
)
{
FIXME
(
"No document object
\n
"
);
return
E_FAIL
;
}
if
(
!
notify_webbrowser_close
(
window
,
window
->
doc_obj
))
return
S_OK
;
FIXME
(
"default action not implemented
\n
"
);
return
E_NOTIMPL
;
}
...
...
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