[PATCH 4/5] user32: Add GetVisibleRect to graphics drivers exported function list

Pierre d'Herbemont pdherbemont at free.fr
Tue Jan 23 09:33:30 CST 2007


---
  dlls/user32/driver.c              |   13 +++++++++++++
  dlls/user32/user_private.h        |    1 +
  dlls/winex11.drv/winex11.drv.spec |    1 +
  dlls/winex11.drv/winpos.c         |    2 +-
  4 files changed, 16 insertions(+), 1 deletions(-)
-------------- next part --------------
diff --git a/dlls/user32/driver.c b/dlls/user32/driver.c
index b102fa5..c0591bd 100644
--- a/dlls/user32/driver.c
+++ b/dlls/user32/driver.c
@@ -109,6 +109,7 @@ static const USER_DRIVER *load_driver(vo
         GET_USER_FUNC(CreateWindow);
         GET_USER_FUNC(DestroyWindow);
         GET_USER_FUNC(GetDCEx);
+        GET_USER_FUNC(GetVisibleRect);
         GET_USER_FUNC(MsgWaitForMultipleObjectsEx);
         GET_USER_FUNC(ReleaseDC);
         GET_USER_FUNC(ScrollDC);
@@ -349,6 +350,11 @@ static HDC nulldrv_GetDCEx( HWND hwnd, H
     return 0;
 }
 
+static BOOL nulldrv_GetVisibleRect( HWND hwnd, RECT *visible_rect, RECT *new_whole_rect )
+{
+    return FALSE;
+}
+
 static DWORD nulldrv_MsgWaitForMultipleObjectsEx( DWORD count, const HANDLE *handles, DWORD timeout,
                                                   DWORD mask, DWORD flags )
 {
@@ -462,6 +468,7 @@ static const USER_DRIVER null_driver =
     nulldrv_CreateWindow,
     nulldrv_DestroyWindow,
     nulldrv_GetDCEx,
+    nulldrv_GetVisibleRect,
     nulldrv_MsgWaitForMultipleObjectsEx,
     nulldrv_ReleaseDC,
     nulldrv_ScrollDC,
@@ -673,6 +680,11 @@ static HDC loaderdrv_GetDCEx( HWND hwnd,
     return load_driver()->pGetDCEx( hwnd, hrgn, flags );
 }
 
+static BOOL loaderdrv_GetVisibleRect( HWND hwnd, RECT *visible_rect, RECT *new_whole_rect )
+{
+    return load_driver()->pGetVisibleRect( hwnd, visible_rect, new_whole_rect );
+}
+
 static DWORD loaderdrv_MsgWaitForMultipleObjectsEx( DWORD count, const HANDLE *handles, DWORD timeout,
                                                     DWORD mask, DWORD flags )
 {
@@ -791,6 +803,7 @@ static const USER_DRIVER lazy_load_drive
     loaderdrv_CreateWindow,
     loaderdrv_DestroyWindow,
     loaderdrv_GetDCEx,
+    loaderdrv_GetVisibleRect,
     loaderdrv_MsgWaitForMultipleObjectsEx,
     loaderdrv_ReleaseDC,
     loaderdrv_ScrollDC,
diff --git a/dlls/user32/user_private.h b/dlls/user32/user_private.h
index 99915cc..cbaaf6a 100644
--- a/dlls/user32/user_private.h
+++ b/dlls/user32/user_private.h
@@ -145,6 +145,7 @@ typedef struct tagUSER_DRIVER {
     BOOL   (*pCreateWindow)(HWND,CREATESTRUCTA*,BOOL);
     void   (*pDestroyWindow)(HWND);
     HDC    (*pGetDCEx)(HWND,HRGN,DWORD);
+    BOOL   (*pGetVisibleRect)(HWND,RECT*,RECT*);
     DWORD  (*pMsgWaitForMultipleObjectsEx)(DWORD,const HANDLE*,DWORD,DWORD,DWORD);
     INT    (*pReleaseDC)(HWND,HDC,BOOL);
     BOOL   (*pScrollDC)(HDC, INT, INT, const RECT *, const RECT *, HRGN, LPRECT);
diff --git a/dlls/winex11.drv/winex11.drv.spec b/dlls/winex11.drv/winex11.drv.spec
index 6a6c173..17f8984 100644
--- a/dlls/winex11.drv/winex11.drv.spec
+++ b/dlls/winex11.drv/winex11.drv.spec
@@ -97,6 +97,7 @@
 @ cdecl GetClipboardData(long ptr ptr) X11DRV_GetClipboardData
 @ cdecl GetClipboardFormatName(long str long) X11DRV_GetClipboardFormatName
 @ cdecl GetDCEx(long long long) X11DRV_GetDCEx
+@ cdecl GetVisibleRect(long ptr ptr) X11DRV_GetVisibleRect
 @ cdecl IsClipboardFormatAvailable(long) X11DRV_IsClipboardFormatAvailable
 @ cdecl MsgWaitForMultipleObjectsEx(long ptr long long long) X11DRV_MsgWaitForMultipleObjectsEx
 @ cdecl RegisterClipboardFormat(wstr) X11DRV_RegisterClipboardFormat
diff --git a/dlls/winex11.drv/winpos.c b/dlls/winex11.drv/winpos.c
index e72b0ba..7592c64 100644
--- a/dlls/winex11.drv/winpos.c
+++ b/dlls/winex11.drv/winpos.c
@@ -239,7 +239,7 @@ static BOOL fullscreen_state_changed( co
 }
 
 /***********************************************************************
- *		X11DRV_GetVisibleRect
+ *		GetVisibleRect   (X11DRV.@)
  */
 BOOL X11DRV_GetVisibleRect( HWND hwnd, RECT *visible_rect, RECT *new_whole_rect )
 {


More information about the wine-patches mailing list