ReactOS  0.4.13-dev-464-g6b95727
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

Referenced by IsAnyDesktopRunning().

◆ 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 }
HWND WINAPI GetShellWindow(VOID)
Definition: desktop.c:651
static BOOL(WINAPI *SetShellWindow)(HWND)
#define WINAPI
Definition: msvc.h:8
static HWND
Definition: desktop.cpp:36
BOOL WINAPI SetShellWindowEx(HWND, HWND)
Definition: ntwrapper.h:58
#define TEXT(s)
Definition: k32.h:26
#define GetModuleHandle
Definition: winbase.h:3641
#define GetProcAddress(x, y)
Definition: compat.h:410
BOOL WINAPI SetShellWindow(HWND)
Definition: desktop.c:641

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 }
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
void push_back(const_reference __x)
Definition: _list.h:509
#define TRUE
Definition: types.h:120
BOOL WINAPI IsIconic(_In_ HWND)
& rect
Definition: startmenu.cpp:1413
#define GetWindowStyle(hwnd)
Definition: windowsx.h:290
BOOL WINAPI ShowWindowAsync(_In_ HWND, _In_ int)
static UINT WPARAM LPARAM lparam
Definition: combo.c:716
pair< HWND, DWORD > MinimizeStruct
desktop management
Definition: globals.h:225
HWND _hwndDesktopBar
Definition: globals.h:287
#define SW_MINIMIZE
Definition: winuser.h:770
ExplorerGlobals g_Globals
Definition: explorer.cpp:52
Definition: _list.h:228
BOOL WINAPI IsWindowVisible(_In_ HWND)
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
HWND _hwndDesktop
Definition: globals.h:289

Referenced by Desktops::ToggleMinimize().

◆ SwitchDesktopEnumFct()

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

Definition at line 152 of file desktop.cpp.

153 {
155 
157  if (IsWindowVisible(hwnd))
158  windows.insert(hwnd);
159 
160  return TRUE;
161 }
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
#define TRUE
Definition: types.h:120
static UINT WPARAM LPARAM lparam
Definition: combo.c:716
HWND _hwndDesktopBar
Definition: globals.h:287
static struct testwindow_info windows[3]
Definition: appbar.c:46
ExplorerGlobals g_Globals
Definition: explorer.cpp:52
BOOL WINAPI IsWindowVisible(_In_ HWND)
Definition: _set.h:46
HWND _hwndDesktop
Definition: globals.h:289

Referenced by Desktops::SwitchToDesktop().

Variable Documentation

◆ HWND

Definition at line 36 of file desktop.cpp.

Referenced by IsAnyDesktopRunning(), and Desktops::SwitchToDesktop().

◆ 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().