Commit b8732c80 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

win32u: Move caret APIs from user32.

parent 535682cd
......@@ -3807,10 +3807,10 @@ static void EDIT_WM_SetFocus(EDITSTATE *es)
NtUserReleaseDC( es->hwndSelf, hdc );
}
CreateCaret(es->hwndSelf, 0, 1, es->line_height);
NtUserCreateCaret( es->hwndSelf, 0, 1, es->line_height );
EDIT_SetCaretPos(es, es->selection_end,
es->flags & EF_AFTER_WRAP);
ShowCaret(es->hwndSelf);
NtUserShowCaret( es->hwndSelf );
EDIT_NOTIFY_PARENT(es, EN_SETFOCUS);
}
......@@ -3890,10 +3890,10 @@ static void EDIT_WM_SetFont(EDITSTATE *es, HFONT font, BOOL redraw)
EDIT_UpdateText(es, NULL, TRUE);
if (es->flags & EF_FOCUSED) {
DestroyCaret();
CreateCaret(es->hwndSelf, 0, 1, es->line_height);
NtUserCreateCaret( es->hwndSelf, 0, 1, es->line_height );
EDIT_SetCaretPos(es, es->selection_end,
es->flags & EF_AFTER_WRAP);
ShowCaret(es->hwndSelf);
NtUserShowCaret( es->hwndSelf );
}
}
......
......@@ -3300,7 +3300,7 @@ static BOOL MENU_InitTracking(HWND hWnd, HMENU hMenu, BOOL bPopup, UINT wFlags)
TRACE("hwnd=%p hmenu=%p\n", hWnd, hMenu);
HideCaret(0);
NtUserHideCaret( 0 );
if (!(menu = MENU_GetMenu( hMenu ))) return FALSE;
......@@ -3342,7 +3342,7 @@ static BOOL MENU_ExitTracking(HWND hWnd, BOOL bPopup)
TRACE("hwnd=%p\n", hWnd);
SendMessageW( hWnd, WM_EXITMENULOOP, bPopup, 0 );
ShowCaret(0);
NtUserShowCaret( 0 );
top_popup = 0;
top_popup_hmenu = NULL;
return TRUE;
......
......@@ -285,7 +285,7 @@ static INT scroll_window( HWND hwnd, INT dx, INT dy, const RECT *rect, const REC
hwndCaret = fix_caret(hwnd, &rc, dx, dy, flags, &moveCaret, &newCaretPos);
if (hwndCaret)
HideCaret(hwndCaret);
NtUserHideCaret( hwndCaret );
if (is_ex) dcxflags |= DCX_CACHE;
if( style & WS_CLIPSIBLINGS) dcxflags |= DCX_CLIPSIBLINGS;
......@@ -388,7 +388,7 @@ static INT scroll_window( HWND hwnd, INT dx, INT dy, const RECT *rect, const REC
if( moveCaret )
SetCaretPos( newCaretPos.x, newCaretPos.y );
if( hwndCaret )
ShowCaret( hwndCaret );
NtUserShowCaret( hwndCaret );
if( bOwnRgn && hrgnUpdate ) DeleteObject( hrgnUpdate );
......
......@@ -756,7 +756,7 @@ static void SCROLL_HandleKbdEvent(HWND hwnd, WPARAM wParam, LPARAM lParam)
/* hide caret on first KEYDOWN to prevent flicker */
if ((lParam & PFD_DOUBLEBUFFER_DONTCARE) == 0)
HideCaret(hwnd);
NtUserHideCaret( hwnd );
switch(wParam)
{
......@@ -814,7 +814,7 @@ void SCROLL_HandleScrollEvent( HWND hwnd, INT nBar, UINT msg, POINT pt )
switch(msg)
{
case WM_LBUTTONDOWN: /* Initialise mouse tracking */
HideCaret(hwnd); /* hide caret while holding down LBUTTON */
NtUserHideCaret( hwnd ); /* hide caret while holding down LBUTTON */
NtUserSetCapture( hwnd );
prevPt = pt;
g_tracking_info.hit_test = hittest = SCROLL_THUMB;
......@@ -826,7 +826,7 @@ void SCROLL_HandleScrollEvent( HWND hwnd, INT nBar, UINT msg, POINT pt )
case WM_LBUTTONUP:
ReleaseCapture();
g_tracking_info.hit_test = hittest = SCROLL_NOWHERE;
if (hwnd==GetFocus()) ShowCaret(hwnd);
if (hwnd == GetFocus()) NtUserShowCaret( hwnd );
break;
case WM_SYSTIMER:
pt = prevPt;
......@@ -844,7 +844,7 @@ void SCROLL_HandleScrollEvent( HWND hwnd, INT nBar, UINT msg, POINT pt )
switch(msg)
{
case WM_LBUTTONDOWN: /* Initialise mouse tracking */
HideCaret(hwnd); /* hide caret while holding down LBUTTON */
NtUserHideCaret( hwnd ); /* hide caret while holding down LBUTTON */
g_tracking_info.vertical = vertical;
g_tracking_info.hit_test = hittest = SCROLL_HitTest( hwnd, nBar, pt, FALSE );
lastClickPos = vertical ? (pt.y - rect.top) : (pt.x - rect.left);
......@@ -911,7 +911,7 @@ void SCROLL_HandleScrollEvent( HWND hwnd, INT nBar, UINT msg, POINT pt )
hittest = SCROLL_NOWHERE;
ReleaseCapture();
/* if scrollbar has focus, show back caret */
if (hwnd==GetFocus()) ShowCaret(hwnd);
if (hwnd == GetFocus()) NtUserShowCaret( hwnd );
break;
case WM_SYSTIMER:
......@@ -1468,7 +1468,7 @@ LRESULT WINAPI USER_ScrollBarProc( HWND hwnd, UINT message, WPARAM wParam, LPARA
break;
case WM_KEYUP:
ShowCaret(hwnd);
NtUserShowCaret( hwnd );
break;
case WM_SETFOCUS:
......@@ -1480,15 +1480,15 @@ LRESULT WINAPI USER_ScrollBarProc( HWND hwnd, UINT message, WPARAM wParam, LPARA
&arrowSize, &thumbSize, &thumbPos );
if (!vertical)
{
CreateCaret(hwnd, (HBITMAP)1, thumbSize-2, rect.bottom-rect.top-2);
NtUserCreateCaret( hwnd, (HBITMAP)1, thumbSize - 2, rect.bottom - rect.top - 2 );
SetCaretPos(thumbPos+1, rect.top+1);
}
else
{
CreateCaret(hwnd, (HBITMAP)1, rect.right-rect.left-2,thumbSize-2);
NtUserCreateCaret( hwnd, (HBITMAP)1, rect.right - rect.left - 2, thumbSize - 2);
SetCaretPos(rect.top+1, thumbPos+1);
}
ShowCaret(hwnd);
NtUserShowCaret( hwnd );
}
break;
......@@ -1506,7 +1506,7 @@ LRESULT WINAPI USER_ScrollBarProc( HWND hwnd, UINT message, WPARAM wParam, LPARA
rect.top=thumbPos+1;
rect.bottom=rect.top+thumbSize;
}
HideCaret(hwnd);
NtUserHideCaret( hwnd );
InvalidateRect(hwnd,&rect,0);
DestroyCaret();
}
......
......@@ -86,7 +86,7 @@
@ stdcall CountClipboardFormats() NtUserCountClipboardFormats
@ stdcall CreateAcceleratorTableA(ptr long)
@ stdcall CreateAcceleratorTableW(ptr long) NtUserCreateAcceleratorTable
@ stdcall CreateCaret(long long long long)
@ stdcall CreateCaret(long long long long) NtUserCreateCaret
@ stdcall CreateCursor(long long long long long ptr ptr)
@ stdcall CreateDesktopA(str str ptr long long ptr)
@ stdcall CreateDesktopW(wstr wstr ptr long long ptr)
......@@ -259,8 +259,8 @@
@ stdcall GetAutoRotationState(ptr)
@ stdcall GetAwarenessFromDpiAwarenessContext(long)
@ stdcall GetCapture()
@ stdcall GetCaretBlinkTime()
@ stdcall GetCaretPos(ptr)
@ stdcall GetCaretBlinkTime() NtUserGetCaretBlinkTime
@ stdcall GetCaretPos(ptr) NtUserGetCaretPos
@ stdcall GetClassInfoA(long str ptr)
@ stdcall GetClassInfoExA(long str ptr)
@ stdcall GetClassInfoExW(long wstr ptr)
......@@ -425,7 +425,7 @@
@ stdcall GrayStringA(long long ptr long long long long long long)
@ stdcall GrayStringW(long long ptr long long long long long long)
# @ stub HasSystemSleepStarted
@ stdcall HideCaret(long)
@ stdcall HideCaret(long) NtUserHideCaret
@ stdcall HiliteMenuItem(long long long long)
# @ stub IMPGetIMEA
# @ stub IMPGetIMEW
......@@ -736,7 +736,7 @@
@ stdcall SetWindowsHookExA(long long long long)
@ stdcall SetWindowsHookExW(long long long long)
@ stdcall SetWindowsHookW(long ptr)
@ stdcall ShowCaret(long)
@ stdcall ShowCaret(long) NtUserShowCaret
@ stdcall -import ShowCursor(long) NtUserShowCursor
@ stdcall ShowOwnedPopups(long long)
@ stdcall ShowScrollBar(long long long)
......
......@@ -161,13 +161,10 @@ static const struct user_callbacks user_funcs =
{
AdjustWindowRectEx,
CopyImage,
DestroyCaret,
EndMenu,
HideCaret,
ImmProcessKey,
ImmTranslateMessage,
SetSystemMenu,
ShowCaret,
free_menu_items,
free_win_ptr,
MENU_IsMenuActive,
......@@ -177,7 +174,6 @@ static const struct user_callbacks user_funcs =
rawinput_device_get_usages,
register_builtin_classes,
SCROLL_SetStandardScrollPainted,
toggle_caret,
unpack_dde_message,
register_imm,
unregister_imm,
......
......@@ -101,7 +101,6 @@ extern HBRUSH SYSCOLOR_Get55AABrush(void) DECLSPEC_HIDDEN;
extern void SYSPARAMS_Init(void) DECLSPEC_HIDDEN;
extern void USER_CheckNotLock(void) DECLSPEC_HIDDEN;
extern BOOL USER_IsExitingThread( DWORD tid ) DECLSPEC_HIDDEN;
extern void CDECL toggle_caret( HWND hwnd ) DECLSPEC_HIDDEN;
typedef LRESULT (*winproc_callback_t)( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp,
LRESULT *result, void *arg );
......
......@@ -1340,7 +1340,7 @@ HDC WINAPI NtUserBeginPaint( HWND hwnd, PAINTSTRUCT *ps )
RECT rect;
UINT flags = UPDATE_NONCLIENT | UPDATE_ERASE | UPDATE_PAINT | UPDATE_INTERNALPAINT | UPDATE_NOCHILDREN;
if (user_callbacks) user_callbacks->pHideCaret( hwnd );
NtUserHideCaret( hwnd );
if (!(hrgn = send_ncpaint( hwnd, NULL, &flags ))) return 0;
......@@ -1364,7 +1364,7 @@ HDC WINAPI NtUserBeginPaint( HWND hwnd, PAINTSTRUCT *ps )
*/
BOOL WINAPI NtUserEndPaint( HWND hwnd, const PAINTSTRUCT *ps )
{
if (user_callbacks) user_callbacks->pShowCaret( hwnd );
NtUserShowCaret( hwnd );
flush_window_surfaces( FALSE );
if (!ps) return FALSE;
release_dc( hwnd, ps->hdc, TRUE );
......
......@@ -1147,6 +1147,7 @@ static struct unix_funcs unix_funcs =
NtUserClipCursor,
NtUserCloseClipboard,
NtUserCountClipboardFormats,
NtUserCreateCaret,
NtUserCreateWindowEx,
NtUserDeferWindowPosAndBand,
NtUserDestroyCursor,
......@@ -1178,6 +1179,7 @@ static struct unix_funcs unix_funcs =
NtUserGetUpdateRect,
NtUserGetUpdateRgn,
NtUserGetUpdatedClipboardFormats,
NtUserHideCaret,
NtUserIsClipboardFormatAvailable,
NtUserMapVirtualKeyEx,
NtUserMessageCall,
......@@ -1214,6 +1216,7 @@ static struct unix_funcs unix_funcs =
NtUserSetWindowPos,
NtUserSetWindowRgn,
NtUserSetWindowWord,
NtUserShowCaret,
NtUserShowCursor,
NtUserShowWindow,
NtUserShowWindowAsync,
......
......@@ -2474,8 +2474,7 @@ LRESULT dispatch_message( const MSG *msg, BOOL ansi )
switch (msg->wParam)
{
case SYSTEM_TIMER_CARET:
if (!user_callbacks) break;
user_callbacks->toggle_caret( msg->hwnd );
toggle_caret( msg->hwnd );
return 0;
case SYSTEM_TIMER_TRACK_MOUSE:
......
......@@ -34,13 +34,10 @@ struct user_callbacks
{
BOOL (WINAPI *pAdjustWindowRectEx)( RECT *, DWORD, BOOL, DWORD );
HANDLE (WINAPI *pCopyImage)( HANDLE, UINT, INT, INT, UINT );
BOOL (WINAPI *pDestroyCaret)(void);
BOOL (WINAPI *pEndMenu)(void);
BOOL (WINAPI *pHideCaret)( HWND hwnd );
BOOL (WINAPI *pImmProcessKey)(HWND, HKL, UINT, LPARAM, DWORD);
BOOL (WINAPI *pImmTranslateMessage)(HWND, UINT, WPARAM, LPARAM);
BOOL (WINAPI *pSetSystemMenu)( HWND hwnd, HMENU menu );
BOOL (WINAPI *pShowCaret)( HWND hwnd );
void (CDECL *free_menu_items)( void *ptr );
void (CDECL *free_win_ptr)( struct tagWND *win );
HWND (CDECL *is_menu_active)(void);
......@@ -51,7 +48,6 @@ struct user_callbacks
BOOL (CDECL *rawinput_device_get_usages)(HANDLE handle, USHORT *usage_page, USHORT *usage);
void (CDECL *register_builtin_classes)(void);
void (WINAPI *set_standard_scroll_painted)( HWND hwnd, INT bar, BOOL visible );
void (CDECL *toggle_caret)( HWND hwnd );
BOOL (CDECL *unpack_dde_message)( HWND hwnd, UINT message, WPARAM *wparam, LPARAM *lparam,
void **buffer, size_t size );
BOOL (WINAPI *register_imm)( HWND hwnd );
......
......@@ -119,6 +119,8 @@ static void * const syscalls[] =
NtUserFindWindowEx,
NtUserGetAncestor,
NtUserGetAtomName,
NtUserGetCaretBlinkTime,
NtUserGetCaretPos,
NtUserGetClassName,
NtUserGetClipboardFormatName,
NtUserGetClipboardOwner,
......
......@@ -4653,6 +4653,9 @@ ULONG_PTR WINAPI NtUserCallNoParam( ULONG code )
{
switch(code)
{
case NtUserCallNoParam_DestroyCaret:
return destroy_caret();
case NtUserCallNoParam_GetDesktopWindow:
return HandleToUlong( get_desktop_window() );
......@@ -4744,6 +4747,9 @@ ULONG_PTR WINAPI NtUserCallOneParam( ULONG_PTR arg, ULONG code )
case NtUserCallOneParam_MessageBeep:
return message_beep( arg );
case NtUserCallOneParam_SetCaretBlinkTime:
return set_caret_blink_time( arg );
/* temporary exports */
case NtUserCallHooks:
{
......@@ -4800,6 +4806,9 @@ ULONG_PTR WINAPI NtUserCallTwoParam( ULONG_PTR arg1, ULONG_PTR arg2, ULONG code
case NtUserCallTwoParam_ReplyMessage:
return reply_message_result( arg1, (MSG *)arg2 );
case NtUserCallTwoParam_SetCaretPos:
return set_caret_pos( arg1, arg2 );
case NtUserCallTwoParam_SetIconParam:
return set_icon_param( UlongToHandle(arg1), arg2 );
......
......@@ -807,7 +807,7 @@
@ stdcall -syscall NtUserCreateAcceleratorTable(ptr long)
@ stub NtUserCreateActivationGroup
@ stub NtUserCreateActivationObject
@ stub NtUserCreateCaret
@ stdcall NtUserCreateCaret(long long long long)
@ stub NtUserCreateDCompositionHwndTarget
@ stdcall -syscall NtUserCreateDesktopEx(ptr ptr ptr long long long)
@ stub NtUserCreateEmptyCursorObject
......@@ -896,8 +896,8 @@
@ stub NtUserGetAutoRotationState
@ stub NtUserGetCIMSSM
@ stub NtUserGetCPD
@ stub NtUserGetCaretBlinkTime
@ stub NtUserGetCaretPos
@ stdcall -syscall NtUserGetCaretBlinkTime()
@ stdcall -syscall NtUserGetCaretPos(ptr)
@ stdcall NtUserGetClassInfoEx(ptr ptr ptr ptr long)
@ stdcall -syscall NtUserGetClassName(long long ptr)
@ stub NtUserGetClipCursor
......@@ -1020,7 +1020,7 @@
@ stub NtUserGhostWindowFromHungWindow
@ stub NtUserHandleDelegatedInput
@ stub NtUserHardErrorControl
@ stub NtUserHideCaret
@ stdcall NtUserHideCaret(long)
@ stub NtUserHidePointerContactVisualization
@ stub NtUserHiliteMenuItem
@ stub NtUserHungWindowFromGhostWindow
......@@ -1257,7 +1257,7 @@
@ stdcall NtUserSetWindowWord(long long long)
@ stub NtUserSetWindowsHookAW
@ stdcall -syscall NtUserSetWindowsHookEx(ptr ptr long long ptr long)
@ stub NtUserShowCaret
@ stdcall NtUserShowCaret(long)
@ stdcall NtUserShowCursor(long)
@ stub NtUserShowScrollBar
@ stub NtUserShowSystemCursor
......
......@@ -197,6 +197,7 @@ struct unix_funcs
BOOL (WINAPI *pNtUserClipCursor)( const RECT *rect );
BOOL (WINAPI *pNtUserCloseClipboard)(void);
INT (WINAPI *pNtUserCountClipboardFormats)(void);
BOOL (WINAPI *pNtUserCreateCaret)( HWND hwnd, HBITMAP bitmap, int width, int height );
HWND (WINAPI *pNtUserCreateWindowEx)( DWORD ex_style, UNICODE_STRING *class_name,
UNICODE_STRING *version, UNICODE_STRING *window_name,
DWORD style, INT x, INT y, INT width, INT height,
......@@ -240,6 +241,7 @@ struct unix_funcs
BOOL (WINAPI *pNtUserGetUpdateRect)( HWND hwnd, RECT *rect, BOOL erase );
INT (WINAPI *pNtUserGetUpdateRgn)( HWND hwnd, HRGN hrgn, BOOL erase );
BOOL (WINAPI *pNtUserGetUpdatedClipboardFormats)( UINT *formats, UINT size, UINT *out_size );
BOOL (WINAPI *pNtUserHideCaret)( HWND hwnd );
BOOL (WINAPI *pNtUserIsClipboardFormatAvailable)( UINT format );
UINT (WINAPI *pNtUserMapVirtualKeyEx)( UINT code, UINT type, HKL layout );
LRESULT (WINAPI *pNtUserMessageCall)( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam,
......@@ -284,6 +286,7 @@ struct unix_funcs
BOOL (WINAPI *pNtUserSetWindowPos)( HWND hwnd, HWND after, INT x, INT y, INT cx, INT cy, UINT flags );
int (WINAPI *pNtUserSetWindowRgn)( HWND hwnd, HRGN hrgn, BOOL redraw );
WORD (WINAPI *pNtUserSetWindowWord)( HWND hwnd, INT offset, WORD newval );
BOOL (WINAPI *pNtUserShowCaret)( HWND hwnd );
INT (WINAPI *pNtUserShowCursor)( BOOL show );
BOOL (WINAPI *pNtUserShowWindow)( HWND hwnd, INT cmd );
BOOL (WINAPI *pNtUserShowWindowAsync)( HWND hwnd, INT cmd );
......@@ -354,6 +357,7 @@ extern LRESULT call_hooks( INT id, INT code, WPARAM wparam, LPARAM lparam, BOOL
extern BOOL unhook_windows_hook( INT id, HOOKPROC proc ) DECLSPEC_HIDDEN;
/* input.c */
extern BOOL destroy_caret(void) DECLSPEC_HIDDEN;
extern LONG global_key_state_counter DECLSPEC_HIDDEN;
extern HWND get_active_window(void) DECLSPEC_HIDDEN;
extern HWND get_capture(void) DECLSPEC_HIDDEN;
......@@ -362,7 +366,10 @@ extern HWND get_focus(void) DECLSPEC_HIDDEN;
extern DWORD get_input_state(void) DECLSPEC_HIDDEN;
extern BOOL WINAPI release_capture(void) DECLSPEC_HIDDEN;
extern BOOL set_capture_window( HWND hwnd, UINT gui_flags, HWND *prev_ret ) DECLSPEC_HIDDEN;
extern BOOL set_caret_blink_time( unsigned int time ) DECLSPEC_HIDDEN;
extern BOOL set_caret_pos( int x, int y ) DECLSPEC_HIDDEN;
extern BOOL set_foreground_window( HWND hwnd, BOOL mouse ) DECLSPEC_HIDDEN;
extern void toggle_caret( HWND hwnd ) DECLSPEC_HIDDEN;
extern void update_mouse_tracking_info( HWND hwnd ) DECLSPEC_HIDDEN;
/* menu.c */
......
......@@ -3307,13 +3307,10 @@ BOOL set_window_pos( WINDOWPOS *winpos, int parent_x, int parent_y )
&new_window_rect, &new_client_rect, valid_rects ))
goto done;
if (user_callbacks)
{
if (winpos->flags & SWP_HIDEWINDOW)
user_callbacks->pHideCaret( winpos->hwnd );
else if (winpos->flags & SWP_SHOWWINDOW)
user_callbacks->pShowCaret( winpos->hwnd );
}
if (winpos->flags & SWP_HIDEWINDOW)
NtUserHideCaret( winpos->hwnd );
else if (winpos->flags & SWP_SHOWWINDOW)
NtUserShowCaret( winpos->hwnd );
if (!(winpos->flags & (SWP_NOACTIVATE|SWP_HIDEWINDOW)))
{
......@@ -4407,7 +4404,7 @@ static void send_destroy_message( HWND hwnd )
info.cbSize = sizeof(info);
if (NtUserGetGUIThreadInfo( GetCurrentThreadId(), &info ))
{
if (hwnd == info.hwndCaret && user_callbacks) user_callbacks->pDestroyCaret();
if (hwnd == info.hwndCaret) destroy_caret();
if (hwnd == info.hwndActive) activate_other_window( hwnd );
}
......
......@@ -780,6 +780,12 @@ INT WINAPI NtUserCountClipboardFormats(void)
return unix_funcs->pNtUserCountClipboardFormats();
}
BOOL WINAPI NtUserCreateCaret( HWND hwnd, HBITMAP bitmap, int width, int height )
{
if (!unix_funcs) return 0;
return unix_funcs->pNtUserCreateCaret( hwnd, bitmap, width, height );
}
HWND WINAPI NtUserCreateWindowEx( DWORD ex_style, UNICODE_STRING *class_name,
UNICODE_STRING *version, UNICODE_STRING *window_name,
DWORD style, INT x, INT y, INT width, INT height,
......@@ -957,6 +963,12 @@ INT WINAPI NtUserGetUpdateRgn( HWND hwnd, HRGN hrgn, BOOL erase )
return unix_funcs->pNtUserGetUpdateRgn( hwnd, hrgn, erase );
}
BOOL WINAPI NtUserHideCaret( HWND hwnd )
{
if (!unix_funcs) return FALSE;
return unix_funcs->pNtUserHideCaret( hwnd );
}
BOOL WINAPI NtUserMoveWindow( HWND hwnd, INT x, INT y, INT cx, INT cy, BOOL repaint )
{
if (!unix_funcs) return 0;
......@@ -1197,6 +1209,12 @@ WORD WINAPI NtUserSetWindowWord( HWND hwnd, INT offset, WORD newval )
return unix_funcs->pNtUserSetWindowWord( hwnd, offset, newval );
}
BOOL WINAPI NtUserShowCaret( HWND hwnd )
{
if (!unix_funcs) return FALSE;
return unix_funcs->pNtUserShowCaret( hwnd );
}
INT WINAPI NtUserShowCursor( BOOL show )
{
if (!unix_funcs) return 0;
......
......@@ -106,6 +106,8 @@
SYSCALL_ENTRY( NtUserFindWindowEx ) \
SYSCALL_ENTRY( NtUserGetAncestor ) \
SYSCALL_ENTRY( NtUserGetAtomName ) \
SYSCALL_ENTRY( NtUserGetCaretBlinkTime ) \
SYSCALL_ENTRY( NtUserGetCaretPos ) \
SYSCALL_ENTRY( NtUserGetClassName ) \
SYSCALL_ENTRY( NtUserGetClipboardFormatName ) \
SYSCALL_ENTRY( NtUserGetClipboardOwner ) \
......
......@@ -608,6 +608,18 @@ NTSTATUS WINAPI wow64_NtUserKillTimer( UINT *args )
return NtUserKillTimer( hwnd, id );
}
NTSTATUS WINAPI wow64_NtUserGetCaretBlinkTime( UINT *args )
{
return NtUserGetCaretBlinkTime();
}
NTSTATUS WINAPI wow64_NtUserGetCaretPos( UINT *args )
{
POINT *pt = get_ptr( &args );
return NtUserGetCaretPos( pt );
}
NTSTATUS WINAPI wow64_NtUserCopyAcceleratorTable( UINT *args )
{
HACCEL src = get_handle( &args );
......
......@@ -463,6 +463,7 @@ BOOL WINAPI NtUserCloseWindowStation( HWINSTA handle );
INT WINAPI NtUserCopyAcceleratorTable( HACCEL src, ACCEL *dst, INT count );
INT WINAPI NtUserCountClipboardFormats(void);
HACCEL WINAPI NtUserCreateAcceleratorTable( ACCEL *table, INT count );
BOOL WINAPI NtUserCreateCaret( HWND hwnd, HBITMAP bitmap, int width, int height );
HDESK WINAPI NtUserCreateDesktopEx( OBJECT_ATTRIBUTES *attr, UNICODE_STRING *device,
DEVMODEW *devmode, DWORD flags, ACCESS_MASK access,
ULONG heap_size );
......@@ -500,6 +501,8 @@ BOOL WINAPI NtUserFlashWindowEx( FLASHWINFO *info );
HWND WINAPI NtUserGetAncestor( HWND hwnd, UINT type );
SHORT WINAPI NtUserGetAsyncKeyState( INT key );
ULONG WINAPI NtUserGetAtomName( ATOM atom, UNICODE_STRING *name );
UINT WINAPI NtUserGetCaretBlinkTime(void);
BOOL WINAPI NtUserGetCaretPos( POINT *point );
ATOM WINAPI NtUserGetClassInfoEx( HINSTANCE instance, UNICODE_STRING *name, WNDCLASSEXW *wc,
struct client_menu_name *menu_name, BOOL ansi );
INT WINAPI NtUserGetClassName( HWND hwnd, BOOL real, UNICODE_STRING *name );
......@@ -547,6 +550,7 @@ INT WINAPI NtUserGetUpdateRgn( HWND hwnd, HRGN hrgn, BOOL erase );
BOOL WINAPI NtUserGetUpdatedClipboardFormats( UINT *formats, UINT size, UINT *out_size );
BOOL WINAPI NtUserGetUpdateRect( HWND hwnd, RECT *rect, BOOL erase );
int WINAPI NtUserGetWindowRgnEx( HWND hwnd, HRGN hrgn, UINT unk );
BOOL WINAPI NtUserHideCaret( HWND hwnd );
NTSTATUS WINAPI NtUserInitializeClientPfnArrays( const struct user_client_procs *client_procsA,
const struct user_client_procs *client_procsW,
const void *client_workers, HINSTANCE user_module );
......@@ -616,6 +620,7 @@ HHOOK WINAPI NtUserSetWindowsHookEx( HINSTANCE inst, UNICODE_STRING *module, D
HWINEVENTHOOK WINAPI NtUserSetWinEventHook( DWORD event_min, DWORD event_max, HMODULE inst,
UNICODE_STRING *module, WINEVENTPROC proc,
DWORD pid, DWORD tid, DWORD flags );
BOOL WINAPI NtUserShowCaret( HWND hwnd );
INT WINAPI NtUserShowCursor( BOOL show );
BOOL WINAPI NtUserShowWindow( HWND hwnd, INT cmd );
BOOL WINAPI NtUserShowWindowAsync( HWND hwnd, INT cmd );
......@@ -643,6 +648,7 @@ HWND WINAPI NtUserWindowFromPoint( LONG x, LONG y );
/* NtUserCallNoParam codes, not compatible with Windows */
enum
{
NtUserCallNoParam_DestroyCaret,
NtUserCallNoParam_GetDesktopWindow,
NtUserCallNoParam_GetInputState,
NtUserCallNoParam_ReleaseCapture,
......@@ -651,6 +657,11 @@ enum
NtUserThreadDetach,
};
static inline BOOL NtUserDestroyCaret(void)
{
return NtUserCallNoParam( NtUserCallNoParam_DestroyCaret );
}
static inline HWND NtUserGetDesktopWindow(void)
{
return UlongToHandle( NtUserCallNoParam( NtUserCallNoParam_GetDesktopWindow ));
......@@ -688,6 +699,7 @@ enum
NtUserCallOneParam_IsWindowRectFullScreen,
NtUserCallOneParam_MessageBeep,
NtUserCallOneParam_RealizePalette,
NtUserCallOneParam_SetCaretBlinkTime,
/* temporary exports */
NtUserCallHooks,
NtUserGetDeskPattern,
......@@ -754,6 +766,11 @@ static inline RECT NtUserGetPrimaryMonitorRect(void)
return primary;
}
static inline BOOL NtUserSetCaretBlinkTime( unsigned int time )
{
return NtUserCallOneParam( time, NtUserCallOneParam_SetCaretBlinkTime );
}
static inline COLORREF NtUserGetSysColor( INT index )
{
return NtUserCallOneParam( index, NtUserCallOneParam_GetSysColor );
......@@ -804,6 +821,7 @@ enum
NtUserCallTwoParam_GetSystemMetricsForDpi,
NtUserCallTwoParam_MonitorFromRect,
NtUserCallTwoParam_ReplyMessage,
NtUserCallTwoParam_SetCaretPos,
NtUserCallTwoParam_SetIconParam,
NtUserCallTwoParam_UnhookWindowsHook,
/* temporary exports */
......@@ -839,6 +857,11 @@ static inline BOOL NtUserReplyMessage( LRESULT result, MSG *msg )
return NtUserCallTwoParam( result, (UINT_PTR)msg, NtUserCallTwoParam_ReplyMessage );
}
static inline BOOL NtUserSetCaretPos( int x, int y )
{
return NtUserCallTwoParam( x, y, NtUserCallTwoParam_SetCaretPos );
}
static inline UINT_PTR NtUserSetIconParam( HICON icon, ULONG_PTR param )
{
return NtUserCallTwoParam( HandleToUlong(icon), param, NtUserCallTwoParam_SetIconParam );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment