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
a1bdef2d
Commit
a1bdef2d
authored
Dec 04, 2007
by
Jacek Caban
Committed by
Alexandre Julliard
Dec 04, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Make IConnectionPointContainer more flexible.
parent
440af173
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
28 deletions
+21
-28
conpoint.c
dlls/mshtml/conpoint.c
+11
-13
htmlbody.c
dlls/mshtml/htmlbody.c
+3
-5
htmldoc.c
dlls/mshtml/htmldoc.c
+4
-7
mshtml_private.h
dlls/mshtml/mshtml_private.h
+3
-3
No files found.
dlls/mshtml/conpoint.c
View file @
a1bdef2d
...
...
@@ -93,7 +93,7 @@ static HRESULT WINAPI ConnectionPoint_GetConnectionInterface(IConnectionPoint *i
if
(
!
pIID
)
return
E_POINTER
;
memcpy
(
pIID
,
&
This
->
iid
,
sizeof
(
IID
));
memcpy
(
pIID
,
This
->
iid
,
sizeof
(
IID
));
return
S_OK
;
}
...
...
@@ -122,8 +122,8 @@ static HRESULT WINAPI ConnectionPoint_Advise(IConnectionPoint *iface, IUnknown *
TRACE
(
"(%p)->(%p %p)
\n
"
,
This
,
pUnkSink
,
pdwCookie
);
hres
=
IUnknown_QueryInterface
(
pUnkSink
,
&
This
->
iid
,
(
void
**
)
&
sink
);
if
(
FAILED
(
hres
)
&&
!
IsEqualGUID
(
&
IID_IPropertyNotifySink
,
&
This
->
iid
))
hres
=
IUnknown_QueryInterface
(
pUnkSink
,
This
->
iid
,
(
void
**
)
&
sink
);
if
(
FAILED
(
hres
)
&&
!
IsEqualGUID
(
&
IID_IPropertyNotifySink
,
This
->
iid
))
hres
=
IUnknown_QueryInterface
(
pUnkSink
,
&
IID_IDispatch
,
(
void
**
)
&
sink
);
if
(
FAILED
(
hres
))
return
CONNECT_E_CANNOTCONNECT
;
...
...
@@ -184,18 +184,17 @@ static const IConnectionPointVtbl ConnectionPointVtbl =
ConnectionPoint_EnumConnections
};
void
ConnectionPoint_Init
(
ConnectionPoint
*
cp
,
IConnectionPointContainer
*
container
,
REFIID
riid
,
ConnectionPoint
*
prev
)
void
ConnectionPoint_Init
(
ConnectionPoint
*
cp
,
ConnectionPointContainer
*
container
,
REFIID
riid
)
{
cp
->
lpConnectionPointVtbl
=
&
ConnectionPointVtbl
;
cp
->
container
=
container
;
cp
->
container
=
CONPTCONT
(
container
)
;
cp
->
sinks
=
NULL
;
cp
->
sinks_size
=
0
;
cp
->
iid
=
*
riid
;
cp
->
iid
=
riid
;
cp
->
next
=
NULL
;
if
(
prev
)
prev
->
nex
t
=
cp
;
cp
->
next
=
container
->
cp_list
;
container
->
cp_lis
t
=
cp
;
}
static
void
ConnectionPoint_Destroy
(
ConnectionPoint
*
This
)
...
...
@@ -250,7 +249,7 @@ static HRESULT WINAPI ConnectionPointContainer_FindConnectionPoint(IConnectionPo
*
ppCP
=
NULL
;
for
(
iter
=
This
->
cp_list
;
iter
;
iter
=
iter
->
next
)
{
if
(
IsEqualGUID
(
&
iter
->
iid
,
riid
))
if
(
IsEqualGUID
(
iter
->
iid
,
riid
))
*
ppCP
=
CONPOINT
(
iter
);
}
...
...
@@ -273,11 +272,10 @@ static const IConnectionPointContainerVtbl ConnectionPointContainerVtbl = {
#undef CONPTCONT_THIS
void
ConnectionPointContainer_Init
(
ConnectionPointContainer
*
This
,
ConnectionPoint
*
cp_list
,
IUnknown
*
outer
)
void
ConnectionPointContainer_Init
(
ConnectionPointContainer
*
This
,
IUnknown
*
outer
)
{
This
->
lpConnectionPointContainerVtbl
=
&
ConnectionPointContainerVtbl
;
This
->
cp_list
=
cp_list
;
This
->
cp_list
=
NULL
;
This
->
outer
=
outer
;
}
...
...
dlls/mshtml/htmlbody.c
View file @
a1bdef2d
...
...
@@ -506,11 +506,9 @@ HTMLElement *HTMLBodyElement_Create(nsIDOMHTMLElement *nselem)
HTMLTextContainer_Init
(
&
ret
->
textcont
);
ConnectionPoint_Init
(
&
ret
->
cp_propnotif
,
CONPTCONT
(
&
ret
->
cp_container
),
&
IID_IPropertyNotifySink
,
NULL
);
ConnectionPoint_Init
(
&
ret
->
cp_txtcontevents
,
CONPTCONT
(
&
ret
->
cp_container
),
&
DIID_HTMLTextContainerEvents
,
&
ret
->
cp_propnotif
);
ConnectionPointContainer_Init
(
&
ret
->
cp_container
,
&
ret
->
cp_propnotif
,
(
IUnknown
*
)
HTMLBODY
(
ret
));
ConnectionPointContainer_Init
(
&
ret
->
cp_container
,
(
IUnknown
*
)
HTMLBODY
(
ret
));
ConnectionPoint_Init
(
&
ret
->
cp_propnotif
,
&
ret
->
cp_container
,
&
IID_IPropertyNotifySink
);
ConnectionPoint_Init
(
&
ret
->
cp_txtcontevents
,
&
ret
->
cp_container
,
&
DIID_HTMLTextContainerEvents
);
nsres
=
nsIDOMHTMLElement_QueryInterface
(
nselem
,
&
IID_nsIDOMHTMLBodyElement
,
(
void
**
)
&
ret
->
nsbody
);
...
...
dlls/mshtml/htmldoc.c
View file @
a1bdef2d
...
...
@@ -1207,13 +1207,10 @@ HRESULT HTMLDocument_Create(IUnknown *pUnkOuter, REFIID riid, void** ppvObject)
HTMLDocument_Service_Init
(
ret
);
HTMLDocument_Hlink_Init
(
ret
);
ConnectionPoint_Init
(
&
ret
->
cp_propnotif
,
CONPTCONT
(
&
ret
->
cp_container
),
&
IID_IPropertyNotifySink
,
NULL
);
ConnectionPoint_Init
(
&
ret
->
cp_htmldocevents
,
CONPTCONT
(
&
ret
->
cp_container
),
&
DIID_HTMLDocumentEvents
,
&
ret
->
cp_propnotif
);
ConnectionPoint_Init
(
&
ret
->
cp_htmldocevents2
,
CONPTCONT
(
&
ret
->
cp_container
),
&
DIID_HTMLDocumentEvents2
,
&
ret
->
cp_htmldocevents
);
ConnectionPointContainer_Init
(
&
ret
->
cp_container
,
&
ret
->
cp_propnotif
,
(
IUnknown
*
)
HTMLDOC
(
ret
));
ConnectionPointContainer_Init
(
&
ret
->
cp_container
,
(
IUnknown
*
)
HTMLDOC
(
ret
));
ConnectionPoint_Init
(
&
ret
->
cp_propnotif
,
&
ret
->
cp_container
,
&
IID_IPropertyNotifySink
);
ConnectionPoint_Init
(
&
ret
->
cp_htmldocevents
,
&
ret
->
cp_container
,
&
DIID_HTMLDocumentEvents
);
ConnectionPoint_Init
(
&
ret
->
cp_htmldocevents2
,
&
ret
->
cp_container
,
&
DIID_HTMLDocumentEvents2
);
ret
->
nscontainer
=
NSContainer_Create
(
ret
,
NULL
);
ret
->
window
=
HTMLWindow_Create
(
ret
);
...
...
dlls/mshtml/mshtml_private.h
View file @
a1bdef2d
...
...
@@ -90,7 +90,7 @@ struct ConnectionPoint {
}
*
sinks
;
DWORD
sinks_size
;
IID
iid
;
const
IID
*
iid
;
ConnectionPoint
*
next
;
};
...
...
@@ -372,8 +372,8 @@ void HTMLDocument_Window_Init(HTMLDocument*);
void
HTMLDocument_Service_Init
(
HTMLDocument
*
);
void
HTMLDocument_Hlink_Init
(
HTMLDocument
*
);
void
ConnectionPoint_Init
(
ConnectionPoint
*
,
IConnectionPointContainer
*
,
REFIID
,
ConnectionPoint
*
);
void
ConnectionPointContainer_Init
(
ConnectionPointContainer
*
,
ConnectionPoint
*
,
IUnknown
*
);
void
ConnectionPoint_Init
(
ConnectionPoint
*
,
ConnectionPointContainer
*
,
REFIID
);
void
ConnectionPointContainer_Init
(
ConnectionPointContainer
*
,
IUnknown
*
);
void
ConnectionPointContainer_Destroy
(
ConnectionPointContainer
*
);
NSContainer
*
NSContainer_Create
(
HTMLDocument
*
,
NSContainer
*
);
...
...
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