31 #include "../taskbar/desktopbar.h" 32 #include "../taskbar/taskbar.h" 82 DesktopPtr& desktop = (*this)[0];
95 DesktopPtr& desktop = (*this)[
idx];
97 DesktopThread* pThread =
NULL;
100 if (desktop->_hdesktop)
104 FmtString desktop_name(
TEXT(
"Desktop %d"),
idx);
117 desktop = DesktopPtr(
new Desktop(hdesktop));
119 pThread =
new DesktopThread(*desktop);
125 desktop->_pThread = DesktopThreadPtr(pThread);
140 if (!_desktop._hwndDesktop)
176 for(const_iterator it1=
begin(); it1!=
end(); ++it1)
218 if (
rect.right>0 &&
rect.bottom>0 &&
233 if (minimized.
empty()) {
238 it!=cminimized.
rend(); ++it) {
374 ClientRect
rect(_hwnd);
440 case WM_DISPLAYCHANGE:
447 return (
LRESULT)static_cast<IShellBrowser*>(
this);
511 #ifndef ROSSHELL // in shell-only-mode fall through and let shell32 handle the command 522 _pShellView(pShellView)
549 CONTEXT(
"DesktopShellView::InitDragDrop()");
565 ftetc.dwAspect = DVASPECT_CONTENT;
567 ftetc.tymed = TYMED_HGLOBAL;
629 LPIDA pida = pidList;
639 for(
int i=pida->
cidl;
i>0; --
i)
679 CMINVOKECOMMANDINFO cmi;
681 cmi.cbSize =
sizeof(CMINVOKECOMMANDINFO);
685 cmi.lpParameters =
NULL;
686 cmi.lpDirectory =
NULL;
691 hr = pcm->InvokeCommand(&cmi);
705 #define ARRANGE_BORDER_DOWN 8 706 #define ARRANGE_BORDER_HV 9 707 #define ARRANGE_ROUNDABOUT 10 779 int dx1 = dir_x1 *
cx;
780 int dy1 = dir_y1 *
cy;
781 int dx2 = dir_x2 *
cx;
782 int dy2 = dir_y2 *
cy;
void DrawDesktopBkgnd(HDC hdc)
static struct testwindow_info windows[3]
#define WINDOW_CREATOR(WND_CLASS)
BOOL IsAnyDesktopRunning()
void push_back(const_reference __x)
DesktopShellView(HWND hwnd, IShellView *pShellView)
GLint GLint GLsizei width
HWND WINAPI GetShellWindow(VOID)
#define WM_SYSCOLORCHANGE
LONG RegSetDWORDValue(IN HKEY hKey, IN LPCWSTR lpSubKey OPTIONAL, IN LPCWSTR lpValue OPTIONAL, IN BOOL bCreateKeyIfDoesntExist, IN DWORD dwData)
VOID WINAPI DECLSPEC_HOTPATCH Sleep(IN DWORD dwMilliseconds)
HRESULT GetData(IDataObject *selection)
#define ARRANGE_ROUNDABOUT
static BOOL(WINAPI *SetShellWindow)(HWND)
void AddSuportedFormat(FORMATETC &ftetc)
void explorer_show_frame(int cmdShow, LPTSTR lpCmdLine)
HRESULT CreateViewWindow([in] IShellView *psvPrevious, [in] LPCFOLDERSETTINGS lpfs, [in] IShellBrowser *psb, [out] RECT *prcView, [out] HWND *phWnd)
LRESULT Init(LPCREATESTRUCT pcs)
#define GetNextWindow(h, c)
#define DESKTOP_SWITCHDESKTOP
#define PM_DISPLAY_VERSION
static const POINTS s_align_dir1[]
#define HKEY_CURRENT_USER
BackgroundWindow(HWND hwnd)
virtual LRESULT Init(LPCREATESTRUCT pcs)
const ITEMIDLIST UNALIGNED * LPCITEMIDLIST
#define SystemParametersInfo
GLint GLint GLint GLint GLint x
#define FCIDM_SHVIEWFIRST
const GUID IID_IDataObject
HRESULT WINAPI RegisterDragDrop(HWND hwnd, LPDROPTARGET pDropTarget)
#define ARRANGE_BORDER_HV
OLE drop target for the desktop window.
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
#define SetWindowStyle(hwnd, val)
BOOL WINAPI IsIconic(_In_ HWND)
GLint GLint GLint yoffset
HRESULT WINAPI RevokeDragDrop(HWND hwnd)
_Rep_type::const_iterator const_iterator
HRESULT DoDesktopContextMenu(int x, int y)
#define GetWindowStyle(hwnd)
void explorer_about(HWND hwndParent)
BOOL WINAPI SetThreadDesktop(_In_ HDESK)
#define IDS_ABOUT_EXPLORER
static const POINTS s_align_dir2[]
BOOL WINAPI ShowWindowAsync(_In_ HWND, _In_ int)
HDESK WINAPI OpenInputDesktop(_In_ DWORD, _In_ BOOL, _In_ DWORD)
static UINT WPARAM LPARAM lparam
map< IconPos, int > IconMap
pair< HWND, DWORD > MinimizeStruct
desktop management
LRESULT WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam)
_Out_opt_ int _Out_opt_ int * cy
#define ListView_GetItemCount(hwnd)
static HWND Create(CREATORFUNC creator, DWORD dwExStyle, LPCTSTR lpClassName, LPCTSTR lpWindowName, DWORD dwStyle, int x, int y, int w, int h, HWND hwndParent=0, HMENU hMenu=0)
pair< iterator, bool > insert(const value_type &__x)
LRESULT WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam)
#define ARRANGE_BORDER_DOWN
static CHAR Desktop[MAX_PATH]
virtual ULONG STDMETHODCALLTYPE AddRef()
#define ListView_SetItemPosition32(hwndLV, i, x0, y0)
static IShellFolder ShellFolder
Implementation of the Explorer desktop window.
_Rep_type::iterator iterator
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
LONG RegGetDWORDValue(IN HKEY hKey, IN LPCWSTR lpSubKey OPTIONAL, IN LPCWSTR lpValue OPTIONAL, OUT LPDWORD lpData OPTIONAL)
int WINAPI GetSystemMetrics(_In_ int)
int Notify(int id, NMHDR *pnmh)
BOOL WINAPI SwitchDesktop(_In_ HDESK)
BOOL WINAPI EnumWindows(_In_ WNDENUMPROC lpEnumFunc, _In_ LPARAM lParam)
#define PM_GET_ICON_ALGORITHM
#define PM_SET_ICON_ALGORITHM
BOOL WINAPI SetShellWindowEx(HWND, HWND)
LRESULT WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam)
virtual LRESULT WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam)
WindowHandle _hwndForeground
virtual int Command(int id, int code)
ExplorerGlobals g_Globals
static const POINTS s_align_start[]
#define WM_GETISHELLBROWSER
virtual ULONG STDMETHODCALLTYPE Release()
BOOL WINAPI MoveWindow(_In_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ BOOL)
HRESULT TranslateAccelerator([in] MSG *pmsg)
GLint GLint GLsizei GLsizei height
BOOL WINAPI DestroyMenu(_In_ HMENU)
#define PM_GET_LAST_ACTIVE
static BOOL CALLBACK SwitchDesktopEnumFct(HWND hwnd, LPARAM lparam)
void ToggleMinimize()
minimize/restore all windows on the desktop
window class with specified icon from resources
ShellFolder & GetDesktopFolder()
subclassed ShellView window
HWND WINAPI GetParent(_In_ HWND)
HRESULT UIActivate([in] UINT uState)
#define GET_WINDOW(CLASS, hwnd)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
#define DESKTOPBARBAR_HEIGHT
LRESULT WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam)
static int OpenShellFolders(LPIDA pida, HWND hFrameWnd)
#define GCL_HBRBACKGROUND
GLint GLint GLint GLint GLint GLint y
HMENU WINAPI CreatePopupMenu(void)
virtual LRESULT WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam)
CtxMenuInterfaces _cm_ifs
reverse_iterator rbegin()
bool DoContextMenu(int x, int y)
BOOL WINAPI CloseDesktop(_In_ HDESK)
HRESULT GetItemObject([in] UINT uItem, [in] REFIID riid, [out, iid_is(riid)] void **ppv)
_Rep_type::const_iterator const_iterator
BOOL WINAPI IsWindowVisible(_In_ HWND)
BOOL WINAPI PaintDesktop(_In_ HDC)
BOOL WINAPI SetForegroundWindow(_In_ HWND)
void SwitchToDesktop(int idx)
#define GetProcAddress(x, y)
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
virtual HRESULT OnDefaultCommand(LPIDA pida)
virtual int Notify(int id, NMHDR *pnmh)
BOOL WINAPI SetShellWindow(HWND)
convenient loading of string resources
static BOOL CALLBACK MinimizeDesktopEnumFct(HWND hwnd, LPARAM lparam)
#define ListView_GetItemSpacing(hwndLV, fSmall)
subclassed background window behind the visible desktop window
HRESULT ShellFolderContextMenu(IShellFolder *shell_folder, HWND hwndParent, int cidl, LPCITEMIDLIST *apidl, int x, int y, CtxMenuInterfaces &cm_ifs)
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
BOOL WINAPI TrackPopupMenu(_In_ HMENU, _In_ UINT, _In_ int, _In_ int, _Reserved_ int, _In_ HWND, _Reserved_ LPCRECT)
int Command(int id, int code)
void ShowExitWindowsDialog(HWND hwndOwner)
Shell folder of the desktop.
static UINT WPARAM wparam
struct _SECURITY_ATTRIBUTES SECURITY_ATTRIBUTES
void PositionIcons(int dir=1)