31#include "../taskbar/desktopbar.h"
32#include "../taskbar/taskbar.h"
41Desktop::Desktop(HDESK hdesktop)
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);
130int DesktopThread::Run()
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:
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;
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;
OLE drop target for the desktop window.
void AddSuportedFormat(FORMATETC &ftetc)
virtual ULONG STDMETHODCALLTYPE AddRef()
virtual ULONG STDMETHODCALLTYPE Release()
void push_back(const_reference __x)
reverse_iterator rbegin()
_Rep_type::const_iterator const_iterator
pair< iterator, bool > insert(const value_type &__x)
_Rep_type::const_iterator const_iterator
_Rep_type::iterator iterator
#define DESKTOPBARBAR_HEIGHT
#define WM_GETISHELLBROWSER
struct _SECURITY_ATTRIBUTES SECURITY_ATTRIBUTES
#define GetProcAddress(x, y)
HRESULT WINAPI RegisterDragDrop(HWND hwnd, LPDROPTARGET pDropTarget)
HRESULT WINAPI RevokeDragDrop(HWND hwnd)
void ShowExitWindowsDialog(HWND hwndOwner)
GLint GLint GLint GLint GLint x
GLint GLint GLint GLint GLint GLint y
GLint GLint GLsizei GLsizei height
GLint GLint GLsizei width
GLint GLint GLint yoffset
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
HRESULT CreateViewWindow([in] IShellView *psvPrevious, [in] LPCFOLDERSETTINGS lpfs, [in] IShellBrowser *psb, [out] RECT *prcView, [out] HWND *phWnd)
HRESULT UIActivate([in] UINT uState)
HRESULT TranslateAccelerator([in] MSG *pmsg)
HRESULT GetItemObject([in] UINT uItem, [in] REFIID riid, [out, iid_is(riid)] void **ppv)
static const POINTS s_align_dir1[]
static const POINTS s_align_dir2[]
static BOOL CALLBACK SwitchDesktopEnumFct(HWND hwnd, LPARAM lparam)
static BOOL CALLBACK MinimizeDesktopEnumFct(HWND hwnd, LPARAM lparam)
#define ARRANGE_BORDER_HV
#define ARRANGE_ROUNDABOUT
static const POINTS s_align_start[]
map< IconPos, int > IconMap
#define ARRANGE_BORDER_DOWN
BOOL IsAnyDesktopRunning()
#define PM_DISPLAY_VERSION
#define PM_SET_ICON_ALGORITHM
#define PM_GET_ICON_ALGORITHM
ExplorerGlobals g_Globals
void explorer_show_frame(int cmdShow, LPTSTR lpCmdLine)
void explorer_about(HWND hwndParent)
pair< HWND, DWORD > MinimizeStruct
desktop management
struct ExplorerGlobals g_Globals
#define IDS_ABOUT_EXPLORER
#define SetWindowStyle(hwnd, val)
#define GET_WINDOW(CLASS, hwnd)
#define WINDOW_CREATOR(WND_CLASS)
static struct testwindow_info windows[3]
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
const GUID IID_IDataObject
_Out_opt_ int _Out_opt_ int * cy
#define ListView_GetItemCount(hwnd)
#define ListView_SetItemPosition32(hwndLV, i, x0, y0)
#define ListView_GetItemSpacing(hwndLV, fSmall)
LONG RegSetDWORDValue(IN HKEY hKey, IN LPCWSTR lpSubKey OPTIONAL, IN LPCWSTR lpValue OPTIONAL, IN BOOL bCreateKeyIfDoesntExist, IN DWORD dwData)
LONG RegGetDWORDValue(IN HKEY hKey, IN LPCWSTR lpSubKey OPTIONAL, IN LPCWSTR lpValue OPTIONAL, OUT LPDWORD lpData OPTIONAL)
ShellFolder & GetDesktopFolder()
HRESULT ShellFolderContextMenu(IShellFolder *shell_folder, HWND hwndParent, int cidl, LPCITEMIDLIST *apidl, int x, int y, CtxMenuInterfaces &cm_ifs)
#define FCIDM_SHVIEWFIRST
const ITEMIDLIST UNALIGNED * LPCITEMIDLIST
subclassed background window behind the visible desktop window
LRESULT WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam)
void DrawDesktopBkgnd(HDC hdc)
BackgroundWindow(HWND hwnd)
Shell folder of the desktop.
subclassed ShellView window
int Notify(int id, NMHDR *pnmh)
bool DoContextMenu(int x, int y)
HRESULT DoDesktopContextMenu(int x, int y)
DesktopShellView(HWND hwnd, IShellView *pShellView)
void PositionIcons(int dir=1)
LRESULT WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam)
int Command(int id, int code)
Implementation of the Explorer desktop window.
virtual HRESULT OnDefaultCommand(LPIDA pida)
LRESULT Init(LPCREATESTRUCT pcs)
LRESULT WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam)
WindowHandle _hwndForeground
void SwitchToDesktop(int idx)
void ToggleMinimize()
minimize/restore all windows on the desktop
CtxMenuInterfaces _cm_ifs
LRESULT WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam)
window class with specified icon from resources
static int OpenShellFolders(LPIDA pida, HWND hFrameWnd)
HRESULT GetData(IDataObject *selection)
convenient loading of string resources
IShellFolder smart pointer.
virtual LRESULT WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam)
virtual LRESULT WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam)
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)
virtual int Command(int id, int code)
virtual LRESULT Init(LPCREATESTRUCT pcs)
virtual int Notify(int id, NMHDR *pnmh)
VOID WINAPI DECLSPEC_HOTPATCH Sleep(IN DWORD dwMilliseconds)
#define PM_GET_LAST_ACTIVE
BOOL WINAPI SetShellWindow(HWND)
BOOL WINAPI SetShellWindowEx(HWND, HWND)
HWND WINAPI GetShellWindow(VOID)
#define GetWindowStyle(hwnd)
#define HKEY_CURRENT_USER
HMENU WINAPI CreatePopupMenu(void)
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
BOOL WINAPI SwitchDesktop(_In_ HDESK)
BOOL WINAPI SetThreadDesktop(_In_ HDESK)
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
HDESK WINAPI OpenInputDesktop(_In_ DWORD, _In_ BOOL, _In_ DWORD)
BOOL WINAPI SetForegroundWindow(_In_ HWND)
BOOL WINAPI PaintDesktop(_In_ HDC)
#define WM_SYSCOLORCHANGE
BOOL WINAPI IsIconic(_In_ HWND)
BOOL WINAPI ShowWindowAsync(_In_ HWND, _In_ int)
#define DESKTOP_SWITCHDESKTOP
BOOL WINAPI EnumWindows(_In_ WNDENUMPROC lpEnumFunc, _In_ LPARAM lParam)
#define GCL_HBRBACKGROUND
#define GetNextWindow(h, c)
HWND WINAPI GetParent(_In_ HWND)
BOOL WINAPI DestroyMenu(_In_ HMENU)
BOOL WINAPI TrackPopupMenu(_In_ HMENU, _In_ UINT, _In_ int, _In_ int, _Reserved_ int, _In_ HWND, _Reserved_ LPCRECT)
BOOL WINAPI CloseDesktop(_In_ HDESK)
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
#define SystemParametersInfo
BOOL WINAPI IsWindowVisible(_In_ HWND)
int WINAPI GetSystemMetrics(_In_ int)
BOOL WINAPI MoveWindow(_In_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ BOOL)