#if DBG
#define WRAPAPI(a) a = a##_wrapper
#else
#define WRAPAPI(a) a
#endif // DBG
LIBRARY USER32

EXPORTS
    ClientThreadSetup                                   PRIVATE ;csrss uses GetProcAddr().
    WRAPAPI(DialogBoxIndirectParamAorW)                 PRIVATE ; comdlg, wow
    WRAPAPI(CreateDialogIndirectParamAorW)              PRIVATE ; comdlg
    EndTask
    WRAPAPI(GetAppCompatFlags)                          PRIVATE
    WRAPAPI(GetAppCompatFlags2)                         PRIVATE
    LoadLocalFonts                                      PRIVATE ; winlogon
    LoadRemoteFonts                                     PRIVATE
    LockWindowStation = NtUserLockWindowStation         PRIVATE
    MBToWCSEx                                           PRIVATE
    WCSToMBEx                                           PRIVATE
    WRAPAPI(MenuWindowProcA)                            PRIVATE
    WRAPAPI(MenuWindowProcW)                            PRIVATE
    QuerySendMessage = NtUserQuerySendMessage           PRIVATE
    RegisterServicesProcess                             PRIVATE
    WRAPAPI(RegisterLogonProcess)                       PRIVATE
    SetLogonNotifyWindow = NtUserSetLogonNotifyWindow   PRIVATE ; Chicago!
    WRAPAPI(ShowStartGlass)                             PRIVATE
    UnlockWindowStation = NtUserUnlockWindowStation     PRIVATE ; Chicago!
    WRAPAPI(UpdatePerUserSystemParameters)              PRIVATE
    UserClientDllInitialize                             PRIVATE
    WRAPAPI(UserRealizePalette)                         PRIVATE ; GDI32
    WRAPAPI(UserRegisterWowHandlers)                    PRIVATE
    WRAPAPI(RegisterSystemThread)                       PRIVATE ; Chicago!
    WRAPAPI(SetWindowStationUser)                       PRIVATE
    WRAPAPI(GetCursorFrameInfo)                         PRIVATE
    SetCursorContents = NtUserSetCursorContents         PRIVATE

    WRAPAPI(DrawCaptionTempA)                           PRIVATE ; desk.cpl
    WRAPAPI(DrawCaptionTempW)                           PRIVATE ; desk.cpl
    SetSysColorsTemp                                    PRIVATE ; desk.cpl
    WRAPAPI(DrawMenuBarTemp)                            PRIVATE

    TranslateMessageEx                                  PRIVATE
    SetConsoleReserveKeys = NtUserSetConsoleReserveKeys PRIVATE
    PrivateExtractIconExA                               PRIVATE
    PrivateExtractIconExW                               PRIVATE
    PrivateExtractIconsA
    PrivateExtractIconsW

    VRipOutput                                          PRIVATE
    VTagOutput                                          PRIVATE
;
; These are macros
;
; GetNextWindow
; CopyCursor

;
; this stuff wasn't exported from win31 but was in this file
; for some reason
;
;    InitQueue
;    GetSysInputMode
;    IsTwoByteCharPrefix
;    Lookupmenuitem
;    RecalcTabStrings

;
; win32 will not support these functions
;
;    SetSysModalWindow
;    GetSysModalWindow

;
; do we support these functions?
;
;    EnableHardwareInput
;    GetSystemDebugState
;    GetCSSwitchCount

;
; Callbacks from Server
;
    EditWndProc

;
; class.c "Window class manipulation APIs and support routines."
;
    RegisterClassA
    RegisterClassW
    WRAPAPI(UnregisterClassA)
    WRAPAPI(UnregisterClassW)
    GetClassInfoA
    GetClassInfoW
    WRAPAPI(GetClassWord)
    SetClassWord = NtUserSetClassWord
    GetClassLongA
    GetClassLongW
    SetClassLongA
    SetClassLongW
    WRAPAPI(GetClassNameA)
    WRAPAPI(GetClassNameW)

;
; clres.c "Resource loading/manipulation APIs."
;
    WRAPAPI(LookupIconIdFromDirectory)
    WRAPAPI(CreateIconFromResource)
    WRAPAPI(GetIconInfo)
    WRAPAPI(CreateIconIndirect)
    WRAPAPI(LoadMenuA)
    WRAPAPI(LoadMenuW)
    WRAPAPI(LoadCursorA)
    WRAPAPI(LoadCursorW)
    WRAPAPI(LoadIconA)
    WRAPAPI(LoadIconW)
    WRAPAPI(LoadBitmapA)
    WRAPAPI(LoadBitmapW)
    WRAPAPI(LoadAcceleratorsA)
    WRAPAPI(LoadAcceleratorsW)
    WRAPAPI(LoadStringA)
    WRAPAPI(LoadStringW)

;
; input.c "Window message receiving/dispatching APIs and support routines."
;
    WRAPAPI(GetMessageA)
    WRAPAPI(GetMessageW)
    WRAPAPI(PeekMessageA)
    WRAPAPI(PeekMessageW)
    TranslateMessage
    DispatchMessageA
    DispatchMessageW
    WRAPAPI(SetMessageQueue)
    GetMessagePos
    GetMessageTime
    WaitMessage = NtUserWaitMessage
    WRAPAPI(WaitForInputIdle)
    RegisterHotKey = NtUserRegisterHotKey
    UnregisterHotKey = NtUserUnregisterHotKey
    GetMessageExtraInfo
    AttachThreadInput = NtUserAttachThreadInput

;
; sendmsg.c "Window message sending/posting APIs and support routines."
;
    WRAPAPI(SendMessageA)
    WRAPAPI(SendMessageW)
    WRAPAPI(SendMessageTimeoutA)
    WRAPAPI(SendMessageTimeoutW)
    WRAPAPI(SendNotifyMessageA)
    WRAPAPI(SendNotifyMessageW)
    WRAPAPI(SendMessageCallbackA)
    WRAPAPI(SendMessageCallbackW)
    WRAPAPI(PostMessageA)
    WRAPAPI(PostMessageW)
    WRAPAPI(PostThreadMessageA)
    WRAPAPI(PostThreadMessageW)
    WRAPAPI(ReplyMessage)
    WRAPAPI(PostQuitMessage)
    InSendMessage
    WRAPAPI(InSendMessageEx)
    WRAPAPI(RegisterWindowMessageA)
    WRAPAPI(RegisterWindowMessageW)

;
; sysmet.c "System metrics APIs and support routines."
;
    WRAPAPI(SwapMouseButton)
    GetDoubleClickTime = NtUserGetDoubleClickTime
    WRAPAPI(SetDoubleClickTime)
    WRAPAPI(GetSystemMetrics)
    WRAPAPI(GetSysColor)
    SetSysColors

;
; enumwin.c "Window Enumeration APIs and support routines."
;
    WRAPAPI(EnumWindows)
    WRAPAPI(EnumChildWindows)
    WRAPAPI(EnumThreadWindows)

;
; showwin.c "ShowWindow and related APIs and support routines."
;
    ShowWindow = NtUserShowWindow
    WRAPAPI(ShowOwnedPopups)
    WRAPAPI(OpenIcon)
    WRAPAPI(CloseWindow)

;
; createw.c "CreateWindow and related APIs and support routines."
;
    WRAPAPI(CreateWindowExA)
    WRAPAPI(CreateWindowExW)
    DestroyWindow = NtUserDestroyWindow

;
; swp.c "SetWindowPos and related APIs and support routines."
;
    SetWindowPos = NtUserSetWindowPos
    WRAPAPI(BeginDeferWindowPos)
    DeferWindowPos = NtUserDeferWindowPos
    WRAPAPI(EndDeferWindowPos)
    MoveWindow = NtUserMoveWindow
    WRAPAPI(BringWindowToTop)

;
; spb.c
;
    LockWindowUpdate = NtUserLockWindowUpdate

;
; sprite.c
;
    UpdateLayeredWindow = NtUserUpdateLayeredWindow
    GetLayeredWindowAttributes = NtUserGetLayeredWindowAttributes
    SetLayeredWindowAttributes = NtUserSetLayeredWindowAttributes
    PrintWindow = NtUserPrintWindow

#ifdef REDIRECTION
    SetProcessRedirectionMode = NtUserSetProcessRedirectionMode
    GetProcessRedirectionMode = NtUserGetProcessRedirectionMode
    SetDesktopRedirectionMode = NtUserSetDesktopRedirectionMode
    GetDesktopRedirectionMode = NtUserGetDesktopRedirectionMode
#endif // REDIRECTION
;
; winmgr.c "Core Window Manager APIs and support routines."
;
    WRAPAPI(DefWindowProcA)
    WRAPAPI(DefWindowProcW)
    WRAPAPI(CallWindowProcA)
    WRAPAPI(CallWindowProcW)
    WRAPAPI(FlashWindow)
    FlashWindowEx       = NtUserFlashWindowEx
    WRAPAPI(EnableWindow)
    WRAPAPI(IsWindowEnabled)
    IsWindowUnicode
    WRAPAPI(SetWindowTextA)
    WRAPAPI(SetWindowTextW)
    WRAPAPI(GetWindowTextA)
    WRAPAPI(GetWindowTextW)
    WRAPAPI(InternalGetWindowText)
    WRAPAPI(IsHungAppWindow)
    CreateSystemThreads                         PRIVATE
    WRAPAPI(GetWindowTextLengthA)
    WRAPAPI(GetWindowTextLengthW)
    WRAPAPI(GetClientRect)
    WRAPAPI(GetWindowRect)
    WRAPAPI(AdjustWindowRect)
    WRAPAPI(AdjustWindowRectEx)
    WRAPAPI(GetParent)
    SetParent = NtUserSetParent
    WRAPAPI(FindWindowA)
    WRAPAPI(FindWindowW)
    WRAPAPI(GetTopWindow)
    WRAPAPI(GetLastActivePopup)
    WRAPAPI(GetWindow)
    WRAPAPI(ClientToScreen)
    WRAPAPI(ScreenToClient)
    WRAPAPI(MapWindowPoints)
    WRAPAPI(IsWindow)
    WRAPAPI(IsChild)
    WRAPAPI(IsWindowVisible)
    WRAPAPI(IsIconic)
    WRAPAPI(IsZoomed)
    AnyPopup
    GetInternalWindowPos = NtUserGetInternalWindowPos   PRIVATE
    SetInternalWindowPos = NtUserSetInternalWindowPos   PRIVATE
    WRAPAPI(SystemParametersInfoA)
    WRAPAPI(SystemParametersInfoW)
    WRAPAPI(IsGUIThread)
    WRAPAPI(GetWindowThreadProcessId)
    GetWindowPlacement = NtUserGetWindowPlacement
    SetWindowPlacement = NtUserSetWindowPlacement
    WRAPAPI(AnimateWindow)
    QueryUserCounters = NtUserQueryUserCounters         PRIVATE
    GetProcessDefaultLayout
    WRAPAPI(SetProcessDefaultLayout)
    WRAPAPI(IsWindowInDestroy)                          PRIVATE
    WRAPAPI(IsServerSideWindow)                         PRIVATE

;
; dlgmgr.c "Dialog Manager APIs and support routines."
;
    WRAPAPI(CreateDialogParamA)
    WRAPAPI(CreateDialogParamW)
    WRAPAPI(CreateDialogIndirectParamA)
    WRAPAPI(CreateDialogIndirectParamW)
    WRAPAPI(DialogBoxParamA)
    WRAPAPI(DialogBoxParamW)
    WRAPAPI(DialogBoxIndirectParamA)
    WRAPAPI(DialogBoxIndirectParamW)
    WRAPAPI(EndDialog)
    WRAPAPI(DefDlgProcA)
    WRAPAPI(DefDlgProcW)
    WRAPAPI(GetDlgItem)
    WRAPAPI(SetDlgItemInt)
    GetDlgItemInt
    WRAPAPI(SetDlgItemTextA)
    WRAPAPI(SetDlgItemTextW)
    WRAPAPI(GetDlgItemTextA)
    WRAPAPI(GetDlgItemTextW)
    WRAPAPI(SendDlgItemMessageA)
    WRAPAPI(SendDlgItemMessageW)
    WRAPAPI(CheckDlgButton)
    WRAPAPI(CheckRadioButton)
    WRAPAPI(IsDlgButtonChecked)
    WRAPAPI(GetNextDlgGroupItem)
    WRAPAPI(GetNextDlgTabItem)
    WRAPAPI(GetDlgCtrlID)
    GetDialogBaseUnits
    WRAPAPI(MapDialogRect)
    WRAPAPI(IsDialogMessageA)
    WRAPAPI(IsDialogMessageW)
    IsDialogMessage = IsDialogMessageA

;
; clipbrd.c "Clipboard Manager APIs and support routines."
;
    WRAPAPI(OpenClipboard)
    CloseClipboard = NtUserCloseClipboard
    WRAPAPI(EnumClipboardFormats)
    EmptyClipboard = NtUserEmptyClipboard
    WRAPAPI(SetClipboardData)
    WRAPAPI(GetClipboardData)
    RegisterClipboardFormatA = RegisterWindowMessageA
    RegisterClipboardFormatW = RegisterWindowMessageW
    IsClipboardFormatAvailable = NtUserIsClipboardFormatAvailable
    WRAPAPI(GetClipboardFormatNameA)
    WRAPAPI(GetClipboardFormatNameW)
    CountClipboardFormats = NtUserCountClipboardFormats
    GetPriorityClipboardFormat = NtUserGetPriorityClipboardFormat
    GetClipboardOwner = NtUserGetClipboardOwner
    GetClipboardSequenceNumber = NtUserGetClipboardSequenceNumber
    GetClipboardViewer = NtUserGetClipboardViewer
    SetClipboardViewer = NtUserSetClipboardViewer
    ChangeClipboardChain = NtUserChangeClipboardChain

;
; paint.c "Window painting APIs and support routines."
;
    BeginPaint = NtUserBeginPaint
    EndPaint = NtUserEndPaint
    WRAPAPI(GetWindowRgn)
    WRAPAPI(GetWindowRgnBox)
    WRAPAPI(SetWindowRgn)

;
; update.c "Window updating APIs and support routines."
;
    WRAPAPI(UpdateWindow)
    WRAPAPI(GetUpdateRect)
    WRAPAPI(GetUpdateRgn)
    ExcludeUpdateRgn = NtUserExcludeUpdateRgn
    InvalidateRect = NtUserInvalidateRect
    ValidateRect = NtUserValidateRect
    InvalidateRgn = NtUserInvalidateRgn
    WRAPAPI(ValidateRgn)
    RedrawWindow = NtUserRedrawWindow

;
; ghost.c "Window ghosting APIs and support routines"
;
    DisableProcessWindowsGhosting

;
; focus.c "Focus/Activation APIs and support routines."
;
    SetFocus = NtUserSetFocus
    GetFocus
    SetActiveWindow = NtUserSetActiveWindow
    GetActiveWindow
    WRAPAPI(SetForegroundWindow)
    GetForegroundWindow = NtUserGetForegroundWindow
    WRAPAPI(AllowSetForegroundWindow)
    WRAPAPI(LockSetForegroundWindow)

;
; capture.c "Window capture APIs and support routines."
;
    GetCapture
    SetCapture = NtUserSetCapture
    ReleaseCapture

;
; kbdlyout.c "Keyboard Layout APIs and support routines."
;
    WRAPAPI(LoadKeyboardLayoutA)
    WRAPAPI(LoadKeyboardLayoutW)
    ActivateKeyboardLayout = NtUserActivateKeyboardLayout
    UnloadKeyboardLayout
    WRAPAPI(GetKeyboardLayoutNameA)
    WRAPAPI(GetKeyboardLayoutNameW)
    WRAPAPI(LoadKeyboardLayoutEx)    PRIVATE

