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
461b3768
Commit
461b3768
authored
Sep 06, 2009
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 08, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IHTMLEventObj::get_altKey implementation.
parent
145d53e2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
8 deletions
+38
-8
htmlevent.c
dlls/mshtml/htmlevent.c
+35
-5
htmlevent.h
dlls/mshtml/htmlevent.h
+1
-1
nsevents.c
dlls/mshtml/nsevents.c
+2
-2
No files found.
dlls/mshtml/htmlevent.c
View file @
461b3768
...
...
@@ -129,6 +129,7 @@ typedef struct {
HTMLDOMNode
*
target
;
const
event_info_t
*
type
;
nsIDOMEvent
*
nsevent
;
}
HTMLEventObj
;
#define HTMLEVENTOBJ(x) ((IHTMLEventObj*) &(x)->lpIHTMLEventObjVtbl)
...
...
@@ -178,6 +179,8 @@ static ULONG WINAPI HTMLEventObj_Release(IHTMLEventObj *iface)
TRACE
(
"(%p) ref=%d
\n
"
,
This
,
ref
);
if
(
!
ref
)
{
if
(
This
->
nsevent
)
nsIDOMEvent_Release
(
This
->
nsevent
);
release_dispex
(
&
This
->
dispex
);
heap_free
(
This
);
}
...
...
@@ -232,8 +235,31 @@ static HRESULT WINAPI HTMLEventObj_get_srcElement(IHTMLEventObj *iface, IHTMLEle
static
HRESULT
WINAPI
HTMLEventObj_get_altKey
(
IHTMLEventObj
*
iface
,
VARIANT_BOOL
*
p
)
{
HTMLEventObj
*
This
=
HTMLEVENTOBJ_THIS
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
E_NOTIMPL
;
PRBool
ret
=
FALSE
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
if
(
This
->
nsevent
)
{
nsIDOMKeyEvent
*
key_event
;
nsresult
nsres
;
nsres
=
nsIDOMEvent_QueryInterface
(
This
->
nsevent
,
&
IID_nsIDOMKeyEvent
,
(
void
**
)
&
key_event
);
if
(
NS_SUCCEEDED
(
nsres
))
{
nsIDOMKeyEvent_GetAltKey
(
key_event
,
&
ret
);
nsIDOMKeyEvent_Release
(
key_event
);
}
else
{
nsIDOMMouseEvent
*
mouse_event
;
nsres
=
nsIDOMEvent_QueryInterface
(
This
->
nsevent
,
&
IID_nsIDOMMouseEvent
,
(
void
**
)
&
mouse_event
);
if
(
NS_SUCCEEDED
(
nsres
))
{
nsIDOMMouseEvent_GetAltKey
(
mouse_event
,
&
ret
);
nsIDOMMouseEvent_Release
(
mouse_event
);
}
}
}
*
p
=
ret
?
VARIANT_TRUE
:
VARIANT_FALSE
;
return
S_OK
;
}
static
HRESULT
WINAPI
HTMLEventObj_get_ctrlKey
(
IHTMLEventObj
*
iface
,
VARIANT_BOOL
*
p
)
...
...
@@ -449,7 +475,7 @@ static dispex_static_data_t HTMLEventObj_dispex = {
HTMLEventObj_iface_tids
};
static
IHTMLEventObj
*
create_event
(
HTMLDOMNode
*
target
,
eventid_t
eid
)
static
IHTMLEventObj
*
create_event
(
HTMLDOMNode
*
target
,
eventid_t
eid
,
nsIDOMEvent
*
nsevent
)
{
HTMLEventObj
*
ret
;
...
...
@@ -460,6 +486,10 @@ static IHTMLEventObj *create_event(HTMLDOMNode *target, eventid_t eid)
ret
->
target
=
target
;
IHTMLDOMNode_AddRef
(
HTMLDOMNODE
(
target
));
ret
->
nsevent
=
nsevent
;
if
(
nsevent
)
nsIDOMEvent_AddRef
(
nsevent
);
init_dispex
(
&
ret
->
dispex
,
(
IUnknown
*
)
HTMLEVENTOBJ
(
ret
),
&
HTMLEventObj_dispex
);
return
HTMLEVENTOBJ
(
ret
);
...
...
@@ -490,7 +520,7 @@ static void call_event_handlers(HTMLDocument *doc, event_target_t *event_target,
}
}
void
fire_event
(
HTMLDocument
*
doc
,
eventid_t
eid
,
nsIDOMNode
*
target
)
void
fire_event
(
HTMLDocument
*
doc
,
eventid_t
eid
,
nsIDOMNode
*
target
,
nsIDOMEvent
*
nsevent
)
{
IHTMLEventObj
*
prev_event
,
*
event_obj
=
NULL
;
nsIDOMNode
*
parent
,
*
nsnode
;
...
...
@@ -504,7 +534,7 @@ void fire_event(HTMLDocument *doc, eventid_t eid, nsIDOMNode *target)
}
prev_event
=
doc
->
window
->
event
;
event_obj
=
doc
->
window
->
event
=
create_event
(
get_node
(
doc
,
target
,
TRUE
),
eid
);
event_obj
=
doc
->
window
->
event
=
create_event
(
get_node
(
doc
,
target
,
TRUE
),
eid
,
nsevent
);
nsnode
=
target
;
nsIDOMNode_AddRef
(
nsnode
);
...
...
dlls/mshtml/htmlevent.h
View file @
461b3768
...
...
@@ -38,7 +38,7 @@ typedef enum {
eventid_t
str_to_eid
(
LPCWSTR
);
void
check_event_attr
(
HTMLDocument
*
,
nsIDOMElement
*
);
void
release_event_target
(
event_target_t
*
);
void
fire_event
(
HTMLDocument
*
,
eventid_t
,
nsIDOMNode
*
);
void
fire_event
(
HTMLDocument
*
,
eventid_t
,
nsIDOMNode
*
,
nsIDOMEvent
*
);
HRESULT
set_event_handler
(
event_target_t
**
,
HTMLDocument
*
,
eventid_t
,
VARIANT
*
);
HRESULT
get_event_handler
(
event_target_t
**
,
eventid_t
,
VARIANT
*
);
...
...
dlls/mshtml/nsevents.c
View file @
461b3768
...
...
@@ -155,7 +155,7 @@ static nsresult NSAPI handle_load(nsIDOMEventListener *iface, nsIDOMEvent *event
nsIDOMHTMLDocument_GetBody
(
This
->
doc
->
nsdoc
,
&
nsbody
);
if
(
nsbody
)
{
fire_event
(
This
->
doc
,
EVENTID_LOAD
,
(
nsIDOMNode
*
)
nsbody
);
fire_event
(
This
->
doc
,
EVENTID_LOAD
,
(
nsIDOMNode
*
)
nsbody
,
event
);
nsIDOMHTMLElement_Release
(
nsbody
);
}
...
...
@@ -191,7 +191,7 @@ static nsresult NSAPI handle_htmlevent(nsIDOMEventListener *iface, nsIDOMEvent *
return
NS_OK
;
}
fire_event
(
This
->
doc
,
eid
,
nsnode
);
fire_event
(
This
->
doc
,
eid
,
nsnode
,
event
);
nsIDOMNode_Release
(
nsnode
);
...
...
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