- Separation of clipboard routines in win32k.

- Call NtUser* for clipboard functions in user32.
- Minor correction for SetCaretBlinkTime.
- Removed empty userobj.c file.

svn path=/trunk/; revision=7018
This commit is contained in:
Filip Navara 2003-12-14 12:39:32 +00:00
parent 5b81f371b6
commit 09feaad3e1
9 changed files with 288 additions and 353 deletions

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/ */
/* $Id: caret.c,v 1.4 2003/10/17 20:50:59 weiden Exp $ /* $Id: caret.c,v 1.5 2003/12/14 12:39:32 navaraf Exp $
* *
* PROJECT: ReactOS user32.dll * PROJECT: ReactOS user32.dll
* FILE: lib/user32/windows/caret.c * FILE: lib/user32/windows/caret.c
@ -120,7 +120,7 @@ HideCaret(HWND hWnd)
WINBOOL STDCALL WINBOOL STDCALL
SetCaretBlinkTime(UINT uMSeconds) SetCaretBlinkTime(UINT uMSeconds)
{ {
return (WINBOOL)NtUserCallOneParam(ONEPARAM_ROUTINE_SETCARETBLINKTIME, (DWORD)uMSeconds); return (WINBOOL)NtUserCallOneParam((DWORD)uMSeconds, ONEPARAM_ROUTINE_SETCARETBLINKTIME);
} }

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/ */
/* $Id: clipboard.c,v 1.5 2003/07/10 21:04:31 chorns Exp $ /* $Id: clipboard.c,v 1.6 2003/12/14 12:39:32 navaraf Exp $
* *
* PROJECT: ReactOS user32.dll * PROJECT: ReactOS user32.dll
* FILE: lib/user32/windows/input.c * FILE: lib/user32/windows/input.c
@ -31,251 +31,190 @@
#include <windows.h> #include <windows.h>
#include <user32.h> #include <user32.h>
#include <debug.h> #include <debug.h>
#include <strpool.h>
/* FUNCTIONS *****************************************************************/ /* FUNCTIONS *****************************************************************/
/* /*
* @unimplemented * @implemented
*/ */
WINBOOL WINBOOL STDCALL
STDCALL OpenClipboard(HWND hWndNewOwner)
{
return NtUserOpenClipboard(hWndNewOwner, 0);
}
/*
* @implemented
*/
WINBOOL STDCALL
CloseClipboard(VOID) CloseClipboard(VOID)
{ {
UNIMPLEMENTED; return NtUserCloseClipboard();
return FALSE;
} }
/* /*
* @unimplemented * @implemented
*/ */
int INT STDCALL
STDCALL
CountClipboardFormats(VOID) CountClipboardFormats(VOID)
{ {
UNIMPLEMENTED; return NtUserCountClipboardFormats();
return 0;
} }
/* /*
* @unimplemented * @implemented
*/ */
WINBOOL WINBOOL STDCALL
STDCALL
EmptyClipboard(VOID) EmptyClipboard(VOID)
{ {
UNIMPLEMENTED; return NtUserEmptyClipboard();
return FALSE;
} }
/* /*
* @unimplemented * @implemented
*/ */
UINT UINT STDCALL
STDCALL EnumClipboardFormats(UINT format)
EnumClipboardFormats(
UINT format)
{ {
UNIMPLEMENTED; return (UINT)NtUserCallOneParam(format, ONEPARAM_ROUTINE_ENUMCLIPBOARDFORMATS);
return 0;
} }
/* /*
* @unimplemented * @implemented
*/ */
HANDLE HANDLE STDCALL
STDCALL GetClipboardData(UINT uFormat)
GetClipboardData(
UINT uFormat)
{ {
UNIMPLEMENTED; return NtUserGetClipboardData(uFormat, 0);
return (HANDLE)0;
} }
/* /*
* @unimplemented * @implemented
*/ */
int INT STDCALL
STDCALL GetClipboardFormatNameA(UINT format, LPSTR lpszFormatName, int cchMaxCount)
GetClipboardFormatNameA(
UINT format,
LPSTR lpszFormatName,
int cchMaxCount)
{ {
UNIMPLEMENTED; LPWSTR lpBuffer;
return 0; INT Length;
lpBuffer = HEAP_alloc(cchMaxCount * sizeof(WCHAR));
if (!lpBuffer)
{
SetLastError(ERROR_OUTOFMEMORY);
return 0;
}
Length = NtUserGetClipboardFormatName(format, lpBuffer, cchMaxCount);
HEAP_strcpyWtoA(lpszFormatName, lpBuffer, Length);
HEAP_free(lpBuffer);
return Length;
} }
/* /*
* @unimplemented * @implemented
*/ */
int INT STDCALL
STDCALL GetClipboardFormatNameW(UINT format, LPWSTR lpszFormatName, INT cchMaxCount)
GetClipboardFormatNameW(
UINT format,
LPWSTR lpszFormatName,
int cchMaxCount)
{ {
UNIMPLEMENTED; return NtUserGetClipboardFormatName(format, lpszFormatName, cchMaxCount);
return 0;
} }
/* /*
* @unimplemented * @implemented
*/ */
HWND HWND STDCALL
STDCALL
GetClipboardOwner(VOID) GetClipboardOwner(VOID)
{ {
UNIMPLEMENTED; return NtUserGetClipboardOwner();
return (HWND)0;
} }
/* /*
* @unimplemented * @implemented
*/ */
DWORD DWORD STDCALL
STDCALL
GetClipboardSequenceNumber(VOID) GetClipboardSequenceNumber(VOID)
{ {
UNIMPLEMENTED; return NtUserGetClipboardSequenceNumber();
return 0;
} }
/* /*
* @unimplemented * @implemented
*/ */
HWND HWND STDCALL
STDCALL
GetClipboardViewer(VOID) GetClipboardViewer(VOID)
{ {
UNIMPLEMENTED; return NtUserGetClipboardViewer();
return (HWND)0;
} }
/* /*
* @unimplemented * @implemented
*/ */
HWND HWND STDCALL
STDCALL
GetOpenClipboardWindow(VOID) GetOpenClipboardWindow(VOID)
{ {
UNIMPLEMENTED; return NtUserGetOpenClipboardWindow();
return (HWND)0;
} }
/* /*
* @unimplemented * @implemented
*/ */
int INT STDCALL
STDCALL GetPriorityClipboardFormat(UINT *paFormatPriorityList, INT cFormats)
GetPriorityClipboardFormat(
UINT *paFormatPriorityList,
int cFormats)
{ {
UNIMPLEMENTED; return NtUserGetPriorityClipboardFormat(paFormatPriorityList, cFormats);
return 0;
} }
/* /*
* @unimplemented * @implemented
*/ */
WINBOOL WINBOOL STDCALL
STDCALL IsClipboardFormatAvailable(UINT format)
IsClipboardFormatAvailable(
UINT format)
{ {
UNIMPLEMENTED; return NtUserIsClipboardFormatAvailable(format);
return FALSE;
} }
/* /*
* @unimplemented * @implemented
*/ */
WINBOOL UINT STDCALL
STDCALL RegisterClipboardFormatA(LPCSTR lpszFormat)
OpenClipboard(
HWND hWndNewOwner)
{ {
UNIMPLEMENTED; return RegisterWindowMessageA(lpszFormat);
return FALSE;
} }
/* /*
* @unimplemented * @implemented
*/ */
UINT UINT STDCALL
STDCALL RegisterClipboardFormatW(LPCWSTR lpszFormat)
RegisterClipboardFormatA(
LPCSTR lpszFormat)
{ {
UNIMPLEMENTED; return RegisterClipboardFormatW(lpszFormat);
return 0;
} }
/* /*
* @unimplemented * @implemented
*/ */
UINT HANDLE STDCALL
STDCALL SetClipboardData(UINT uFormat, HANDLE hMem)
RegisterClipboardFormatW(
LPCWSTR lpszFormat)
{ {
UNIMPLEMENTED; return NtUserSetClipboardData(uFormat, hMem, 0);
return 0;
} }
/* /*
* @unimplemented * @implemented
*/ */
HANDLE HWND STDCALL
STDCALL SetClipboardViewer(HWND hWndNewViewer)
SetClipboardData(
UINT uFormat,
HANDLE hMem)
{ {
UNIMPLEMENTED; return NtUserSetClipboardViewer(hWndNewViewer);
return (HANDLE)0;
} }
/* /*
* @unimplemented * @implemented
*/ */
HWND WINBOOL STDCALL
STDCALL ChangeClipboardChain(HWND hWndRemove, HWND hWndNewNext)
SetClipboardViewer(
HWND hWndNewViewer)
{ {
UNIMPLEMENTED; return NtUserChangeClipboardChain(hWndRemove, hWndNewNext);
return (HWND)0;
}
/*
* @unimplemented
*/
WINBOOL
STDCALL
ChangeClipboardChain(
HWND hWndRemove,
HWND hWndNewNext)
{
UNIMPLEMENTED;
return FALSE;
} }