;
; keyboard.c "Keyboard management APIs and support routines."
;
    GetKBCodePage
    WRAPAPI(GetKeyState)
    WRAPAPI(GetAsyncKeyState)
    GetKeyboardState = NtUserGetKeyboardState
    SetKeyboardState = NtUserSetKeyboardState
    WRAPAPI(GetKeyNameTextA)
    WRAPAPI(GetKeyNameTextW)
    WRAPAPI(GetKeyboardType)

;
; toascii.c "Virtual Keycode to Character translation"
;
    ToAscii
    ToUnicode
    WRAPAPI(VkKeyScanA)
    WRAPAPI(VkKeyScanW)

;
; winable.c "Active Accessibility - Win Event hooks"
;
    GetAltTabInfoA
    GetAltTabInfoW
    GetAltTabInfo = GetAltTabInfoA

    GetAncestor = NtUserGetAncestor
    GetComboBoxInfo = NtUserGetComboBoxInfo
    GetCursorInfo = NtUserGetCursorInfo
    GetGUIThreadInfo = NtUserGetGUIThreadInfo
    GetListBoxInfo = NtUserGetListBoxInfo
    GetMenuBarInfo = NtUserGetMenuBarInfo
    GetScrollBarInfo = NtUserGetScrollBarInfo
    GetTitleBarInfo = NtUserGetTitleBarInfo
    WRAPAPI(GetWindowInfo)
    WRAPAPI(GetWindowModuleFileNameA)
    WRAPAPI(GetWindowModuleFileNameW)
    GetWindowModuleFileName = GetWindowModuleFileNameA

    WRAPAPI(NotifyWinEvent)
    RealChildWindowFromPoint = NtUserRealChildWindowFromPoint
    RealGetWindowClass = RealGetWindowClassA
    WRAPAPI(RealGetWindowClassA)
    WRAPAPI(RealGetWindowClassW)

    SetWinEventHook
    UnhookWinEvent = NtUserUnhookWinEvent
    WRAPAPI(IsWinEventHookInstalled)

    WRAPAPI(RegisterUserApiHook)                        PRIVATE
    UnregisterUserApiHook = NtUserUnregisterUserApiHook PRIVATE
#ifdef MESSAGE_PUMP_HOOK
    RegisterMessagePumpHook                             PRIVATE
    UnregisterMessagePumpHook                           PRIVATE
#endif

;
; xlate.c "Scancode, Virtual Key, and Character translations"
;
    WRAPAPI(MapVirtualKeyA)
    WRAPAPI(MapVirtualKeyW)
    WRAPAPI(OemKeyScan)

;
; lowinput.c "Low-level input APIs and support routines."
;
    GetInputState
    WRAPAPI(GetQueueStatus)
    MsgWaitForMultipleObjects
    MsgWaitForMultipleObjectsEx

;
; timers.c "Timer APIs and support routines."
;
    SetTimer = NtUserSetTimer
    KillTimer = NtUserKillTimer
    SetSystemTimer = NtUserSetSystemTimer               PRIVATE
    WRAPAPI(KillSystemTimer)                            PRIVATE

;
; menu.c "Menu APIs and support routines."
;
    WRAPAPI(TranslateAcceleratorA)
    WRAPAPI(TranslateAcceleratorW)
    TranslateAccelerator = TranslateAcceleratorA
    LoadMenuIndirectW = CreateMenuFromResource
    LoadMenuIndirectA = CreateMenuFromResource
    WRAPAPI(GetMenu)
    WRAPAPI(SetMenu)
    SetSystemMenu = NtUserSetSystemMenu                 PRIVATE
    WRAPAPI(ChangeMenuA)
    WRAPAPI(ChangeMenuW)
    HiliteMenuItem = NtUserHiliteMenuItem
    WRAPAPI(GetMenuStringA)
    WRAPAPI(GetMenuStringW)
    WRAPAPI(GetMenuState)
    WRAPAPI(DrawMenuBar)
    GetSystemMenu = NtUserGetSystemMenu
    CreateMenu
    CreatePopupMenu
    DestroyMenu = NtUserDestroyMenu
    WRAPAPI(CheckMenuItem)
    WRAPAPI(EnableMenuItem)
    WRAPAPI(GetSubMenu)
    WRAPAPI(GetMenuItemID)
    WRAPAPI(GetMenuItemCount)
    WRAPAPI(InsertMenuA)
    WRAPAPI(InsertMenuW)
    WRAPAPI(AppendMenuA)
    WRAPAPI(AppendMenuW)
    WRAPAPI(ModifyMenuA)
    WRAPAPI(ModifyMenuW)
    RemoveMenu = NtUserRemoveMenu
    DeleteMenu = NtUserDeleteMenu
    SetMenuItemBitmaps
    GetMenuCheckMarkDimensions
    TrackPopupMenu
    PaintMenuBar = NtUserPaintMenuBar                   PRIVATE
    CalcMenuBar = NtUserCalcMenuBar                     PRIVATE

;
; scroll.c "Window/DC scrolling APIs and support routines."
;
; later scrollwindow can be removed
    ScrollWindow
    ScrollDC
    ScrollWindowEx

;
; sbapi.c "Scrollbar control"
;
    WRAPAPI(SetScrollPos)
    WRAPAPI(GetScrollPos)
    WRAPAPI(SetScrollRange)
    WRAPAPI(GetScrollRange)
    ShowScrollBar = NtUserShowScrollBar

