Commit a566df11 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

winemac: Directly use win32u for user functions in window.c.

parent 46af1ada
......@@ -302,6 +302,16 @@ static inline LRESULT send_message(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lp
return NtUserMessageCall(hwnd, msg, wparam, lparam, NULL, NtUserSendMessage, FALSE);
}
static inline LRESULT send_message_timeout(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam,
UINT flags, UINT timeout, PDWORD_PTR res_ptr)
{
struct send_message_timeout_params params = { .flags = flags, .timeout = timeout };
LRESULT res = NtUserMessageCall(hwnd, msg, wparam, lparam, &params,
NtUserSendMessageTimeout, FALSE);
if (res_ptr) *res_ptr = params.result;
return res;
}
static inline HWND get_active_window(void)
{
GUITHREADINFO info;
......@@ -316,6 +326,22 @@ static inline HWND get_capture(void)
return NtUserGetGUIThreadInfo(GetCurrentThreadId(), &info) ? info.hwndCapture : 0;
}
static inline HWND get_focus(void)
{
GUITHREADINFO info;
info.cbSize = sizeof(info);
return NtUserGetGUIThreadInfo(GetCurrentThreadId(), &info) ? info.hwndFocus : 0;
}
static inline BOOL intersect_rect( RECT *dst, const RECT *src1, const RECT *src2 )
{
dst->left = max(src1->left, src2->left);
dst->top = max(src1->top, src2->top);
dst->right = min(src1->right, src2->right);
dst->bottom = min(src1->bottom, src2->bottom);
return !IsRectEmpty( dst );
}
/* registry helpers */
extern HKEY open_hkcu_key( const char *name ) DECLSPEC_HIDDEN;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment