17 #define IDT_AUTOHIDE 1 18 #define IDT_AUTOUNHIDE 2 22 #define APPBAR_CALLBACK (WM_USER + 100) 24 #define LEFT_DOWN() mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0); 25 #define LEFT_UP() mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0); 26 #define MOVE(x, y) SetCursorPos((x), (y)) 36 static char s_buf[32];
57 trace(
"SHAppBarMessage entered (dwMessage=%s, rc=(%ld, %ld, %ld, %ld))\n",
58 MessageOfAppBar(dwMessage),
61 trace(
"SHAppBarMessage leaved (dwMessage=%s, rc=(%ld, %ld, %ld, %ld))\n",
62 MessageOfAppBar(dwMessage),
66 #define SHAppBarMessage SHAppBarMessageWrap 69 #define ARRAYSIZE _countof 71 void appbar_tprintf(
const TCHAR *
fmt, ...)
85 #define MSGDUMP_TPRINTF appbar_tprintf 92 #define SLIDE_HIDE 400 93 #define SLIDE_SHOW 150 273 skip(
"failed to create thread\n");
425 if (hwndAutoHide !=
hwnd)
777 hwndActive !=
hwnd &&
778 hwndActive !=
NULL &&
850 if (
pt.x < cxScreen / 2)
857 dx = cxScreen -
pt.x;
861 if (
pt.y < cyScreen / 2)
868 dy = cyScreen -
pt.y;
872 if (cxScreen *
dy > cyScreen *
dx)
1123 skip(
"Window::DoRegisterClass failed\n");
1133 skip(
"CreateWindowExW failed\n");
1141 skip(
"CreateWindowExW failed\n");
#define ABM_GETAUTOHIDEBAR
BOOL WINAPI RedrawWindow(_In_opt_ HWND, _In_opt_ LPCRECT, _In_opt_ HRGN, _In_ UINT)
void OnWindowPosChanged(HWND hwnd, const LPWINDOWPOS lpwpos)
BOOL WINAPI TranslateMessage(_In_ const MSG *)
void OnSize(HWND hwnd, UINT state, int cx, int cy)
VOID WINAPI DECLSPEC_HOTPATCH Sleep(IN DWORD dwMilliseconds)
_In_ int _Inout_ LPRECT lprc
#define SetWindowRedraw(hwnd, fRedraw)
BOOL WINAPI OffsetRect(_Inout_ LPRECT, _In_ int, _In_ int)
void AppBar_SetAutoHideTimer(HWND hwnd)
void AppBar_PosChanged(PAPPBARDATA pabd)
void AppBar_QueryPos(HWND hwnd, LPRECT lprc)
TW_UINT32 TW_UINT16 TW_UINT16 MSG
void OnAppBarCallback(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
virtual LRESULT CALLBACK WindowProcDx(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
BOOL WINAPI UpdateWindow(_In_ HWND)
DWORD WINAPI GetTickCount(VOID)
#define SystemParametersInfo
void OnTimer(HWND hwnd, UINT id)
GLint GLint GLint GLint GLint x
void AppBar_Hide(HWND hwnd)
#define ABM_GETTASKBARPOS
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
BOOL WINAPI EndPaint(_In_ HWND, _In_ const PAINTSTRUCT *)
BOOL WINAPI GetCursorPos(_Out_ LPPOINT)
#define ok_long(expression, result)
CREATESTRUCTA * LPCREATESTRUCT
BOOL WINAPI DestroyWindow(_In_ HWND)
void OnLButtonUp(HWND hwnd, int x, int y, UINT keyFlags)
BOOL OnCreate(HWND hwnd, LPCREATESTRUCT lpCreateStruct)
void SlideWindow(HWND hwnd, LPRECT prc)
UINT_PTR WINAPI SHAppBarMessage(DWORD msg, PAPPBARDATA data)
void OnRButtonDown(HWND hwnd, BOOL fDoubleClick, int x, int y, UINT keyFlags)
void OnCommand(HWND hwnd, int id, HWND hwndCtl, UINT codeNotify)
static const WCHAR szText[]
HANDLE WINAPI GetCurrentThread(VOID)
HDC WINAPI BeginPaint(_In_ HWND, _Out_ LPPAINTSTRUCT)
#define THREAD_PRIORITY_HIGHEST
#define FORWARD_WM_NCHITTEST(hwnd, x, y, fn)
void AppBar_SetAutoUnhideTimer(HWND hwnd)
void AppBar_QuerySetPos(UINT uEdge, LPRECT lprc, PAPPBARDATA pabd, BOOL fMove)
_Out_opt_ int _Out_opt_ int * cy
DWORD WINAPI GetWindowThreadProcessId(HWND, PDWORD)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateThread(IN LPSECURITY_ATTRIBUTES lpThreadAttributes, IN DWORD dwStackSize, IN LPTHREAD_START_ROUTINE lpStartAddress, IN LPVOID lpParameter, IN DWORD dwCreationFlags, OUT LPDWORD lpThreadId)
HWND WINAPI GetDesktopWindow(void)
WDF_INTERRUPT_PRIORITY priority
static LRESULT CALLBACK WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
BOOL AppBar_AutoHide(HWND hwnd)
UINT_PTR WINAPI SetTimer(_In_opt_ HWND, _In_ UINT_PTR, _In_ UINT, _In_opt_ TIMERPROC)
BOOL WINAPI SetThreadPriority(IN HANDLE hThread, IN int nPriority)
BOOL WINAPI SystemParametersInfoW(_In_ UINT, _In_ UINT, _Inout_opt_ PVOID, _In_ UINT)
static Window * GetAppbarData(HWND hwnd)
void OnNCDestroy(HWND hwnd)
BOOL AppBar_UnRegister(HWND hwnd)
void AppBar_Size(HWND hwnd)
#define PostThreadMessage
void AppBar_SetAlwaysOnTop(HWND hwnd, BOOL fOnTop)
#define FORWARD_WM_WINDOWPOSCHANGED(hwnd, lpwpos, fn)
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
int WINAPI GetSystemMetrics(_In_ int)
void OnActivate(HWND hwnd, UINT state, HWND hwndActDeact, BOOL fMinimized)
#define ABM_SETAUTOHIDEBAR
BOOL AppBar_SetSide(HWND hwnd, UINT uSide)
BOOL WINAPI KillTimer(_In_opt_ HWND, _In_ UINT_PTR)
HWND WINAPI GetWindow(_In_ HWND, _In_ UINT)
START_TEST(SHAppBarMessage)
static DWORD WINAPI ActionThreadFunc(LPVOID args)
BOOL WINAPI MoveWindow(_In_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ BOOL)
#define ABN_FULLSCREENAPP
static BOOL DoRegisterClass(HINSTANCE hInstance)
void OnMove(HWND hwnd, int x, int y)
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
BOOL WINAPI SetRect(_Out_ LPRECT, _In_ int, _In_ int, _In_ int, _In_ int)
HWND WINAPI SetCapture(_In_ HWND hWnd)
BOOL AppBar_SetAutoHide(HWND hwnd, BOOL fHide)
static const TCHAR s_szName[]
int WINAPIV wsprintfA(_Out_ LPSTR, _In_ _Printf_format_string_ LPCSTR,...)
void OnLButtonDown(HWND hwnd, BOOL fDoubleClick, int x, int y, UINT keyFlags)
#define ABM_WINDOWPOSCHANGED
BOOL AppBar_NoAutoHide(HWND hwnd)
HWND WINAPI GetForegroundWindow(void)
GLint GLint GLint GLint GLint GLint y
#define WM_WINDOWPOSCHANGED
BOOL WINAPI PtInRect(_In_ LPCRECT, _In_ POINT)
BOOL WINAPI ReleaseCapture(void)
void OnKey(HWND hwnd, UINT vk, BOOL fDown, int cRepeat, UINT flags)
Window(INT cx, INT cy, BOOL fAutoHide=FALSE)
static HWND DoCreateMainWnd(HINSTANCE hInstance, LPCTSTR pszText, INT cx, INT cy, DWORD style=WS_POPUP|WS_THICKFRAME|WS_CLIPCHILDREN, DWORD exstyle=WS_EX_WINDOWEDGE|WS_EX_TOOLWINDOW|WS_EX_TOPMOST, BOOL fAutoHide=FALSE)
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
#define HANDLE_MSG(hwnd, message, fn)
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
_Check_return_ long __cdecl labs(_In_ long x)
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
void AppBar_UnHide(HWND hwnd)
void GetWorkArea(LPRECT prc) const
static __inline LRESULT MSGDUMP_API MD_msgdump(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
int WINAPI GetThreadPriority(IN HANDLE hThread)
void OnMouseMove(HWND hwnd, int x, int y, UINT keyFlags)
BOOL AppBar_Register(HWND hwnd)
UINT OnNCHitTest(HWND hwnd, int x, int y)
#define GetWindowOwner(hwnd)