4 * Copyright 2000, 2005 Alexandre Julliard
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
27 #include "wine/debug.h"
29 #include "user_private.h"
31 static USER_DRIVER null_driver, lazy_load_driver;
33 const USER_DRIVER *USER_Driver = &lazy_load_driver;
34 static DWORD driver_load_error;
36 /* load the graphics driver */
37 static const USER_DRIVER *load_driver(void)
39 char buffer[MAX_PATH], libname[32], *name, *next;
42 HMODULE graphics_driver;
43 USER_DRIVER *driver, *prev;
45 strcpy( buffer, "x11" ); /* default value */
46 /* @@ Wine registry key: HKCU\Software\Wine\Drivers */
47 if (!RegOpenKeyA( HKEY_CURRENT_USER, "Software\\Wine\\Drivers", &hkey ))
49 DWORD type, count = sizeof(buffer);
50 RegQueryValueExA( hkey, "Graphics", 0, &type, (LPBYTE) buffer, &count );
57 next = strchr( name, ',' );
58 if (next) *next++ = 0;
60 snprintf( libname, sizeof(libname), "wine%s.drv", name );
61 if ((graphics_driver = LoadLibraryA( libname )) != 0) break;
66 driver_load_error = GetLastError();
68 driver = HeapAlloc( GetProcessHeap(), 0, sizeof(*driver) );
69 *driver = null_driver;
73 #define GET_USER_FUNC(name) \
74 do { if ((ptr = GetProcAddress( graphics_driver, #name ))) driver->p##name = ptr; } while(0)
76 GET_USER_FUNC(ActivateKeyboardLayout);
78 GET_USER_FUNC(GetAsyncKeyState);
79 GET_USER_FUNC(GetKeyNameText);
80 GET_USER_FUNC(GetKeyboardLayout);
81 GET_USER_FUNC(GetKeyboardLayoutName);
82 GET_USER_FUNC(LoadKeyboardLayout);
83 GET_USER_FUNC(MapVirtualKeyEx);
84 GET_USER_FUNC(RegisterHotKey);
85 GET_USER_FUNC(ToUnicodeEx);
86 GET_USER_FUNC(UnloadKeyboardLayout);
87 GET_USER_FUNC(UnregisterHotKey);
88 GET_USER_FUNC(VkKeyScanEx);
89 GET_USER_FUNC(CreateCursorIcon);
90 GET_USER_FUNC(DestroyCursorIcon);
91 GET_USER_FUNC(SetCursor);
92 GET_USER_FUNC(GetCursorPos);
93 GET_USER_FUNC(SetCursorPos);
94 GET_USER_FUNC(ClipCursor);
95 GET_USER_FUNC(GetScreenSaveActive);
96 GET_USER_FUNC(SetScreenSaveActive);
97 GET_USER_FUNC(AcquireClipboard);
98 GET_USER_FUNC(EmptyClipboard);
99 GET_USER_FUNC(SetClipboardData);
100 GET_USER_FUNC(GetClipboardData);
101 GET_USER_FUNC(CountClipboardFormats);
102 GET_USER_FUNC(EnumClipboardFormats);
103 GET_USER_FUNC(IsClipboardFormatAvailable);
104 GET_USER_FUNC(EndClipboardUpdate);
105 GET_USER_FUNC(ChangeDisplaySettingsEx);
106 GET_USER_FUNC(EnumDisplayMonitors);
107 GET_USER_FUNC(EnumDisplaySettingsEx);
108 GET_USER_FUNC(GetMonitorInfo);
109 GET_USER_FUNC(CreateDesktopWindow);
110 GET_USER_FUNC(CreateWindow);
111 GET_USER_FUNC(DestroyWindow);
112 GET_USER_FUNC(GetDC);
113 GET_USER_FUNC(MsgWaitForMultipleObjectsEx);
114 GET_USER_FUNC(ReleaseDC);
115 GET_USER_FUNC(ScrollDC);
116 GET_USER_FUNC(SetCapture);
117 GET_USER_FUNC(SetFocus);
118 GET_USER_FUNC(SetLayeredWindowAttributes);
119 GET_USER_FUNC(SetParent);
120 GET_USER_FUNC(SetWindowRgn);
121 GET_USER_FUNC(SetWindowIcon);
122 GET_USER_FUNC(SetWindowStyle);
123 GET_USER_FUNC(SetWindowText);
124 GET_USER_FUNC(ShowWindow);
125 GET_USER_FUNC(SysCommand);
126 GET_USER_FUNC(UpdateLayeredWindow);
127 GET_USER_FUNC(WindowMessage);
128 GET_USER_FUNC(WindowPosChanging);
129 GET_USER_FUNC(WindowPosChanged);
133 prev = InterlockedCompareExchangePointer( (void **)&USER_Driver, driver, &lazy_load_driver );
134 if (prev != &lazy_load_driver)
136 /* another thread beat us to it */
137 HeapFree( GetProcessHeap(), 0, driver );
138 FreeLibrary( graphics_driver );
144 /* unload the graphics driver on process exit */
145 void USER_unload_driver(void)
148 /* make sure we don't try to call the driver after it has been detached */
149 prev = InterlockedExchangePointer( (void **)&USER_Driver, &null_driver );
150 if (prev != &lazy_load_driver && prev != &null_driver)
151 HeapFree( GetProcessHeap(), 0, prev );
155 /**********************************************************************
158 * These are fallbacks for entry points that are not implemented in the real driver.
161 static HKL CDECL nulldrv_ActivateKeyboardLayout( HKL layout, UINT flags )
166 static void CDECL nulldrv_Beep(void)
170 static SHORT CDECL nulldrv_GetAsyncKeyState( INT key )
175 static INT CDECL nulldrv_GetKeyNameText( LONG lparam, LPWSTR buffer, INT size )
180 static HKL CDECL nulldrv_GetKeyboardLayout( DWORD thread_id )
185 static BOOL CDECL nulldrv_GetKeyboardLayoutName( LPWSTR name )
190 static HKL CDECL nulldrv_LoadKeyboardLayout( LPCWSTR name, UINT flags )
195 static UINT CDECL nulldrv_MapVirtualKeyEx( UINT code, UINT type, HKL layout )
200 static BOOL CDECL nulldrv_RegisterHotKey( HWND hwnd, UINT modifiers, UINT vk )
205 static INT CDECL nulldrv_ToUnicodeEx( UINT virt, UINT scan, const BYTE *state, LPWSTR str,
206 int size, UINT flags, HKL layout )
211 static BOOL CDECL nulldrv_UnloadKeyboardLayout( HKL layout )
216 static void CDECL nulldrv_UnregisterHotKey( HWND hwnd, UINT modifiers, UINT vk )
220 static SHORT CDECL nulldrv_VkKeyScanEx( WCHAR ch, HKL layout )
225 static void CDECL nulldrv_CreateCursorIcon( HCURSOR cursor )
229 static void CDECL nulldrv_DestroyCursorIcon( HCURSOR cursor )
233 static void CDECL nulldrv_SetCursor( HCURSOR cursor )
237 static BOOL CDECL nulldrv_GetCursorPos( LPPOINT pt )
242 static BOOL CDECL nulldrv_SetCursorPos( INT x, INT y )
247 static BOOL CDECL nulldrv_ClipCursor( LPCRECT clip )
252 static BOOL CDECL nulldrv_GetScreenSaveActive(void)
257 static void CDECL nulldrv_SetScreenSaveActive( BOOL on )
261 static INT CDECL nulldrv_AcquireClipboard( HWND hwnd )
266 static BOOL CDECL nulldrv_CountClipboardFormats(void)
271 static void CDECL nulldrv_EmptyClipboard( BOOL keepunowned )
275 static void CDECL nulldrv_EndClipboardUpdate(void)
279 static UINT CDECL nulldrv_EnumClipboardFormats( UINT format )
284 static HANDLE CDECL nulldrv_GetClipboardData( UINT format )
289 static BOOL CDECL nulldrv_IsClipboardFormatAvailable( UINT format )
294 static BOOL CDECL nulldrv_SetClipboardData( UINT format, HANDLE handle, BOOL owner )
299 static LONG CDECL nulldrv_ChangeDisplaySettingsEx( LPCWSTR name, LPDEVMODEW mode, HWND hwnd,
300 DWORD flags, LPVOID lparam )
302 return DISP_CHANGE_FAILED;
305 static BOOL CDECL nulldrv_EnumDisplayMonitors( HDC hdc, LPRECT rect, MONITORENUMPROC proc, LPARAM lp )
310 static BOOL CDECL nulldrv_EnumDisplaySettingsEx( LPCWSTR name, DWORD num, LPDEVMODEW mode, DWORD flags )
315 static BOOL CDECL nulldrv_GetMonitorInfo( HMONITOR handle, LPMONITORINFO info )
320 static BOOL CDECL nulldrv_CreateDesktopWindow( HWND hwnd )
325 static BOOL CDECL nulldrv_CreateWindow( HWND hwnd )
329 /* HWND_MESSAGE windows don't need a graphics driver */
330 if (GetAncestor( hwnd, GA_PARENT ) == get_user_thread_info()->msg_window) return TRUE;
331 if (warned++) return FALSE;
333 MESSAGE( "Application tried to create a window, but no driver could be loaded.\n");
334 switch (driver_load_error)
336 case ERROR_MOD_NOT_FOUND:
337 MESSAGE( "The X11 driver is missing. Check your build!\n" );
339 case ERROR_DLL_INIT_FAILED:
340 MESSAGE( "Make sure that your X server is running and that $DISPLAY is set correctly.\n" );
343 MESSAGE( "Unknown error (%d).\n", driver_load_error );
349 static void CDECL nulldrv_DestroyWindow( HWND hwnd )
353 static void CDECL nulldrv_GetDC( HDC hdc, HWND hwnd, HWND top_win, const RECT *win_rect,
354 const RECT *top_rect, DWORD flags )
358 static DWORD CDECL nulldrv_MsgWaitForMultipleObjectsEx( DWORD count, const HANDLE *handles, DWORD timeout,
359 DWORD mask, DWORD flags )
361 return WaitForMultipleObjectsEx( count, handles, flags & MWMO_WAITALL,
362 timeout, flags & MWMO_ALERTABLE );
365 static void CDECL nulldrv_ReleaseDC( HWND hwnd, HDC hdc )
369 static BOOL CDECL nulldrv_ScrollDC( HDC hdc, INT dx, INT dy, const RECT *scroll, const RECT *clip,
370 HRGN hrgn, LPRECT update )
375 static void CDECL nulldrv_SetCapture( HWND hwnd, UINT flags )
379 static void CDECL nulldrv_SetFocus( HWND hwnd )
383 static void CDECL nulldrv_SetLayeredWindowAttributes( HWND hwnd, COLORREF key, BYTE alpha, DWORD flags )
387 static void CDECL nulldrv_SetParent( HWND hwnd, HWND parent, HWND old_parent )
391 static int CDECL nulldrv_SetWindowRgn( HWND hwnd, HRGN hrgn, BOOL redraw )
396 static void CDECL nulldrv_SetWindowIcon( HWND hwnd, UINT type, HICON icon )
400 static void CDECL nulldrv_SetWindowStyle( HWND hwnd, INT offset, STYLESTRUCT *style )
404 static void CDECL nulldrv_SetWindowText( HWND hwnd, LPCWSTR text )
408 static UINT CDECL nulldrv_ShowWindow( HWND hwnd, INT cmd, RECT *rect, UINT swp )
413 static LRESULT CDECL nulldrv_SysCommand( HWND hwnd, WPARAM wparam, LPARAM lparam )
418 static BOOL CDECL nulldrv_UpdateLayeredWindow( HWND hwnd, const UPDATELAYEREDWINDOWINFO *info,
419 const RECT *window_rect )
424 static LRESULT CDECL nulldrv_WindowMessage( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam )
429 static void CDECL nulldrv_WindowPosChanging( HWND hwnd, HWND insert_after, UINT swp_flags,
430 const RECT *window_rect, const RECT *client_rect,
431 RECT *visible_rect, struct window_surface **surface )
435 static void CDECL nulldrv_WindowPosChanged( HWND hwnd, HWND insert_after, UINT swp_flags,
436 const RECT *window_rect, const RECT *client_rect,
437 const RECT *visible_rect, const RECT *valid_rects,
438 struct window_surface *surface )
442 static USER_DRIVER null_driver =
444 /* keyboard functions */
445 nulldrv_ActivateKeyboardLayout,
447 nulldrv_GetAsyncKeyState,
448 nulldrv_GetKeyNameText,
449 nulldrv_GetKeyboardLayout,
450 nulldrv_GetKeyboardLayoutName,
451 nulldrv_LoadKeyboardLayout,
452 nulldrv_MapVirtualKeyEx,
453 nulldrv_RegisterHotKey,
455 nulldrv_UnloadKeyboardLayout,
456 nulldrv_UnregisterHotKey,
458 /* cursor/icon functions */
459 nulldrv_CreateCursorIcon,
460 nulldrv_DestroyCursorIcon,
462 nulldrv_GetCursorPos,
463 nulldrv_SetCursorPos,
465 /* screen saver functions */
466 nulldrv_GetScreenSaveActive,
467 nulldrv_SetScreenSaveActive,
468 /* clipboard functions */
469 nulldrv_AcquireClipboard,
470 nulldrv_CountClipboardFormats,
471 nulldrv_EmptyClipboard,
472 nulldrv_EndClipboardUpdate,
473 nulldrv_EnumClipboardFormats,
474 nulldrv_GetClipboardData,
475 nulldrv_IsClipboardFormatAvailable,
476 nulldrv_SetClipboardData,
478 nulldrv_ChangeDisplaySettingsEx,
479 nulldrv_EnumDisplayMonitors,
480 nulldrv_EnumDisplaySettingsEx,
481 nulldrv_GetMonitorInfo,
482 /* windowing functions */
483 nulldrv_CreateDesktopWindow,
484 nulldrv_CreateWindow,
485 nulldrv_DestroyWindow,
487 nulldrv_MsgWaitForMultipleObjectsEx,
492 nulldrv_SetLayeredWindowAttributes,
494 nulldrv_SetWindowRgn,
495 nulldrv_SetWindowIcon,
496 nulldrv_SetWindowStyle,
497 nulldrv_SetWindowText,
500 nulldrv_UpdateLayeredWindow,
501 nulldrv_WindowMessage,
502 nulldrv_WindowPosChanging,
503 nulldrv_WindowPosChanged
507 /**********************************************************************
508 * Lazy loading user driver
510 * Initial driver used before another driver is loaded.
511 * Each entry point simply loads the real driver and chains to it.
514 static HKL CDECL loaderdrv_ActivateKeyboardLayout( HKL layout, UINT flags )
516 return load_driver()->pActivateKeyboardLayout( layout, flags );
519 static void CDECL loaderdrv_Beep(void)
521 load_driver()->pBeep();
524 static SHORT CDECL loaderdrv_GetAsyncKeyState( INT key )
526 return load_driver()->pGetAsyncKeyState( key );
529 static INT CDECL loaderdrv_GetKeyNameText( LONG lparam, LPWSTR buffer, INT size )
531 return load_driver()->pGetKeyNameText( lparam, buffer, size );
534 static HKL CDECL loaderdrv_GetKeyboardLayout( DWORD thread_id )
536 return load_driver()->pGetKeyboardLayout( thread_id );
539 static BOOL CDECL loaderdrv_GetKeyboardLayoutName( LPWSTR name )
541 return load_driver()->pGetKeyboardLayoutName( name );
544 static HKL CDECL loaderdrv_LoadKeyboardLayout( LPCWSTR name, UINT flags )
546 return load_driver()->pLoadKeyboardLayout( name, flags );
549 static UINT CDECL loaderdrv_MapVirtualKeyEx( UINT code, UINT type, HKL layout )
551 return load_driver()->pMapVirtualKeyEx( code, type, layout );
554 static BOOL CDECL loaderdrv_RegisterHotKey( HWND hwnd, UINT modifiers, UINT vk )
556 return load_driver()->pRegisterHotKey( hwnd, modifiers, vk );
559 static INT CDECL loaderdrv_ToUnicodeEx( UINT virt, UINT scan, const BYTE *state, LPWSTR str,
560 int size, UINT flags, HKL layout )
562 return load_driver()->pToUnicodeEx( virt, scan, state, str, size, flags, layout );
565 static BOOL CDECL loaderdrv_UnloadKeyboardLayout( HKL layout )
567 return load_driver()->pUnloadKeyboardLayout( layout );
570 static void CDECL loaderdrv_UnregisterHotKey( HWND hwnd, UINT modifiers, UINT vk )
572 load_driver()->pUnregisterHotKey( hwnd, modifiers, vk );
575 static SHORT CDECL loaderdrv_VkKeyScanEx( WCHAR ch, HKL layout )
577 return load_driver()->pVkKeyScanEx( ch, layout );
580 static void CDECL loaderdrv_CreateCursorIcon( HCURSOR cursor )
582 load_driver()->pCreateCursorIcon( cursor );
585 static void CDECL loaderdrv_DestroyCursorIcon( HCURSOR cursor )
587 load_driver()->pDestroyCursorIcon( cursor );
590 static void CDECL loaderdrv_SetCursor( HCURSOR cursor )
592 load_driver()->pSetCursor( cursor );
595 static BOOL CDECL loaderdrv_GetCursorPos( LPPOINT pt )
597 return load_driver()->pGetCursorPos( pt );
600 static BOOL CDECL loaderdrv_SetCursorPos( INT x, INT y )
602 return load_driver()->pSetCursorPos( x, y );
605 static BOOL CDECL loaderdrv_ClipCursor( LPCRECT clip )
607 return load_driver()->pClipCursor( clip );
610 static BOOL CDECL loaderdrv_GetScreenSaveActive(void)
612 return load_driver()->pGetScreenSaveActive();
615 static void CDECL loaderdrv_SetScreenSaveActive( BOOL on )
617 load_driver()->pSetScreenSaveActive( on );
620 static INT CDECL loaderdrv_AcquireClipboard( HWND hwnd )
622 return load_driver()->pAcquireClipboard( hwnd );
625 static BOOL CDECL loaderdrv_CountClipboardFormats(void)
627 return load_driver()->pCountClipboardFormats();
630 static void CDECL loaderdrv_EmptyClipboard( BOOL keepunowned )
632 load_driver()->pEmptyClipboard( keepunowned );
635 static void CDECL loaderdrv_EndClipboardUpdate(void)
637 load_driver()->pEndClipboardUpdate();
640 static UINT CDECL loaderdrv_EnumClipboardFormats( UINT format )
642 return load_driver()->pEnumClipboardFormats( format );
645 static HANDLE CDECL loaderdrv_GetClipboardData( UINT format )
647 return load_driver()->pGetClipboardData( format );
650 static BOOL CDECL loaderdrv_IsClipboardFormatAvailable( UINT format )
652 return load_driver()->pIsClipboardFormatAvailable( format );
655 static BOOL CDECL loaderdrv_SetClipboardData( UINT format, HANDLE handle, BOOL owner )
657 return load_driver()->pSetClipboardData( format, handle, owner );
660 static LONG CDECL loaderdrv_ChangeDisplaySettingsEx( LPCWSTR name, LPDEVMODEW mode, HWND hwnd,
661 DWORD flags, LPVOID lparam )
663 return load_driver()->pChangeDisplaySettingsEx( name, mode, hwnd, flags, lparam );
666 static BOOL CDECL loaderdrv_EnumDisplayMonitors( HDC hdc, LPRECT rect, MONITORENUMPROC proc, LPARAM lp )
668 return load_driver()->pEnumDisplayMonitors( hdc, rect, proc, lp );
671 static BOOL CDECL loaderdrv_EnumDisplaySettingsEx( LPCWSTR name, DWORD num, LPDEVMODEW mode, DWORD flags )
673 return load_driver()->pEnumDisplaySettingsEx( name, num, mode, flags );
676 static BOOL CDECL loaderdrv_GetMonitorInfo( HMONITOR handle, LPMONITORINFO info )
678 return load_driver()->pGetMonitorInfo( handle, info );
681 static BOOL CDECL loaderdrv_CreateDesktopWindow( HWND hwnd )
683 return load_driver()->pCreateDesktopWindow( hwnd );
686 static BOOL CDECL loaderdrv_CreateWindow( HWND hwnd )
688 return load_driver()->pCreateWindow( hwnd );
691 static void CDECL loaderdrv_DestroyWindow( HWND hwnd )
693 load_driver()->pDestroyWindow( hwnd );
696 static void CDECL loaderdrv_GetDC( HDC hdc, HWND hwnd, HWND top_win, const RECT *win_rect,
697 const RECT *top_rect, DWORD flags )
699 load_driver()->pGetDC( hdc, hwnd, top_win, win_rect, top_rect, flags );
702 static DWORD CDECL loaderdrv_MsgWaitForMultipleObjectsEx( DWORD count, const HANDLE *handles, DWORD timeout,
703 DWORD mask, DWORD flags )
705 return load_driver()->pMsgWaitForMultipleObjectsEx( count, handles, timeout, mask, flags );
708 static void CDECL loaderdrv_ReleaseDC( HWND hwnd, HDC hdc )
710 load_driver()->pReleaseDC( hwnd, hdc );
713 static BOOL CDECL loaderdrv_ScrollDC( HDC hdc, INT dx, INT dy, const RECT *scroll, const RECT *clip,
714 HRGN hrgn, LPRECT update )
716 return load_driver()->pScrollDC( hdc, dx, dy, scroll, clip, hrgn, update );
719 static void CDECL loaderdrv_SetCapture( HWND hwnd, UINT flags )
721 load_driver()->pSetCapture( hwnd, flags );
724 static void CDECL loaderdrv_SetFocus( HWND hwnd )
726 load_driver()->pSetFocus( hwnd );
729 static void CDECL loaderdrv_SetLayeredWindowAttributes( HWND hwnd, COLORREF key, BYTE alpha, DWORD flags )
731 load_driver()->pSetLayeredWindowAttributes( hwnd, key, alpha, flags );
734 static void CDECL loaderdrv_SetParent( HWND hwnd, HWND parent, HWND old_parent )
736 load_driver()->pSetParent( hwnd, parent, old_parent );
739 static int CDECL loaderdrv_SetWindowRgn( HWND hwnd, HRGN hrgn, BOOL redraw )
741 return load_driver()->pSetWindowRgn( hwnd, hrgn, redraw );
744 static void CDECL loaderdrv_SetWindowIcon( HWND hwnd, UINT type, HICON icon )
746 load_driver()->pSetWindowIcon( hwnd, type, icon );
749 static void CDECL loaderdrv_SetWindowStyle( HWND hwnd, INT offset, STYLESTRUCT *style )
751 load_driver()->pSetWindowStyle( hwnd, offset, style );
754 static void CDECL loaderdrv_SetWindowText( HWND hwnd, LPCWSTR text )
756 load_driver()->pSetWindowText( hwnd, text );
759 static UINT CDECL loaderdrv_ShowWindow( HWND hwnd, INT cmd, RECT *rect, UINT swp )
761 return load_driver()->pShowWindow( hwnd, cmd, rect, swp );
764 static LRESULT CDECL loaderdrv_SysCommand( HWND hwnd, WPARAM wparam, LPARAM lparam )
766 return load_driver()->pSysCommand( hwnd, wparam, lparam );
769 static BOOL CDECL loaderdrv_UpdateLayeredWindow( HWND hwnd, const UPDATELAYEREDWINDOWINFO *info,
770 const RECT *window_rect )
772 return load_driver()->pUpdateLayeredWindow( hwnd, info, window_rect );
775 static LRESULT CDECL loaderdrv_WindowMessage( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam )
777 return load_driver()->pWindowMessage( hwnd, msg, wparam, lparam );
780 static void CDECL loaderdrv_WindowPosChanging( HWND hwnd, HWND insert_after, UINT swp_flags,
781 const RECT *window_rect, const RECT *client_rect,
782 RECT *visible_rect, struct window_surface **surface )
784 load_driver()->pWindowPosChanging( hwnd, insert_after, swp_flags,
785 window_rect, client_rect, visible_rect, surface );
788 static void CDECL loaderdrv_WindowPosChanged( HWND hwnd, HWND insert_after, UINT swp_flags,
789 const RECT *window_rect, const RECT *client_rect,
790 const RECT *visible_rect, const RECT *valid_rects,
791 struct window_surface *surface )
793 load_driver()->pWindowPosChanged( hwnd, insert_after, swp_flags, window_rect,
794 client_rect, visible_rect, valid_rects, surface );
797 static USER_DRIVER lazy_load_driver =
799 /* keyboard functions */
800 loaderdrv_ActivateKeyboardLayout,
802 loaderdrv_GetAsyncKeyState,
803 loaderdrv_GetKeyNameText,
804 loaderdrv_GetKeyboardLayout,
805 loaderdrv_GetKeyboardLayoutName,
806 loaderdrv_LoadKeyboardLayout,
807 loaderdrv_MapVirtualKeyEx,
808 loaderdrv_RegisterHotKey,
809 loaderdrv_ToUnicodeEx,
810 loaderdrv_UnloadKeyboardLayout,
811 loaderdrv_UnregisterHotKey,
812 loaderdrv_VkKeyScanEx,
813 /* cursor/icon functions */
814 loaderdrv_CreateCursorIcon,
815 loaderdrv_DestroyCursorIcon,
817 loaderdrv_GetCursorPos,
818 loaderdrv_SetCursorPos,
819 loaderdrv_ClipCursor,
820 /* screen saver functions */
821 loaderdrv_GetScreenSaveActive,
822 loaderdrv_SetScreenSaveActive,
823 /* clipboard functions */
824 loaderdrv_AcquireClipboard,
825 loaderdrv_CountClipboardFormats,
826 loaderdrv_EmptyClipboard,
827 loaderdrv_EndClipboardUpdate,
828 loaderdrv_EnumClipboardFormats,
829 loaderdrv_GetClipboardData,
830 loaderdrv_IsClipboardFormatAvailable,
831 loaderdrv_SetClipboardData,
833 loaderdrv_ChangeDisplaySettingsEx,
834 loaderdrv_EnumDisplayMonitors,
835 loaderdrv_EnumDisplaySettingsEx,
836 loaderdrv_GetMonitorInfo,
837 /* windowing functions */
838 loaderdrv_CreateDesktopWindow,
839 loaderdrv_CreateWindow,
840 loaderdrv_DestroyWindow,
842 loaderdrv_MsgWaitForMultipleObjectsEx,
845 loaderdrv_SetCapture,
847 loaderdrv_SetLayeredWindowAttributes,
849 loaderdrv_SetWindowRgn,
850 loaderdrv_SetWindowIcon,
851 loaderdrv_SetWindowStyle,
852 loaderdrv_SetWindowText,
853 loaderdrv_ShowWindow,
854 loaderdrv_SysCommand,
855 loaderdrv_UpdateLayeredWindow,
856 loaderdrv_WindowMessage,
857 loaderdrv_WindowPosChanging,
858 loaderdrv_WindowPosChanged