;
; prop.c "Window property APIs and support routines."
;
    WRAPAPI(SetPropA)
    WRAPAPI(SetPropW)
    WRAPAPI(GetPropA)
    WRAPAPI(GetPropW)
    WRAPAPI(RemovePropA)
    WRAPAPI(RemovePropW)
    WRAPAPI(EnumPropsA)
    WRAPAPI(EnumPropsW)
    WRAPAPI(EnumPropsExA)
    WRAPAPI(EnumPropsExW)

;
; msgbox.c "Message Box APIs and support routines."
;
    MessageBoxA
    MessageBoxW
    MessageBoxExA
    MessageBoxExW
    MessageBoxIndirectA
    MessageBoxIndirectW
    MessageBoxTimeoutA
    MessageBoxTimeoutW
    WRAPAPI(MessageBeep)
    MB_GetString                                PRIVATE
    SoftModalMessageBox                         PRIVATE

;
; rmcreate.c
;
    CreateCursor
    WRAPAPI(DestroyCursor)
    CreateIcon
    DestroyIcon             = DestroyCursor
    WRAPAPI(CreateAcceleratorTableA)
    CreateAcceleratorTableW = NtUserCreateAcceleratorTable
    DestroyAcceleratorTable
    WRAPAPI(CopyAcceleratorTableA)
    CopyAcceleratorTableW = NtUserCopyAcceleratorTable

;
; cursor.c "Mouse cursor APIs and support routines."
;
    WRAPAPI(ShowCursor)
    WRAPAPI(SetCursorPos)
    SetCursor = NtUserSetCursor
    WRAPAPI(GetCursorPos)
    ClipCursor = NtUserClipCursor
    GetClipCursor = NtUserGetClipCursor
    GetCursor
    WRAPAPI(SetSystemCursor)
    WRAPAPI(LoadCursorFromFileA)
    WRAPAPI(LoadCursorFromFileW)

;
; icon.c "Icon management APIs and support routines"
;
    WRAPAPI(DrawIcon)

;
; caret.c "Input caret APIs and support routines."
;
    CreateCaret = NtUserCreateCaret
    GetCaretBlinkTime = NtUserGetCaretBlinkTime
    WRAPAPI(SetCaretBlinkTime)
    DestroyCaret
    HideCaret = NtUserHideCaret
    ShowCaret = NtUserShowCaret
    WRAPAPI(SetCaretPos)
    GetCaretPos = NtUserGetCaretPos

;
; winwhere.c "Window hit-testing APIs and support routines."
;
    WindowFromPoint = NtUserWindowFromPoint
    WRAPAPI(ChildWindowFromPoint)

;
; getset.c "window word manipulation APIs"
;
    WRAPAPI(GetWindowWord)
    SetWindowWord = NtUserSetWindowWord
    GetWindowLongA
    GetWindowLongW
    SetWindowLongA
    SetWindowLongW

;
; desktop.c "Desktop window APIs and window procedure."
;

;   GetDesktopHwnd
    GetDesktopWindow

    WRAPAPI(CreateDesktopA)
    WRAPAPI(CreateDesktopW)

    WRAPAPI(OpenDesktopA)
    WRAPAPI(OpenDesktopW)
    OpenInputDesktop = NtUserOpenInputDesktop

    SwitchDesktop = NtUserSwitchDesktop
    GetInputDesktop
    SetThreadDesktop = NtUserSetThreadDesktop
    GetThreadDesktop
    CloseDesktop = NtUserCloseDesktop
    RegisterTasklist = NtUserRegisterTasklist   PRIVATE
    SetDeskWallpaper
    WRAPAPI(EnumDisplayDevicesA)
    WRAPAPI(EnumDisplayDevicesW)
    WRAPAPI(EnumDisplaySettingsA)
    WRAPAPI(EnumDisplaySettingsW)
    WRAPAPI(EnumDisplaySettingsExA)
    WRAPAPI(EnumDisplaySettingsExW)
    WRAPAPI(EnumWindowStationsA)
    WRAPAPI(EnumWindowStationsW)
    WRAPAPI(EnumDesktopsA)
    WRAPAPI(EnumDesktopsW)
    WRAPAPI(EnumDesktopWindows)
    ResolveDesktopForWOW = NtUserResolveDesktopForWOW PRIVATE


;
; winsta.c "Windowstation APIs."
;
    WRAPAPI(CreateWindowStationA)
    WRAPAPI(CreateWindowStationW)
    WRAPAPI(OpenWindowStationA)
    WRAPAPI(OpenWindowStationW)
    CloseWindowStation = NtUserCloseWindowStation
    SetProcessWindowStation = NtUserSetProcessWindowStation
    GetProcessWindowStation = NtUserGetProcessWindowStation

;
; security.c "USER object security routines."
;
    WRAPAPI(SetUserObjectSecurity)
    WRAPAPI(GetUserObjectSecurity)
    SetUserObjectInformationW = NtUserSetObjectInformation
    SetUserObjectInformationA = NtUserSetObjectInformation
    GetUserObjectInformationW = NtUserGetObjectInformation
    WRAPAPI(GetUserObjectInformationA)

;
; dirlist.c "Directory list APIs and support routines."
;
    WRAPAPI(DlgDirListA)
    WRAPAPI(DlgDirListW)
    WRAPAPI(DlgDirSelectExA)
    WRAPAPI(DlgDirSelectExW)
    WRAPAPI(DlgDirListComboBoxA)
    WRAPAPI(DlgDirListComboBoxW)
    WRAPAPI(DlgDirSelectComboBoxExA)
    WRAPAPI(DlgDirSelectComboBoxExW)

;
; hooks.c "Hook APIs and support routines."
;
    WRAPAPI(SetWindowsHookA)
    WRAPAPI(SetWindowsHookW)
    WRAPAPI(UnhookWindowsHook)
    WRAPAPI(SetWindowsHookExA)
    WRAPAPI(SetWindowsHookExW)
    UnhookWindowsHookEx = NtUserUnhookWindowsHookEx
    WRAPAPI(CallNextHookEx)
    WRAPAPI(CallMsgFilterA)
    WRAPAPI(CallMsgFilterW)
    CallMsgFilter = CallMsgFilterA

;
; MDI.c "Multiple Document Interface APIs, window procs, and support routines."
;
    WRAPAPI(DefFrameProcA)
    WRAPAPI(DefFrameProcW)
    WRAPAPI(DefMDIChildProcA)
    WRAPAPI(DefMDIChildProcW)
    WRAPAPI(ArrangeIconicWindows)
    WRAPAPI(CascadeChildWindows)
    WRAPAPI(TileChildWindows)
;   CalcChildScroll                 ; Private API used by progman
    WRAPAPI(CreateMDIWindowA)
    WRAPAPI(CreateMDIWindowW)
    WRAPAPI(ScrollChildren)           PRIVATE

;
; help.c "Front end API for Windows Help Manager."
;
    WinHelpA
    WinHelpW

;
; draw.c "Miscellaneous exported and internal drawing routines."
;
    WRAPAPI(GrayStringA)
    WRAPAPI(GrayStringW)
    WRAPAPI(DrawTextA)
    WRAPAPI(DrawTextW)
    TabbedTextOutA
    TabbedTextOutW
    GetTabbedTextExtentA
    GetTabbedTextExtentW
    DrawFocusRect

;
; dc.c "DC management APIs and support routines."
;
    GetWindowDC = NtUserGetWindowDC
    GetDC = NtUserGetDC
    WRAPAPI(ReleaseDC)
    WRAPAPI(WindowFromDC)
    GetDCEx = NtUserGetDCEx

;
; palman.c "Palette Manager APIs and support routines."
;
;   SelectPalette
;   RealizePalette

;
; misc.c "Miscellanous APIs and routines that don't fit well anywhere else."
;
    WRAPAPI(ExitWindowsEx)
    WRAPAPI(DisplayExitWindowsWarnings)         PRIVATE
    WRAPAPI(RecordShutdownReason)               PRIVATE
    WRAPAPI(SwitchToThisWindow)
    WRAPAPI(SetDebugErrorLevel)
#if defined(_X86_)
    WRAPAPI(InitializeWin32EntryTable)          PRIVATE
#endif
    EnterReaderModeHelper                       PRIVATE

;
; clrect.c "Client-side rectangle drawing primitives"
;
    FillRect
    InvertRect
    FrameRect

;
; ddeml.c "DDEML APIs"
;
    WRAPAPI(DdeInitializeA)
    WRAPAPI(DdeInitializeW)
    WRAPAPI(DdeUninitialize)
    WRAPAPI(DdeCmpStringHandles)
    WRAPAPI(DdeConnectList)
    WRAPAPI(DdeQueryNextServer)
    WRAPAPI(DdeDisconnectList)
    WRAPAPI(DdeConnect)
    WRAPAPI(DdeDisconnect)
    WRAPAPI(DdeReconnect)
    WRAPAPI(DdeQueryConvInfo)
    WRAPAPI(DdeSetUserHandle)
    WRAPAPI(DdeAbandonTransaction)
    WRAPAPI(DdePostAdvise)
    WRAPAPI(DdeEnableCallback)
    DdeNameService
    WRAPAPI(DdeClientTransaction)
    WRAPAPI(DdeCreateDataHandle)
    WRAPAPI(DdeAddData)
    WRAPAPI(DdeGetData)
    WRAPAPI(DdeAccessData)
    WRAPAPI(DdeFreeDataHandle)
    WRAPAPI(DdeUnaccessData)
    WRAPAPI(DdeGetLastError)
    WRAPAPI(DdeCreateStringHandleA)
    WRAPAPI(DdeCreateStringHandleW)
    WRAPAPI(DdeQueryStringA)
    WRAPAPI(DdeQueryStringW)
    WRAPAPI(DdeFreeStringHandle)
    WRAPAPI(DdeKeepStringHandle)
    WRAPAPI(DdeImpersonateClient)
    ImpersonateDdeClientWindow = NtUserImpersonateDdeClientWindow
    DdeGetQualityOfService = NtUserDdeGetQualityOfService               PRIVATE
    DdeSetQualityOfService = NtUserDdeSetQualityOfService

;
; ddetrack.c
;
    WRAPAPI(PackDDElParam)
    WRAPAPI(UnpackDDElParam)
    WRAPAPI(FreeDDElParam)
    WRAPAPI(ReuseDDElParam)

;
; dragdrop.c "Drag/Drop support functions."
;
    DragObject = NtUserDragObject
    DragDetect = NtUserDragDetect