View file

@ -0,0 +1,9 @@
#ifndef _WIN32K_CLIPBOARD_H
#define _WIN32K_CLIPBOARD_H
#include <windows.h>
UINT FASTCALL
IntEnumClipboardFormats(UINT format);
#endif /* _WIN32K_CLIPBOARD_H */

View file

@ -1,4 +1,4 @@
# $Id: makefile,v 1.88 2003/12/07 23:02:57 gvg Exp $ # $Id: makefile,v 1.89 2003/12/14 12:39:32 navaraf Exp $
PATH_TO_TOP = ../.. PATH_TO_TOP = ../..
@ -49,13 +49,13 @@ MISC_OBJECTS = misc/driver.o misc/error.o misc/math.o misc/object.o
LDR_OBJECTS = ldr/loader.o LDR_OBJECTS = ldr/loader.o
NTUSER_OBJECTS = ntuser/accelerator.o ntuser/callback.o ntuser/caret.o ntuser/class.o ntuser/focus.o \ NTUSER_OBJECTS = ntuser/accelerator.o ntuser/callback.o ntuser/caret.o ntuser/class.o \
ntuser/desktop.o ntuser/guicheck.o ntuser/hook.o ntuser/hotkey.o ntuser/input.o \ ntuser/clipboard.o ntuser/focus.o ntuser/desktop.o ntuser/guicheck.o \
ntuser/keyboard.o ntuser/menu.o ntuser/message.o ntuser/metric.o \ ntuser/hook.o ntuser/hotkey.o ntuser/input.o ntuser/keyboard.o \
ntuser/misc.o ntuser/msgqueue.o ntuser/painting.o ntuser/prop.o \ ntuser/menu.o ntuser/message.o ntuser/metric.o ntuser/misc.o \
ntuser/scrollbar.o ntuser/stubs.o ntuser/timer.o ntuser/userobj.o \ ntuser/msgqueue.o ntuser/painting.o ntuser/prop.o ntuser/scrollbar.o \
ntuser/vis.o ntuser/windc.o ntuser/window.o ntuser/winlock.o \ ntuser/stubs.o ntuser/timer.o ntuser/vis.o ntuser/windc.o \
ntuser/winpos.o ntuser/winsta.o ntuser/window.o ntuser/winlock.o ntuser/winpos.o ntuser/winsta.o
OBJECTS_OBJECTS = objects/bitmaps.o objects/brush.o objects/cliprgn.o \ OBJECTS_OBJECTS = objects/bitmaps.o objects/brush.o objects/cliprgn.o \
objects/color.o objects/coord.o objects/dc.o \ objects/color.o objects/coord.o objects/dc.o \

