Commit 9546953b authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

user32: Remove no longer needed helpers.

parent 290a5314
...@@ -670,15 +670,6 @@ BOOL WINAPI EnumDisplaySettingsExW( const WCHAR *device, DWORD mode, ...@@ -670,15 +670,6 @@ BOOL WINAPI EnumDisplaySettingsExW( const WCHAR *device, DWORD mode,
} }
/********************************************************************** /**********************************************************************
* get_monitor_dpi
*/
UINT get_monitor_dpi( HMONITOR monitor )
{
/* FIXME: use the monitor DPI instead */
return system_dpi;
}
/**********************************************************************
* get_win_monitor_dpi * get_win_monitor_dpi
*/ */
UINT get_win_monitor_dpi( HWND hwnd ) UINT get_win_monitor_dpi( HWND hwnd )
...@@ -730,16 +721,6 @@ static POINT point_phys_to_win_dpi( HWND hwnd, POINT pt ) ...@@ -730,16 +721,6 @@ static POINT point_phys_to_win_dpi( HWND hwnd, POINT pt )
} }
/********************************************************************** /**********************************************************************
* point_win_to_thread_dpi
*/
POINT point_win_to_thread_dpi( HWND hwnd, POINT pt )
{
UINT dpi = get_thread_dpi();
if (!dpi) dpi = get_win_monitor_dpi( hwnd );
return map_dpi_point( pt, GetDpiForWindow( hwnd ), dpi );
}
/**********************************************************************
* map_dpi_rect * map_dpi_rect
*/ */
RECT map_dpi_rect( RECT rect, UINT dpi_from, UINT dpi_to ) RECT map_dpi_rect( RECT rect, UINT dpi_from, UINT dpi_to )
......
...@@ -37,25 +37,6 @@ ...@@ -37,25 +37,6 @@
WINE_DEFAULT_DEBUG_CHANNEL(win); WINE_DEFAULT_DEBUG_CHANNEL(win);
/***********************************************************************
* get_user_handle_ptr
*/
void *get_user_handle_ptr( HANDLE handle, unsigned int type )
{
return (void *)NtUserCallTwoParam( HandleToUlong(handle), type, NtUserGetHandlePtr );
}
/***********************************************************************
* release_user_handle_ptr
*/
void release_user_handle_ptr( void *ptr )
{
assert( ptr && ptr != OBJ_OTHER_PROCESS );
NtUserCallOneParam( 1, NtUserLock );
}
/******************************************************************* /*******************************************************************
* list_window_children * list_window_children
* *
...@@ -149,17 +130,23 @@ BOOL is_desktop_window( HWND hwnd ) ...@@ -149,17 +130,23 @@ BOOL is_desktop_window( HWND hwnd )
*/ */
WND *WIN_GetPtr( HWND hwnd ) WND *WIN_GetPtr( HWND hwnd )
{ {
WND *ptr; WND *ptr = (void *)NtUserCallTwoParam( HandleToUlong(hwnd), NTUSER_OBJ_WINDOW, NtUserGetHandlePtr );
if (ptr == WND_OTHER_PROCESS && is_desktop_window( hwnd )) ptr = WND_DESKTOP;
if ((ptr = get_user_handle_ptr( hwnd, NTUSER_OBJ_WINDOW )) == WND_OTHER_PROCESS)
{
if (is_desktop_window( hwnd )) ptr = WND_DESKTOP;
}
return ptr; return ptr;
} }
/*********************************************************************** /***********************************************************************
* WIN_ReleasePtr
*/
void WIN_ReleasePtr( WND *ptr )
{
assert( ptr && ptr != OBJ_OTHER_PROCESS );
NtUserCallOneParam( 1, NtUserLock );
}
/***********************************************************************
* WIN_IsCurrentProcess * WIN_IsCurrentProcess
* *
* Check whether a given window belongs to the current process (and return the full handle). * Check whether a given window belongs to the current process (and return the full handle).
......
...@@ -37,6 +37,7 @@ struct tagDIALOGINFO; ...@@ -37,6 +37,7 @@ struct tagDIALOGINFO;
extern HWND get_hwnd_message_parent(void) DECLSPEC_HIDDEN; extern HWND get_hwnd_message_parent(void) DECLSPEC_HIDDEN;
extern BOOL is_desktop_window( HWND hwnd ) DECLSPEC_HIDDEN; extern BOOL is_desktop_window( HWND hwnd ) DECLSPEC_HIDDEN;
extern WND *WIN_GetPtr( HWND hwnd ) DECLSPEC_HIDDEN; extern WND *WIN_GetPtr( HWND hwnd ) DECLSPEC_HIDDEN;
extern void WIN_ReleasePtr( WND *ptr ) DECLSPEC_HIDDEN;
extern HWND WIN_GetFullHandle( HWND hwnd ) DECLSPEC_HIDDEN; extern HWND WIN_GetFullHandle( HWND hwnd ) DECLSPEC_HIDDEN;
extern HWND WIN_IsCurrentProcess( HWND hwnd ) DECLSPEC_HIDDEN; extern HWND WIN_IsCurrentProcess( HWND hwnd ) DECLSPEC_HIDDEN;
extern HWND WIN_IsCurrentThread( HWND hwnd ) DECLSPEC_HIDDEN; extern HWND WIN_IsCurrentThread( HWND hwnd ) DECLSPEC_HIDDEN;
...@@ -48,20 +49,12 @@ extern HWND *WIN_ListChildren( HWND hwnd ) DECLSPEC_HIDDEN; ...@@ -48,20 +49,12 @@ extern HWND *WIN_ListChildren( HWND hwnd ) DECLSPEC_HIDDEN;
extern void MDI_CalcDefaultChildPos( HWND hwndClient, INT total, LPPOINT lpPos, INT delta, UINT *id ) DECLSPEC_HIDDEN; extern void MDI_CalcDefaultChildPos( HWND hwndClient, INT total, LPPOINT lpPos, INT delta, UINT *id ) DECLSPEC_HIDDEN;
extern HDESK open_winstation_desktop( HWINSTA hwinsta, LPCWSTR name, DWORD flags, BOOL inherit, ACCESS_MASK access ) DECLSPEC_HIDDEN; extern HDESK open_winstation_desktop( HWINSTA hwinsta, LPCWSTR name, DWORD flags, BOOL inherit, ACCESS_MASK access ) DECLSPEC_HIDDEN;
/* to release pointers retrieved by WIN_GetPtr */
static inline void WIN_ReleasePtr( WND *ptr )
{
release_user_handle_ptr( ptr );
}
extern void WINPOS_ActivateOtherWindow( HWND hwnd ) DECLSPEC_HIDDEN; extern void WINPOS_ActivateOtherWindow( HWND hwnd ) DECLSPEC_HIDDEN;
extern UINT get_monitor_dpi( HMONITOR monitor ) DECLSPEC_HIDDEN;
extern UINT get_win_monitor_dpi( HWND hwnd ) DECLSPEC_HIDDEN; extern UINT get_win_monitor_dpi( HWND hwnd ) DECLSPEC_HIDDEN;
extern UINT get_thread_dpi(void) DECLSPEC_HIDDEN; extern UINT get_thread_dpi(void) DECLSPEC_HIDDEN;
extern POINT map_dpi_point( POINT pt, UINT dpi_from, UINT dpi_to ) DECLSPEC_HIDDEN; extern POINT map_dpi_point( POINT pt, UINT dpi_from, UINT dpi_to ) DECLSPEC_HIDDEN;
extern POINT point_win_to_phys_dpi( HWND hwnd, POINT pt ) DECLSPEC_HIDDEN; extern POINT point_win_to_phys_dpi( HWND hwnd, POINT pt ) DECLSPEC_HIDDEN;
extern POINT point_win_to_thread_dpi( HWND hwnd, POINT pt ) DECLSPEC_HIDDEN;
extern RECT map_dpi_rect( RECT rect, UINT dpi_from, UINT dpi_to ) DECLSPEC_HIDDEN; extern RECT map_dpi_rect( RECT rect, UINT dpi_from, UINT dpi_to ) DECLSPEC_HIDDEN;
extern RECT rect_win_to_thread_dpi( HWND hwnd, RECT rect ) DECLSPEC_HIDDEN; extern RECT rect_win_to_thread_dpi( HWND hwnd, RECT rect ) 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