;
; Merge 3.1.1
;
    GetOpenClipboardWindow = NtUserGetOpenClipboardWindow
    DrawFrame
    EnableScrollBar
    WRAPAPI(CopyIcon)

;
; winmgrc.c
;
    WRAPAPI(IsMenu)

;
; rect.c "Rectangle management APIs."
;
    SetRect
    SetRectEmpty
    CopyRect
    InflateRect
    SubtractRect
    IntersectRect
    UnionRect
    OffsetRect
    IsRectEmpty
    EqualRect
    PtInRect

;
; alignrec.c "Rectangle management APIs."
;
    AlignRects                                  PRIVATE

;
; strings.c "String manipulation routines.  Should be replaced with Rtl macros."
;
    WRAPAPI(wvsprintfA)
    WRAPAPI(wvsprintfW)
    wsprintfA
    wsprintfW

    WRAPAPI(CharLowerA)
    WRAPAPI(CharLowerW)
    WRAPAPI(CharUpperA)
    WRAPAPI(CharUpperW)
    WRAPAPI(CharNextA)
    WRAPAPI(CharNextW)
    WRAPAPI(CharPrevA)
    WRAPAPI(CharPrevW)
    WRAPAPI(IsCharLowerA)
    WRAPAPI(IsCharLowerW)
    WRAPAPI(IsCharUpperA)
    WRAPAPI(IsCharUpperW)
    WRAPAPI(IsCharAlphaA)
    WRAPAPI(IsCharAlphaW)
    WRAPAPI(IsCharAlphaNumericA)
    WRAPAPI(IsCharAlphaNumericW)
    WRAPAPI(CharLowerBuffA)
    WRAPAPI(CharLowerBuffW)
    WRAPAPI(CharUpperBuffA)
    WRAPAPI(CharUpperBuffW)

;
; oemxlate.c "OEM to ANSI/Unicode, ANSI/Unicode to OEM character translation"
;
    WRAPAPI(CharToOemA)
    WRAPAPI(CharToOemW)
    WRAPAPI(CharToOemBuffA)
    WRAPAPI(CharToOemBuffW)
    WRAPAPI(OemToCharA)
    WRAPAPI(OemToCharW)
    WRAPAPI(OemToCharBuffA)
    WRAPAPI(OemToCharBuffW)

;
; ntinput
;
    WRAPAPI(keybd_event)
    WRAPAPI(mouse_event)

    SendInput = NtUserSendInput
    BlockInput = NtUserBlockInput
    GetMouseMovePointsEx = NtUserGetMouseMovePointsEx
    GetLastInputInfo

    WRAPAPI(SetLastErrorEx)      ; to be moved!!!
;
; Chicago/Cairo APIs
;
    WRAPAPI(BroadcastSystemMessageA)
    WRAPAPI(BroadcastSystemMessageW)
    BroadcastSystemMessage = BroadcastSystemMessageA
    WRAPAPI(BroadcastSystemMessageExA)
    WRAPAPI(BroadcastSystemMessageExW)
    CascadeWindows
    WRAPAPI(ChangeDisplaySettingsA)
    WRAPAPI(ChangeDisplaySettingsW)
    WRAPAPI(ChangeDisplaySettingsExA)
    WRAPAPI(ChangeDisplaySettingsExW)
    WRAPAPI(CharNextExA)                 ; Ansi Only
    WRAPAPI(CharPrevExA)                 ; Ansi Only
    WRAPAPI(CheckMenuRadioItem)
    ChildWindowFromPointEx = NtUserChildWindowFromPointEx
    WRAPAPI(CopyImage)
    WRAPAPI(CreateIconFromResourceEx)
    DrawAnimatedRects = NtUserDrawAnimatedRects
    DrawCaption
    DrawEdge
    WRAPAPI(DrawFrameControl)
    WRAPAPI(DrawIconEx)
    WRAPAPI(DrawStateA)
    WRAPAPI(DrawStateW)
    WRAPAPI(DrawTextExA)
    DrawTextExW
    EndMenu = NtUserEndMenu
    WRAPAPI(FindWindowExA)
    WRAPAPI(FindWindowExW)
    GetClassInfoExA
    GetClassInfoExW
    WRAPAPI(GetKeyboardLayout)
    GetKeyboardLayoutList = NtUserGetKeyboardLayoutList
    WRAPAPI(GetMenuContextHelpId)
    WRAPAPI(GetMenuDefaultItem)
    WRAPAPI(GetMenuInfo)
    WRAPAPI(GetMenuItemInfoA)
    WRAPAPI(GetMenuItemInfoW)
    GetMenuItemRect = NtUserGetMenuItemRect
    WRAPAPI(GetScrollInfo)
    GetShellWindow
    WRAPAPI(GetSysColorBrush)
    WRAPAPI(GetWindowContextHelpId)
    InsertMenuItemA
    InsertMenuItemW
    WRAPAPI(LoadImageA)
    WRAPAPI(LoadImageW)
    WRAPAPI(LookupIconIdFromDirectoryEx)
    WRAPAPI(MapVirtualKeyExA)
    WRAPAPI(MapVirtualKeyExW)
    MenuItemFromPoint = NtUserMenuItemFromPoint
    PaintDesktop = NtUserPaintDesktop
    RegisterClassExA
    RegisterClassExW
    SetMenuContextHelpId = NtUserSetMenuContextHelpId
    SetMenuDefaultItem = NtUserSetMenuDefaultItem
    WRAPAPI(SetMenuInfo)
    WRAPAPI(SetMenuItemInfoA)
    WRAPAPI(SetMenuItemInfoW)
    WRAPAPI(SetMessageExtraInfo)
    WRAPAPI(SetScrollInfo)
    WRAPAPI(SetShellWindow)
    SetShellWindowEx = NtUserSetShellWindowEx   PRIVATE
    WRAPAPI(SetWindowContextHelpId)
    ShowWindowAsync = NtUserShowWindowAsync
    TileWindows
    ToAsciiEx
    ToUnicodeEx
    TrackMouseEvent = NtUserTrackMouseEvent
    TrackPopupMenuEx = NtUserTrackPopupMenuEx
    WRAPAPI(TranslateMDISysAccel)
    WRAPAPI(VkKeyScanExA)
    WRAPAPI(VkKeyScanExW)

