win32u: Move IsWindowEnabled implementation from user32.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Huw Davies <huw@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
d32d3b4f31
commit
c31954dfa7
|
@ -915,14 +915,9 @@ BOOL WINAPI EnableWindow( HWND hwnd, BOOL enable )
|
|||
/***********************************************************************
|
||||
* IsWindowEnabled (USER32.@)
|
||||
*/
|
||||
BOOL WINAPI IsWindowEnabled(HWND hWnd)
|
||||
BOOL WINAPI IsWindowEnabled( HWND hwnd )
|
||||
{
|
||||
LONG ret;
|
||||
|
||||
SetLastError(NO_ERROR);
|
||||
ret = GetWindowLongW( hWnd, GWL_STYLE );
|
||||
if (!ret && GetLastError() != NO_ERROR) return FALSE;
|
||||
return !(ret & WS_DISABLED);
|
||||
return NtUserCallHwnd( hwnd, NtUserIsWindowEnabled );
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
|
|
|
@ -807,6 +807,17 @@ BOOL is_window_unicode( HWND hwnd )
|
|||
return ret;
|
||||
}
|
||||
|
||||
/* see IsWindowEnabled */
|
||||
static BOOL is_window_enabled( HWND hwnd )
|
||||
{
|
||||
LONG ret;
|
||||
|
||||
SetLastError( NO_ERROR );
|
||||
ret = get_window_long( hwnd, GWL_STYLE );
|
||||
if (!ret && GetLastError() != NO_ERROR) return FALSE;
|
||||
return !(ret & WS_DISABLED);
|
||||
}
|
||||
|
||||
/* see GetWindowDpiAwarenessContext */
|
||||
DPI_AWARENESS_CONTEXT get_window_dpi_awareness_context( HWND hwnd )
|
||||
{
|
||||
|
@ -4979,6 +4990,8 @@ ULONG_PTR WINAPI NtUserCallHwnd( HWND hwnd, DWORD code )
|
|||
return get_server_window_text( hwnd, NULL, 0 );
|
||||
case NtUserIsWindow:
|
||||
return is_window( hwnd );
|
||||
case NtUserIsWindowEnabled:
|
||||
return is_window_enabled( hwnd );
|
||||
case NtUserIsWindowUnicode:
|
||||
return is_window_unicode( hwnd );
|
||||
case NtUserIsWindowVisible:
|
||||
|
|
|
@ -198,6 +198,7 @@ enum
|
|||
NtUserGetWindowDpiAwarenessContext,
|
||||
NtUserGetWindowTextLength,
|
||||
NtUserIsWindow,
|
||||
NtUserIsWindowEnabled,
|
||||
NtUserIsWindowUnicode,
|
||||
NtUserIsWindowVisible,
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue