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
a93b6a59
Commit
a93b6a59
authored
Mar 07, 2006
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
explorer: Added desktop option.
The /desktop option causes explorer to create and manage the desktop window.
parent
bb84eaa9
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
115 additions
and
2 deletions
+115
-2
Makefile.in
programs/explorer/Makefile.in
+1
-0
desktop.c
programs/explorer/desktop.c
+74
-0
explorer.c
programs/explorer/explorer.c
+14
-2
explorer_private.h
programs/explorer/explorer_private.h
+26
-0
No files found.
programs/explorer/Makefile.in
View file @
a93b6a59
...
...
@@ -7,6 +7,7 @@ APPMODE = -mwindows
IMPORTS
=
user32 gdi32 advapi32 kernel32
C_SRCS
=
\
desktop.c
\
explorer.c
\
systray.c
...
...
programs/explorer/desktop.c
0 → 100644
View file @
a93b6a59
/*
* Explorer desktop support
*
* Copyright 2006 Alexandre Julliard
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <windows.h>
#include <wine/debug.h>
#include "explorer_private.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
explorer
);
#define DESKTOP_CLASS_ATOM MAKEINTATOMW(32769)
static
LRESULT
WINAPI
desktop_wnd_proc
(
HWND
hwnd
,
UINT
message
,
WPARAM
wp
,
LPARAM
lp
)
{
WINE_TRACE
(
"got msg %x wp %x lp %lx
\n
"
,
message
,
wp
,
lp
);
switch
(
message
)
{
case
WM_SYSCOMMAND
:
if
((
wp
&
0xfff0
)
==
SC_CLOSE
)
ExitWindows
(
0
,
0
);
break
;
case
WM_SETCURSOR
:
return
(
LRESULT
)
SetCursor
(
LoadCursorA
(
0
,
(
LPSTR
)
IDC_ARROW
)
);
case
WM_NCHITTEST
:
return
HTCLIENT
;
case
WM_ERASEBKGND
:
PaintDesktop
(
(
HDC
)
wp
);
return
TRUE
;
case
WM_PAINT
:
{
PAINTSTRUCT
ps
;
BeginPaint
(
hwnd
,
&
ps
);
if
(
ps
.
fErase
)
PaintDesktop
(
ps
.
hdc
);
EndPaint
(
hwnd
,
&
ps
);
}
return
0
;
}
return
0
;
}
void
manage_desktop
(
void
)
{
MSG
msg
;
HWND
hwnd
=
CreateWindowExW
(
0
,
DESKTOP_CLASS_ATOM
,
NULL
,
WS_POPUP
|
WS_VISIBLE
|
WS_CLIPSIBLINGS
|
WS_CLIPCHILDREN
,
0
,
0
,
GetSystemMetrics
(
SM_CXSCREEN
),
GetSystemMetrics
(
SM_CYSCREEN
),
0
,
0
,
0
,
NULL
);
if
(
hwnd
!=
GetDesktopWindow
())
return
;
/* some other process beat us to it */
SetWindowLongPtrW
(
hwnd
,
GWLP_WNDPROC
,
(
LONG_PTR
)
desktop_wnd_proc
);
WINE_TRACE
(
"explorer starting on hwnd %p
\n
"
,
hwnd
);
while
(
GetMessageW
(
&
msg
,
0
,
0
,
0
))
DispatchMessageW
(
&
msg
);
WINE_TRACE
(
"explorer exiting for hwnd %p
\n
"
,
hwnd
);
}
programs/explorer/explorer.c
View file @
a93b6a59
...
...
@@ -23,7 +23,7 @@
#include <ctype.h>
#include <wine/debug.h>
#include "explorer_private.h"
#include <systray.h>
WINE_DEFAULT_DEBUG_CHANNEL
(
explorer
);
...
...
@@ -33,6 +33,7 @@ unsigned int shell_refs = 0;
typedef
struct
parametersTAG
{
BOOL
explorer_mode
;
BOOL
systray_mode
;
BOOL
desktop_mode
;
WCHAR
root
[
MAX_PATH
];
WCHAR
selection
[
MAX_PATH
];
}
parameters_struct
;
...
...
@@ -143,6 +144,11 @@ static void ParseCommandLine(LPSTR commandline,parameters_struct *parameters)
parameters
->
systray_mode
=
TRUE
;
p
+=
7
;
}
else
if
(
strncmp
(
p
,
"desktop"
,
7
)
==
0
)
{
parameters
->
desktop_mode
=
TRUE
;
p
+=
7
;
}
p2
=
p
;
p
=
strchr
(
p
,
'/'
);
}
...
...
@@ -216,7 +222,13 @@ int WINAPI WinMain(HINSTANCE hinstance,
do_systray_loop
();
return
0
;
}
else
if
(
parameters
.
selection
[
0
])
if
(
parameters
.
desktop_mode
)
{
manage_desktop
();
return
0
;
}
if
(
parameters
.
selection
[
0
])
{
len
+=
lstrlenW
(
parameters
.
selection
)
+
2
;
winefile_commandline
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
));
...
...
programs/explorer/explorer_private.h
0 → 100644
View file @
a93b6a59
/*
* Explorer private definitions
*
* Copyright 2006 Alexandre Julliard
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef __WINE_EXPLORER_PRIVATE_H
#define __WINE_EXPLORER_PRIVATE_H
extern
void
manage_desktop
(
void
);
#endif
/* __WINE_EXPLORER_PRIVATE_H */
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