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"
28 #include "wine/gdi_driver.h"
29 #include "wine/unicode.h"
31 #include "user_private.h"
34 WINE_DEFAULT_DEBUG_CHANNEL(user
);
35 WINE_DECLARE_DEBUG_CHANNEL(winediag
);
37 static USER_DRIVER null_driver
, lazy_load_driver
;
39 const USER_DRIVER
*USER_Driver
= &lazy_load_driver
;
40 static char driver_load_error
[80];
42 static HMODULE
load_desktop_driver( HWND hwnd
)
44 static const WCHAR display_device_guid_propW
[] = {
45 '_','_','w','i','n','e','_','d','i','s','p','l','a','y','_',
46 'd','e','v','i','c','e','_','g','u','i','d',0 };
47 static const WCHAR key_pathW
[] = {
48 'S','y','s','t','e','m','\\',
49 'C','u','r','r','e','n','t','C','o','n','t','r','o','l','S','e','t','\\',
50 'C','o','n','t','r','o','l','\\',
51 'V','i','d','e','o','\\','{',0};
52 static const WCHAR displayW
[] = {'}','\\','0','0','0','0',0};
53 static const WCHAR driverW
[] = {'G','r','a','p','h','i','c','s','D','r','i','v','e','r',0};
58 WCHAR key
[(sizeof(key_pathW
) + sizeof(displayW
)) / sizeof(WCHAR
) + 40];
59 UINT guid_atom
= HandleToULong( GetPropW( hwnd
, display_device_guid_propW
));
63 strcpy( driver_load_error
, "The explorer process failed to start." ); /* default error */
67 SendMessageW( hwnd
, WM_NULL
, 0, 0 ); /* wait for the desktop process to be ready */
68 guid_atom
= HandleToULong( GetPropW( hwnd
, display_device_guid_propW
));
70 memcpy( key
, key_pathW
, sizeof(key_pathW
) );
71 if (!GlobalGetAtomNameW( guid_atom
, key
+ strlenW(key
), 40 )) return 0;
72 strcatW( key
, displayW
);
73 if (RegOpenKeyW( HKEY_LOCAL_MACHINE
, key
, &hkey
)) return 0;
75 if (!RegQueryValueExW( hkey
, driverW
, NULL
, NULL
, (BYTE
*)path
, &size
))
77 if (!(ret
= LoadLibraryW( path
))) ERR( "failed to load %s\n", debugstr_w(path
) );
78 TRACE( "%s %p\n", debugstr_w(path
), ret
);
82 size
= sizeof(driver_load_error
);
83 RegQueryValueExA( hkey
, "DriverError", NULL
, NULL
, (BYTE
*)driver_load_error
, &size
);
89 /* load the graphics driver */
90 static const USER_DRIVER
*load_driver(void)
93 HMODULE graphics_driver
;
94 USER_DRIVER
*driver
, *prev
;
96 driver
= HeapAlloc( GetProcessHeap(), 0, sizeof(*driver
) );
97 *driver
= null_driver
;
99 graphics_driver
= load_desktop_driver( GetDesktopWindow() );
102 #define GET_USER_FUNC(name) \
103 do { if ((ptr = GetProcAddress( graphics_driver, #name ))) driver->p##name = ptr; } while(0)
105 GET_USER_FUNC(ActivateKeyboardLayout
);
107 GET_USER_FUNC(GetAsyncKeyState
);
108 GET_USER_FUNC(GetKeyNameText
);
109 GET_USER_FUNC(GetKeyboardLayout
);
110 GET_USER_FUNC(GetKeyboardLayoutList
);
111 GET_USER_FUNC(GetKeyboardLayoutName
);
112 GET_USER_FUNC(LoadKeyboardLayout
);
113 GET_USER_FUNC(MapVirtualKeyEx
);
114 GET_USER_FUNC(RegisterHotKey
);
115 GET_USER_FUNC(ToUnicodeEx
);
116 GET_USER_FUNC(UnloadKeyboardLayout
);
117 GET_USER_FUNC(UnregisterHotKey
);
118 GET_USER_FUNC(VkKeyScanEx
);
119 GET_USER_FUNC(DestroyCursorIcon
);
120 GET_USER_FUNC(SetCursor
);
121 GET_USER_FUNC(GetCursorPos
);
122 GET_USER_FUNC(SetCursorPos
);
123 GET_USER_FUNC(ClipCursor
);
124 GET_USER_FUNC(EmptyClipboard
);
125 GET_USER_FUNC(SetClipboardData
);
126 GET_USER_FUNC(GetClipboardData
);
127 GET_USER_FUNC(CountClipboardFormats
);
128 GET_USER_FUNC(EnumClipboardFormats
);
129 GET_USER_FUNC(IsClipboardFormatAvailable
);
130 GET_USER_FUNC(EndClipboardUpdate
);
131 GET_USER_FUNC(ChangeDisplaySettingsEx
);
132 GET_USER_FUNC(EnumDisplayMonitors
);
133 GET_USER_FUNC(EnumDisplaySettingsEx
);
134 GET_USER_FUNC(GetMonitorInfo
);
135 GET_USER_FUNC(CreateDesktopWindow
);
136 GET_USER_FUNC(CreateWindow
);
137 GET_USER_FUNC(DestroyWindow
);
138 GET_USER_FUNC(FlashWindowEx
);
139 GET_USER_FUNC(GetDC
);
140 GET_USER_FUNC(MsgWaitForMultipleObjectsEx
);
141 GET_USER_FUNC(ReleaseDC
);
142 GET_USER_FUNC(ScrollDC
);
143 GET_USER_FUNC(SetCapture
);
144 GET_USER_FUNC(SetFocus
);
145 GET_USER_FUNC(SetLayeredWindowAttributes
);
146 GET_USER_FUNC(SetParent
);
147 GET_USER_FUNC(SetWindowRgn
);
148 GET_USER_FUNC(SetWindowIcon
);
149 GET_USER_FUNC(SetWindowStyle
);
150 GET_USER_FUNC(SetWindowText
);
151 GET_USER_FUNC(ShowWindow
);
152 GET_USER_FUNC(SysCommand
);
153 GET_USER_FUNC(UpdateLayeredWindow
);
154 GET_USER_FUNC(WindowMessage
);
155 GET_USER_FUNC(WindowPosChanging
);
156 GET_USER_FUNC(WindowPosChanged
);
157 GET_USER_FUNC(SystemParametersInfo
);
161 prev
= InterlockedCompareExchangePointer( (void **)&USER_Driver
, driver
, &lazy_load_driver
);
162 if (prev
!= &lazy_load_driver
)
164 /* another thread beat us to it */
165 HeapFree( GetProcessHeap(), 0, driver
);
168 else LdrAddRefDll( 0, graphics_driver
);
170 __wine_set_display_driver( graphics_driver
);
171 register_builtin_classes();
176 /* unload the graphics driver on process exit */
177 void USER_unload_driver(void)
180 /* make sure we don't try to call the driver after it has been detached */
181 prev
= InterlockedExchangePointer( (void **)&USER_Driver
, &null_driver
);
182 if (prev
!= &lazy_load_driver
&& prev
!= &null_driver
)
183 HeapFree( GetProcessHeap(), 0, prev
);
187 /**********************************************************************
190 * These are fallbacks for entry points that are not implemented in the real driver.
193 static HKL CDECL
nulldrv_ActivateKeyboardLayout( HKL layout
, UINT flags
)
198 static void CDECL
nulldrv_Beep(void)
202 static SHORT CDECL
nulldrv_GetAsyncKeyState( INT key
)
207 static UINT CDECL
nulldrv_GetKeyboardLayoutList( INT size
, HKL
*layouts
)
212 ULONG_PTR baselayout
;
214 static const WCHAR szKeyboardReg
[] = {'S','y','s','t','e','m','\\','C','u','r','r','e','n','t','C','o','n','t','r','o','l','S','e','t','\\','C','o','n','t','r','o','l','\\','K','e','y','b','o','a','r','d',' ','L','a','y','o','u','t','s',0};
216 baselayout
= GetUserDefaultLCID();
217 langid
= PRIMARYLANGID(LANGIDFROMLCID(baselayout
));
218 if (langid
== LANG_CHINESE
|| langid
== LANG_JAPANESE
|| langid
== LANG_KOREAN
)
219 baselayout
= MAKELONG( baselayout
, 0xe001 ); /* IME */
221 baselayout
|= baselayout
<< 16;
223 /* Enumerate the Registry */
224 rc
= RegOpenKeyW(HKEY_LOCAL_MACHINE
,szKeyboardReg
,&hKeyKeyboard
);
225 if (rc
== ERROR_SUCCESS
)
230 rc
= RegEnumKeyW(hKeyKeyboard
, count
, szKeyName
, 9);
231 if (rc
== ERROR_SUCCESS
)
233 layout
= (HKL
)(ULONG_PTR
)strtoulW(szKeyName
,NULL
,16);
234 if (baselayout
!= 0 && layout
== (HKL
)baselayout
)
235 baselayout
= 0; /* found in the registry do not add again */
238 if (count
>= size
) break;
239 layouts
[count
] = layout
;
243 } while (rc
== ERROR_SUCCESS
);
244 RegCloseKey(hKeyKeyboard
);
247 /* make sure our base layout is on the list */
254 layouts
[count
] = (HKL
)baselayout
;
265 static INT CDECL
nulldrv_GetKeyNameText( LONG lparam
, LPWSTR buffer
, INT size
)
270 static HKL CDECL
nulldrv_GetKeyboardLayout( DWORD thread_id
)
275 static BOOL CDECL
nulldrv_GetKeyboardLayoutName( LPWSTR name
)
280 static HKL CDECL
nulldrv_LoadKeyboardLayout( LPCWSTR name
, UINT flags
)
285 static UINT CDECL
nulldrv_MapVirtualKeyEx( UINT code
, UINT type
, HKL layout
)
290 static BOOL CDECL
nulldrv_RegisterHotKey( HWND hwnd
, UINT modifiers
, UINT vk
)
295 static INT CDECL
nulldrv_ToUnicodeEx( UINT virt
, UINT scan
, const BYTE
*state
, LPWSTR str
,
296 int size
, UINT flags
, HKL layout
)
301 static BOOL CDECL
nulldrv_UnloadKeyboardLayout( HKL layout
)
306 static void CDECL
nulldrv_UnregisterHotKey( HWND hwnd
, UINT modifiers
, UINT vk
)
310 static SHORT CDECL
nulldrv_VkKeyScanEx( WCHAR ch
, HKL layout
)
315 static void CDECL
nulldrv_DestroyCursorIcon( HCURSOR cursor
)
319 static void CDECL
nulldrv_SetCursor( HCURSOR cursor
)
323 static BOOL CDECL
nulldrv_GetCursorPos( LPPOINT pt
)
328 static BOOL CDECL
nulldrv_SetCursorPos( INT x
, INT y
)
333 static BOOL CDECL
nulldrv_ClipCursor( LPCRECT clip
)
338 static BOOL CDECL
nulldrv_CountClipboardFormats(void)
343 static void CDECL
nulldrv_EmptyClipboard(void)
347 static void CDECL
nulldrv_EndClipboardUpdate(void)
351 static UINT CDECL
nulldrv_EnumClipboardFormats( UINT format
)
356 static HANDLE CDECL
nulldrv_GetClipboardData( UINT format
)
361 static BOOL CDECL
nulldrv_IsClipboardFormatAvailable( UINT format
)
366 static BOOL CDECL
nulldrv_SetClipboardData( UINT format
, HANDLE handle
, BOOL owner
)
371 static LONG CDECL
nulldrv_ChangeDisplaySettingsEx( LPCWSTR name
, LPDEVMODEW mode
, HWND hwnd
,
372 DWORD flags
, LPVOID lparam
)
374 return DISP_CHANGE_FAILED
;
377 static BOOL CDECL
nulldrv_EnumDisplayMonitors( HDC hdc
, LPRECT rect
, MONITORENUMPROC proc
, LPARAM lp
)
382 static BOOL CDECL
nulldrv_EnumDisplaySettingsEx( LPCWSTR name
, DWORD num
, LPDEVMODEW mode
, DWORD flags
)
387 static BOOL CDECL
nulldrv_GetMonitorInfo( HMONITOR handle
, LPMONITORINFO info
)
392 static BOOL CDECL
nulldrv_CreateDesktopWindow( HWND hwnd
)
397 static BOOL CDECL
nulldrv_CreateWindow( HWND hwnd
)
400 HWND parent
= GetAncestor( hwnd
, GA_PARENT
);
402 /* HWND_MESSAGE windows don't need a graphics driver */
403 if (!parent
|| parent
== get_user_thread_info()->msg_window
) return TRUE
;
404 if (warned
++) return FALSE
;
406 ERR_(winediag
)( "Application tried to create a window, but no driver could be loaded.\n" );
407 if (driver_load_error
[0]) ERR_(winediag
)( "%s\n", driver_load_error
);
411 static void CDECL
nulldrv_DestroyWindow( HWND hwnd
)
415 static void CDECL
nulldrv_FlashWindowEx( FLASHWINFO
*info
)
419 static void CDECL
nulldrv_GetDC( HDC hdc
, HWND hwnd
, HWND top_win
, const RECT
*win_rect
,
420 const RECT
*top_rect
, DWORD flags
)
424 static DWORD CDECL
nulldrv_MsgWaitForMultipleObjectsEx( DWORD count
, const HANDLE
*handles
, DWORD timeout
,
425 DWORD mask
, DWORD flags
)
427 return WaitForMultipleObjectsEx( count
, handles
, flags
& MWMO_WAITALL
,
428 timeout
, flags
& MWMO_ALERTABLE
);
431 static void CDECL
nulldrv_ReleaseDC( HWND hwnd
, HDC hdc
)
435 static BOOL CDECL
nulldrv_ScrollDC( HDC hdc
, INT dx
, INT dy
, HRGN update
)
439 GetClipBox( hdc
, &rect
);
440 return BitBlt( hdc
, rect
.left
, rect
.top
, rect
.right
- rect
.left
, rect
.bottom
- rect
.top
,
441 hdc
, rect
.left
- dx
, rect
.top
- dy
, SRCCOPY
);
444 static void CDECL
nulldrv_SetCapture( HWND hwnd
, UINT flags
)
448 static void CDECL
nulldrv_SetFocus( HWND hwnd
)
452 static void CDECL
nulldrv_SetLayeredWindowAttributes( HWND hwnd
, COLORREF key
, BYTE alpha
, DWORD flags
)
456 static void CDECL
nulldrv_SetParent( HWND hwnd
, HWND parent
, HWND old_parent
)
460 static void CDECL
nulldrv_SetWindowRgn( HWND hwnd
, HRGN hrgn
, BOOL redraw
)
464 static void CDECL
nulldrv_SetWindowIcon( HWND hwnd
, UINT type
, HICON icon
)
468 static void CDECL
nulldrv_SetWindowStyle( HWND hwnd
, INT offset
, STYLESTRUCT
*style
)
472 static void CDECL
nulldrv_SetWindowText( HWND hwnd
, LPCWSTR text
)
476 static UINT CDECL
nulldrv_ShowWindow( HWND hwnd
, INT cmd
, RECT
*rect
, UINT swp
)
481 static LRESULT CDECL
nulldrv_SysCommand( HWND hwnd
, WPARAM wparam
, LPARAM lparam
)
486 static BOOL CDECL
nulldrv_UpdateLayeredWindow( HWND hwnd
, const UPDATELAYEREDWINDOWINFO
*info
,
487 const RECT
*window_rect
)
492 static LRESULT CDECL
nulldrv_WindowMessage( HWND hwnd
, UINT msg
, WPARAM wparam
, LPARAM lparam
)
497 static void CDECL
nulldrv_WindowPosChanging( HWND hwnd
, HWND insert_after
, UINT swp_flags
,
498 const RECT
*window_rect
, const RECT
*client_rect
,
499 RECT
*visible_rect
, struct window_surface
**surface
)
503 static void CDECL
nulldrv_WindowPosChanged( HWND hwnd
, HWND insert_after
, UINT swp_flags
,
504 const RECT
*window_rect
, const RECT
*client_rect
,
505 const RECT
*visible_rect
, const RECT
*valid_rects
,
506 struct window_surface
*surface
)
510 static BOOL CDECL
nulldrv_SystemParametersInfo( UINT action
, UINT int_param
, void *ptr_param
, UINT flags
)
515 static USER_DRIVER null_driver
=
517 /* keyboard functions */
518 nulldrv_ActivateKeyboardLayout
,
520 nulldrv_GetAsyncKeyState
,
521 nulldrv_GetKeyNameText
,
522 nulldrv_GetKeyboardLayout
,
523 nulldrv_GetKeyboardLayoutList
,
524 nulldrv_GetKeyboardLayoutName
,
525 nulldrv_LoadKeyboardLayout
,
526 nulldrv_MapVirtualKeyEx
,
527 nulldrv_RegisterHotKey
,
529 nulldrv_UnloadKeyboardLayout
,
530 nulldrv_UnregisterHotKey
,
532 /* cursor/icon functions */
533 nulldrv_DestroyCursorIcon
,
535 nulldrv_GetCursorPos
,
536 nulldrv_SetCursorPos
,
538 /* clipboard functions */
539 nulldrv_CountClipboardFormats
,
540 nulldrv_EmptyClipboard
,
541 nulldrv_EndClipboardUpdate
,
542 nulldrv_EnumClipboardFormats
,
543 nulldrv_GetClipboardData
,
544 nulldrv_IsClipboardFormatAvailable
,
545 nulldrv_SetClipboardData
,
547 nulldrv_ChangeDisplaySettingsEx
,
548 nulldrv_EnumDisplayMonitors
,
549 nulldrv_EnumDisplaySettingsEx
,
550 nulldrv_GetMonitorInfo
,
551 /* windowing functions */
552 nulldrv_CreateDesktopWindow
,
553 nulldrv_CreateWindow
,
554 nulldrv_DestroyWindow
,
555 nulldrv_FlashWindowEx
,
557 nulldrv_MsgWaitForMultipleObjectsEx
,
562 nulldrv_SetLayeredWindowAttributes
,
564 nulldrv_SetWindowRgn
,
565 nulldrv_SetWindowIcon
,
566 nulldrv_SetWindowStyle
,
567 nulldrv_SetWindowText
,
570 nulldrv_UpdateLayeredWindow
,
571 nulldrv_WindowMessage
,
572 nulldrv_WindowPosChanging
,
573 nulldrv_WindowPosChanged
,
574 /* system parameters */
575 nulldrv_SystemParametersInfo
579 /**********************************************************************
580 * Lazy loading user driver
582 * Initial driver used before another driver is loaded.
583 * Each entry point simply loads the real driver and chains to it.
586 static HKL CDECL
loaderdrv_ActivateKeyboardLayout( HKL layout
, UINT flags
)
588 return load_driver()->pActivateKeyboardLayout( layout
, flags
);
591 static void CDECL
loaderdrv_Beep(void)
593 load_driver()->pBeep();
596 static SHORT CDECL
loaderdrv_GetAsyncKeyState( INT key
)
598 return load_driver()->pGetAsyncKeyState( key
);
601 static INT CDECL
loaderdrv_GetKeyNameText( LONG lparam
, LPWSTR buffer
, INT size
)
603 return load_driver()->pGetKeyNameText( lparam
, buffer
, size
);
606 static HKL CDECL
loaderdrv_GetKeyboardLayout( DWORD thread_id
)
608 return load_driver()->pGetKeyboardLayout( thread_id
);
611 static UINT CDECL
loaderdrv_GetKeyboardLayoutList( INT size
, HKL
*layouts
)
613 return load_driver()->pGetKeyboardLayoutList( size
, layouts
);
616 static BOOL CDECL
loaderdrv_GetKeyboardLayoutName( LPWSTR name
)
618 return load_driver()->pGetKeyboardLayoutName( name
);
621 static HKL CDECL
loaderdrv_LoadKeyboardLayout( LPCWSTR name
, UINT flags
)
623 return load_driver()->pLoadKeyboardLayout( name
, flags
);
626 static UINT CDECL
loaderdrv_MapVirtualKeyEx( UINT code
, UINT type
, HKL layout
)
628 return load_driver()->pMapVirtualKeyEx( code
, type
, layout
);
631 static BOOL CDECL
loaderdrv_RegisterHotKey( HWND hwnd
, UINT modifiers
, UINT vk
)
633 return load_driver()->pRegisterHotKey( hwnd
, modifiers
, vk
);
636 static INT CDECL
loaderdrv_ToUnicodeEx( UINT virt
, UINT scan
, const BYTE
*state
, LPWSTR str
,
637 int size
, UINT flags
, HKL layout
)
639 return load_driver()->pToUnicodeEx( virt
, scan
, state
, str
, size
, flags
, layout
);
642 static BOOL CDECL
loaderdrv_UnloadKeyboardLayout( HKL layout
)
644 return load_driver()->pUnloadKeyboardLayout( layout
);
647 static void CDECL
loaderdrv_UnregisterHotKey( HWND hwnd
, UINT modifiers
, UINT vk
)
649 load_driver()->pUnregisterHotKey( hwnd
, modifiers
, vk
);
652 static SHORT CDECL
loaderdrv_VkKeyScanEx( WCHAR ch
, HKL layout
)
654 return load_driver()->pVkKeyScanEx( ch
, layout
);
657 static void CDECL
loaderdrv_SetCursor( HCURSOR cursor
)
659 load_driver()->pSetCursor( cursor
);
662 static BOOL CDECL
loaderdrv_GetCursorPos( LPPOINT pt
)
664 return load_driver()->pGetCursorPos( pt
);
667 static BOOL CDECL
loaderdrv_SetCursorPos( INT x
, INT y
)
669 return load_driver()->pSetCursorPos( x
, y
);
672 static BOOL CDECL
loaderdrv_ClipCursor( LPCRECT clip
)
674 return load_driver()->pClipCursor( clip
);
677 static BOOL CDECL
loaderdrv_CountClipboardFormats(void)
679 return load_driver()->pCountClipboardFormats();
682 static void CDECL
loaderdrv_EmptyClipboard(void)
684 load_driver()->pEmptyClipboard();
687 static void CDECL
loaderdrv_EndClipboardUpdate(void)
689 load_driver()->pEndClipboardUpdate();
692 static UINT CDECL
loaderdrv_EnumClipboardFormats( UINT format
)
694 return load_driver()->pEnumClipboardFormats( format
);
697 static HANDLE CDECL
loaderdrv_GetClipboardData( UINT format
)
699 return load_driver()->pGetClipboardData( format
);
702 static BOOL CDECL
loaderdrv_IsClipboardFormatAvailable( UINT format
)
704 return load_driver()->pIsClipboardFormatAvailable( format
);
707 static BOOL CDECL
loaderdrv_SetClipboardData( UINT format
, HANDLE handle
, BOOL owner
)
709 return load_driver()->pSetClipboardData( format
, handle
, owner
);
712 static LONG CDECL
loaderdrv_ChangeDisplaySettingsEx( LPCWSTR name
, LPDEVMODEW mode
, HWND hwnd
,
713 DWORD flags
, LPVOID lparam
)
715 return load_driver()->pChangeDisplaySettingsEx( name
, mode
, hwnd
, flags
, lparam
);
718 static BOOL CDECL
loaderdrv_EnumDisplayMonitors( HDC hdc
, LPRECT rect
, MONITORENUMPROC proc
, LPARAM lp
)
720 return load_driver()->pEnumDisplayMonitors( hdc
, rect
, proc
, lp
);
723 static BOOL CDECL
loaderdrv_EnumDisplaySettingsEx( LPCWSTR name
, DWORD num
, LPDEVMODEW mode
, DWORD flags
)
725 return load_driver()->pEnumDisplaySettingsEx( name
, num
, mode
, flags
);
728 static BOOL CDECL
loaderdrv_GetMonitorInfo( HMONITOR handle
, LPMONITORINFO info
)
730 return load_driver()->pGetMonitorInfo( handle
, info
);
733 static BOOL CDECL
loaderdrv_CreateDesktopWindow( HWND hwnd
)
735 return load_driver()->pCreateDesktopWindow( hwnd
);
738 static BOOL CDECL
loaderdrv_CreateWindow( HWND hwnd
)
740 return load_driver()->pCreateWindow( hwnd
);
743 static void CDECL
loaderdrv_FlashWindowEx( FLASHWINFO
*info
)
745 load_driver()->pFlashWindowEx( info
);
748 static void CDECL
loaderdrv_GetDC( HDC hdc
, HWND hwnd
, HWND top_win
, const RECT
*win_rect
,
749 const RECT
*top_rect
, DWORD flags
)
751 load_driver()->pGetDC( hdc
, hwnd
, top_win
, win_rect
, top_rect
, flags
);
754 static void CDECL
loaderdrv_SetLayeredWindowAttributes( HWND hwnd
, COLORREF key
, BYTE alpha
, DWORD flags
)
756 load_driver()->pSetLayeredWindowAttributes( hwnd
, key
, alpha
, flags
);
759 static void CDECL
loaderdrv_SetWindowRgn( HWND hwnd
, HRGN hrgn
, BOOL redraw
)
761 load_driver()->pSetWindowRgn( hwnd
, hrgn
, redraw
);
764 static BOOL CDECL
loaderdrv_UpdateLayeredWindow( HWND hwnd
, const UPDATELAYEREDWINDOWINFO
*info
,
765 const RECT
*window_rect
)
767 return load_driver()->pUpdateLayeredWindow( hwnd
, info
, window_rect
);
770 static USER_DRIVER lazy_load_driver
=
772 /* keyboard functions */
773 loaderdrv_ActivateKeyboardLayout
,
775 loaderdrv_GetAsyncKeyState
,
776 loaderdrv_GetKeyNameText
,
777 loaderdrv_GetKeyboardLayout
,
778 loaderdrv_GetKeyboardLayoutList
,
779 loaderdrv_GetKeyboardLayoutName
,
780 loaderdrv_LoadKeyboardLayout
,
781 loaderdrv_MapVirtualKeyEx
,
782 loaderdrv_RegisterHotKey
,
783 loaderdrv_ToUnicodeEx
,
784 loaderdrv_UnloadKeyboardLayout
,
785 loaderdrv_UnregisterHotKey
,
786 loaderdrv_VkKeyScanEx
,
787 /* cursor/icon functions */
788 nulldrv_DestroyCursorIcon
,
790 loaderdrv_GetCursorPos
,
791 loaderdrv_SetCursorPos
,
792 loaderdrv_ClipCursor
,
793 /* clipboard functions */
794 loaderdrv_CountClipboardFormats
,
795 loaderdrv_EmptyClipboard
,
796 loaderdrv_EndClipboardUpdate
,
797 loaderdrv_EnumClipboardFormats
,
798 loaderdrv_GetClipboardData
,
799 loaderdrv_IsClipboardFormatAvailable
,
800 loaderdrv_SetClipboardData
,
802 loaderdrv_ChangeDisplaySettingsEx
,
803 loaderdrv_EnumDisplayMonitors
,
804 loaderdrv_EnumDisplaySettingsEx
,
805 loaderdrv_GetMonitorInfo
,
806 /* windowing functions */
807 loaderdrv_CreateDesktopWindow
,
808 loaderdrv_CreateWindow
,
809 nulldrv_DestroyWindow
,
810 loaderdrv_FlashWindowEx
,
812 nulldrv_MsgWaitForMultipleObjectsEx
,
817 loaderdrv_SetLayeredWindowAttributes
,
819 loaderdrv_SetWindowRgn
,
820 nulldrv_SetWindowIcon
,
821 nulldrv_SetWindowStyle
,
822 nulldrv_SetWindowText
,
825 loaderdrv_UpdateLayeredWindow
,
826 nulldrv_WindowMessage
,
827 nulldrv_WindowPosChanging
,
828 nulldrv_WindowPosChanged
,
829 /* system parameters */
830 nulldrv_SystemParametersInfo