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
8be6eb25
Commit
8be6eb25
authored
Nov 28, 2005
by
Jacek Caban
Committed by
Alexandre Julliard
Nov 28, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Better windows handling.
parent
c820a3c1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
66 additions
and
36 deletions
+66
-36
dochost.c
dlls/shdocvw/dochost.c
+52
-0
oleobject.c
dlls/shdocvw/oleobject.c
+9
-36
shdocvw.h
dlls/shdocvw/shdocvw.h
+2
-0
webbrowser.c
dlls/shdocvw/webbrowser.c
+3
-0
No files found.
dlls/shdocvw/dochost.c
View file @
8be6eb25
...
...
@@ -21,6 +21,56 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
shdocvw
);
static
ATOM
doc_view_atom
=
0
;
static
LRESULT
WINAPI
doc_view_proc
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wParam
,
LPARAM
lParam
)
{
WebBrowser
*
This
;
static
const
WCHAR
wszTHIS
[]
=
{
'T'
,
'H'
,
'I'
,
'S'
,
0
};
if
(
msg
==
WM_CREATE
)
{
This
=
*
(
WebBrowser
**
)
lParam
;
ERR
(
"create %p
\n
"
,
This
);
SetPropW
(
hwnd
,
wszTHIS
,
This
);
}
else
{
This
=
GetPropW
(
hwnd
,
wszTHIS
);
}
return
DefWindowProcA
(
hwnd
,
msg
,
wParam
,
lParam
);
}
void
create_doc_view_hwnd
(
WebBrowser
*
This
)
{
RECT
rect
;
static
const
WCHAR
wszShell_DocObject_View
[]
=
{
'S'
,
'h'
,
'e'
,
'l'
,
'l'
,
' '
,
'D'
,
'o'
,
'c'
,
'O'
,
'b'
,
'j'
,
'e'
,
'c'
,
't'
,
' '
,
'V'
,
'i'
,
'e'
,
'w'
,
0
};
if
(
!
doc_view_atom
)
{
static
WNDCLASSEXW
wndclass
=
{
sizeof
(
wndclass
),
CS_PARENTDC
,
doc_view_proc
,
0
,
0
/* native uses 4*/
,
NULL
,
NULL
,
NULL
,
(
HBRUSH
)
COLOR_WINDOWFRAME
,
NULL
,
wszShell_DocObject_View
,
NULL
};
wndclass
.
hInstance
=
shdocvw_hinstance
;
doc_view_atom
=
RegisterClassExW
(
&
wndclass
);
}
GetWindowRect
(
This
->
shell_embedding_hwnd
,
&
rect
);
This
->
doc_view_hwnd
=
CreateWindowExW
(
0
,
wszShell_DocObject_View
,
wszShell_DocObject_View
,
WS_CHILD
|
WS_VISIBLE
|
WS_CLIPSIBLINGS
|
WS_CLIPCHILDREN
|
WS_TABSTOP
|
WS_MAXIMIZEBOX
,
rect
.
left
,
rect
.
top
,
rect
.
right
,
rect
.
bottom
,
This
->
shell_embedding_hwnd
,
NULL
,
shdocvw_hinstance
,
This
);
}
#define DOCHOSTUI_THIS(iface) DEFINE_THIS(WebBrowser, DocHostUIHandler, iface)
static
HRESULT
WINAPI
DocHostUIHandler_QueryInterface
(
IDocHostUIHandler2
*
iface
,
...
...
@@ -214,4 +264,6 @@ static const IDocHostUIHandler2Vtbl DocHostUIHandler2Vtbl = {
void
WebBrowser_DocHost_Init
(
WebBrowser
*
This
)
{
This
->
lpDocHostUIHandlerVtbl
=
&
DocHostUIHandler2Vtbl
;
This
->
doc_view_hwnd
=
NULL
;
}
dlls/shdocvw/oleobject.c
View file @
8be6eb25
...
...
@@ -29,46 +29,13 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
shdocvw
);
static
ATOM
doc_view_atom
=
0
;
static
ATOM
shell_embedding_atom
=
0
;
static
LRESULT
WINAPI
doc_view_proc
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wParam
,
LPARAM
lParam
)
{
return
DefWindowProcA
(
hwnd
,
msg
,
wParam
,
lParam
);
}
static
LRESULT
WINAPI
shell_embedding_proc
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wParam
,
LPARAM
lParam
)
{
return
DefWindowProcA
(
hwnd
,
msg
,
wParam
,
lParam
);
}
static
void
create_doc_view_hwnd
(
WebBrowser
*
This
)
{
static
const
WCHAR
wszShell_DocObject_View
[]
=
{
'S'
,
'h'
,
'e'
,
'l'
,
'l'
,
' '
,
'D'
,
'o'
,
'c'
,
'O'
,
'b'
,
'j'
,
'e'
,
'c'
,
't'
,
' '
,
'V'
,
'i'
,
'e'
,
'w'
,
0
};
if
(
!
doc_view_atom
)
{
static
WNDCLASSEXW
wndclass
=
{
sizeof
(
wndclass
),
CS_PARENTDC
,
doc_view_proc
,
0
,
0
/* native uses 4*/
,
NULL
,
NULL
,
NULL
,
(
HBRUSH
)
COLOR_WINDOWFRAME
,
NULL
,
wszShell_DocObject_View
,
NULL
};
wndclass
.
hInstance
=
shdocvw_hinstance
;
doc_view_atom
=
RegisterClassExW
(
&
wndclass
);
}
This
->
doc_view_hwnd
=
CreateWindowExW
(
0
,
wszShell_DocObject_View
,
NULL
,
WS_CHILD
|
WS_VISIBLE
|
WS_CLIPSIBLINGS
|
WS_CLIPCHILDREN
|
WS_TABSTOP
|
WS_MAXIMIZEBOX
,
0
,
0
,
0
,
0
,
This
->
shell_embedding_hwnd
,
NULL
,
shdocvw_hinstance
,
This
);
}
static
void
create_shell_embedding_hwnd
(
WebBrowser
*
This
)
{
IOleInPlaceSite
*
inplace
;
...
...
@@ -99,12 +66,10 @@ static void create_shell_embedding_hwnd(WebBrowser *This)
IOleInPlaceSite_Release
(
inplace
);
}
This
->
shell_embedding_hwnd
=
CreateWindowExW
(
0
,
wszShellEmbedding
,
NULL
,
This
->
shell_embedding_hwnd
=
CreateWindowExW
(
0
,
wszShellEmbedding
,
wszShellEmbedding
,
WS_CHILD
|
WS_CLIPSIBLINGS
|
WS_CLIPCHILDREN
|
WS_TABSTOP
|
WS_MAXIMIZEBOX
,
0
,
0
,
0
,
0
,
parent
,
NULL
,
shdocvw_hinstance
,
This
);
create_doc_view_hwnd
(
This
);
}
/**********************************************************************
...
...
@@ -266,6 +231,13 @@ static HRESULT WINAPI OleObject_DoVerb(IOleObject *iface, LONG iVerb, struct tag
IOleInPlaceSite_Release
(
inplace
);
SetWindowPos
(
This
->
shell_embedding_hwnd
,
NULL
,
This
->
pos_rect
.
left
,
This
->
pos_rect
.
top
,
This
->
pos_rect
.
right
-
This
->
pos_rect
.
left
,
This
->
pos_rect
.
bottom
-
This
->
pos_rect
.
top
,
SWP_NOZORDER
|
SWP_SHOWWINDOW
);
if
(
This
->
client
)
{
IOleClientSite_ShowObject
(
This
->
client
);
IOleClientSite_GetContainer
(
This
->
client
,
&
This
->
container
);
...
...
@@ -586,6 +558,7 @@ void WebBrowser_OleObject_Init(WebBrowser *This)
This
->
frame_hwnd
=
NULL
;
This
->
frame
=
NULL
;
This
->
uiwindow
=
NULL
;
This
->
shell_embedding_hwnd
=
NULL
;
memset
(
&
This
->
pos_rect
,
0
,
sizeof
(
RECT
));
memset
(
&
This
->
clip_rect
,
0
,
sizeof
(
RECT
));
...
...
dlls/shdocvw/shdocvw.h
View file @
8be6eb25
...
...
@@ -146,6 +146,8 @@ void WebBrowser_Events_Destroy(WebBrowser*);
HRESULT
WebBrowser_Create
(
IUnknown
*
,
REFIID
,
void
**
);
void
create_doc_view_hwnd
(
WebBrowser
*
This
);
#define DEFINE_THIS(cls,ifc,iface) ((cls*)((BYTE*)(iface)-offsetof(cls,lp ## ifc ## Vtbl)))
/**********************************************************************
...
...
dlls/shdocvw/webbrowser.c
View file @
8be6eb25
...
...
@@ -515,6 +515,9 @@ static HRESULT WINAPI WebBrowser_Navigate2(IWebBrowser2 *iface, VARIANT *URL, VA
if
(
V_VT
(
URL
)
!=
VT_BSTR
)
return
E_INVALIDARG
;
if
(
!
This
->
doc_view_hwnd
)
create_doc_view_hwnd
(
This
);
/*
* FIXME:
* We should use URLMoniker's BindToObject instead creating HTMLDocument here.
...
...
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