View file

@ -0,0 +1,174 @@
/*
* ReactOS W32 Subsystem
* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* PURPOSE: Clipboard routines
* FILE: subsys/win32k/ntuser/clipboard.c
* PROGRAMER: Filip Navara <xnavara@volny.cz>
*/
#include <include/clipboard.h>
#define NDEBUG
#include <debug.h>
#if 0
PW32THREAD ClipboardThread;
HWND ClipboardWindow;
#endif
UINT FASTCALL
IntEnumClipboardFormats(UINT format)
{
UNIMPLEMENTED;
return 0;
}
BOOL STDCALL
NtUserOpenClipboard(HWND hWnd, DWORD Unknown1)
{
#if 0
if (ClipboardThread && ClipboardThread != PsGetWin32Thread())
{
SetLastWin32Error(ERROR_LOCKED);
return FALSE;
}
ClipboardWindow = hWnd;
ClipboardThread = PsGetWin32Thread();
return TRUE;
#else
UNIMPLEMENTED
return FALSE;
#endif
}
BOOL STDCALL
NtUserCloseClipboard(VOID)
{
#if 0
if (ClipboardThread && ClipboardThread != PsGetWin32Thread())
{
SetLastWin32Error(ERROR_LOCKED);
return FALSE;
}
ClipboardWindow = 0;
ClipboardThread = NULL;
return TRUE;
#else
UNIMPLEMENTED
return FALSE;
#endif
}
/*
* @unimplemented
*/
HWND STDCALL
NtUserGetOpenClipboardWindow(VOID)
{
UNIMPLEMENTED
return 0;
}
BOOL STDCALL
NtUserChangeClipboardChain(HWND hWndRemove, HWND hWndNewNext)
{
UNIMPLEMENTED
return 0;
}
DWORD STDCALL
NtUserCountClipboardFormats(VOID)
{
UNIMPLEMENTED
return 0;
}
DWORD STDCALL
NtUserEmptyClipboard(VOID)
{
UNIMPLEMENTED
return 0;
}
HANDLE STDCALL
NtUserGetClipboardData(UINT uFormat, DWORD Unknown1)
{
UNIMPLEMENTED
return 0;
}
INT STDCALL
NtUserGetClipboardFormatName(UINT format, LPWSTR lpszFormatName,
INT cchMaxCount)
{
UNIMPLEMENTED
return 0;
}
HWND STDCALL
NtUserGetClipboardOwner(VOID)
{
UNIMPLEMENTED
return 0;
}
DWORD STDCALL
NtUserGetClipboardSequenceNumber(VOID)
{
UNIMPLEMENTED
return 0;
}
HWND STDCALL
NtUserGetClipboardViewer(VOID)
{
UNIMPLEMENTED
return 0;
}
INT STDCALL
NtUserGetPriorityClipboardFormat(UINT *paFormatPriorityList, INT cFormats)
{
UNIMPLEMENTED
return 0;
}
WINBOOL STDCALL
NtUserIsClipboardFormatAvailable(UINT format)
{
UNIMPLEMENTED
return 0;
}
HANDLE STDCALL
NtUserSetClipboardData(UINT uFormat, HANDLE hMem, DWORD Unknown2)
{
UNIMPLEMENTED
return 0;
}
HWND STDCALL
NtUserSetClipboardViewer(HWND hWndNewViewer)
{
UNIMPLEMENTED
return 0;
}
/* EOF */

View file

@ -1,4 +1,4 @@
/* $Id: misc.c,v 1.33 2003/12/13 15:49:32 weiden Exp $ /* $Id: misc.c,v 1.34 2003/12/14 12:39:32 navaraf Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -22,6 +22,7 @@
#include <include/caret.h> #include <include/caret.h>
#include <include/object.h> #include <include/object.h>
#include <include/focus.h> #include <include/focus.h>
#include <include/clipboard.h>
#define NDEBUG #define NDEBUG
#include <debug.h> #include <debug.h>
@ -156,6 +157,8 @@ NtUserCallOneParam(
case ONEPARAM_ROUTINE_SETCARETBLINKTIME: case ONEPARAM_ROUTINE_SETCARETBLINKTIME:
return (DWORD)IntSetCaretBlinkTime((UINT)Param); return (DWORD)IntSetCaretBlinkTime((UINT)Param);
case ONEPARAM_ROUTINE_ENUMCLIPBOARDFORMATS:
return (DWORD)IntEnumClipboardFormats((UINT)Param);
} }
DPRINT1("Calling invalid routine number 0x%x in NtUserCallOneParam()\n Param=0x%x\n", DPRINT1("Calling invalid routine number 0x%x in NtUserCallOneParam()\n Param=0x%x\n",
Routine, Param); Routine, Param);

View file

@ -1,4 +1,4 @@
/* $Id: stubs.c,v 1.41 2003/12/07 12:59:34 chorns Exp $ /* $Id: stubs.c,v 1.42 2003/12/14 12:39:32 navaraf Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -111,17 +111,6 @@ NtUserCallMsgFilter(
return 0; return 0;
} }
DWORD
STDCALL
NtUserChangeClipboardChain(
DWORD Unknown0,
DWORD Unknown1)
{
UNIMPLEMENTED
return 0;
}
LONG LONG
STDCALL STDCALL
NtUserChangeDisplaySettings( NtUserChangeDisplaySettings(
@ -136,15 +125,6 @@ NtUserChangeDisplaySettings(
return 0; return 0;
} }
DWORD
STDCALL
NtUserCloseClipboard(VOID)
{
UNIMPLEMENTED
return 0;
}
DWORD DWORD
STDCALL STDCALL
NtUserConvertMemHandle( NtUserConvertMemHandle(
@ -156,15 +136,6 @@ NtUserConvertMemHandle(
return 0; return 0;
} }
DWORD
STDCALL
NtUserCountClipboardFormats(VOID)
{
UNIMPLEMENTED
return 0;
}
DWORD DWORD
STDCALL STDCALL
NtUserCreateLocalMemHandle( NtUserCreateLocalMemHandle(
@ -273,15 +244,6 @@ NtUserDrawCaptionTemp(
return 0; return 0;
} }
DWORD
STDCALL
NtUserEmptyClipboard(VOID)
{
UNIMPLEMENTED
return 0;
}
WINBOOL WINBOOL
STDCALL STDCALL
NtUserEnumDisplayDevices ( NtUserEnumDisplayDevices (
@ -367,56 +329,6 @@ NtUserGetAsyncKeyState(
return 0; return 0;
} }
DWORD
STDCALL
NtUserGetClipboardData(
DWORD Unknown0,
DWORD Unknown1)
{
UNIMPLEMENTED
return 0;
}
DWORD
STDCALL
NtUserGetClipboardFormatName(
DWORD Unknown0,
DWORD Unknown1,
DWORD Unknown2)
{
UNIMPLEMENTED
return 0;
}
DWORD
STDCALL
NtUserGetClipboardOwner(VOID)
{
UNIMPLEMENTED
return 0;
}
DWORD
STDCALL
NtUserGetClipboardSequenceNumber(VOID)
{
UNIMPLEMENTED
return 0;
}
DWORD
STDCALL
NtUserGetClipboardViewer(VOID)
{
UNIMPLEMENTED
return 0;
}
DWORD DWORD
STDCALL STDCALL
NtUserGetComboBoxInfo( NtUserGetComboBoxInfo(
@ -523,17 +435,6 @@ NtUserGetMouseMovePointsEx(
return 0; return 0;
} }
DWORD
STDCALL
NtUserGetPriorityClipboardFormat(
DWORD Unknown0,
DWORD Unknown1)
{
UNIMPLEMENTED
return 0;
}
DWORD DWORD
STDCALL STDCALL
NtUserGetTitleBarInfo( NtUserGetTitleBarInfo(
@ -589,16 +490,6 @@ NtUserInitTask(
return 0; return 0;
} }
DWORD
STDCALL
NtUserIsClipboardFormatAvailable(
DWORD Unknown0)
{
UNIMPLEMENTED
return 0;
}
DWORD DWORD
STDCALL STDCALL
NtUserLoadKeyboardLayoutEx( NtUserLoadKeyboardLayoutEx(
@ -691,17 +582,6 @@ NtUserNotifyWinEvent(
return 0; return 0;
} }
DWORD
STDCALL
NtUserOpenClipboard(
DWORD Unknown0,
DWORD Unknown1)
{
UNIMPLEMENTED
return 0;
}
DWORD DWORD
STDCALL STDCALL
NtUserQueryUserCounters( NtUserQueryUserCounters(
@ -753,28 +633,6 @@ NtUserSendInput(
return 0; return 0;
} }
DWORD
STDCALL
NtUserSetClipboardData(
DWORD Unknown0,
DWORD Unknown1,
DWORD Unknown2)
{
UNIMPLEMENTED
return 0;
}
DWORD
STDCALL
NtUserSetClipboardViewer(
DWORD Unknown0)
{
UNIMPLEMENTED
return 0;
}
DWORD DWORD
STDCALL STDCALL
NtUserSetConsoleReserveKeys( NtUserSetConsoleReserveKeys(

View file

@ -1,36 +0,0 @@
/*
* ReactOS W32 Subsystem
* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/* $Id: userobj.c,v 1.3 2003/11/23 12:24:21 weiden Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* PURPOSE: USER Object counter
* FILE: subsys/win32k/ntuser/userobj.c
* PROGRAMER:
*
*/
#undef WIN32_LEAN_AND_MEAN
#include <windows.h>
#define NDEBUG
#include <debug.h>
#include <ddk/ntddk.h>
/* EOF */

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/ */
/* $Id: window.c,v 1.160 2003/12/14 11:36:43 gvg Exp $ /* $Id: window.c,v 1.161 2003/12/14 12:39:32 navaraf Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -1930,18 +1930,6 @@ NtUserGetLastActivePopup(HWND hWnd)
#endif #endif
} }
/*
* @unimplemented
*/
DWORD STDCALL
NtUserGetOpenClipboardWindow(VOID)
{
UNIMPLEMENTED
return 0;
}
/* /*
* NtUserGetParent * NtUserGetParent
* *