ReactOS 0.4.15-dev-7953-g1f49173
desktop.cpp File Reference
#include <precomp.h>
#include "../taskbar/desktopbar.h"
#include "../taskbar/taskbar.h"
Include dependency graph for desktop.cpp:

Go to the source code of this file.

Macros

#define ARRANGE_BORDER_DOWN   8
 
#define ARRANGE_BORDER_HV   9
 
#define ARRANGE_ROUNDABOUT   10
 

Typedefs

typedef pair< int, intIconPos
 
typedef map< IconPos, intIconMap
 

Functions

static BOOL (WINAPI *SetShellWindow)(HWND)
 
static BOOL CALLBACK SwitchDesktopEnumFct (HWND hwnd, LPARAM lparam)
 
static BOOL CALLBACK MinimizeDesktopEnumFct (HWND hwnd, LPARAM lparam)
 
BOOL IsAnyDesktopRunning ()
 

Variables

static HWND
 
static const POINTS s_align_start []
 
static const POINTS s_align_dir1 []
 
static const POINTS s_align_dir2 []
 

Macro Definition Documentation

◆ ARRANGE_BORDER_DOWN

#define ARRANGE_BORDER_DOWN   8

Definition at line 705 of file desktop.cpp.

◆ ARRANGE_BORDER_HV

#define ARRANGE_BORDER_HV   9

Definition at line 706 of file desktop.cpp.

◆ ARRANGE_ROUNDABOUT

#define ARRANGE_ROUNDABOUT   10

Definition at line 707 of file desktop.cpp.

Typedef Documentation

◆ IconMap

typedef map<IconPos, int> IconMap

Definition at line 755 of file desktop.cpp.

◆ IconPos

typedef pair<int,int> IconPos

Definition at line 754 of file desktop.cpp.

Function Documentation

◆ BOOL()

static BOOL ( WINAPI SetShellWindow)
static

◆ IsAnyDesktopRunning()

BOOL IsAnyDesktopRunning ( void  )

Definition at line 248 of file desktop.cpp.

249{
250 HINSTANCE hUser32 = GetModuleHandle(TEXT("user32"));
251
252 SetShellWindow = (BOOL(WINAPI*)(HWND)) GetProcAddress(hUser32, "SetShellWindow");
253 SetShellWindowEx = (BOOL(WINAPI*)(HWND,HWND)) GetProcAddress(hUser32, "SetShellWindowEx");
254
255 return GetShellWindow() != 0;
256}
#define GetProcAddress(x, y)
Definition: compat.h:753
#define TEXT(s)
Definition: k32.h:26
static HWND
Definition: desktop.cpp:36
#define BOOL
Definition: nt_native.h:43
BOOL WINAPI SetShellWindow(HWND)
Definition: desktop.c:641
BOOL WINAPI SetShellWindowEx(HWND, HWND)
Definition: ntwrapper.h:58
HWND WINAPI GetShellWindow(VOID)
Definition: desktop.c:651
#define GetModuleHandle
Definition: winbase.h:3827
#define WINAPI
Definition: msvc.h:6

Referenced by _tWinMain().

◆ MinimizeDesktopEnumFct()

static BOOL CALLBACK MinimizeDesktopEnumFct ( HWND  hwnd,
LPARAM  lparam 
)
static

Definition at line 209 of file desktop.cpp.

210{
212
214 if (IsWindowVisible(hwnd) && !IsIconic(hwnd)) {
215 RECT rect;
216
217 if (GetWindowRect(hwnd,&rect))
218 if (rect.right>0 && rect.bottom>0 &&
219 rect.right>rect.left && rect.bottom>rect.top) {
222 }
223 }
224
225 return TRUE;
226}
@ lparam
Definition: SystemMenu.c:31
Definition: list.h:37
void push_back(const_reference __x)
Definition: _list.h:509
#define TRUE
Definition: types.h:120
ExplorerGlobals g_Globals
Definition: explorer.cpp:52
pair< HWND, DWORD > MinimizeStruct
desktop management
Definition: globals.h:225
& rect
Definition: startmenu.cpp:1413
HWND _hwndDesktopBar
Definition: globals.h:287
HWND _hwndDesktop
Definition: globals.h:289
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
#define GetWindowStyle(hwnd)
Definition: windowsx.h:315
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
#define SW_MINIMIZE
Definition: winuser.h:776
BOOL WINAPI IsIconic(_In_ HWND)
BOOL WINAPI ShowWindowAsync(_In_ HWND, _In_ int)
BOOL WINAPI IsWindowVisible(_In_ HWND)

Referenced by Desktops::ToggleMinimize().

◆ SwitchDesktopEnumFct()

static BOOL CALLBACK SwitchDesktopEnumFct ( HWND  hwnd,
LPARAM  lparam 
)
static

Definition at line 152 of file desktop.cpp.

153{
155
158 windows.insert(hwnd);
159
160 return TRUE;
161}
Definition: _set.h:50
static struct testwindow_info windows[3]
Definition: appbar.c:46

Referenced by Desktops::SwitchToDesktop().

Variable Documentation

◆ HWND

Definition at line 36 of file desktop.cpp.

Referenced by IsAnyDesktopRunning().

◆ s_align_dir1

const POINTS s_align_dir1[]
static
Initial value:
= {
{ 0, +1},
{+1, 0},
{-1, 0},
{ 0, +1},
{ 0, -1},
{+1, 0},
{-1, 0},
{ 0, -1},
{ 0, +1},
{+1, 0},
{+1, 0}
}

Definition at line 724 of file desktop.cpp.

Referenced by DesktopShellView::PositionIcons().

◆ s_align_dir2

const POINTS s_align_dir2[]
static
Initial value:
= {
{+1, 0},
{ 0, +1},
{ 0, +1},
{-1, 0},
{+1, 0},
{ 0, -1},
{ 0, -1},
{-1, 0},
{+1, 0},
{ 0, +1},
{ 0, +1}
}

Definition at line 739 of file desktop.cpp.

Referenced by DesktopShellView::PositionIcons().

◆ s_align_start

const POINTS s_align_start[]
static
Initial value:
= {
{0, 0},
{0, 0},
{1, 0},
{1, 0},
{0, 1},
{0, 1},
{1, 1},
{1, 1},
{0, 0},
{0, 0},
{0, 0}
}

Definition at line 709 of file desktop.cpp.

Referenced by DesktopShellView::PositionIcons().