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
d17d78e4
Commit
d17d78e4
authored
Aug 23, 2010
by
David Hedberg
Committed by
Alexandre Julliard
Aug 23, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: Add some basic support for hosting a shellview in the ExplorerBrowser.
parent
9c0260f2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
56 additions
and
5 deletions
+56
-5
ebrowser.c
dlls/shell32/ebrowser.c
+56
-5
No files found.
dlls/shell32/ebrowser.c
View file @
d17d78e4
...
...
@@ -42,11 +42,35 @@ typedef struct _ExplorerBrowserImpl {
BOOL
destroyed
;
HWND
hwnd_main
;
HWND
hwnd_sv
;
EXPLORER_BROWSER_OPTIONS
eb_options
;
IShellView
*
psv
;
RECT
sv_rc
;
}
ExplorerBrowserImpl
;
/**************************************************************************
* Helper functions
*/
static
void
update_layout
(
ExplorerBrowserImpl
*
This
)
{
RECT
rc
;
TRACE
(
"%p
\n
"
,
This
);
GetClientRect
(
This
->
hwnd_main
,
&
rc
);
CopyRect
(
&
This
->
sv_rc
,
&
rc
);
}
static
void
size_panes
(
ExplorerBrowserImpl
*
This
)
{
MoveWindow
(
This
->
hwnd_sv
,
This
->
sv_rc
.
left
,
This
->
sv_rc
.
top
,
This
->
sv_rc
.
right
-
This
->
sv_rc
.
left
,
This
->
sv_rc
.
bottom
-
This
->
sv_rc
.
top
,
TRUE
);
}
/**************************************************************************
* Main window related functions.
*/
static
LRESULT
main_on_wm_create
(
HWND
hWnd
,
CREATESTRUCTW
*
crs
)
...
...
@@ -60,11 +84,22 @@ static LRESULT main_on_wm_create(HWND hWnd, CREATESTRUCTW *crs)
return
TRUE
;
}
static
LRESULT
main_on_wm_size
(
ExplorerBrowserImpl
*
This
)
{
update_layout
(
This
);
size_panes
(
This
);
return
TRUE
;
}
static
LRESULT
CALLBACK
main_wndproc
(
HWND
hWnd
,
UINT
uMessage
,
WPARAM
wParam
,
LPARAM
lParam
)
{
ExplorerBrowserImpl
*
This
=
(
ExplorerBrowserImpl
*
)
GetWindowLongPtrW
(
hWnd
,
GWLP_USERDATA
);
switch
(
uMessage
)
{
case
WM_CREATE
:
return
main_on_wm_create
(
hWnd
,
(
CREATESTRUCTW
*
)
lParam
);
case
WM_SIZE
:
return
main_on_wm_size
(
This
);
default:
return
DefWindowProcW
(
hWnd
,
uMessage
,
wParam
,
lParam
);
}
...
...
@@ -183,6 +218,14 @@ static HRESULT WINAPI IExplorerBrowser_fnDestroy(IExplorerBrowser *iface)
ExplorerBrowserImpl
*
This
=
(
ExplorerBrowserImpl
*
)
iface
;
TRACE
(
"%p
\n
"
,
This
);
if
(
This
->
psv
)
{
IShellView_DestroyViewWindow
(
This
->
psv
);
IShellView_Release
(
This
->
psv
);
This
->
psv
=
NULL
;
This
->
hwnd_sv
=
NULL
;
}
DestroyWindow
(
This
->
hwnd_main
);
This
->
destroyed
=
TRUE
;
...
...
@@ -325,10 +368,12 @@ static HRESULT WINAPI IExplorerBrowser_fnGetCurrentView(IExplorerBrowser *iface,
REFIID
riid
,
void
**
ppv
)
{
ExplorerBrowserImpl
*
This
=
(
ExplorerBrowserImpl
*
)
iface
;
FIXME
(
"stub,
%p (%s, %p)
\n
"
,
This
,
shdebugstr_guid
(
riid
),
ppv
);
TRACE
(
"
%p (%s, %p)
\n
"
,
This
,
shdebugstr_guid
(
riid
),
ppv
);
*
ppv
=
NULL
;
return
E_FAIL
;
if
(
!
This
->
psv
)
return
E_FAIL
;
return
IShellView_QueryInterface
(
This
->
psv
,
riid
,
ppv
);
}
static
const
IExplorerBrowserVtbl
vt_IExplorerBrowser
=
...
...
@@ -510,9 +555,15 @@ static HRESULT WINAPI IShellBrowser_fnQueryActiveShellView(IShellBrowser *iface,
IShellView
**
ppshv
)
{
ExplorerBrowserImpl
*
This
=
impl_from_IShellBrowser
(
iface
);
FIXME
(
"stub,
%p (%p)
\n
"
,
This
,
ppshv
);
TRACE
(
"
%p (%p)
\n
"
,
This
,
ppshv
);
return
E_NOTIMPL
;
if
(
!
This
->
psv
)
return
E_FAIL
;
*
ppshv
=
This
->
psv
;
IShellView_AddRef
(
This
->
psv
);
return
S_OK
;
}
static
HRESULT
WINAPI
IShellBrowser_fnOnViewWindowActive
(
IShellBrowser
*
iface
,
...
...
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