win32u: Introduce a win32u_get_window_pixel_format() helper.

This commit is contained in:
Zebediah Figura 2023-01-20 14:01:54 -06:00 committed by Alexandre Julliard
parent b545ca0f9b
commit 463a11379b
2 changed files with 18 additions and 0 deletions

View file

@ -1457,6 +1457,23 @@ BOOL win32u_set_window_pixel_format( HWND hwnd, int format )
return TRUE;
}
int win32u_get_window_pixel_format( HWND hwnd )
{
WND *win = get_win_ptr( hwnd );
int ret;
if (!win || win == WND_DESKTOP || win == WND_OTHER_PROCESS)
{
WARN( "getting format on win %p not supported\n", hwnd );
return 0;
}
ret = win->pixel_format;
release_win_ptr( win );
return ret;
}
/***********************************************************************
* NtUserGetProp (win32u.@)
*

View file

@ -340,6 +340,7 @@ struct user_driver_funcs
extern void __wine_set_user_driver( const struct user_driver_funcs *funcs, UINT version );
extern BOOL win32u_set_window_pixel_format( HWND hwnd, int format );
extern int win32u_get_window_pixel_format( HWND hwnd );
#endif /* WINE_UNIX_LIB */