user32: Add a SetCapture function to the driver interface.

This commit is contained in:
Alexandre Julliard 2008-03-12 14:55:28 +01:00
parent 4e129f88d0
commit b9dee8efa7
3 changed files with 15 additions and 0 deletions

View File

@ -112,6 +112,7 @@ static const USER_DRIVER *load_driver(void)
GET_USER_FUNC(MsgWaitForMultipleObjectsEx);
GET_USER_FUNC(ReleaseDC);
GET_USER_FUNC(ScrollDC);
GET_USER_FUNC(SetCapture);
GET_USER_FUNC(SetFocus);
GET_USER_FUNC(SetParent);
GET_USER_FUNC(SetWindowPos);
@ -364,6 +365,10 @@ static BOOL nulldrv_ScrollDC( HDC hdc, INT dx, INT dy, const RECT *scroll, const
return FALSE;
}
static void nulldrv_SetCapture( HWND hwnd, UINT flags )
{
}
static void nulldrv_SetFocus( HWND hwnd )
{
}
@ -452,6 +457,7 @@ static const USER_DRIVER null_driver =
nulldrv_MsgWaitForMultipleObjectsEx,
nulldrv_ReleaseDC,
nulldrv_ScrollDC,
nulldrv_SetCapture,
nulldrv_SetFocus,
nulldrv_SetParent,
nulldrv_SetWindowPos,
@ -676,6 +682,11 @@ static BOOL loaderdrv_ScrollDC( HDC hdc, INT dx, INT dy, const RECT *scroll, con
return load_driver()->pScrollDC( hdc, dx, dy, scroll, clip, hrgn, update );
}
static void loaderdrv_SetCapture( HWND hwnd, UINT flags )
{
load_driver()->pSetCapture( hwnd, flags );
}
static void loaderdrv_SetFocus( HWND hwnd )
{
load_driver()->pSetFocus( hwnd );
@ -772,6 +783,7 @@ static const USER_DRIVER lazy_load_driver =
loaderdrv_MsgWaitForMultipleObjectsEx,
loaderdrv_ReleaseDC,
loaderdrv_ScrollDC,
loaderdrv_SetCapture,
loaderdrv_SetFocus,
loaderdrv_SetParent,
loaderdrv_SetWindowPos,

View File

@ -100,6 +100,8 @@ BOOL set_capture_window( HWND hwnd, UINT gui_flags, HWND *prev_ret )
}
SERVER_END_REQ;
USER_Driver->pSetCapture( hwnd, gui_flags );
if (previous && previous != hwnd)
SendMessageW( previous, WM_CAPTURECHANGED, 0, (LPARAM)hwnd );

View File

@ -148,6 +148,7 @@ typedef struct tagUSER_DRIVER {
DWORD (*pMsgWaitForMultipleObjectsEx)(DWORD,const HANDLE*,DWORD,DWORD,DWORD);
void (*pReleaseDC)(HWND,HDC);
BOOL (*pScrollDC)(HDC, INT, INT, const RECT *, const RECT *, HRGN, LPRECT);
void (*pSetCapture)(HWND,UINT);
void (*pSetFocus)(HWND);
void (*pSetParent)(HWND,HWND,HWND);
void (*pSetWindowPos)(HWND,HWND,UINT,const RECT *,const RECT *,const RECT *,const RECT *);