; Win 5.0 APIs
    GetGuiResources     = NtUserGetGuiResources
    RegisterDeviceNotificationA
    RegisterDeviceNotificationW
    UnregisterDeviceNotification
    DeviceEventWorker                           PRIVATE

    Win32PoolAllocationStats = NtUserWin32PoolAllocationStats    PRIVATE

#if DBG
    WRAPAPI(DbgWin32HeapFail)
    WRAPAPI(DbgWin32HeapStat)
#endif

    LockWorkStation = NtUserLockWorkStation

    UserHandleGrantAccess = NtUserUserHandleGrantAccess

; multimonitor apis
    WRAPAPI(GetMonitorInfoA)
    WRAPAPI(GetMonitorInfoW)
    EnumDisplayMonitors = NtUserEnumDisplayMonitors
    MonitorFromPoint
    MonitorFromRect
    MonitorFromWindow

    WRAPAPI(SetTaskmanWindow)                   PRIVATE
    GetTaskmanWindow                            PRIVATE
    WRAPAPI(SetProgmanWindow)                   PRIVATE
    GetProgmanWindow                            PRIVATE
    WRAPAPI(RegisterShellHookWindow)
    WRAPAPI(DeregisterShellHookWindow)

    PrivateSetDbgTag = NtUserSetDbgTag          PRIVATE
    PrivateSetRipFlags = NtUserSetRipFlags      PRIVATE
;
;   Used by CreateWindowStation() and winsrv.dll to
;   finish DLL init after the connection is made.
;   No graphics can be done until the connection is
;   established.
    CtxInitUser32                               PRIVATE
    GetWinStationInfo                           PRIVATE



#ifdef _WIN64
    WRAPAPI(GetWindowLongPtrA)
    WRAPAPI(GetWindowLongPtrW)
    WRAPAPI(SetWindowLongPtrA)
    WRAPAPI(SetWindowLongPtrW)
    WRAPAPI(GetClassLongPtrA)
    WRAPAPI(GetClassLongPtrW)
    WRAPAPI(SetClassLongPtrA)
    WRAPAPI(SetClassLongPtrW)
#endif

;
; The following IMM functions are faked(US) or dynamically loaded(FE)
;
    WRAPAPI(WINNLSGetIMEHotkey)
    WRAPAPI(WINNLSEnableIME)
    WRAPAPI(WINNLSGetEnableStatus)
    WRAPAPI(SendIMEMessageExW)
    WRAPAPI(SendIMEMessageExA)
    WRAPAPI(IMPGetIMEW)
    WRAPAPI(IMPGetIMEA)
    WRAPAPI(IMPQueryIMEW)
    WRAPAPI(IMPQueryIMEA)
    WRAPAPI(IMPSetIMEW)
    WRAPAPI(IMPSetIMEA)
    WRAPAPI(User32InitializeImmEntryTable)      PRIVATE

;
; IMM related private APIs
;
    WRAPAPI(CliImmSetHotKey)                    PRIVATE
#ifdef LATER
    WRAPAPI(ImmReconversionWorker)              PRIVATE
#endif

;
; LPK APIs
;
    InitializeLpkHooks                          PRIVATE
    UserLpkTabbedTextOut                        PRIVATE
    WRAPAPI(UserLpkPSMTextOut)                  PRIVATE

#ifdef GENERIC_INPUT
    ; Raw Input APIs
    GetRawInputData = NtUserGetRawInputData
    WRAPAPI(GetRawInputDeviceInfoA)
    WRAPAPI(GetRawInputDeviceInfoW)
    RegisterRawInputDevices = NtUserRegisterRawInputDevices
    GetRegisteredRawInputDevices = NtUserGetRegisteredRawInputDevices
    WRAPAPI(GetRawInputBuffer)
    GetRawInputDeviceList = NtUserGetRawInputDeviceList
    DefRawInputProc
#endif // GENERIC_INPUT

;
; Shutdown reason APIs
    GetReasonTitleFromReasonCode                PRIVATE
    ReasonCodeNeedsComment                      PRIVATE
    ReasonCodeNeedsBugID                        PRIVATE
    BuildReasonArray                            PRIVATE
    DestroyReasons                              PRIVATE

;
; BroadcastSystemMessageExW wrapper function
; associates a desktop with the csrss server thread
; in order to send a message with BroadcastSystemMessageExW
;
    WRAPAPI(CsrBroadcastSystemMessageExW)       PRIVATE

    AllowForegroundActivation                   PRIVATE