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
1a7bf2e0
Commit
1a7bf2e0
authored
Jan 18, 2008
by
Jacek Caban
Committed by
Alexandre Julliard
Jan 21, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shdocvw: Use more flexible mechanism instead of WB_WM_NAVIGATE2.
parent
4ff62118
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
54 additions
and
12 deletions
+54
-12
dochost.c
dlls/shdocvw/dochost.c
+26
-7
iexplore.c
dlls/shdocvw/iexplore.c
+2
-0
navigate.c
dlls/shdocvw/navigate.c
+8
-1
oleobject.c
dlls/shdocvw/oleobject.c
+2
-0
shdocvw.h
dlls/shdocvw/shdocvw.h
+16
-4
No files found.
dlls/shdocvw/dochost.c
View file @
1a7bf2e0
...
...
@@ -25,6 +25,27 @@ WINE_DEFAULT_DEBUG_CHANNEL(shdocvw);
static
ATOM
doc_view_atom
=
0
;
void
push_dochost_task
(
DocHost
*
This
,
task_header_t
*
task
,
task_proc_t
proc
,
BOOL
send
)
{
task
->
proc
=
proc
;
/* FIXME: Don't use lParam */
if
(
send
)
SendMessageW
(
This
->
frame_hwnd
,
WM_DOCHOSTTASK
,
0
,
(
LPARAM
)
task
);
else
PostMessageW
(
This
->
frame_hwnd
,
WM_DOCHOSTTASK
,
0
,
(
LPARAM
)
task
);
}
LRESULT
process_dochost_task
(
DocHost
*
This
,
LPARAM
lparam
)
{
task_header_t
*
task
=
(
task_header_t
*
)
lparam
;
task
->
proc
(
This
,
task
);
heap_free
(
task
);
return
0
;
}
static
void
navigate_complete
(
DocHost
*
This
)
{
IDispatch
*
disp
=
NULL
;
...
...
@@ -59,7 +80,7 @@ static void navigate_complete(DocHost *This)
IDispatch_Release
(
disp
);
}
static
LRESULT
navigate2
(
DocHost
*
This
)
void
object_available
(
DocHost
*
This
)
{
IHlinkTarget
*
hlink
;
HRESULT
hres
;
...
...
@@ -68,25 +89,25 @@ static LRESULT navigate2(DocHost *This)
if
(
!
This
->
document
)
{
WARN
(
"document == NULL
\n
"
);
return
0
;
return
;
}
hres
=
IUnknown_QueryInterface
(
This
->
document
,
&
IID_IHlinkTarget
,
(
void
**
)
&
hlink
);
if
(
FAILED
(
hres
))
{
FIXME
(
"Could not get IHlinkTarget interface
\n
"
);
return
0
;
return
;
}
hres
=
IHlinkTarget_Navigate
(
hlink
,
0
,
NULL
);
IHlinkTarget_Release
(
hlink
);
if
(
FAILED
(
hres
))
{
FIXME
(
"Navigate failed
\n
"
);
return
0
;
return
;
}
navigate_complete
(
This
);
return
0
;
return
;
}
static
LRESULT
resize_document
(
DocHost
*
This
,
LONG
width
,
LONG
height
)
...
...
@@ -117,8 +138,6 @@ static LRESULT WINAPI doc_view_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l
switch
(
msg
)
{
case
WM_SIZE
:
return
resize_document
(
This
,
LOWORD
(
lParam
),
HIWORD
(
lParam
));
case
WB_WM_NAVIGATE2
:
return
navigate2
(
This
);
}
return
DefWindowProcW
(
hwnd
,
msg
,
wParam
,
lParam
);
...
...
dlls/shdocvw/iexplore.c
View file @
1a7bf2e0
...
...
@@ -77,6 +77,8 @@ ie_window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
return
iewnd_OnDestroy
(
This
);
case
WM_SIZE
:
return
iewnd_OnSize
(
This
,
LOWORD
(
lparam
),
HIWORD
(
lparam
));
case
WM_DOCHOSTTASK
:
return
process_dochost_task
(
&
This
->
doc_host
,
lparam
);
}
return
DefWindowProcW
(
hwnd
,
msg
,
wparam
,
lparam
);
}
...
...
dlls/shdocvw/navigate.c
View file @
1a7bf2e0
...
...
@@ -269,10 +269,16 @@ static HRESULT WINAPI BindStatusCallback_OnDataAvailable(IBindStatusCallback *if
return
E_NOTIMPL
;
}
static
void
object_available_proc
(
DocHost
*
This
,
task_header_t
*
task
)
{
object_available
(
This
);
}
static
HRESULT
WINAPI
BindStatusCallback_OnObjectAvailable
(
IBindStatusCallback
*
iface
,
REFIID
riid
,
IUnknown
*
punk
)
{
BindStatusCallback
*
This
=
BINDSC_THIS
(
iface
);
task_header_t
*
task
;
IOleObject
*
oleobj
;
HRESULT
hres
;
...
...
@@ -302,7 +308,8 @@ static HRESULT WINAPI BindStatusCallback_OnObjectAvailable(IBindStatusCallback *
/* FIXME: Call SetAdvise */
/* FIXME: Call Invoke(DISPID_READYSTATE) */
PostMessageW
(
This
->
doc_host
->
hwnd
,
WB_WM_NAVIGATE2
,
0
,
0
);
task
=
heap_alloc
(
sizeof
(
*
task
));
push_dochost_task
(
This
->
doc_host
,
task
,
object_available_proc
,
FALSE
);
return
S_OK
;
}
...
...
dlls/shdocvw/oleobject.c
View file @
1a7bf2e0
...
...
@@ -61,6 +61,8 @@ static LRESULT WINAPI shell_embedding_proc(HWND hwnd, UINT msg, WPARAM wParam, L
switch
(
msg
)
{
case
WM_SIZE
:
return
resize_window
(
This
,
LOWORD
(
lParam
),
HIWORD
(
lParam
));
case
WM_DOCHOSTTASK
:
return
process_dochost_task
(
&
This
->
doc_host
,
lParam
);
}
return
DefWindowProcW
(
hwnd
,
msg
,
wParam
,
lParam
);
...
...
dlls/shdocvw/shdocvw.h
View file @
1a7bf2e0
...
...
@@ -51,6 +51,7 @@ extern HRESULT SHDOCVW_GetShellInstanceObjectClassObject(REFCLSID rclsid,
*/
typedef
struct
ConnectionPoint
ConnectionPoint
;
typedef
struct
DocHost
DocHost
;
typedef
struct
{
const
IConnectionPointContainerVtbl
*
lpConnectionPointContainerVtbl
;
...
...
@@ -62,7 +63,15 @@ typedef struct {
IUnknown
*
impl
;
}
ConnectionPointContainer
;
typedef
struct
{
struct
_task_header_t
;
typedef
void
(
*
task_proc_t
)(
DocHost
*
,
struct
_task_header_t
*
);
typedef
struct
_task_header_t
{
task_proc_t
proc
;
}
task_header_t
;
struct
DocHost
{
const
IOleClientSiteVtbl
*
lpOleClientSiteVtbl
;
const
IOleInPlaceSiteVtbl
*
lpOleInPlaceSiteVtbl
;
const
IDocHostUIHandler2Vtbl
*
lpDocHostUIHandlerVtbl
;
...
...
@@ -92,7 +101,7 @@ typedef struct {
VARIANT_BOOL
offline
;
ConnectionPointContainer
cps
;
}
DocHost
;
};
struct
WebBrowser
{
/* Interfaces available via WebBrowser object */
...
...
@@ -198,17 +207,20 @@ HRESULT WebBrowserV2_Create(IUnknown*,REFIID,void**);
void
create_doc_view_hwnd
(
DocHost
*
);
void
deactivate_document
(
DocHost
*
);
void
object_available
(
DocHost
*
);
void
call_sink
(
ConnectionPoint
*
,
DISPID
,
DISPPARAMS
*
);
HRESULT
navigate_url
(
DocHost
*
,
LPCWSTR
,
const
VARIANT
*
,
const
VARIANT
*
,
VARIANT
*
,
VARIANT
*
);
HRESULT
go_home
(
DocHost
*
);
#define WM_DOCHOSTTASK (WM_USER+0x300)
void
push_dochost_task
(
DocHost
*
,
task_header_t
*
,
task_proc_t
,
BOOL
);
LRESULT
process_dochost_task
(
DocHost
*
,
LPARAM
);
HRESULT
InternetExplorer_Create
(
IUnknown
*
,
REFIID
,
void
**
);
void
InternetExplorer_WebBrowser_Init
(
InternetExplorer
*
);
HRESULT
CUrlHistory_Create
(
IUnknown
*
,
REFIID
,
void
**
);
#define WB_WM_NAVIGATE2 (WM_USER+100)
#define DEFINE_THIS(cls,ifc,iface) ((cls*)((BYTE*)(iface)-offsetof(cls,lp ## ifc ## Vtbl)))
/**********************************************************************
...
...
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