Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
00e3ac5b
Commit
00e3ac5b
authored
Apr 18, 2006
by
Jacek Caban
Committed by
Alexandre Julliard
Apr 18, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shdocvw: Use DocHost, not WebBrowser, in Shell DocObject View window.
parent
61560b87
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
27 deletions
+27
-27
dochost.c
dlls/shdocvw/dochost.c
+16
-16
navigate.c
dlls/shdocvw/navigate.c
+3
-3
shdocvw.h
dlls/shdocvw/shdocvw.h
+3
-3
webbrowser.c
dlls/shdocvw/webbrowser.c
+5
-5
No files found.
dlls/shdocvw/dochost.c
View file @
00e3ac5b
...
...
@@ -25,7 +25,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(shdocvw);
static
ATOM
doc_view_atom
=
0
;
static
void
navigate_complete
(
WebBrowser
*
This
)
static
void
navigate_complete
(
DocHost
*
This
)
{
IDispatch
*
disp
=
NULL
;
DISPPARAMS
dispparams
;
...
...
@@ -33,7 +33,7 @@ static void navigate_complete(WebBrowser *This)
VARIANT
url
;
HRESULT
hres
;
hres
=
IUnknown_QueryInterface
(
This
->
doc
_host
.
doc
ument
,
&
IID_IDispatch
,
(
void
**
)
&
disp
);
hres
=
IUnknown_QueryInterface
(
This
->
document
,
&
IID_IDispatch
,
(
void
**
)
&
disp
);
if
(
FAILED
(
hres
))
FIXME
(
"Could not get IDispatch interface
\n
"
);
...
...
@@ -51,26 +51,26 @@ static void navigate_complete(WebBrowser *This)
V_VT
(
&
url
)
=
VT_BSTR
;
V_BSTR
(
&
url
)
=
This
->
url
;
call_sink
(
This
->
doc_host
.
cp_wbe2
,
DISPID_NAVIGATECOMPLETE2
,
&
dispparams
);
call_sink
(
This
->
doc_host
.
cp_wbe2
,
DISPID_DOCUMENTCOMPLETE
,
&
dispparams
);
call_sink
(
This
->
cp_wbe2
,
DISPID_NAVIGATECOMPLETE2
,
&
dispparams
);
call_sink
(
This
->
cp_wbe2
,
DISPID_DOCUMENTCOMPLETE
,
&
dispparams
);
if
(
disp
)
IDispatch_Release
(
disp
);
}
static
LRESULT
navigate2
(
WebBrowser
*
This
)
static
LRESULT
navigate2
(
DocHost
*
This
)
{
IHlinkTarget
*
hlink
;
HRESULT
hres
;
TRACE
(
"(%p)
\n
"
,
This
);
if
(
!
This
->
doc
_host
.
doc
ument
)
{
if
(
!
This
->
document
)
{
WARN
(
"document == NULL
\n
"
);
return
0
;
}
hres
=
IUnknown_QueryInterface
(
This
->
doc
_host
.
doc
ument
,
&
IID_IHlinkTarget
,
(
void
**
)
&
hlink
);
hres
=
IUnknown_QueryInterface
(
This
->
document
,
&
IID_IHlinkTarget
,
(
void
**
)
&
hlink
);
if
(
FAILED
(
hres
))
{
FIXME
(
"Could not get IHlinkTarget interface
\n
"
);
return
0
;
...
...
@@ -88,26 +88,26 @@ static LRESULT navigate2(WebBrowser *This)
return
0
;
}
static
LRESULT
resize_document
(
WebBrowser
*
This
,
LONG
width
,
LONG
height
)
static
LRESULT
resize_document
(
DocHost
*
This
,
LONG
width
,
LONG
height
)
{
RECT
rect
=
{
0
,
0
,
width
,
height
};
TRACE
(
"(%p)->(%ld %ld)
\n
"
,
This
,
width
,
height
);
if
(
This
->
doc_host
.
view
)
IOleDocumentView_SetRect
(
This
->
doc_host
.
view
,
&
rect
);
if
(
This
->
view
)
IOleDocumentView_SetRect
(
This
->
view
,
&
rect
);
return
0
;
}
static
LRESULT
WINAPI
doc_view_proc
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wParam
,
LPARAM
lParam
)
{
WebBrowser
*
This
;
DocHost
*
This
;
static
const
WCHAR
wszTHIS
[]
=
{
'T'
,
'H'
,
'I'
,
'S'
,
0
};
if
(
msg
==
WM_CREATE
)
{
This
=
*
(
WebBrowser
**
)
lParam
;
This
=
*
(
DocHost
**
)
lParam
;
SetPropW
(
hwnd
,
wszTHIS
,
This
);
}
else
{
This
=
GetPropW
(
hwnd
,
wszTHIS
);
...
...
@@ -123,7 +123,7 @@ static LRESULT WINAPI doc_view_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l
return
DefWindowProcW
(
hwnd
,
msg
,
wParam
,
lParam
);
}
void
create_doc_view_hwnd
(
WebBrowser
*
This
)
void
create_doc_view_hwnd
(
DocHost
*
This
)
{
RECT
rect
;
...
...
@@ -146,11 +146,11 @@ void create_doc_view_hwnd(WebBrowser *This)
doc_view_atom
=
RegisterClassExW
(
&
wndclass
);
}
GetClientRect
(
This
->
shell_embedding_hwnd
,
&
rect
);
This
->
doc_host
.
hwnd
=
CreateWindowExW
(
0
,
wszShell_DocObject_View
,
GetClientRect
(
This
->
frame_hwnd
,
&
rect
);
/* FIXME */
This
->
hwnd
=
CreateWindowExW
(
0
,
wszShell_DocObject_View
,
wszShell_DocObject_View
,
WS_CHILD
|
WS_VISIBLE
|
WS_CLIPSIBLINGS
|
WS_CLIPCHILDREN
|
WS_TABSTOP
,
rect
.
left
,
rect
.
top
,
rect
.
right
,
rect
.
bottom
,
This
->
shell_embedding
_hwnd
,
rect
.
left
,
rect
.
top
,
rect
.
right
,
rect
.
bottom
,
This
->
frame
_hwnd
,
NULL
,
shdocvw_hinstance
,
This
);
}
...
...
dlls/shdocvw/navigate.c
View file @
00e3ac5b
...
...
@@ -456,8 +456,8 @@ HRESULT navigate_url(WebBrowser *This, LPCWSTR url, PBYTE post_data, ULONG post_
return
hres
;
}
IMoniker_GetDisplayName
(
mon
,
NULL
,
NULL
,
&
This
->
url
);
TRACE
(
"navigating to %s
\n
"
,
debugstr_w
(
This
->
url
));
IMoniker_GetDisplayName
(
mon
,
NULL
,
NULL
,
&
This
->
doc_host
.
url
);
TRACE
(
"navigating to %s
\n
"
,
debugstr_w
(
This
->
doc_host
.
url
));
callback
=
create_callback
(
This
,
post_data
,
post_data_len
,
(
LPWSTR
)
headers
,
&
cancel
);
CreateAsyncBindCtx
(
0
,
callback
,
0
,
&
bindctx
);
...
...
@@ -517,7 +517,7 @@ HRESULT navigate_hlink(WebBrowser *This, IMoniker *mon, IBindCtx *bindctx,
return
S_OK
;
}
This
->
url
=
url
;
This
->
doc_host
.
url
=
url
;
return
navigate
(
This
,
mon
,
bindctx
,
callback
);
}
...
...
dlls/shdocvw/shdocvw.h
View file @
00e3ac5b
...
...
@@ -74,6 +74,8 @@ typedef struct {
HWND
hwnd
;
HWND
frame_hwnd
;
LPOLESTR
url
;
/* Connection points */
ConnectionPoint
*
cp_wbe2
;
...
...
@@ -103,8 +105,6 @@ typedef struct WebBrowser {
IOleContainer
*
container
;
IOleInPlaceSite
*
inplace
;
LPOLESTR
url
;
/* window context */
HWND
iphwnd
;
...
...
@@ -166,7 +166,7 @@ void DocHost_Events_Release(DocHost*);
HRESULT
WebBrowser_Create
(
IUnknown
*
,
REFIID
,
void
**
);
void
create_doc_view_hwnd
(
WebBrowser
*
This
);
void
create_doc_view_hwnd
(
DocHost
*
);
void
deactivate_document
(
DocHost
*
);
void
call_sink
(
ConnectionPoint
*
,
DISPID
,
DISPPARAMS
*
);
HRESULT
navigate_url
(
WebBrowser
*
,
LPCWSTR
,
PBYTE
,
ULONG
,
LPWSTR
);
...
...
dlls/shdocvw/webbrowser.c
View file @
00e3ac5b
...
...
@@ -132,7 +132,7 @@ static ULONG WINAPI WebBrowser_Release(IWebBrowser2 *iface)
WebBrowser_OleObject_Destroy
(
This
);
SysFreeString
(
This
->
url
);
SysFreeString
(
This
->
doc_host
.
url
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
SHDOCVW_UnlockModule
();
}
...
...
@@ -411,13 +411,13 @@ static HRESULT WINAPI WebBrowser_get_LocationURL(IWebBrowser2 *iface, BSTR *Loca
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
LocationURL
);
if
(
!
This
->
url
)
{
if
(
!
This
->
doc_host
.
url
)
{
static
const
WCHAR
null_char
=
0
;
*
LocationURL
=
SysAllocString
(
&
null_char
);
return
S_FALSE
;
}
*
LocationURL
=
SysAllocString
(
This
->
url
);
*
LocationURL
=
SysAllocString
(
This
->
doc_host
.
url
);
return
S_OK
;
}
...
...
@@ -613,7 +613,7 @@ static HRESULT WINAPI WebBrowser_Navigate2(IWebBrowser2 *iface, VARIANT *URL, VA
}
if
(
!
This
->
doc_host
.
hwnd
)
create_doc_view_hwnd
(
This
);
create_doc_view_hwnd
(
&
This
->
doc_host
);
hres
=
navigate_url
(
This
,
V_BSTR
(
URL
),
post_data
,
post_data_len
,
headers
);
...
...
@@ -844,7 +844,7 @@ HRESULT WebBrowser_Create(IUnknown *pOuter, REFIID riid, void **ppv)
ret
->
lpWebBrowser2Vtbl
=
&
WebBrowser2Vtbl
;
ret
->
ref
=
0
;
ret
->
url
=
NULL
;
ret
->
doc_host
.
url
=
NULL
;
ret
->
doc_host
.
disp
=
(
IDispatch
*
)
WEBBROWSER2
(
ret
);
DocHost_Init
(
&
ret
->
doc_host
);
...
...
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