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
fbf91383
Commit
fbf91383
authored
Jul 29, 2010
by
Alexander Nicolaysen Sørnes
Committed by
Alexandre Julliard
Jul 29, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shdocvw: Add DocHostContainer interface to interact with WB2/IE.
parent
d83a08c4
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
65 additions
and
8 deletions
+65
-8
dochost.c
dlls/shdocvw/dochost.c
+4
-3
frame.c
dlls/shdocvw/frame.c
+2
-2
iexplore.c
dlls/shdocvw/iexplore.c
+25
-1
navigate.c
dlls/shdocvw/navigate.c
+2
-0
shdocvw.h
dlls/shdocvw/shdocvw.h
+10
-1
webbrowser.c
dlls/shdocvw/webbrowser.c
+22
-1
No files found.
dlls/shdocvw/dochost.c
View file @
fbf91383
...
@@ -311,8 +311,7 @@ void create_doc_view_hwnd(DocHost *This)
...
@@ -311,8 +311,7 @@ void create_doc_view_hwnd(DocHost *This)
doc_view_atom
=
RegisterClassExW
(
&
wndclass
);
doc_view_atom
=
RegisterClassExW
(
&
wndclass
);
}
}
GetClientRect
(
This
->
frame_hwnd
,
&
rect
);
This
->
container_vtbl
->
GetDocObjRect
(
This
,
&
rect
);
adjust_ie_docobj_rect
(
This
->
frame_hwnd
,
&
rect
);
This
->
hwnd
=
CreateWindowExW
(
0
,
wszShell_DocObject_View
,
This
->
hwnd
=
CreateWindowExW
(
0
,
wszShell_DocObject_View
,
wszShell_DocObject_View
,
wszShell_DocObject_View
,
WS_CHILD
|
WS_VISIBLE
|
WS_CLIPSIBLINGS
|
WS_CLIPCHILDREN
|
WS_TABSTOP
,
WS_CHILD
|
WS_VISIBLE
|
WS_CLIPSIBLINGS
|
WS_CLIPCHILDREN
|
WS_TABSTOP
,
...
@@ -784,7 +783,7 @@ static const IPropertyNotifySinkVtbl PropertyNotifySinkVtbl = {
...
@@ -784,7 +783,7 @@ static const IPropertyNotifySinkVtbl PropertyNotifySinkVtbl = {
PropertyNotifySink_OnRequestEdit
PropertyNotifySink_OnRequestEdit
};
};
void
DocHost_Init
(
DocHost
*
This
,
IDispatch
*
disp
)
void
DocHost_Init
(
DocHost
*
This
,
IDispatch
*
disp
,
const
IDocHostContainerVtbl
*
container
)
{
{
This
->
lpDocHostUIHandlerVtbl
=
&
DocHostUIHandler2Vtbl
;
This
->
lpDocHostUIHandlerVtbl
=
&
DocHostUIHandler2Vtbl
;
This
->
lpOleCommandTargetVtbl
=
&
OleCommandTargetVtbl
;
This
->
lpOleCommandTargetVtbl
=
&
OleCommandTargetVtbl
;
...
@@ -792,6 +791,8 @@ void DocHost_Init(DocHost *This, IDispatch *disp)
...
@@ -792,6 +791,8 @@ void DocHost_Init(DocHost *This, IDispatch *disp)
This
->
disp
=
disp
;
This
->
disp
=
disp
;
This
->
container_vtbl
=
container
;
This
->
client_disp
=
NULL
;
This
->
client_disp
=
NULL
;
This
->
document
=
NULL
;
This
->
document
=
NULL
;
...
...
dlls/shdocvw/frame.c
View file @
fbf91383
...
@@ -135,8 +135,8 @@ static HRESULT WINAPI InPlaceFrame_SetStatusText(IOleInPlaceFrame *iface,
...
@@ -135,8 +135,8 @@ static HRESULT WINAPI InPlaceFrame_SetStatusText(IOleInPlaceFrame *iface,
LPCOLESTR
pszStatusText
)
LPCOLESTR
pszStatusText
)
{
{
DocHost
*
This
=
INPLACEFRAME_THIS
(
iface
);
DocHost
*
This
=
INPLACEFRAME_THIS
(
iface
);
FIXM
E
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
pszStatusText
));
TRAC
E
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
pszStatusText
));
return
E_NOTIMPL
;
return
This
->
container_vtbl
->
SetStatusText
(
This
,
pszStatusText
)
;
}
}
static
HRESULT
WINAPI
InPlaceFrame_EnableModeless
(
IOleInPlaceFrame
*
iface
,
BOOL
fEnable
)
static
HRESULT
WINAPI
InPlaceFrame_EnableModeless
(
IOleInPlaceFrame
*
iface
,
BOOL
fEnable
)
...
...
dlls/shdocvw/iexplore.c
View file @
fbf91383
...
@@ -344,6 +344,30 @@ static IWebBrowser2 *create_ie_window(LPCSTR cmdline)
...
@@ -344,6 +344,30 @@ static IWebBrowser2 *create_ie_window(LPCSTR cmdline)
return
wb
;
return
wb
;
}
}
static
void
WINAPI
DocHostContainer_GetDocObjRect
(
DocHost
*
This
,
RECT
*
rc
)
{
GetClientRect
(
This
->
frame_hwnd
,
rc
);
adjust_ie_docobj_rect
(
This
->
frame_hwnd
,
rc
);
}
static
HRESULT
WINAPI
DocHostContainer_SetStatusText
(
DocHost
*
This
,
LPCWSTR
text
)
{
FIXME
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
text
));
return
E_NOTIMPL
;
}
static
void
WINAPI
DocHostContainer_SetURL
(
DocHost
*
This
,
LPCWSTR
url
)
{
}
static
const
IDocHostContainerVtbl
DocHostContainerVtbl
=
{
DocHostContainer_GetDocObjRect
,
DocHostContainer_SetStatusText
,
DocHostContainer_SetURL
};
HRESULT
InternetExplorer_Create
(
IUnknown
*
pOuter
,
REFIID
riid
,
void
**
ppv
)
HRESULT
InternetExplorer_Create
(
IUnknown
*
pOuter
,
REFIID
riid
,
void
**
ppv
)
{
{
InternetExplorer
*
ret
;
InternetExplorer
*
ret
;
...
@@ -355,7 +379,7 @@ HRESULT InternetExplorer_Create(IUnknown *pOuter, REFIID riid, void **ppv)
...
@@ -355,7 +379,7 @@ HRESULT InternetExplorer_Create(IUnknown *pOuter, REFIID riid, void **ppv)
ret
->
ref
=
0
;
ret
->
ref
=
0
;
ret
->
doc_host
.
disp
=
(
IDispatch
*
)
WEBBROWSER2
(
ret
);
ret
->
doc_host
.
disp
=
(
IDispatch
*
)
WEBBROWSER2
(
ret
);
DocHost_Init
(
&
ret
->
doc_host
,
(
IDispatch
*
)
WEBBROWSER2
(
ret
));
DocHost_Init
(
&
ret
->
doc_host
,
(
IDispatch
*
)
WEBBROWSER2
(
ret
)
,
&
DocHostContainerVtbl
);
InternetExplorer_WebBrowser_Init
(
ret
);
InternetExplorer_WebBrowser_Init
(
ret
);
...
...
dlls/shdocvw/navigate.c
View file @
fbf91383
...
@@ -125,6 +125,8 @@ static HRESULT set_dochost_url(DocHost *This, const WCHAR *url)
...
@@ -125,6 +125,8 @@ static HRESULT set_dochost_url(DocHost *This, const WCHAR *url)
heap_free
(
This
->
url
);
heap_free
(
This
->
url
);
This
->
url
=
new_url
;
This
->
url
=
new_url
;
This
->
container_vtbl
->
SetURL
(
This
,
This
->
url
);
return
S_OK
;
return
S_OK
;
}
}
...
...
dlls/shdocvw/shdocvw.h
View file @
fbf91383
...
@@ -82,6 +82,13 @@ typedef struct _task_header_t {
...
@@ -82,6 +82,13 @@ typedef struct _task_header_t {
task_proc_t
proc
;
task_proc_t
proc
;
}
task_header_t
;
}
task_header_t
;
typedef
struct
_IDocHostContainerVtbl
{
void
(
WINAPI
*
GetDocObjRect
)(
DocHost
*
,
RECT
*
);
HRESULT
(
WINAPI
*
SetStatusText
)(
DocHost
*
,
LPCWSTR
);
void
(
WINAPI
*
SetURL
)(
DocHost
*
,
LPCWSTR
);
}
IDocHostContainerVtbl
;
struct
DocHost
{
struct
DocHost
{
const
IOleClientSiteVtbl
*
lpOleClientSiteVtbl
;
const
IOleClientSiteVtbl
*
lpOleClientSiteVtbl
;
const
IOleInPlaceSiteVtbl
*
lpOleInPlaceSiteVtbl
;
const
IOleInPlaceSiteVtbl
*
lpOleInPlaceSiteVtbl
;
...
@@ -105,6 +112,8 @@ struct DocHost {
...
@@ -105,6 +112,8 @@ struct DocHost {
IOleDocumentView
*
view
;
IOleDocumentView
*
view
;
IUnknown
*
doc_navigate
;
IUnknown
*
doc_navigate
;
const
IDocHostContainerVtbl
*
container_vtbl
;
HWND
hwnd
;
HWND
hwnd
;
HWND
frame_hwnd
;
HWND
frame_hwnd
;
...
@@ -220,7 +229,7 @@ void WebBrowser_ClassInfo_Init(WebBrowser*);
...
@@ -220,7 +229,7 @@ void WebBrowser_ClassInfo_Init(WebBrowser*);
void
WebBrowser_OleObject_Destroy
(
WebBrowser
*
);
void
WebBrowser_OleObject_Destroy
(
WebBrowser
*
);
void
DocHost_Init
(
DocHost
*
,
IDispatch
*
);
void
DocHost_Init
(
DocHost
*
,
IDispatch
*
,
const
IDocHostContainerVtbl
*
);
void
DocHost_ClientSite_Init
(
DocHost
*
);
void
DocHost_ClientSite_Init
(
DocHost
*
);
void
DocHost_Frame_Init
(
DocHost
*
);
void
DocHost_Frame_Init
(
DocHost
*
);
void
release_dochost_client
(
DocHost
*
);
void
release_dochost_client
(
DocHost
*
);
...
...
dlls/shdocvw/webbrowser.c
View file @
fbf91383
...
@@ -1126,6 +1126,27 @@ static const IServiceProviderVtbl ServiceProviderVtbl =
...
@@ -1126,6 +1126,27 @@ static const IServiceProviderVtbl ServiceProviderVtbl =
WebBrowser_IServiceProvider_QueryService
WebBrowser_IServiceProvider_QueryService
};
};
static
void
WINAPI
DocHostContainer_GetDocObjRect
(
DocHost
*
This
,
RECT
*
rc
)
{
GetClientRect
(
This
->
frame_hwnd
,
rc
);
}
static
HRESULT
WINAPI
DocHostContainer_SetStatusText
(
DocHost
*
This
,
LPCWSTR
text
)
{
return
E_NOTIMPL
;
}
static
void
WINAPI
DocHostContainer_SetURL
(
DocHost
*
This
,
LPCWSTR
url
)
{
}
static
const
IDocHostContainerVtbl
DocHostContainerVtbl
=
{
DocHostContainer_GetDocObjRect
,
DocHostContainer_SetStatusText
,
DocHostContainer_SetURL
};
static
HRESULT
WebBrowser_Create
(
INT
version
,
IUnknown
*
pOuter
,
REFIID
riid
,
void
**
ppv
)
static
HRESULT
WebBrowser_Create
(
INT
version
,
IUnknown
*
pOuter
,
REFIID
riid
,
void
**
ppv
)
{
{
WebBrowser
*
ret
;
WebBrowser
*
ret
;
...
@@ -1140,7 +1161,7 @@ static HRESULT WebBrowser_Create(INT version, IUnknown *pOuter, REFIID riid, voi
...
@@ -1140,7 +1161,7 @@ static HRESULT WebBrowser_Create(INT version, IUnknown *pOuter, REFIID riid, voi
ret
->
ref
=
1
;
ret
->
ref
=
1
;
ret
->
version
=
version
;
ret
->
version
=
version
;
DocHost_Init
(
&
ret
->
doc_host
,
(
IDispatch
*
)
WEBBROWSER2
(
ret
));
DocHost_Init
(
&
ret
->
doc_host
,
(
IDispatch
*
)
WEBBROWSER2
(
ret
)
,
&
DocHostContainerVtbl
);
ret
->
visible
=
VARIANT_TRUE
;
ret
->
visible
=
VARIANT_TRUE
;
ret
->
menu_bar
=
VARIANT_TRUE
;
ret
->
menu_bar
=
VARIANT_TRUE
;
...
...
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