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
c7496aee
Commit
c7496aee
authored
Sep 08, 2009
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 09, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IHTMLWindow2::onbeforeunload property implementation.
parent
b481b092
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
4 deletions
+23
-4
htmlevent.c
dlls/mshtml/htmlevent.c
+4
-0
htmlevent.h
dlls/mshtml/htmlevent.h
+11
-0
htmlwindow.c
dlls/mshtml/htmlwindow.c
+8
-4
No files found.
dlls/mshtml/htmlevent.c
View file @
c7496aee
...
...
@@ -42,6 +42,9 @@ struct event_target_t {
handler_vector_t
*
event_table
[
EVENTID_LAST
];
};
static
const
WCHAR
beforeunloadW
[]
=
{
'b'
,
'e'
,
'f'
,
'o'
,
'r'
,
'e'
,
'u'
,
'n'
,
'l'
,
'o'
,
'a'
,
'd'
,
0
};
static
const
WCHAR
onbeforeunloadW
[]
=
{
'o'
,
'n'
,
'b'
,
'e'
,
'f'
,
'o'
,
'r'
,
'e'
,
'u'
,
'n'
,
'l'
,
'o'
,
'a'
,
'd'
,
0
};
static
const
WCHAR
blurW
[]
=
{
'b'
,
'l'
,
'u'
,
'r'
,
0
};
static
const
WCHAR
onblurW
[]
=
{
'o'
,
'n'
,
'b'
,
'l'
,
'u'
,
'r'
,
0
};
...
...
@@ -97,6 +100,7 @@ typedef struct {
#define EVENT_BUBBLE 0x0002
static
const
event_info_t
event_info
[]
=
{
{
beforeunloadW
,
onbeforeunloadW
,
EVENT_DEFAULTLISTENER
},
{
blurW
,
onblurW
,
EVENT_DEFAULTLISTENER
},
{
changeW
,
onchangeW
,
EVENT_DEFAULTLISTENER
|
EVENT_BUBBLE
},
{
clickW
,
onclickW
,
EVENT_DEFAULTLISTENER
|
EVENT_BUBBLE
},
...
...
dlls/mshtml/htmlevent.h
View file @
c7496aee
...
...
@@ -17,6 +17,7 @@
*/
typedef
enum
{
EVENTID_BEFOREUNLOAD
,
EVENTID_BLUR
,
EVENTID_CHANGE
,
EVENTID_CLICK
,
...
...
@@ -67,3 +68,13 @@ static inline HRESULT get_doc_event(HTMLDocument *doc, eventid_t eid, VARIANT *v
{
return
get_event_handler
(
&
doc
->
event_target
,
eid
,
var
);
}
static
inline
HRESULT
set_window_event
(
HTMLWindow
*
window
,
eventid_t
eid
,
VARIANT
*
var
)
{
return
set_event_handler
(
&
window
->
event_target
,
window
->
doc
,
eid
,
var
);
}
static
inline
HRESULT
get_window_event
(
HTMLWindow
*
window
,
eventid_t
eid
,
VARIANT
*
var
)
{
return
get_event_handler
(
&
window
->
event_target
,
eid
,
var
);
}
dlls/mshtml/htmlwindow.c
View file @
c7496aee
...
...
@@ -512,15 +512,19 @@ static HRESULT WINAPI HTMLWindow2_get_onload(IHTMLWindow2 *iface, VARIANT *p)
static
HRESULT
WINAPI
HTMLWindow2_put_onbeforeunload
(
IHTMLWindow2
*
iface
,
VARIANT
v
)
{
HTMLWindow
*
This
=
HTMLWINDOW2_THIS
(
iface
);
FIXME
(
"(%p)->(v(%d))
\n
"
,
This
,
V_VT
(
&
v
));
return
E_NOTIMPL
;
TRACE
(
"(%p)->(v(%d))
\n
"
,
This
,
V_VT
(
&
v
));
return
set_window_event
(
This
,
EVENTID_BEFOREUNLOAD
,
&
v
);
}
static
HRESULT
WINAPI
HTMLWindow2_get_onbeforeunload
(
IHTMLWindow2
*
iface
,
VARIANT
*
p
)
{
HTMLWindow
*
This
=
HTMLWINDOW2_THIS
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
E_NOTIMPL
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
get_window_event
(
This
,
EVENTID_BEFOREUNLOAD
,
p
);
}
static
HRESULT
WINAPI
HTMLWindow2_put_onunload
(
IHTMLWindow2
*
iface
,
VARIANT
v
)
...
...
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