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
13e3cad0
Commit
13e3cad0
authored
Nov 28, 2005
by
Jacek Caban
Committed by
Alexandre Julliard
Nov 28, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added IOleDocumentSite implementation.
parent
225a9fac
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
69 additions
and
0 deletions
+69
-0
client.c
dlls/shdocvw/client.c
+64
-0
shdocvw.h
dlls/shdocvw/shdocvw.h
+4
-0
webbrowser.c
dlls/shdocvw/webbrowser.c
+1
-0
No files found.
dlls/shdocvw/client.c
View file @
13e3cad0
...
...
@@ -272,8 +272,72 @@ static const IOleInPlaceSiteVtbl OleInPlaceSiteVtbl = {
InPlaceSite_OnPosRectChange
};
#define DOCSITE_THIS(iface) DEFINE_THIS(WebBrowser, OleDocumentSite, iface)
static
HRESULT
WINAPI
OleDocumentSite_QueryInterface
(
IOleDocumentSite
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
WebBrowser
*
This
=
DOCSITE_THIS
(
iface
);
return
IOleClientSite_QueryInterface
(
CLIENTSITE
(
This
),
riid
,
ppv
);
}
static
ULONG
WINAPI
OleDocumentSite_AddRef
(
IOleDocumentSite
*
iface
)
{
WebBrowser
*
This
=
DOCSITE_THIS
(
iface
);
return
IOleClientSite_AddRef
(
CLIENTSITE
(
This
));
}
static
ULONG
WINAPI
OleDocumentSite_Release
(
IOleDocumentSite
*
iface
)
{
WebBrowser
*
This
=
DOCSITE_THIS
(
iface
);
return
IOleClientSite_Release
(
CLIENTSITE
(
This
));
}
static
HRESULT
WINAPI
OleDocumentSite_ActivateMe
(
IOleDocumentSite
*
iface
,
IOleDocumentView
*
pViewToActivate
)
{
WebBrowser
*
This
=
DOCSITE_THIS
(
iface
);
IOleDocument
*
oledoc
;
RECT
rect
;
HRESULT
hres
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
pViewToActivate
);
hres
=
IUnknown_QueryInterface
(
This
->
document
,
&
IID_IOleDocument
,
(
void
**
)
&
oledoc
);
if
(
FAILED
(
hres
))
return
hres
;
IOleDocument_CreateView
(
oledoc
,
INPLACESITE
(
This
),
NULL
,
0
,
&
This
->
view
);
IOleDocument_Release
(
oledoc
);
GetClientRect
(
This
->
doc_view_hwnd
,
&
rect
);
IOleDocumentView_SetRect
(
This
->
view
,
&
rect
);
hres
=
IOleDocumentView_Show
(
This
->
view
,
TRUE
);
return
hres
;
}
#undef DOCSITE_THIS
static
const
IOleDocumentSiteVtbl
OleDocumentSiteVtbl
=
{
OleDocumentSite_QueryInterface
,
OleDocumentSite_AddRef
,
OleDocumentSite_Release
,
OleDocumentSite_ActivateMe
};
void
WebBrowser_ClientSite_Init
(
WebBrowser
*
This
)
{
This
->
lpOleClientSiteVtbl
=
&
OleClientSiteVtbl
;
This
->
lpOleInPlaceSiteVtbl
=
&
OleInPlaceSiteVtbl
;
This
->
lpOleDocumentSiteVtbl
=
&
OleDocumentSiteVtbl
;
This
->
view
=
NULL
;
}
void
WebBrowser_ClientSite_Destroy
(
WebBrowser
*
This
)
{
if
(
This
->
view
)
IOleDocumentView_Release
(
This
->
view
);
}
dlls/shdocvw/shdocvw.h
View file @
13e3cad0
...
...
@@ -77,6 +77,7 @@ typedef struct {
const
IOleClientSiteVtbl
*
lpOleClientSiteVtbl
;
const
IOleInPlaceSiteVtbl
*
lpOleInPlaceSiteVtbl
;
const
IDocHostUIHandler2Vtbl
*
lpDocHostUIHandlerVtbl
;
const
IOleDocumentSiteVtbl
*
lpOleDocumentSiteVtbl
;
/* Interfaces of InPlaceFrame object */
...
...
@@ -88,6 +89,7 @@ typedef struct {
IOleClientSite
*
client
;
IOleContainer
*
container
;
IOleDocumentView
*
view
;
/* window context */
...
...
@@ -126,6 +128,7 @@ typedef struct {
#define INPLACESITE(x) ((IOleInPlaceSite*) &(x)->lpOleInPlaceSiteVtbl)
#define DOCHOSTUI(x) ((IDocHostUIHandler*) &(x)->lpDocHostUIHandlerVtbl)
#define DOCHOSTUI2(x) ((IDocHostUIHandler2*) &(x)->lpDocHostUIHandlerVtbl)
#define DOCSITE(x) ((IOleDocumentSite*) &(x)->lpOleDocumentSiteVtbl)
#define INPLACEFRAME(x) ((IOleInPlaceFrame*) &(x)->lpOleInPlaceFrameVtbl)
...
...
@@ -143,6 +146,7 @@ void WebBrowser_Frame_Init(WebBrowser*);
void
WebBrowser_OleObject_Destroy
(
WebBrowser
*
);
void
WebBrowser_Events_Destroy
(
WebBrowser
*
);
void
WebBrowser_ClientSite_Destroy
(
WebBrowser
*
);
HRESULT
WebBrowser_Create
(
IUnknown
*
,
REFIID
,
void
**
);
...
...
dlls/shdocvw/webbrowser.c
View file @
13e3cad0
...
...
@@ -126,6 +126,7 @@ static ULONG WINAPI WebBrowser_Release(IWebBrowser2 *iface)
WebBrowser_OleObject_Destroy
(
This
);
WebBrowser_Events_Destroy
(
This
);
WebBrowser_ClientSite_Destroy
(
This
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
SHDOCVW_UnlockModule
();
...
...
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