31 if (pAppBar && hwndAppBar == pAppBar->
hWnd)
68 ERR(
"Already exists: %p\n",
hWnd);
74 const UINT c_nGrow = 4;
78 ERR(
"Out of memory\n");
95 ERR(
"Out of memory\n");
136 ERR(
"!pOutput: %d\n",
pData->dwProcessId);
142 ERR(
"IsRectEmpty\n");
162 if (!pAppBar2 || pAppBar1->
hWnd == pAppBar2->
hWnd)
168 if (pAppBar1->
uEdge == uEdge || pAppBar2->
uEdge != uEdge)
212 TRACE(
"%p, %p, 0x%X, %p\n", hMon, hwndIgnore, dwNotify,
lParam);
221 if (!pAppBar || pAppBar->
hWnd == hwndIgnore)
240 switch (pAppBar->uEdge)
257 if (pAppBar1->uEdge != pAppBar2->uEdge)
260 switch (pAppBar2->uEdge)
262 case ABE_LEFT:
return pAppBar1->rc.left >= pAppBar2->rc.left;
263 case ABE_TOP:
return pAppBar1->rc.top >= pAppBar2->rc.top;
264 case ABE_RIGHT:
return pAppBar1->rc.right <= pAppBar2->rc.right;
265 case ABE_BOTTOM:
return pAppBar1->rc.bottom <= pAppBar2->rc.bottom;
329 RECT rcWorkArea1, rcWorkArea2;
332 enum { SET_WORKAREA_1 = 1, SET_WORKAREA_2 = 2, NEED_SIZING = 4 };
341 flags = SET_WORKAREA_1;
350 if (hMon2 && hMon2 != hMon1)
354 flags |= SET_WORKAREA_2;
360 if (
flags & SET_WORKAREA_1)
367 if (
flags & SET_WORKAREA_2)
374 if (bTray ||
flags == NEED_SIZING)
458 if (pCopyData->cbData !=
sizeof(*
pData) ||
461 ERR(
"Invalid AppBar message\n");
475 switch (
pData->dwMessage)
static BOOL Edge_IsVertical(_In_ UINT uEdge)
static PAPPBARDATAINTEROP AppBar_LockOutput(_In_ PAPPBAR_COMMAND pData)
@ WORKAREA_IS_NOT_MONITOR
@ WORKAREA_SAME_AS_MONITOR
static VOID AppBar_UnLockOutput(_Out_ PAPPBARDATAINTEROP pOutput)
struct tagAPPBAR * PAPPBAR
#define UlongToHandle(ul)
void AppBarSubtractRect(_In_ PAPPBAR pAppBar, _Inout_ PRECT prc)
void EliminateAppBar(_In_ INT iItem)
void ComputeHiddenRect(_Inout_ PRECT prc, _In_ UINT uSide)
void OnAppBarRemove(_In_ const APPBAR_COMMAND *pData)
static BOOL CALLBACK MonitorEnumProc(_In_ HMONITOR hMonitor, _In_ HDC hDC, _In_ LPRECT prc, _Inout_ LPARAM lParam)
virtual BOOL IsAutoHideState() const =0
void StuckAppChange(_In_opt_ HWND hwndTarget, _In_opt_ const RECT *prcOld, _In_opt_ const RECT *prcNew, _In_ BOOL bTray)
void OnAppBarSetPos(_Inout_ PAPPBAR_COMMAND pData)
PAPPBAR FindAppBar(_In_ HWND hwndAppBar) const
BOOL AppBarOutsideOf(_In_ const APPBAR *pAppBar1, _In_ const APPBAR *pAppBar2)
void GetDockedRect(_Out_ PRECT prcDocked)
virtual const RECT * GetTrayRect()=0
void OnAppBarNotifyAll(_In_opt_ HMONITOR hMon, _In_opt_ HWND hwndIgnore, _In_ DWORD dwNotify, _In_opt_ LPARAM lParam)
void RecomputeAllWorkareas()
virtual INT GetPosition() const =0
virtual BOOL IsHidingState() const =0
virtual HMONITOR GetMonitor() const =0
virtual ~CAppBarManager()
PAPPBAR_COMMAND GetAppBarMessage(_Inout_ PCOPYDATASTRUCT pCopyData)
virtual HWND GetDesktopWnd() const =0
void OnAppBarQueryPos(_Inout_ PAPPBAR_COMMAND pData)
WORKAREA_TYPE RecomputeWorkArea(_In_ const RECT *prcTray, _In_ HMONITOR hMonitor, _Out_ PRECT prcWorkArea)
void RedrawDesktop(_In_ HWND hwndDesktop, _Inout_ PRECT prc)
virtual HMONITOR GetPreviousMonitor() const =0
LRESULT OnAppBarMessage(_Inout_ PCOPYDATASTRUCT pCopyData)
BOOL OnAppBarNew(_In_ const APPBAR_COMMAND *pData)
LPVOID WINAPI DPA_DeletePtr(HDPA hdpa, INT i)
BOOL WINAPI DPA_Destroy(HDPA hdpa)
HDPA WINAPI DPA_Create(INT nGrow)
INT WINAPI DPA_InsertPtr(HDPA hdpa, INT i, LPVOID p)
HLOCAL NTAPI LocalAlloc(UINT uFlags, SIZE_T dwBytes)
HLOCAL NTAPI LocalFree(HLOCAL hMem)
HMONITOR WINAPI MonitorFromRect(LPCRECT, DWORD)
HMONITOR WINAPI MonitorFromWindow(HWND, DWORD)
#define UNREFERENCED_PARAMETER(P)
#define DPA_GetPtrCount(hdpa)
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
struct tagAPPBAR_COMMAND * PAPPBAR_COMMAND
BOOL WINAPI IsWindow(_In_opt_ HWND)
BOOL WINAPI RedrawWindow(_In_opt_ HWND, _In_opt_ LPCRECT, _In_opt_ HRGN, _In_ UINT)
BOOL WINAPI PostMessageW(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI IsRectEmpty(_In_ LPCRECT)
BOOL WINAPI EnumDisplayMonitors(_In_opt_ HDC, _In_opt_ LPCRECT, _In_ MONITORENUMPROC, _In_ LPARAM)
int WINAPI MapWindowPoints(_In_opt_ HWND hWndFrom, _In_opt_ HWND hWndTo, _Inout_updates_(cPoints) LPPOINT lpPoints, _In_ UINT cPoints)
BOOL WINAPI SystemParametersInfoW(_In_ UINT uiAction, _In_ UINT uiParam, _Inout_opt_ PVOID pvParam, _In_ UINT fWinIni)
BOOL WINAPI GetMonitorInfoW(_In_ HMONITOR, _Inout_ LPMONITORINFO)
BOOL WINAPI EqualRect(_In_ LPCRECT, _In_ LPCRECT)
int WINAPI GetSystemMetrics(_In_ int)
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI SubtractRect(_Out_ LPRECT, _In_ LPCRECT, _In_ LPCRECT)